RE: action item "to send pointers to test cases to the list"

Oops.. (was too much in a hurry to go home..)
what I wrote as
[[
The interaction between the two q:select statements is
select T1 where W1 AND select T2 where W2
(the query is an RDF graph :))
and if the q:where graphs W1 and W2 are the same
then this actually means select (T1 OR T2) where W
]]
is of course complete nonsense..
It should have been
[[
The interaction between the two q:select statements is
select S1 where W1 AND select S2 where W2
(the query is an RDF graph :))
and if the q:select graphs S1 and S2 are the same
then this actually means select S where (W1 OR W2)
]]

-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/




Jos De_Roo/AMDUS/MOR/Agfa-NV/BE/BAYER@AGFA
Sent by: public-rdf-dawg-request@w3.org
07/07/2004 19:15

 
        To:     andy.seaborne@hp.com
        cc:     public-rdf-dawg@w3.org
        Subject:        RE: action item "to send pointers to test cases to the list"



Andy wrote:
> Jos - some questions inline
>
>                Andy
>
> -------- Original Message --------
>> From: Jos De_Roo <>
>> Date: 7 July 2004 00:36
>> 
>> Rather than waiting for more completeness, I wanted to start with
>> some test cases that we recently tested ...
>> 
>> 
>> 1/ given http://eulersharp.sourceforge.net/2004/04test/librarianP.n3
>> the query http://eulersharp.sourceforge.net/2004/04test/librarianQ.n3
>> ====
>> [] q:select { q:result q:is (?x ?y) };
>>    q:where { ?x a :Librarian; :hairColor ?y }.
>> 
>> results in
>> ====
>> q:result q:is (:Joe "black").
>> q:result q:is (:Mary "red").
>> 
>> 
>> 2/ given http://eulersharp.sourceforge.net/2004/04test/vcardP.n3
>> the query http://eulersharp.sourceforge.net/2004/04test/vcardQ.n3
>> ====
>> [] q:select {?S ?P ?O};
>>    q:where {?S :employeeId "1234". ?P a rdf:Property. ?S ?P ?O}.
>> [] q:select {?O ?Q ?X};
>>    q:where {?S :employeeId "1234". ?P a rdf:Property. ?S ?P ?O. ?Q a
>> rdf:Property. ?O ?Q ?X}.
>
> Why the "?P a rdf:Property" test?  ?P can only be a property can't it?

Indeed :) You could leave those out (at least for Cwm)
The 2 selects are 2 queries and merging their result graphs
(see below)


> Why isn't this:
>
> [] q:select {"1234" ?P ?O. ?O ?Q ?X}
>    q:where {"1234" ?P ?O. ?O ?Q ?X}

a query like

[] q:select {?S :employeeId "1234". ?S ?P ?O. ?O ?Q ?X};
   q:where {?S :employeeId "1234". ?S ?P ?O. ?O ?Q ?X}.

gives a different result! (fewer triples satisfy that where clause)


<snip/>

>> 
>> 
>> 3/ given http://eulersharp.sourceforge.net/2004/04test/sampleP.n3
>> the query http://eulersharp.sourceforge.net/2004/04test/sampleQ.n3
>> ====
>> [] q:select {q:result q:is (?P ?M ?N ?E)};
>>    q:where {?P :author ?S. ?S rdfs:member ?M. ?M :name ?N}.
>> [] q:select {q:result q:is (?P ?M ?N ?E)};
>>    q:where {?P :author ?S. ?S rdfs:member ?M. ?M :name ?N. ?M :email
>> ?E}. 
>
> I don't understand how this one works.  Is it doing an optional :email? 
If
> so, how? I don'tunderstand the interaction of two q:select statements I
> guess.

the first query returns

q:result q:is (:Paper <http://www.cs.vu.nl/~jbroeks/> "Jeen Broekstra" 
?E). 
q:result q:is (:Paper <http://www.aifb.uni-karlsruhe.de/WBS/aeb> "Andreas 
Eberhart" ?E). 
q:result q:is (:Paper <http://www.aifb.uni-karlsruhe.de/WBS/pha> "Peter 
Haase" ?E). 
q:result q:is (:Paper <http://www.aifb.uni-karlsruhe.de/WBS/rvo> "Raphael 
Volz" ?E). 

the second query returns

q:result q:is (:Paper <http://www.cs.vu.nl/~jbroeks/> "Jeen Broekstra" 
"jbroeks@cs.vu.nl"). 

and their merge unifies to

q:result q:is (:Paper <http://www.aifb.uni-karlsruhe.de/WBS/aeb> "Andreas 
Eberhart" ?E). 
q:result q:is (:Paper <http://www.aifb.uni-karlsruhe.de/WBS/pha> "Peter 
Haase" ?E). 
q:result q:is (:Paper <http://www.aifb.uni-karlsruhe.de/WBS/rvo> "Raphael 
Volz" ?E). 
q:result q:is (:Paper <http://www.cs.vu.nl/~jbroeks/> "Jeen Broekstra" 
"jbroeks@cs.vu.nl"). 

and this is indeed doing an optional :email
(module a discussion wether one should use <null>)

The interaction between the two q:select statements is
select T1 where W1 AND select T2 where W2
(the query is an RDF graph :))
and if the q:where graphs W1 and W2 are the same
then this actually means select (T1 OR T2) where W

>> 
>> results in
>> ====
>> q:result q:is (:Paper <http://www.aifb.uni-karlsruhe.de/WBS/aeb>
>> "Andreas 
>> Eberhart" ?E).
>> q:result q:is (:Paper <http://www.aifb.uni-karlsruhe.de/WBS/pha> "Peter
>> Haase" ?E).
>> q:result q:is (:Paper <http://www.aifb.uni-karlsruhe.de/WBS/rvo>
>> "Raphael 
>> Volz" ?E).
>> q:result q:is (:Paper <http://www.cs.vu.nl/~jbroeks/> "Jeen Broekstra"
>> "jbroeks@cs.vu.nl").
>> 
>> 
>> 4/ given http://eulersharp.sourceforge.net/2004/04test/danP.n3
>> the query http://eulersharp.sourceforge.net/2004/04test/danQ.n3
>> ====
>> [] q:select { q:result q:is (?N ?LA ?LO) };
>>    q:where { ?C :latitude ?LA; :longitude ?LO; :cityName ?N.
>>              ((((?LA 42.3).math:difference 2).math:exponentiation ((?LO
>> -71.1).math:difference 2).math:exponentiation).math:sum
>> 0.5).math:exponentiation math:lessThan 0.5}.
>> 
>> results in
>> ====
>> q:result q:is ("Cambridge" 42.3 -71.1).
>> q:result q:is ("Boston" 42.19 -71.05).
>> 
>> 
>> 5/ given http://slashdot.org/slashdot.rss
>> and http://www.w3.org/2000/08/w3c-synd/home.rss
>> the query http://eulersharp.sourceforge.net/2004/04test/rtQ.n3
>> ====
>> [] q:select {?U rss:title ?T};
>>    q:where {?U rss:title ?T}.
>> 
>> (at this moment) results in
>
> Nice test case.

:)

>> ====
>> <http://images.slashdot.org/topics/topicslashdot.gif> rss:title
>> "Slashdot".
>> <http://slashdot.org/> rss:title "Slashdot".
>> <http://slashdot.org/search.pl> rss:title "Search Slashdot".
>> <http://slashdot.org/article.pl?sid=04/07/06/1814202> rss:title "Hacking
>> Quartz".
>> <http://slashdot.org/article.pl?sid=04/07/06/1828221> rss:title
>> "Besieged 
>> Movie Industry Suffers Record Takings".
>> <http://slashdot.org/article.pl?sid=04/07/06/2248208> rss:title "World
>> Computer Chess Championships Underway".
>> <http://slashdot.org/article.pl?sid=04/07/06/1718239> rss:title "Who
>> Wrote 
>> Linux?".
>> <http://slashdot.org/article.pl?sid=04/07/06/1344200> rss:title "First
>> Doom3 Tourney @ QuakeCon".
>> <http://slashdot.org/article.pl?sid=04/07/06/1910231> rss:title "Linux
>> Laptop w/ 3.5\" Disk, USB, and No Hard Drive?".
>> <http://slashdot.org/article.pl?sid=04/07/06/1636241> rss:title "Dell to
>> Ship Linux Desktops in Europe".
>> <http://slashdot.org/article.pl?sid=04/07/06/217238> rss:title "Robots
>> in 
>> Hospitals".
>> <http://slashdot.org/article.pl?sid=04/07/06/1628220> rss:title "NIST
>> Issues Windows XP Security Guide".
>> <http://slashdot.org/article.pl?sid=04/07/06/1558259> rss:title
>> "Broadband 
>> Blimps".
>> <http://www.w3.org/News/2004#item98> rss:title "RDF and OWL Working
>> Groups 
>> Complete Deliverables, Close".
>> <http://www.w3.org/News/2004#item97> rss:title "Call for Participation:
>> Workshop on Constraints and Capabilities for Web Services".
>> <http://www.w3.org/News/2004#item96> rss:title "Upcoming W3C Talks".
>> <http://www.w3.org/News/2004#item95> rss:title "Working Draft: Mobile
>> SVG 
>> Profiles Version 1.2".
>> <http://www.w3.org/News/2004#item94> rss:title "W3C Workshop on Web
>> Applications and Compound Documents: Summary and Papers".
>> <http://www.w3.org/News/2004#item93> rss:title "Tim Berners-Lee Receives
>> Millennium Technology Prize in Helsinki".
>> <http://www.w3.org/News/2004#item92> rss:title "Working Draft: Content
>> Selection for Device Independence (DISelect) 1.0".
>> <http://www.w3.org/2000/08/w3c-synd/home.rss> rss:title "World Wide Web
>> Consortium".

-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/

Received on Wednesday, 7 July 2004 14:34:52 UTC