-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Description
We are using several asp encodings that make use of conditional literals and noticed that on some instances clingo 4 (4.4.0) and clingo 5 (5.4.0) return different answer-sets. It seems that this only happens for programs having conditional literals in rule heads.
For instance for the program below
arg(a1). arg(a2). arg(a3). arg(a4). arg(a5). arg(a6). arg(a7). arg(a8). arg(a9).
att(a2,a1). att(a2,a6). att(a2,a7). att(a2,a8). att(a2,a9).
att(a3,a1).
att(a4,a1).
att(a5,a1).
att(a6,a1). att(a6,a2). att(a6,a3). att(a6,a4). att(a6,a5).
att(a7,a1).
att(a8,a1).
att(a9,a1).
in(X) :- arg(X), not out(X).
out(X) :- arg(X), not in(X).
in(X):-arg(X), out(Y):att(Y,X).
out(X):- in(Y), att(X,Y).
out(X):-in(Y), att(Y,X).
in(Y):att(Y,X) :-out(X).
#show in/1.
#show out/1.
:-in(a1).
clingo4 returns the answer-sets
Answer: 1
out(a1) out(a2) out(a3) out(a4) out(a5) in(a6) in(a7) in(a8) in(a9)
Answer: 2
out(a1) in(a2) in(a3) in(a4) in(a5) out(a6) out(a7) out(a8) out(a9)
while clingo5 returns UNSATISFIABLE
.
When removing the last constraint ':-in(a1).' then both versions return the two answer-sets listed above.
Is there an intended difference in the semantics of conditional literals between clingo 4 and clingo 5?
Another example where clingo 4 and clingo 5 disagree on the answer-sets is
idealset_adm.txt