From 1c33d2a2edb85ca235f4958f7db35bcb5bf61a21 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Sun, 3 Sep 2023 21:47:58 +0200 Subject: [PATCH] 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. --- src/lib/clpb.pl | 4 ++++ 1 file changed, 4 insertions(+) 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), -- 2.54.0