[vivace-graph-devel] triple-equal semantics

Kevin Raison raison at chatsubo.net
Sun Sep 4 21:27:19 UTC 2011


>From the github discussion:

Dan:
triple-equal implemented as v1 uuid comparison?
Does that yield the appropriate semantics? For example if i happen to
compare it with a triple with the same s p o from a different graph, i'd
expect them to unify. What prevents duplicate triples from leaking into
the same graph?

Kevin:
take a look at add-triple in triples.lisp to see how duplicates are
avoided. as for unification, there is not an easy answer to how triples
from different graphs should unify. calling the basic data type in VG a
triple is perhaps a misnomer; it is really a quint, with the graph as
one of the 5 slots (the other 4 being s, p, o and id). so, i think that
if you want to unify across graphs there should be some sort of special
functor for that purpose, otherwise you confound the notion of equality.
i see triple-equal as being more akin to Lisp's EQL, which compares
addresses and not content; the triple's uuid is essentially its address.
this is of course debatable and i am happy to hear dissenting opinions.
:) also, see the definitions of q-/4 and q-/3 in prolog-functors.lisp
for how unification is done.

Dan:
wouldn't that be more equivalent to triple-eq? You're only matching on a
single instance of the triple. If you delete (really delete i mean) and
re-add the same spog they wont be eql. wilbur interns quads by string
comparison of spo constituent node-uri and de.setf.resource does sha1
hex-id on the byte array. Well i'll play around & also make sure to join
the mailing list too.

Enjoy your vacation I look forward to talking again.


-K




More information about the vivace-graph-devel mailing list