IITDBGroup / gprom

GProM is a middleware that adds support for provenance to database backends.
http://www.cs.iit.edu/%7edbgroup/research/gprom.php
Apache License 2.0
8 stars 5 forks source link

Logicblox backend - the head predicate is not correctly returned in the multi-level rules without order #32

Closed shek21 closed 6 years ago

shek21 commented 6 years ago

query "Q1(X,Y) :- R(X,Y). Q(X) :- Q1(X,Y)."

lb result: _(X0, X1) <- _Q1(X0, X1). _Q1(X,Y) <- R(X,Y). _Q(X) <- _Q1(X,Y).

lordpretzel commented 6 years ago

@shek21 this is not a bug, if you do not specify the answer predicate then GProM uses the first mentioned predicate. Try this:

Q1(X,Y) :- R(X,Y). Q(X) :- Q1(X,Y). ANS : Q.
_(X0) <- _Q(X0).
_Q1(X,Y) <- R(X,Y).
_Q(X) <- _Q1(X,Y).
shek21 commented 6 years ago

I got it. Thanks.