Hello, I love this procedure, it has been very useful to test transformations from one graph to another. Although sometimes its not so easy (for me) to interpret the resulting graph differences, I think that is direct to adjust the output.
Thank you very much! Cristian. On Sat, Oct 17, 2009 at 8:01 PM, Ivan Mikhailov <[email protected]> wrote: > Aldo, > > The attached file contains an efficient procedure that keeps simple > cases of graphs with bnodes. First it compares all triples without > bnodes, then it iteratively establishes equivalences between bnodes that > are directly and unambiguously connected to equivalent vertexes by > identical predicates. > > Best Regards, > > Ivan Mikhailov > OpenLink Software > http://virtuoso.openlinksw.com > > On Tue, 2009-10-13 at 03:57 -0300, Aldo Bucchi wrote: >> Hi Ivan, >> >> On Sun, Oct 11, 2009 at 3:50 AM, Ivan Mikhailov >> <[email protected]> wrote: >> > Hello Aldo, >> > >> > Yes, some low-level tricks could be possible. But it depends on two >> > things. >> > >> > 1) What are sizes of graphs in question? >> >> Initially they will be small. 1000 triples or less. >> I want to use this for a minimalistic unit testing framework I am >> putting together. >> http://code.google.com/p/vunit/ >> >> Here's the specific piece where graph comparison should be >> http://code.google.com/p/vunit/source/browse/vunit.sql#181 >> >> I hope I can gain some insight on best practices you use at OLS when >> coding V PL by collaborating on this framework, so feel free to leave >> annotations (using that very same source browser) and/or clone the >> project to make modifications. >> This is something I put together in a couple of hours, so I really >> expect it to evolve quite a bit, and fast. >> >> We need it because coding in something as powerful as SPASQL with no >> IDE is suicide unless you test properly. >> >> > >> > 2) With BNodes, what's the needed criterion to decide wither two BNodes >> > are equivalent? >> >> Hmm. For my particular use case, I just figured I can abritrarily >> forget about bnodes ( at least for the first version ). >> However, I understand there is a formal algorithm for Graph >> equivalence, as per this spec doc: >> >> http://www.w3.org/TR/rdf-concepts/ >> >> [quote] >> 6.3 Graph Equivalence >> >> Two RDF graphs G and G' are equivalent if there is a bijection M >> between the sets of nodes of the two graphs, such that: >> >> 1. M maps blank nodes to blank nodes. >> 2. M(lit)=lit for all RDF literals lit which are nodes of G. >> 3. M(uri)=uri for all RDF URI references uri which are nodes of G. >> 4. The triple ( s, p, o ) is in G if and only if the triple ( M(s), >> p, M(o) ) is in G' >> >> With this definition, M shows how each blank node in G can be replaced >> with a new blank node to give G'. >> [endquote] >> >> Regards, >> A >> >> > >> > Best Regards, >> > >> > Ivan Mikhailov >> > OpenLink Software >> > http://virtuoso.openlinksw.com >> > >> > On Sun, 2009-10-11 at 02:07 -0300, Aldo Bucchi wrote: >> >> Hi, >> >> >> >> What would be a PERFORMANT way of testing graph equality for two >> >> graphs in the Quad store? >> >> * A: without BNodes >> >> * B: with BNodes >> >> >> >> I am now using SPARUL and temp graphs to generate a diff, but I >> >> imagine there is a better way ( using low level APIs perhaps? ). >> >> >> >> Regards, >> >> A >> >> >> > >> > >> >> >> > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Virtuoso-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/virtuoso-users > >
