[foaf-protocols] [foaf-dev] Graph Diffs, objects and meaning

Story Henry henry.story at bblfish.net
Sun Apr 18 01:26:26 CEST 2010


On 17 Apr 2010, at 22:16, Nathan wrote:

> All,
> 
> I made GUO with the intention that implementing diff creators and
> processors wouldn't need to know anything about semantics, inference,
> reasoning, or ontologies other than GUO.

that may be. But you still have to take into account what you mean 
when you say something, and at least one major way of finding out what 
something means, is to look at what is logically implied by what is said.
Logical implication is just the process of extracting meaning contained
in what is being stated.

This is the beauty of reasoning and the semantic layer. We can use logic
to help us test ontologies, verify that we mean what we say etc. It is
a fundamental tool in enabling us to better communicate. 

> 
> Negating any conversation about what the statements in a produced diff
> "mean", the fact is simply that they work and do the job, in all scenarios.

Only because you are the producer of the statements you feed your tools.
If we follow that reasoning we can make any word mean whatever
we want, Humpty Dumpty like. 

If you pursue your work a bit further you will notice that you wills soon 
try to make syntactic restrictions on what is being said. An clear example of
this in your work is that you seem to be requiring the object of guo:delete 
and guo:insert to be blank nodes.


> The task at hand was to take a graph contained in a document and turn it
> in to another; this is what it does; the resulting graphs are as
> expected in all cases.

that is what you want it to do, and it works because you are restricting
artificially how things are being said. 

Sorry to seem so harsh. Truth is often like that. As a community we should
have helped you spot these errors earlier. It is just that many of us are 
overwhelmed with work (even unemployed as I am) Clearly you put a lot of 
good effort into what you did. The criticism is not on you. It is just a 
basic logical problem that you  have encountered. I think once you have 
digested it, your next work will be very much better, as you will
have understood some key concepts in thinking and the semantic web.

> 
> Regardless though, I have my head stuck in my formal logic, graph and
> set theory books and will (hopefully) come back with some formal proof
> that it works and doesn't infer that _:d1 owl:sameAs _:i1 - and rather
> that the following:

Ok! :-) That is the right attitude. By the way, if there is a semantics document 
for SPARQL you should perhaps look at that.

Also look at the early parts of the RDF Semantics document.



> @prefix guo: <http://webr3.org/owl/guo#> .
> @prefix dcterms: <http://purl.org/dc/terms/> .
> 
> _:u1 a guo:UpdateInstruction ;
>     guo:target_graph <http://webr3.org> ;
>     guo:target_subject <http://foaf.me/bblfish#me> ;
>     guo:delete _:d1 ;
>     guo:insert _:i2 .
> 
> _:d1 owl:sameAs <http://spammer.com/12312412#me> .
> 
> _:i2 owl:sameAs <http://bblfish.net/#hjs>;
>     foaf:knows <http://webr3.org/#nathan> .
> 
> should be interpreted as:
> 
> for the object identified by <http://foaf.me/bblfish#me> within the
> graph <http://webr3.org> assert that:
> { <http://foaf.me/bblfish#me> owl:sameAs
> <http://spammer.com/12312412#me> } is false, and that {
> <http://foaf.me/bblfish#me> owl:sameAs <http://bblfish.net/#hjs> ;
> foaf:knows <http://webr3.org/#nathan> } is true, and update the graph
> identified by <http://webr3.org> to indicate such.

yes, that is what I undersood you to be intending.
Now I am not quite sure why you don't just use SPARUL, since it does this allready...

In RDF/XML if you want to stick to that, you can argue that you can make references to graphs
by the ^^rdf:XMLLiteral datatype. So you could just have a relation to a RDF literal of some
type to define what you want to add or delete. Note that quantification into the RDF literal is
not defined I think. So there I imagine you will won't be able to be as flexible as SPARUL.

> 
> further, before any processing the aforementioned rdf simply states that:
> 
> "some unidentified resource" is the owl:sameAs
> <http://spammer.com/12312412#me>.
> "some unidentified resource" is the owl:sameAs <http://bblfish.net/#hjs>
> and also foaf:knows <http://webr3.org/#nathan> 

If I tell you that there £(2+2) in my pocket, whether you do the inferencing
or not, that will be true just in case there are £4 pounds in my pocket.

Another way to think of it is that Truth and Falsity apply to sentences, not to 
objects. Above you correctly put brackets around your statement when applying the
is False predicate. It is not objects that are false, but sentences.

Similarly if a document G contains information such as 

@prefix math: <http://www.w3.org/2000/10/swap/math#>.

G { 
  ( 2 2 ) sum 5 . 
} 

which is wrong, ie G a log:Falsehood .

and you want to change it, then you want to remove not the object 5 but the relation between
the list and 5.

Ok, enough of this, I tink you'll be able to work out the rest.

	Henry



What you want is those inferences not to matter, which is why you need to quote 
your sentences. 


> Best,
> 
> Nathan
> 
> 
> Reto Bachmann-Gmür wrote:
>> Missed the Nathan's diff ontology. It seems the goals are close to my
>> diff/patch work with eventually led to the graph versioning system gvs
>> and its related ontology available at
>> http://jena.svn.sourceforge.net/viewvc/jena/gvs/trunk/rdf/metamodel.rdf
>> 
>> A major issue I don't exactly see how it is addressed by GUO is the
>> scope of bnode and their meaning in removal instruction.
>> 
>> [ a foaf:Person] means that there is something that is a foaf:Person.
>> But what does a remove operation with that triple mean? The negation
>> of the assertion would imply removing all foaf:PersonS, should just
>> the respective rdf:type statements be removed or the resources with
>> their context? if their type statement is to be removed we should also
>> consider properties which have a foaf:Person as domain or range as
>> their user would contradict the negation of  [ a foaf:Person].
>> 
>> Cheers,
>> reto
>> 
>> 
>> 
>> On Sat, Apr 17, 2010 at 2:20 PM, Story Henry <henry.story at bblfish.net> wrote:
>>> In another thread on this list we came across Nathan's Graph diffing
>>> ontology http://markmail.org/message/letornjov6wrofmx
>>> 
>>> It was sidetracking the thread on pinging, so I asked Nathan to bring it
>>> off list. I am probably a bit improperly bringing this back to the list,
>>> partly because I spent some time thinking about it in more detail, and because it is
>>> the kind of error that I think we need to be aware that a lot of people
>>> are going to make. All of programming in the 20th century has been in one
>>> way or another OO programming, that avoided engineers confronting the
>>> problem of belief states.
>>> 
>>> The semantic web brings this back, in a BIG way. Named Graphs are the key
>>> element to understanding this. This may lead some pessimists to
>>> say that this is a fatal flaw, that if engineers cannot understand this, the semweb
>>> will never get going! The thing is that 4 year old children understand it!
>>> We have just been moulded in our work into forgetting what we knew as kids.
>>> I explain this in more detail in "Are OO languages Autistic"
>>> 
>>>  http://blogs.sun.com/bblfish/entry/are_oo_languages_autistic
>>> 
>>> So it is really really important to understand that the fundamental distinction
>>> between objects and graphs, ie between speaking of things, and speaking of meaning.
>>> This is something that has been the core of debate in philosophy for the past 120
>>> years. A very lengthy summary of the philosophical debate on this issue can be found
>>> here
>>> 
>>>  http://plato.stanford.edu/entries/prop-attitude-reports/
>>> 
>>> (I am still reading it, the first few sections lay the foundations, which have to be understood)
>>> 
>>> In any case when making diffs of graphs, we are doing something that requires those same contexts, which
>>> in the semantic web we have called named graphs.
>>> 
>>> If you do not make such distinction then you get into errors such as the one described
>>> below
>>> 
>>> So we were looking at a diff such as
>>> 
>>> 
>>> @prefix guo: <http://webr3.org/owl/guo#> .
>>> @prefix dcterms: <http://purl.org/dc/terms/> .
>>> 
>>> _:u1 a guo:UpdateInstruction ;
>>>    guo:target_graph <http://webr3.org> ;
>>>    guo:target_subject <http://webr3.org/#nathan> ;
>>>    guo:delete _:d1 ;
>>>    guo:insert _:i2 .
>>> 
>>> _:d1 foaf:knows <http://bblfish.net/#hjs> .
>>> 
>>> _:i2 foaf:knows <http://bblfish.net/people/henry/card#me> .
>>> 
>>> 
>>> The above would be a request to change the relation of who nathan knew, by replacing
>>> foaf:knows relations to "http://bblfish.net/people/henry/card#me"
>>> with "http://bblfish.net/#hjs"
>>> 
>>> I pointed out that the definition of foaf:knows being
>>> 
>>> foaf:knows
>>>  a rdf:Property, owl:ObjectProperty ;
>>>  rdfs:comment "A person known by this person (indicating some level of reciprocated interaction between the parties)." ;
>>>  rdfs:domain foaf:Person ;
>>>  rdfs:isDefinedBy <http://xmlns.com/foaf/0.1/> ;
>>>  rdfs:label "knows" ;
>>>  rdfs:range foaf:Person ;
>>>  vs:term_status "testing" .
>>> 
>>> Now let us take the example
>>> 
>>> _:d1 foaf:knows <http://bblfish.net/#hjs> .
>>> 
>>> So because
>>> 
>>> foaf:knows rdfs:domain foaf:Person.
>>> 
>>> it follows that
>>> 
>>> _:d1 a foaf:Person.
>>> 
>>> but Nathan wants it to be
>>> 
>>> _:d1 a rdf:Statement
>>> 
>>> To this Nathan responded off list that
>>> 
>>> On 17 Apr 2010, at 01:42, Nathan wrote:
>>>> it's not rdf:Statement
>>>> _:d1 a rdfs:Resource .
>>>> 
>>>> so if:
>>>> _:d1 foaf:knows <http://bblfish.net/#hjs> .
>>>> then:
>>>> _:d1 a rdfs:Resource, foaf:Person .
>>> 
>>> Ok so to this I respond that _:d1 has to be an rdf:Statement !
>>> 
>>> You are not trying to delete objects are you? Because then the above would be a demand
>>> to kill someone :-) (only half kidding)
>>> 
>>> Let us improve the example a little bit to show why that does not work even more clearly
>>> 
>>> @prefix guo: <http://webr3.org/owl/guo#> .
>>> @prefix dcterms: <http://purl.org/dc/terms/> .
>>> 
>>> graph1:  {
>>> _:u1 a guo:UpdateInstruction ;
>>>    guo:target_graph <http://webr3.org> ;
>>>    guo:target_subject <http://foaf.me/bblfish#me> ;
>>>    guo:delete _:d1 ;
>>>    guo:insert _:i2 .
>>> 
>>> _:d1 owl:sameAs <http://spammer.com/12312412#me> .
>>> 
>>> _:i2 owl:sameAs <http://bblfish.net/#hjs>;
>>>    foaf:knows <http://webr3.org/#nathan> .
>>> }
>>> 
>>> 
>>> So you want to replace my long web id with my short one, and add that I know Nathan.
>>> 
>>> But semantically the above graph implies
>>> 
>>> _:d1 owl:sameAs _:i2 .
>>> 
>>> So that you should think of your graph as implying the following
>>> (logic does not add new facts, it just develops what is already there)
>>> 
>>> @prefix log: <http://www.w3.org/2000/10/swap/log#>.
>>> 
>>> graph1 log:implies {
>>> _:u1 a guo:UpdateInstruction ;
>>>     guo:target_graph <http://webr3.org> ;
>>>     guo:target_subject <http://foaf.me/bblfish#me> ;
>>>     guo:delete _:d1 ;
>>>     guo:insert _:i2 .
>>> 
>>> _:d1 owl:sameAs <http://spammer.com/12312412#me>;
>>>     foaf:knows <http://webr3.org/#nathan> .
>>> 
>>> _:i2 owl:sameAs _:i2 .
>>> }
>>> 
>>> So now on your interpretation the above is a request to delete all statements,
>>> and to insert none.
>>> 
>>> Similarly the original graph implies
>>> 
>>> graph1 log:implies {
>>> _:u1 a guo:UpdateInstruction ;
>>>     guo:target_graph <http://webr3.org> ;
>>>     guo:target_subject <http://foaf.me/bblfish#me> ;
>>>     guo:delete _:d1 ;
>>>     guo:insert _:i2 .
>>> 
>>> _:d1 owl:sameAs _:d1 .
>>> 
>>> _:i2 owl:sameAs <http://spammer.com/12312412#me> ;
>>>      owl:sameAs <http://bblfish.net/#hjs>;
>>>      foaf:knows <http://webr3.org/#nathan> .
>>> 
>>> }
>>> 
>>> Which means it implies the request according to your interpretation to
>>> delete no statements and to insert all statements.
>>> 
>>> But it also implies
>>> 
>>> graph1 log:implies {
>>> _:u1 a guo:UpdateInstruction ;
>>>     guo:target_graph <http://webr3.org> ;
>>>     guo:target_subject <http://foaf.me/bblfish#me> ;
>>>     guo:delete _:d1 ;
>>>     guo:insert _:i2 .
>>> 
>>> _:d1 owl:sameAs <http://spammer.com/12312412#me> ;
>>>      owl:sameAs <http://bblfish.net/#hjs>;
>>>      foaf:knows <http://webr3.org/#nathan> .
>>> 
>>> _:i2 owl:sameAs <http://spammer.com/12312412#me> ;
>>>      owl:sameAs <http://bblfish.net/#hjs>;
>>>      foaf:knows <http://webr3.org/#nathan> .
>>> }
>>> 
>>> Which according to your interpretation is a request to update and delete all those relations,
>>> ie to do nothing. ie, it implies
>>> 
>>> graph1 log:implies {
>>> _:u1 a guo:UpdateInstruction ;
>>>     guo:target_graph <http://webr3.org> ;
>>>     guo:target_subject <http://foaf.me/bblfish#me> ;
>>>     guo:delete _:d1 ;
>>>     guo:insert _:d1 .
>>> 
>>> _:d1 owl:sameAs _:d1 .
>>> }
>>> 
>>> 
>>> So it seems that the graph implies everything. When a graph implies everything it
>>> means that it contains a contradiction.
>>> 
>>>  Again this is an easy error to fall into, especially when one tries to
>>> formalize what we do intuitively every day, as one can see by following the discussion
>>> in philosophy of the past century.
>>> 
>>>  Keeping this in mind on the other hand should make a lot of problems a lot easier
>>> to solve. It's just a question of remembering what we all knew when we were 4.
>>> 
>>>       Henry
>>> 
>>> _______________________________________________
>>> foaf-dev mailing list
>>> foaf-dev at lists.foaf-project.org
>>> http://lists.foaf-project.org/mailman/listinfo/foaf-dev
>>> 
>> 
>> 
> 



More information about the foaf-protocols mailing list