[PPL-devel] [GIT] ppl/ppl(deprecated_0_11_removal): No longer use ppl_Polyhedron_add_constraints_and_minimize/2.

Roberto Bagnara bagnara at cs.unipr.it
Fri Apr 17 20:46:33 CEST 2009


Module: ppl/ppl
Branch: deprecated_0_11_removal
Commit: 089cc703e60fc5717f5651f7292d3b60f4f32918
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=089cc703e60fc5717f5651f7292d3b60f4f32918

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Fri Apr 17 20:46:19 2009 +0200

No longer use ppl_Polyhedron_add_constraints_and_minimize/2.

---

 interfaces/Prolog/tests/clpq.pl  |    6 ++++--
 interfaces/Prolog/tests/clpq2.pl |    9 ++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/interfaces/Prolog/tests/clpq.pl b/interfaces/Prolog/tests/clpq.pl
index 5b6502a..0f5baa0 100644
--- a/interfaces/Prolog/tests/clpq.pl
+++ b/interfaces/Prolog/tests/clpq.pl
@@ -150,8 +150,10 @@ select_clause(Atom, Head, Body) :-
 % The constraints are solved by adding them into the polyhedron.
 solve_constraints(Constraints, Polyhedron) :-
     listize_constraints(Constraints, Constraints_List),
-    % Fails if `Polyhedron' becomes empty.
-    ppl_Polyhedron_add_constraints_and_minimize(Polyhedron, Constraints_List).
+    ppl_Polyhedron_add_constraints(Polyhedron, Constraints_List),
+    % Fail if `Polyhedron' became empty.
+    \+ ppl_Polyhedron_is_empty(Polyhedron).
+
 
 listize_constraints(C, LC) :-
     listize_constraints(C, [], LC).
diff --git a/interfaces/Prolog/tests/clpq2.pl b/interfaces/Prolog/tests/clpq2.pl
index e506503..942c712 100644
--- a/interfaces/Prolog/tests/clpq2.pl
+++ b/interfaces/Prolog/tests/clpq2.pl
@@ -124,8 +124,10 @@ solve(_, { Constraints }, [Poly|Polys], [Poly|Polys]) :-
   % and check we do have constraints.
   constraints2list(Constraints, Constraints_List),
 
-  % Fails if `Poly' becomes empty.
-  ppl_Polyhedron_add_constraints_and_minimize(Poly, Constraints_List).
+  ppl_Polyhedron_add_constraints(Poly, Constraints_List),
+
+  % Fail if `Poly' became empty.
+  \+ ppl_Polyhedron_is_empty(Poly).
 
 % Built-ins may be added here.
 
@@ -167,7 +169,8 @@ solve(Topology, Atom, [Poly|Polys], Polys_Out) :-
   ppl_Polyhedron_add_space_dimensions_and_embed(Poly_Copy, Added_Dims),
 
   % First solve the parameter passing equations.
-  ppl_Polyhedron_add_constraints_and_minimize(Poly_Copy, Binding_Constraints),
+  ppl_Polyhedron_add_constraints(Poly_Copy, Binding_Constraints),
+  \+ ppl_Polyhedron_is_empty(Poly_Copy),
   % Then solve the body.
   solve(Topology, Body, [Poly_Copy, Poly|Polys], Polys_Soln_Out),
 




More information about the PPL-devel mailing list