Closed danlentz closed 13 years ago
Dan, would you mind bringing this discussion over the the mailing list? You can join it here: http://common-lisp.net/project/vivace-graph/
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.
-kevin
On 09/04/2011 03:12 AM, danlentz wrote:
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?
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.
Hi kraison and danlentz
I think there is room for lots of discussion around VG's triple-equality and I would love to contribute and learn more. Can we take this up on the vivace-graph-devel mailing list? Tracking communication on github across multiple repos and branches is a PITA :)
i just posted our discussion to the list.
LOL me too. Exactly why this interface is less than ideal :)
it looks like yours went through; i think the crappy wifi provider on the airplane is intercepting smtp traffic, so mine went into a black hole. thanks!
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?