# -----------------------
# Traversing French roads
# -----------------------

@prefix : <http://example.org/#>.

:paris :oneway :orleans.
:paris :oneway :chartres.
:paris :oneway :amiens.
:orleans :oneway :blois.
:orleans :oneway :bourges.
:blois :oneway :tours.
:chartres :oneway :lemans.
:lemans :oneway :angers.
:lemans :oneway :tours.
:angers :oneway :nantes.

{
    ?S :oneway ?O.
} => ($ {
    ?S :path ?O.
} $).

{
    ?S :oneway ?X.
    ?X :path ?O.
} => ($ {
    ?S :path ?O.
} $).

# query
{
    ?X :path :nantes.
} =^ {
    ?X :path :nantes.
}.
