Re: Alternatives to containers/collections (was Re: Requirements for a possible "RDF 2.0")

On Jan 14, 2010, at 1:10 PM, Steve Harris wrote:

> On 14 Jan 2010, at 17:31, Dan Brickley wrote:
>
>> On Thu, Jan 14, 2010 at 4:20 PM, Pat Hayes <phayes@ihmc.us> wrote:
>>> A lot, perhaps all, of this hair could be avoided if RDF allowed  
>>> general
>>> tuples as well as triples. All that is needed is some way to put N  
>>> things
>>> into a sequence: so, put N things into a sequence. The 'graph  
>>> model' would
>>> be a hyperlink, drawn as a polygon (eg triangle for N=3) rather  
>>> than a line.
>>> In triples-style syntax, it would just be moving a dot.
>>
>> I periodically wonder what an RDF without the binary restriction  
>> would
>> look like.
>>
>> Would each property/relation have a fixed arity, eg. dc:source might
>> 'be a 4', 'foaf:knows' a 7? That doesn't make a lot of sense to me.  
>> So
>> presumably they'd vary freely. In which case, we have a lot of
>> figuring out to do when wondering whether   livesWith(alice, bob,
>> 2007, 'y') implies livesWith(alice,bob) or livesWith(alice, bob, 'y',
>> 'foo.html'). The binary straightjacket makes some of these questions
>> impossible, albeit maddeningly...
>
> I was thinking something more like a new literal type, which was a  
> list/vector/sequence/whatever-you-want-to-call-it.
>
> So, it would still bind in a query:
>
> [using the old list syntax for the sake of an example]
> <a> <b> (1 2 3) .
>
> SELECT ?z
> WHERE {
>  <a> <b> ?z .
> }
>
> and the return value would be a list "literal".

But are these necessarily literal values. then? I don' t think that  
would be enough.

I wonder about query binding, I think it would be more use to allow  
item binding, with a wildcard pattern variable extending SPARQL. We  
followed this idea in Common Logic and it is very slick. So for example

:a :P ?x .

matches

:a :P :foo .

with ?x/foo, but does NOT match

:a :P :foo :baz .

However, :a :P ??x  . (choose your own syntax: CL uses ...x) matches  
both of them with ??x bound to (:foo) (not :foo, note: the list, not  
its atom) in the first case and (:foo :baz) in the second. This lets a  
query bind an arbitrarily long tail but also allows queries to  
micromanage things inside argument sequences when required. Some care  
is required to ensure a unique match, but its workable and very  
convenient.

Pat


>
> - Steve
>

------------------------------------------------------------
IHMC                                     (850)434 8903 or (650)494 3973
40 South Alcaniz St.           (850)202 4416   office
Pensacola                            (850)202 4440   fax
FL 32502                              (850)291 0667   mobile
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes

Received on Thursday, 14 January 2010 20:30:25 UTC