# -----------------------
# Blank Node Graphs - BNG
# -----------------------

@prefix graph: <http://www.w3.org/2000/10/swap/graph#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.

# create forward rules
{
    ?A log:implies ?B.
    ?A graph:namedGraph ?C.
    ?B graph:namedGraph ?D.
} => {
    ?C => ?D.
}.

# create backward rules
{
    ?A log:isImpliedBy ?B.
    ?A graph:namedGraph ?C.
    ?B graph:namedGraph ?D.
} => {
    ?C <= ?D.
}.

# create queries
{
    ?A log:query ?B.
    ?A graph:namedGraph ?C.
    ?B graph:namedGraph ?D.
} => {
    ?C =^ ?D.
}.
