[PPL-devel] [GIT] ppl/ppl(master): Changed test04 to print more info when noisy.

Enea Zaffanella zaffanella at cs.unipr.it
Fri Jul 13 16:03:29 CEST 2012


Module: ppl/ppl
Branch: master
Commit: 8a29319f037b70bef7b59992a1f95132aa9254cc
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=8a29319f037b70bef7b59992a1f95132aa9254cc

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Fri Jul 13 15:40:36 2012 +0200

Changed test04 to print more info when noisy.

---

 tests/Concrete_Expression/polyhedron2.cc |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/tests/Concrete_Expression/polyhedron2.cc b/tests/Concrete_Expression/polyhedron2.cc
index 8ac9cf3..4577b3d 100644
--- a/tests/Concrete_Expression/polyhedron2.cc
+++ b/tests/Concrete_Expression/polyhedron2.cc
@@ -119,27 +119,26 @@ test04() {
   FP_Interval_Abstract_Store store(2);
   store.set_interval(A, tmp0);
   store.set_interval(B, tmp0);
-  FP_Interval tmp(tmp0);
-  tmp = 2;
-  tmp /= FP_Interval(3);
   FP_Linear_Form la(A);
   FP_Linear_Form lb(B);
-  FP_Linear_Form lk(tmp);
+
+  FP_Interval tmp(2);
+  tmp /= FP_Interval(3);
 
   C_Polyhedron ph(2);
   ph.generalized_refine_with_linear_form_inequality(
-    lk, la, GREATER_THAN);
-  tmp = 1;
-  lk -= tmp;
+    FP_Linear_Form(tmp), la, GREATER_THAN);
+  tmp = -1;
+  tmp /= FP_Interval(3);
   ph.generalized_refine_with_linear_form_inequality(
-    lk, -la, GREATER_OR_EQUAL);
+    FP_Linear_Form(tmp), -la, GREATER_OR_EQUAL);
+  tmp = 1;
+  tmp /= FP_Interval(3);
   ph.generalized_refine_with_linear_form_inequality(
-    lb, -lk, LESS_OR_EQUAL);
+    lb, FP_Linear_Form(tmp), LESS_OR_EQUAL);
   tmp = 0;
-  lk = FP_Linear_Form(tmp);
   ph.generalized_refine_with_linear_form_inequality(
-    -lb, lk, LESS_THAN);
-  print_constraints(ph, "*** ph ***");
+    -lb, FP_Linear_Form(tmp), LESS_THAN);
 
   C_Polyhedron known_result1(2);
   known_result1.add_constraint(3*A >= 1);
@@ -148,11 +147,17 @@ test04() {
   known_result1.add_constraint(3*B <= 1);
   print_constraints(known_result1, "*** known_result1 ***");
 
+  Box<FP_Interval> box(ph);
+  print_constraints(ph, "*** ph ***");
+  print_constraints(box, "*** box ***");
+
   bool ok1 = ph.contains(known_result1);
 
   ph.refine_fp_interval_abstract_store(store);
   nout << "*** FP_Interval_Abstract_Store ***" << endl;
 
+  nout << "tmp0 = " << tmp0 << endl;
+
   nout << "A = " << store.get_interval(A) << endl;
   bool ok2 = tmp0.contains(store.get_interval(A));
 




More information about the PPL-devel mailing list