Is there some way to get s(CASP) to cooperate? Is there perhaps a different way of expressing disunities that s(CASP) is able to navigate better? I have heard people say you should prefer dif(X,Y) to X \= Y, but dif gives a permission error in swish, so I don’t know if it would work.
As an aside, I note the s(CASP) github repository under SWI-Prolog doesn’t allow non-members to submit issues. Is that by design?
atom_cond(+Spec, -Atom, -Children, -Condition) is det.
Translate a pred/1 condition. Spec specifies a node in the justification tree. Its general form is AtomSpec-Children, where Children is one of
A list of specifications. The specification matches if each specification in the children list matches one of the children of the justification tree. Non-matched children remain in the tree and are used as justification normally. If the list ends with -, e.g. [p(X)|-], all non-matched children are discarded.
The atom -. All children are discarded.
The atom *. This is the default if there are no children and causes the node to be processed normally.
Each AtomSpec is either a plain Atom, one wrapped, -(Atom)not(Atom) or not(-(Atom)). A condition may be added to an Atom as a conjunction, e.g., this denotes the atom p(X), but only if X
is an integer.
We ran in a similar problem (if I understand you correct). The solution we went for is have a helper that returns a number if some object is in a category and a final rules that says that the sum of these numbers should have some value (or value range). So, you have something like this (forgot the details).