Comparing s(CASP) models

Using SWISH:

https://swish.swi-prolog.org/p/CrbJNPtp.swinb

:- use_module(library(scasp)).
p:-q.

q :- not notq.
notq :- not q.

I can ask for the model for a query or its negation like so:

?-scasp(p),scasp_model(M).
M = [not notq, p, q]

?-scasp(not p), scasp_model(M2).
M2 = [notq, not p, not q]

But how would I query both models to be able to compare them?

?- scasp(p),scasp_model(M),scasp(not p), scasp_model(M2).
scasp_stack:justification_tree/3: Deterministic procedure scasp_stack:justification_tree/3 failed

At the moment all I can imagine is

?- findall(M, ( scasp(p),scasp_model(M) ; scasp(not p), scasp_model(M)), [M,M2]).

Conjunction of scasp/1 queries is still a bit unsettled territory.

ok good to know :slight_smile: Thanks!