kraison / vivace-graph-v2

Superceded by https://github.com/kraison/vivace-graph-v3 Open source Common Lisp graph database / RDF store / Prolog implementation. Supersedes http://github.com/kraison/vivace-graph.
Other
32 stars 6 forks source link

triple-equal implemented as v1 uuid comparison? #1

Closed danlentz closed 13 years ago

danlentz commented 13 years ago

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?

kraison commented 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/

kraison commented 13 years ago

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?

danlentz commented 13 years ago

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.

mon-key commented 13 years ago

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 :)

kraison commented 13 years ago

i just posted our discussion to the list.

mon-key commented 13 years ago

LOL me too. Exactly why this interface is less than ideal :)

kraison commented 13 years ago

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!