From: Markus Triska Date: Tue, 11 Aug 2020 18:48:37 +0000 (+0200) Subject: omit internal attributes in residual goals when using taut/2 X-Git-Tag: v0.9.0~174^2~13^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=ad8e2ad4f6f7f64a29dce96931d00cf18657b039;p=scryer-prolog.git omit internal attributes in residual goals when using taut/2 Examples: ?- taut(X=:=X,1). clpb:sat(X=:=X) ; false. ?- taut(X=\=X,0). clpb:sat(X=:=X) ; false. --- diff --git a/src/lib/clpb.pl b/src/lib/clpb.pl index 6b74e272..ad49f61c 100644 --- a/src/lib/clpb.pl +++ b/src/lib/clpb.pl @@ -1558,9 +1558,10 @@ sats([]) --> []. sats([A|As]) --> [clpb:sat(A)], sats(As). booleans([]) --> []. -booleans([B|Bs]) --> boolean(B), { del_clpb(B) }, booleans(Bs). +booleans([B|Bs]) --> boolean(B), booleans(Bs). boolean(Var) --> + { del_clpb(Var) }, ( { get_attr(Var, clpb_omit_boolean, true) } -> [] ; [clpb:sat(Var =:= Var)] ).