# Action-198 Property Path test case

From: Olivier Corby <Olivier.Corby@sophia.inria.fr>
Date: Tue, 29 Jun 2010 10:51:47 +0200
Message-ID: <4C29B423.4060000@sophia.inria.fr>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
```

Action-198 Property path test case

a p1 b
b p2 a
a p3 c

select * where {
a p1/p2/p3 ?x
}

?x=c

_________________________________________

the cardinality of
solutions to variable-length paths is the cardinality of solutions
via paths that do not repeat nodes;

a p1 b
b p2 a
a p3 c

select * where {
a (p1/p2/p3)* ?x
}

?x=c
or no solution ?

_________________________________________

a p1 b
b p2 a
a p3 b
b p4 a

select * where {
a p1/p2/p3/p4 ?x
}

?x=a

_________________________________________

a p1 b
b p2 a
a p3 b
b p4 a

select * where {
a (p1/p2){1,}/(p3/p4){1,} ?x
}

?x=a
or no solution ?

________________________________________

inferences

a componentOf b
componentOf rdfs:subPropertyOf partOf

select * where {
a partOf+ ?x
}

?x=b

_________________________________________

a componentOf b
componentOf rdfs:subPropertyOf partOf

select * where {
a !partOf ?x
}

?x=b
or no solution ?

_____________________________________

zero length path

_:b1 rdf:first 1
_:b1 rdf:rest rdf:nil

_:b2 ex:prop 2

select * where {
?x rdf:rest{0,1} ?y
}

?x=_:b1; ?y=_:b1
?x=_:b2; ?y=_:b2
?x=rdf:nil; ?y=rdf:nil

?x=_:b1; ?y=rdf:nil

____________________________________

g1 {a p1 b}
g2 {b p2 c}

select * where {
graph ?g {a p1/p2 ?x}
}

no solution

________________________________

g1 {a p1 b b p2 c}

select * where {
graph ?g {a p1/p2 ?x}
}

?g=g1; ?x=c

________________________________

g1 {a p1 b}
g2 {b p2 c}

select
from g1
from g2
where {
a p1/p2 ?x
}

?x=c
____________________________________

a p b

b ^p a
}

true

____________________________________

a p b

select * where {
b ^p ?x
}

?x=a

____________________________________

a p1 b
b p2 c

select * where {
c ^(p1/p2) ?x
}

?x=a
_____________________________________________

a p1 b
a p2 c
a p3 d

select * where {
a !(p1|p2) ?x
}

?x=d
_____________________________________________

Several paths

a p1 b
b p2 c
a p1 d
d p2 c

select * where {
a p1/p2 ?x
}

?x=c
?x=c

_____________________________________________

One path

a p1 b b p2 c
a p1 d d p2 c

select * where {
a (p1/p2)+ ?x
}

?x=c
```
Received on Tuesday, 29 June 2010 08:52:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:00 UTC