The following works:
$ ./scasp ./test/birds.pl
% QUERY:?- flies(X).
ANSWER: 1 (in 60 ms)
MODEL:
{ flies(tweety), bird(tweety), not ab(tweety), not penguin(tweety), not wounded_bird(tweety), not -ab(sam), ab(sam), penguin(sam), not -ab(john), ab(john), wounded_bird(john), -ab(Var1 | {Var1 \= john,Var1 \= sam}), not ab(Var1 | {Var1 \= john,Var1 \= sam}), not penguin(Var1 | {Var1 \= john,Var1 \= sam}), not wounded_bird(Var1 | {Var1 \= john,Var1 \= sam}), not -penguin(sam), -penguin(Var2 | {Var2 \= sam}), not penguin(Var2 | {Var2 \= sam}), not -wounded_bird(john), -wounded_bird(Var3 | {Var3 \= john}), not wounded_bird(Var3 | {Var3 \= john}), not -bird(tweety), not -bird(john), bird(john), -bird(Var4 | {Var4 \= john,Var4 \= tweety}), not bird(Var4 | {Var4 \= john,Var4 \= tweety}), not wounded_bird(Var4 | {Var4 \= john,Var4 \= tweety}), not -flies(tweety), -flies(sam), not flies(sam), not bird(sam), not wounded_bird(sam), -flies(john), not flies(john), -flies(Var5 | {Var5 \= john,Var5 \= sam,Var5 \= tweety}), -bird(Var5 | {Var5 \= john,Var5 \= sam,Var5 \= tweety}), not bird(Var5 | {Var5 \= john,Var5 \= sam,Var5 \= tweety}), not wounded_bird(Var5 | {Var5 \= john,Var5 \= sam,Var5 \= tweety}), not flies(Var5 | {Var5 \= john,Var5 \= sam,Var5 \= tweety}) }
BINDINGS:
X = tweety ?
But this doesn’t:
$ swipl -l src/scasp.pl
1 ?- main([ 'test/birds.pl']).
true.
Is there something I am doing wrongly?