karmaresearch / vlog

Apache License 2.0
55 stars 9 forks source link

More missing derivations in VLog #59

Closed mkroetzsch closed 4 years ago

mkroetzsch commented 4 years ago

This might be related to #58, but it could also have another reason. To reproduce, use the following input to VLog:

element(L,E) :- TRIPLE(L,first,E)
next(L1,L2) :- TRIPLE(L1,rest,L2),element(L2,E)
Intersection(Y) :- TRIPLE(X,intersectionOf,Y)
hasList(X,Y)   :- TRIPLE(X,intersectionOf,Y)
Intersection(Z) :- Intersection(Y),next(Y,Z)
hasList(X,Z) :- hasList(X,Y),next(Y,Z)
hasIntersectionElement(X,E) :- hasList(X,Y),Intersection(Y),element(Y,E)

EDB configuration edb.conf:

EDB0_predname=TRIPLE
EDB0_type=INMEMORY
EDB0_param0=.
EDB0_param1=triples

Data file triples.csv contains:

B-fa5724d6-ca7b-30d2-8444-297a0b98ebc3,intersectionOf,B-360d4bb5-c9d3-3c12-8f6d-59e7651598e2
B-360d4bb5-c9d3-3c12-8f6d-59e7651598e2,first,Woman
B-360d4bb5-c9d3-3c12-8f6d-59e7651598e2,rest,B-1a790bdd-6a06-3bfc-8567-7703fdad45f6
B-1a790bdd-6a06-3bfc-8567-7703fdad45f6,first,Parent
B-1a790bdd-6a06-3bfc-8567-7703fdad45f6,rest,nil

The materialisation contains:

However, the rule hasIntersectionElement(X,E) :- hasList(X,Y),Intersection(Y),element(Y,E) should have two conclusions in this situation.

CerielJacobs commented 4 years ago

Fixed.

CerielJacobs commented 4 years ago

Note: this also fixes issue #58