% s(CASP) Programming
:- use_module(library(scasp)).
% Your program goes here
false :-q,r(1).
q.
r(2).
r(1).
thing:-q,r(1).
p(X):- X #>2.
/** <examples> Your example queries go here, e.g.
?- ? q.
?- ? r(1).
?- ? thing.
?- ? p(X).
*/
I try the following queries:
?- ? q.
false
?- ? r(1).
false
?- ? thing.
s(CASP) model
q holds
thing holds
r holds for 1
?- ? p(X).
scasp_just_html:clpq/5: Deterministic procedure scasp_swish:to_html/3 failed
That is not your fault Both now work as you expected them. Constraints of the binding are printed in native clp(q) notation. I’m not sure that can be avoided in SWISH.
Thanks again Jan.
I also at first missed the ? syntax, maybe try and make that more clear in the example scasp page with first a call to scasp/1 then the same call with the short hand ? explicitly pointed out.