RE: unreification (long)

Folks, thanks for the responses.

If you have a web where you can assert anything about anything, can you have
a web where you can retract anything about anything as well?

Suppose we have the following similar setup as the one I first outlined:

	[einstein believes [god notplayswith dice]]

That maps into a set of statements (which I'll call a Model), using a new
Resource Rx, to:

	[einstein believes, Rx]            
	[Rx, rdf:type, rdf:Statement]      
	[Rx, rdf:subject, god]             
	[Rx, rdf:predicate, notplayswith]  
	[Rx, rdf:object, dice]            

I just want to know what the procedural dependencies among
these quads that stand for a reified statement are, if any, 
when I have a Model that allows me to remove statements. 


So lets look at some possible changes to the Model:

	-retract( [einstein believes, Rx] )
	[Rx, rdf:type, rdf:Statement]      
	[Rx, rdf:subject, god]            
	[Rx, rdf:predicate, notplayswith] 
	[Rx, rdf:object, dice]             

As Ora pointed out: "You can remove S' and keep the other triples. 
In fact, this is a very important case we considered when we 
introduced reification in the RDF model. Reified form without 
the existence of the "original" triple allows us to discuss 
(describe) statements we do not consider as facts."

Thanks Ora. Though I think that this does something funny for a 
doubly reified statement, which I'll get to below. 

Lets (re)assert these:

	-assert( [einstein believes, Rx] ) 
	-assert( [bohr, notbelieves, Rx] )          
	-assert( [bohr, incredulous, [einstein believes Rx]] )

resulting in the Model:

	[Rx, rdf:type, rdf:Statement]      
	[Rx, rdf:subject, god]             
	[Rx, rdf:predicate, notplayswith]  
	[Rx, rdf:object, dice]
	[einstein believes, Rx]              
	[bohr, notbelieves, Rx]            
	[bohr, incredulous, Rx']           
	[Rx', rdf:type, rdf:Statement]     
	[Rx', rdf:subject, einstein]       
	[Rx', rdf:predicate, believes]      
	[Rx', rdf:object, Rx]             

Take a note of the last statement, it has a reified subject and object,
which is the form of a second order reification. Let's assert a
revolutionary new finding in theology: [god notplayswith dice].
We can do this afait without affecting any of the statements in the model:

	-assert([god notplayswith dice])

	[Rx, rdf:type, rdf:Statement]      
	[Rx, rdf:subject, god]             
	[Rx, rdf:predicate, notplayswith]  
	[Rx, rdf:object, dice]  
	[einstein believes, Rx]             
	[bohr, notbelieves, Rx]            
	[bohr, incredulous, Rx']           
	[Rx', rdf:type, rdf:Statement]    
	[Rx', rdf:subject, einstein]       
	[Rx', rdf:predicate, believes]      
	[Rx', rdf:object, Rx]              
	[god notplayswith dice]           

add we later discover and assert:

-assert( [feynman, thinksisfunny, [bohr, incredulous, Rx'] )

	[Rx, rdf:type, rdf:Statement]      
	[Rx, rdf:subject, god]             
	[Rx, rdf:predicate, notplayswith]  
	[Rx, rdf:object, dice]  
	[einstein believes, Rx]             
	[bohr, notbelieves, Rx]            
	[bohr, incredulous, Rx']           
	[Rx', rdf:type, rdf:Statement]    
	[Rx', rdf:subject, einstein]       
	[Rx', rdf:predicate, believes]      
	[Rx', rdf:object, Rx]              
	[god notplayswith dice]    
	[feynman, thinksisfunny, Rx'']           
	[Rx'', rdf:type, rdf:Statement]    
	[Rx'', rdf:subject, bohr]       
	[Rx'', rdf:predicate, incredulous]      
	[Rx'', rdf:object, Rx'] 

Suppose this api allows a pattern match style retraction over the Model. We
only remove the statements that unify with the pattern (we're still
operating at the statement level). I've marked the matching statements with
xx:

	-retract( [_, _, Rx] ):

	[Rx, rdf:type, rdf:Statement]      
	[Rx, rdf:subject, god]             
	[Rx, rdf:predicate, notplayswith]  
	[Rx, rdf:object, dice]  
xx[einstein believes, Rx]             
xx[bohr, notbelieves, Rx]           
	[bohr, incredulous, Rx']           
	[Rx', rdf:type, rdf:Statement]    
	[Rx', rdf:subject, einstein]       
	[Rx', rdf:predicate, believes]      
xx[Rx', rdf:object, Rx]             
	[god notplayswith dice]    
	[feynman, thinksisfunny, Rx'']           
	[Rx'', rdf:type, rdf:Statement]    
	[Rx'', rdf:subject, bohr]       
	[Rx'', rdf:predicate, incredulous]      
	[Rx'', rdf:object, Rx'] 

But that looks a bit weird. This the "does something funny" I mentioned
above. Now we're missing one of the quads for  involved in that reification
of bohr's incredulity, namely [Rx', rdf:object, Rx]. Let's try a different
pattern:

	-retract( [Rx, _, _] ):

xx[Rx, rdf:type, rdf:Statement]      
xx[Rx, rdf:subject, god]             
xx[Rx, rdf:predicate, notplayswith]  
xx[Rx, rdf:object, dice]  
	[einstein believes, Rx]             
	[bohr, notbelieves, Rx]           
	[bohr, incredulous, Rx']           
	[Rx', rdf:type, rdf:Statement]    
	[Rx', rdf:subject, einstein]       
	[Rx', rdf:predicate, believes]      
	[Rx', rdf:object, Rx]             
	[god notplayswith dice]    
	[feynman, thinksisfunny, Rx'']           
	[Rx'', rdf:type, rdf:Statement]    
	[Rx'', rdf:subject, bohr]       
	[Rx'', rdf:predicate, incredulous]      
	[Rx'', rdf:object, Rx'] 

This knocks out the Rx quad (the reification of [god notplayswith dice]).
Now einstein and bohr have forgotten what it is they were on about, which
seems weird. Maybe there's a commonsense way of explaining this: einstein
believes something and bohr doesn't believe it, but we can't remember what
it is. Wait, it's on the tip of my model ... no it's gone, sorry.
 
That suggest to me that retractions involving a reified statement (1st
order) that is again reified (2nd order) will often a:) remove 1 quad, from
the second order statement the one with rdf:object as predicate leaving that
quad 'unbalanced' and b:) remove the 1st order reified statement leaving
nothing for the 2nd order statement to reify. Now I can't say that any of
this this is actually incorrect, since of what the RDFm does not speak I
must pass over in silence, but intuitively I think that these models are in
illegal states.

Suppose that this api is also Resource centric and we can zap them directly:

	-retract( Rx ):

xx[Rx, rdf:type, rdf:Statement]      
xx[Rx, rdf:subject, god]             
xx[Rx, rdf:predicate, notplayswith]  
xx[Rx, rdf:object, dice]  
xx[einstein believes, Rx]             
xx[bohr, notbelieves, Rx]            
	[bohr, incredulous, Rx']           
	[Rx', rdf:type, rdf:Statement]    
	[Rx', rdf:subject, einstein]       
	[Rx', rdf:predicate, believes]      
xx[Rx', rdf:object, Rx]              
	[god notplayswith dice]    
	[feynman, thinksisfunny, Rx'']           
	[Rx'', rdf:type, rdf:Statement]    
	[Rx'', rdf:subject, bohr]       
	[Rx'', rdf:predicate, incredulous]      
	[Rx'', rdf:object, Rx'] 

Again we end up zapping an rdf:object member of a quad. This is just
shorthand for 3 successive retractions:

	-retract( [Rx, _, _] ):
	-retract( [_, _, Rx] ):
	-retract( [_, Rx, _] ):

As Ora pointed out, it makes no sense to leave triples lying about that are
missing an element. So I would ask: does it make any sense to leave reified
quads lying about that are missing statements?

What I'm *really* vague about are the cases where we operate on statements
that are created as a result of reification, since I think they have may
have side effects and therefore need transaction semantics. Suppose we start
with:

	[einstein believes, Rx]            S'
	[Rx, rdf:type, rdf:Statement]      S''
	[Rx, rdf:subject, god]             S'''
	[Rx, rdf:predicate, notplayswith]  S''''
	[Rx, rdf:object, dice]             S'''''

in principle, all of these have equal value in a Model (they're just
triples). That means we can operate on any of them. But suppose:

	retract(S''):
	[einstein, believes, Rx]           S'
	[Rx, rdf:subject, god]             S'''
	[Rx, rdf:predicate, notplayswith]  S''''
	[Rx, rdf:object, dice]             S'''''


Some possibilities about what a legal state or operation might be:

1: <<empty>>
We just forgot what einstein believed in and went and zapped the old
mopheads belief as well. So it's true: you are what you believe. But if do
this here:

	[einstein believes, Rx]            S'
	[Rx, rdf:type, rdf:Statement]      S''
	[Rx, rdf:subject, god]             S'''
	[Rx, rdf:predicate, notplayswith]  S''''
	[Rx, rdf:object, dice]             S'''''     
	[bohr, notbelieves, Rx]            
	[bohr, incredulous, Rx']           
	[Rx', rdf:type, rdf:Statement]    
	[Rx', rdf:subject, einstein]       
	[Rx', rdf:predicate, believes]      
	[Rx', rdf:object, Rx]              
	[god notplayswith dice]    
	[feynman, thinksisfunny, Rx'']           
	[Rx'', rdf:type, rdf:Statement]    
	[Rx'', rdf:subject, bohr]       
	[Rx'', rdf:predicate, incredulous]      
	[Rx'', rdf:object, Rx'] 

	-retract(S''):

we are left with:

	[god notplayswith dice] 

We recursively kill our reifications because they are in a chain of
contingencies. Probably not what was intended. 

2: [einstein, believes, Rx] S'
He believes in something, but, um, we can't remember what. This sounds like
the yuck situation Seth mentioned. But it stops someone from creaming the
above model. We keep maps of the following patterns of statements where R
must be unified:

	[?R, rdf:subject, _]
	[?R, rdf:predicate, _]
	[?R, rdf:object, _]

so when one goes we know we have to zap the others. In other words these
statements are contingent facts, not atomic facts. Which means we have two
different types of statement.

3: refuse the operation on the above patterns
We're lazy, so we divide RDF into two types of statement, ones that can
be retracted and ones that can't. So this means that any statement matching
the patterns described above are still special cases. I'm not sure that this
division of statements at the procedural level is inline with RDFm.

4: Naive update
We're very lazy and just zap the statement(s) that matches. We don't need no
stinking truth maintenance.

	-retract(S''):
	[einstein, believes, Rx]           S'
	[Rx, rdf:subject, god]             S'''
	[Rx, rdf:predicate, notplayswith]  S''''
	[Rx, rdf:object, dice]             S'''''

4: Refuse all retract operations to preserve the sameness of statements:

	-$ retract(S''):
	-$ no, sod off.


5: Any of the above
Just document it. RDFm doesn't define any correct behavior so there's no
point going on about it procedurally. Anyway, if you want to start messing
about with asserts and retracts you're on your own.

So, if anyone can clarify this...

yours-tiny-mindedly,

-Bill de hÓra

Received on Friday, 17 November 2000 05:09:45 UTC