Skip to content

Instantly share code, notes, and snippets.

@koo5
Created July 23, 2015 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koo5/0ae360807935347c7a54 to your computer and use it in GitHub Desktop.
Save koo5/0ae360807935347c7a54 to your computer and use it in GitHub Desktop.
x
kook@idea ~/C/tauchain> cat n3test2.nq
:x a :y .
:x a :z .
fin.
:x a :y .
:x a :z .
fin.
kook@idea ~/C/tauchain> env LD_PRELOAD=libmarpa/dist/.libs/libmarpa.so ./tau --level 1 --shorten < n3test2.nq
kb input done.
query loaded.
Rules:
{ } => :x a :y .
{ } => :x a :z .
{ :x a :y ,:x a :z } => .
Query: :x a :y ,:x a :z
Rules:
[
{
"":[{"head":{},"body":[{ "pred":"a", "args":[ { "pred":":x", "args":[ ] }, { "pred":":y", "args":[ ] } ] },{ "pred":"a", "args":[ { "pred":":x", "args":[ ] }, { "pred":":z", "args":[ ] } ] }]}
]}, {
"a":[{"head":{ "pred":"a", "args":[ { "pred":":x", "args":[ ] }, { "pred":":y", "args":[ ] } ] },"body":[]},
{"head":{ "pred":"a", "args":[ { "pred":":x", "args":[ ] }, { "pred":":z", "args":[ ] } ] },"body":[]}
]}]
Query: :x a :y ,:x a :z
Evidence:
:x a :y <=
=> a(:x() ,:y())
=> a(:x() ,:z())
:x a :z <=
=> a(:x() ,:y())
=> a(:x() ,:z())
elapsed: 0.758ms steps: 11
Ready.
kook@idea ~/C/tauchain>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment