]> Repositorios git - scryer-prolog.git/commitdiff
remove clpb_max/1 attribute for residual goal projection
authorMarkus Triska <[email protected]>
Sun, 3 Sep 2023 19:47:58 +0000 (21:47 +0200)
committerMarkus Triska <[email protected]>
Sun, 3 Sep 2023 19:56:15 +0000 (21:56 +0200)
Example:

    ?- sat(A+B), weighted_maximum([1,1], [A,B], Max).
       A = 1, B = 1, Max = 2.

src/lib/clpb.pl

index 3b7ac007407e1b762acf2a3a40b3da360402150b..868ac277bfa0db12e453aa9da5d44dd384f1ba93 100644 (file)
@@ -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),