From: Markus Triska Date: Sun, 3 Sep 2023 19:47:58 +0000 (+0200) Subject: remove clpb_max/1 attribute for residual goal projection X-Git-Tag: remove~117^2~2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=1c33d2a2edb85ca235f4958f7db35bcb5bf61a21;p=scryer-prolog.git remove clpb_max/1 attribute for residual goal projection Example: ?- sat(A+B), weighted_maximum([1,1], [A,B], Max). A = 1, B = 1, Max = 2. --- diff --git a/src/lib/clpb.pl b/src/lib/clpb.pl index 3b7ac007..868ac277 100644 --- a/src/lib/clpb.pl +++ b/src/lib/clpb.pl @@ -1656,6 +1656,10 @@ attribute_goals(Var) --> booleans(RestVs) ; boolean(Var) % the variable may have occurred only in taut/2 ). +attribute_goals(Var) --> + { get_atts(Var, clpb_max(_)), + !, + put_atts(Var, -clpb_max(_)) }. attribute_goals(Var) --> { get_atts(Var, clpb_bdd(BDD)), ground(BDD),