Re: [RDF+OWL] Way of connecting RDF and RIF lists

> Sandro Hawke wrote:
> >> http://www.w3.org/2005/rules/wiki/RIF-RDF-Lists
> > 
> > 1.  Does the rdf graph need to include the 'rdf:type rdf:List' triples?
> >     I hope not.
> > 
> > That is:
> > 
> >    ex:a ex:p _:l1 .
> >    _:l1 rdf:first ex:b .
> >    _:l1 rdf:rest rdf:nil .
> > 
> > entails:
> > 
> >    ex:a[ex:p -> List(ex:b)].
> 
> It was my interpretation that in RDF the list items (_:l1, etc) must be
> of type rdf:List to have a well-formed list. Therefore, in the original
> proposal, if you use simple or RDF entailment, these triples are required.
> When checking the RDF documents again, I realize that there is not much
> support for this interpretation.
> I modified my proposal to get rid of this requirement.  So, your test
> case is now valid.

Great, thanks.

> > 2.  Can I provide my RDF data in RIF frames?  I hope so (at least in the
> >     one-to-one mapping version).
> > 
> > That is:
> > 
> >    import(any-rdf-graph-even-an-empty-one, rdf-simple).
> > 
> >    ex:a[ex:p -> _:l1].
> >    _:l1[rdf:first -> ex:b].
> >    _:l1[rdf:rest -> rdf:nil].
> > 
> > entails:
> > 
> >    ex:a[ex:p -> List(ex:b)].
> 
> Yes, this works in both the extension and the one-to-one semantics.

Good.

> > 3.  Is an RDF list without a final rdf:nil just an open RIF List?  I'd
> >     kind of expect so, although I don't really care.   
> > 
> > That is:
> > 
> >    ex:a ex:p _:l1 .
> >    _:l1 rdf:first ex:b .
> >    _:l1 rdf:rest ex:c .
> > 
> > entails:
> > 
> >    ex:a[ex:p -> List(ex:b | ex:c)].
> 
> Right now, rdf:nil is required, and so this test case is not valid.
> 
> Actually, according to the RIF list semantics, List(ex:b | ex:c) does
> not necessarily denote a list.  In some interpretations it will be a
> list, and in other interpretations it is just some object.
> This might actually be a problem.
> 
> That said, it is possible to require the existence of some list (denoted
> by ex:c) in this case. However, I do not fully understand the
> consequences of such a change at the moment.
> 
> Anyway, I think it is reasonable to require rdf:nil, because in all RDF
> documents that mention lists, lists are closed, and the special RDF/XML
> syntax for lists requires them to be closed.

Okay....    I can't find any actual real problem here...

(And I agree, it's not clear what RIF is supposed to do with 
     List(ex:b | ex:c)
This is really "cons", not "List".....)

> > I'm not sure about the case where the 3rd triple is totally missing; it
> > seems like the open list would still exist, even if we can't name its
> > tail.
> > 
> > In the one-to-one version, I'd expect open lists to map to RDF lists
> > with some kind of variable 'rest' part:
> > 
> >    ex:p(List(ex:a | ?X)).
> > 
> > entails
> > 
> >    Exists ?x ?rest (
> >       And(
> >          ex:p(?x) 
> >          ?x[rdf:first -> ex:a] 
> >          ?x[rdf:rest -> ?rest]
> >          ))
> 
> Yes.

Great, thanks.  

    -- Sandro

Received on Tuesday, 28 April 2009 12:12:20 UTC