W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2004

RE: disjunction implementation

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Tue, 15 Jun 2004 15:13:01 +0100
Message-ID: <E864E95CB35C1C46B72FEA0626A2E8080361579A@0-mail-br1.hpl.hp.com>
To: Dan Connolly <connolly@w3.org>, "Eric Prud'hommeaux" <eric@w3.org>
Cc: RDF Data Access Working Group <public-rdf-dawg@w3.org>, Rob Shearer <Rob.Shearer@networkinference.com>



-------- Original Message --------
> From: Dan Connolly <>
> Date: 15 June 2004 14:30
> 
> On Tue, 2004-06-15 at 08:15, Eric Prud'hommeaux wrote:
> > On Mon, Jun 14, 2004 at 04:00:46PM -0500, Dan Connolly wrote:
> > > 
> > > On Fri, 2004-06-11 at 22:38, Eric Prud'hommeaux wrote:
> > > > I'm a dork. I sent out an optional arcs impelementation. I was
> > > > supposed to send disjunction implementation.
> > > 
> > > Specifically, w.r.t. 3.4 Subgraph Results
> > > http://www.w3.org/TR/2004/WD-rdf-dawg-uc-20040602/#r3.4
> 
> [...]
> 
> >  If you specify an output mode like RDFXML, you'll get a
> > graph with all of those statements mushed together.
> > 
> >  homer:/home/eric$ ./union-alg.sh -sClass n3
> > @prefix : <http://example.org/n#>
> > A1 p2 C .
> > A2 p3 D .
> > A3 p2 C ;
> >    p3 D .
> 
> OK, that's what I was looking for.
> 
> Hmm... now that I think about it, I guess that
> design does work. The results are, in a way, not very
> interesting: the client may have a hard problem
> figuring out what ?n matched... they basically
> have to do the query again. But if they don't
> want "subgraph results" they shouldn't ask
> for them, I suppose.

Obvservation: this seems compatible with JimH's point about it being in the
constraints part of a query:

   ask (
    ( ?n p2 C || ?n p3 D ))

is:

    (?n ?p ?v) such that (?p = p2 & ?v = C) or (?p = p3 & ?v = D)

albeit inefficiently if the implementation is na´ve.  That would mean that
the subgraph selected would be to put both triples in if both existed.

	Andy


> 
> 
> 
> Just to have it all on the same page, here's
> the test input:
> 
> -----------
> TEST CASE:
> 
>   ns <http://example.org/n#>
>   assert (
>    A0 p1 B .
>   # A0 p2 C .
>   # A0 p3 D .
> 
>   # A1 p1 B .
>    A1 p2 C .
>   # A1 p3 D .
> 
>   # A2 p1 B .
>   # A2 p2 C .
>    A2 p3 D .
> 
>   # A3 p1 B .
>    A3 p2 C .
>    A3 p3 D )
> 
>   ask (
>    ( ?n p2 C || ?n p3 D ))
> -----------
> 
> [...]
Received on Tuesday, 15 June 2004 10:15:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:19 GMT