RE: disjunction implementation

-------- 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 UTC