Closed MaxOstrowski closed 1 year ago
Looks like a bug in the AST processing:
clingo-dl test.lp 0 --verbose
clingo-dl version 1.4.0
Reading from test.lp
Reading : ************** parsed program **************
#theory dl{
term{+ :1,binary,left,- :1,binary,left,* :2,binary,left,/ :2,binary,left,- :3,unary};
&__diff_h/0:term,{<=,>=,<,>,=,!=},term,head;
&__diff_b/0:term,{<=,>=,<,>,=,!=},term,body
}.
event(1,1,r1).
event(2,2,r2).
event(3,3,r3).
between1(Z,X,Y):-event(LX,UX,X);event(LY,UY,Y);X!=Y;LX<=UY;event(LZ,UZ,Z);LX<=LZ;LZ<=UY;Z!=X;Z!=Y.
between2(Z,X,Y):-event(LX,UX,X);event(LY,UY,Y);X!=Y;LX<=UY;event(LZ,UZ,Z);LX<=UY;Z!=X;Z!=Y.
Looks like the LZ
in the comparison is somehow lost.
Given the program:
the only difference between
between1
andbetween2
is the new short formLX <= LZ <= UY
instead ofLX <= LZ, LZ <= UY
.behaves correctly, but
messes up the comparison although they use the same clingo-lib version.