forked from w3c/rdf-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SPARQL evaluation tests for triple terms and reified triples
These tests are derived from the rdf-star SPARQL evaluation tests. https://github.com/w3c/rdf-star/tree/main/tests/sparql/eval Closes w3c#140
- Loading branch information
1 parent
3341e16
commit 625f02a
Showing
86 changed files
with
3,252 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
SELECT * { | ||
<<:a :b :c>> ?p ?o | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"head": { | ||
"vars": [ | ||
"o", | ||
"p" | ||
] | ||
}, | ||
"results": { | ||
"bindings": [ | ||
{ | ||
"o": { | ||
"value": { | ||
"subject": { | ||
"value": "http://example/a", | ||
"type": "uri" | ||
}, | ||
"predicate": { | ||
"value": "http://example/b", | ||
"type": "uri" | ||
}, | ||
"object": { | ||
"value": "http://example/c", | ||
"type": "uri" | ||
} | ||
}, | ||
"type": "triple" | ||
}, | ||
"p": { | ||
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies", | ||
"type": "uri" | ||
} | ||
}, | ||
{ | ||
"o": { | ||
"value": "http://example/z", | ||
"type": "uri" | ||
}, | ||
"p": { | ||
"value": "http://example/q", | ||
"type": "uri" | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
SELECT * { | ||
<<?s :b :c>> ?p ?o | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"head": { | ||
"vars": [ | ||
"o", | ||
"p", | ||
"s" | ||
] | ||
}, | ||
"results": { | ||
"bindings": [ | ||
{ | ||
"s": { | ||
"value": "http://example/a", | ||
"type": "uri" | ||
}, | ||
"p": { | ||
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies", | ||
"type": "uri" | ||
}, | ||
"o": { | ||
"value": { | ||
"subject": { | ||
"value": "http://example/a", | ||
"type": "uri" | ||
}, | ||
"predicate": { | ||
"value": "http://example/b", | ||
"type": "uri" | ||
}, | ||
"object": { | ||
"value": "http://example/c", | ||
"type": "uri" | ||
} | ||
}, | ||
"type": "triple" | ||
} | ||
}, | ||
{ | ||
"s": { | ||
"value": "http://example/a", | ||
"type": "uri" | ||
}, | ||
"p": { | ||
"value": "http://example/q", | ||
"type": "uri" | ||
}, | ||
"o": { | ||
"value": "http://example/z", | ||
"type": "uri" | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
SELECT * { | ||
<<:a ?p :c>> ?q :z . | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ "head": { | ||
"vars": [ "p" , "q" ] | ||
} , | ||
"results": { | ||
"bindings": [ | ||
{ | ||
"p": { "type": "uri" , "value": "http://example/b" } , | ||
"q": { "type": "uri" , "value": "http://example/q" } | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
SELECT * { | ||
<<:a :b ?o>> ?q :z . | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ "head": { | ||
"vars": [ "o" , "q" ] | ||
} , | ||
"results": { | ||
"bindings": [ | ||
{ | ||
"o": { "type": "uri" , "value": "http://example/c" } , | ||
"q": { "type": "uri" , "value": "http://example/q" } | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
SELECT * { | ||
<<?a ?b :nomatch >> ?q :z . | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ "head": { | ||
"vars": [ "a" , "b" , "q" ] | ||
} , | ||
"results": { | ||
"bindings": [ | ||
|
||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
CONSTRUCT { | ||
<<:a :b :c >> :q :z . | ||
} WHERE { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PREFIX : <http://example/> | ||
|
||
<< :a :b :c >> :q :z . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
CONSTRUCT WHERE { | ||
<<:a :b :c >> :q :z . | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PREFIX : <http://example/> | ||
|
||
<< :a :b :c >> :q :z . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
PREFIX : <http://example/> | ||
|
||
CONSTRUCT { | ||
<< ?s ?p ?o >> :source :ABC . | ||
} WHERE { | ||
?s ?p ?o . | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PREFIX : <http://example/> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
|
||
<< _:reifier2 rdf:reifies <<( :a :b :c )>> >> :source :ABC. | ||
|
||
<< _:reifier2 :q :z >> :source :ABC . | ||
|
||
<< :a :b :c >> :source :ABC . | ||
|
||
<< :s :p :o >> :source :ABC . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
PREFIX : <http://example/> | ||
|
||
CONSTRUCT { | ||
:a :b ?c {| :source :ABC |} . | ||
} WHERE { | ||
:a :b ?c . | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
:a :b :c . | ||
|
||
<< :a :b :c >> :source :ABC . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
CONSTRUCT WHERE { | ||
:a :b ?c {| ?q ?z |} . | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
PREFIX : <http://example/> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
|
||
:a :b :c . | ||
|
||
_:reifier1 rdf:reifies <<( :a :b :c )>>. | ||
|
||
<< :a :b :c ~ _:reifier2 >> :q :z . |
12 changes: 12 additions & 0 deletions
12
sparql/sparql12/eval-triple-terms/data-0-reifiedtriples.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
PREFIX : <http://example/> | ||
|
||
<<:a :b :c>> :q :z . | ||
:a :q <<:a :b :c>> . | ||
|
||
:f :g << <<:x1 :y1 123 >> :p :o >> . | ||
|
||
:f :g << :s :p <<:x2 :y3 123 >> >> . | ||
|
||
<< :s1 :p1 :o1 >> :q << :s1 :p1 :o1 >> . | ||
|
||
:a :b :c {| :q1 :z1 |} . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PREFIX : <http://example/> | ||
|
||
:a :q <<(:a :b :c)>> . | ||
|
||
:f :g <<( :s :p <<(:x2 :y3 123 )>> )>> . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PREFIX : <http://example/> | ||
|
||
<<:a :b :c>> :q :z . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
PREFIX : <http://example/> | ||
|
||
:s :p1 :o . | ||
<<:s :p1 :o>> :q :z . | ||
|
||
# pattern-3 | ||
:a1 :b <<:s :p1 :o ~ :reifier >> . | ||
<<:s :p1 :o ~ :reifier >> :b :a2 . | ||
|
||
# pattern-3-nomatch | ||
:a1 :b2 <<:s :p1 :o >> . | ||
<<:s :p1 :o >> :b2 :a2 . | ||
|
||
# pattern-5 | ||
:s :p2 :o . | ||
<<:s :p2 :o>> :sym <<:s :p2 :o>> . | ||
|
||
# pattern-6 | ||
<<:s :p2 :o>> :p3 :z . | ||
<< <<:s :p2 :o>> :p3 :z >> :q :o . | ||
|
||
# pattern-8 | ||
<<:s :p2 :o ~ :reifier2 >> :p4 :z . | ||
<< <<:s :p2 :o ~ :reifier2 >> :p4 :z >> :q :o . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PREFIX : <http://example/> | ||
|
||
:a :b :c {| :q :z |} . | ||
:s :p :o . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
PREFIX : <http://example/> | ||
|
||
:s :p :o1 . | ||
|
||
GRAPH :g { | ||
<<:s :p :o1 >> :q1 :z1 . | ||
<<:s :p :o2 >> :q2 :z2 . | ||
} | ||
|
||
GRAPH :g1 { _:b :r :o3 . _:b :r :o4 . } | ||
|
||
GRAPH :g2 { << _:b :r :o3 >> :pb "abc" . } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PREFIX : <http://example/> | ||
|
||
<<:s1 :p :o>> :q :z . | ||
<<:s2 :p :o>> :p "same-p" . | ||
<<:s3 :p :o>> : "same-p" . | ||
|
||
|
||
:z1 :q << :s1 :p :o >> . | ||
:z2 :p << :s2 :p :o >> . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PREFIX : <http://example/> | ||
|
||
GRAPH :g1 { :s1 :p1 :o1 } | ||
GRAPH :g2 { :s2 :p2 :o2 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
PREFIX : <http://example/> | ||
|
||
:x1 :left <<( :a :b 123 )>> . | ||
:x1 :right <<( :a :b 123.0 )>> . | ||
|
||
:x2 :left <<( :a :b 123 )>> . | ||
:x2 :right <<( :a :b 123 )>> . | ||
|
||
:x3 :left <<( :a :q <<( :a :b 123 )>> )>> . | ||
:x3 :right <<( :a :q <<( :a :b 123.0 )>> )>> . | ||
|
||
:x4 :left <<( :a :b 123 )>> . | ||
:x4 :right <<( :c :d 123 )>> . | ||
|
||
:x5 :left <<( _:bnode1 :b 123 )>> . | ||
:x5 :right <<( _:bnode1 :b 123 )>> . | ||
|
||
:x6 :left <<( _:bnode2 :b 123e0 )>> . | ||
:x6 :right <<( _:bnode2 :b 123 )>> . | ||
|
||
:x7 :left <<( :a :b 9 )>> . | ||
:x7 :right <<( :a :b 123 )>> . | ||
|
||
:x8 :left << :a :b 9 >> . | ||
:x8 :right << :a :b 9 >> . | ||
|
||
:x9 :left << :a :b 9 ~ :irireifier >> . | ||
:x9 :right << :a :b 9 ~ :irireifier >> . | ||
|
||
:x10 :left << :a :b 9 ~ _:bnodereifier >> . | ||
:x10 :right << :a :b 9 ~ _:bnodereifier >> . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
PREFIX : <http://example/> | ||
|
||
# The different kinds of orderable items. | ||
# (Not in collation order). | ||
|
||
:item :p :x . | ||
|
||
:item :p <<( :s :p :o )>> . | ||
|
||
:item :p "abc" . | ||
|
||
:item :p _:b . | ||
|
||
## (Lowest) no value assigned to the variable or expression in this solution. | ||
## Blank nodes | ||
## IRIs | ||
## RDF literals | ||
## RDF-star embedded triple terms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
PREFIX : <http://example.com/> | ||
|
||
# Items that can be ordered | ||
# The test query deals with up to 20 items. | ||
# The integer in the subject does not correspond to expected order. | ||
|
||
:s-01 :p <<(:s :p 123)>> . | ||
:s-02 :p <<(:s :p -456)>> . | ||
|
||
:s-03 :p _:blank-node . | ||
|
||
:s-04 :p <<(:s2 :p 900)>> . | ||
:s-05 :p <<(:s1 :p 999)>> . | ||
:s-06 :p <<(:s1 :a 999)>> . | ||
|
||
:s-07 :p "string" . | ||
|
||
:s-08 :p <<( :s :p <<(:x :y :z)>> )>> . | ||
|
||
:s-09 :p <http://host/entity> . | ||
|
||
|
Empty file.
Oops, something went wrong.