karmaresearch / vlog

Apache License 2.0
55 stars 9 forks source link

Incomplete predicate extension when using existential rules #61

Closed larry-gonzalez closed 3 years ago

larry-gonzalez commented 3 years ago

Let's consider the following program:

edb.conf:

EDB0_predname=p
EDB0_type=INMEMORY
EDB0_param0=.
EDB0_param1=p

p.csv:

a

rules.txt:

q(X,Y,Z) :- p(X)
q(X,Y,Y) :- p(X)

After materialization, the extension of q (in VLog syntax) should be something like

1   a   1_2_0   1_3_0
2   a   1_4_0   1_4_0

but, on commit 017d66d, VLog only produces

1   a   1_2_0   1_3_0

which is incomplete.


As a side note, if the rule set would had contained the same rules but in the inverse order, the extension of q would have been correct, namely

q(X,Y,Y) :- p(X)
q(X,Y,Z) :- p(X)

and

1   a   1_2_0   1_2_0