sCASP icon indicating copy to clipboard operation
sCASP copied to clipboard

Unexpected bahaviour with respect to "more than one" predicate

Open mgttlinger opened this issue 1 year ago • 1 comments

Take the following sCASP specification where g is saying roughly that f holds for more than one value of its first argument in any context (value of the second argument of f):

f(a,c).
f(b,d).

equal(a,a).
equal(b,b).

g(A) :- f(A,_), f(B,_), not equal(A,B).

Unexpectedly sCASP happily finds a model for both g(a) and not g(a). Is this due to a misunderstanding on my side or is this considered a bug?

See https://swish.swi-prolog.org/p/strange.pl

Modifying the program to make f unary the behaviour is not observable.

f(a).
f(b).

equal(a,a).
equal(b,b).

g(A) :- f(A), f(B), not equal(A,B).

mgttlinger avatar Oct 10 '24 07:10 mgttlinger

In the ciao version of sCASP the same behaviour can not be observed. So it sais that not g(a) is not provable in both versions.

mgttlinger avatar Oct 10 '24 08:10 mgttlinger