[PPL-devel] [GIT] ppl/ppl(termination): test10() and test11() witness a bug in termination_test_PR().

Roberto Bagnara bagnara at cs.unipr.it
Wed Mar 10 12:23:52 CET 2010


Module: ppl/ppl
Branch: termination
Commit: 147de8cc7cdf60650f0425c9aef5132ef9a8f6d0
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=147de8cc7cdf60650f0425c9aef5132ef9a8f6d0

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Wed Mar 10 15:23:12 2010 +0400

test10() and test11() witness a bug in termination_test_PR().

---

 tests/Polyhedron/termination1.cc |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/tests/Polyhedron/termination1.cc b/tests/Polyhedron/termination1.cc
index 5bc65a4..c654942 100644
--- a/tests/Polyhedron/termination1.cc
+++ b/tests/Polyhedron/termination1.cc
@@ -184,6 +184,38 @@ test07() {
   return termination_test_MS(bds);
 }
 
+bool
+test10() {
+  Variable xp1(0);
+  Variable xp2(1);
+  Variable x1(2);
+  Variable x2(3);
+  C_Polyhedron ph(4);
+  ph.add_constraint(xp1 - x1 >= 0);
+  ph.add_constraint(-xp1 + x1 >= 0);
+  ph.add_constraint(-xp2 + x2 >= 1);
+  ph.add_constraint(xp2 >= 0);
+  ph.add_constraint(xp1 >= 1);
+
+  return termination_test_MS(ph);
+}
+
+bool
+test11() {
+  Variable xp1(0);
+  Variable xp2(1);
+  Variable x1(2);
+  Variable x2(3);
+  C_Polyhedron ph(4);
+  ph.add_constraint(xp1 - x1 >= 0);
+  ph.add_constraint(-xp1 + x1 >= 0);
+  ph.add_constraint(-xp2 + x2 >= 1);
+  ph.add_constraint(xp2 >= 0);
+  ph.add_constraint(xp1 >= 1);
+
+  return termination_test_PR(ph);
+}
+
 } // namespace
 
 BEGIN_MAIN
@@ -194,4 +226,6 @@ BEGIN_MAIN
   //DO_TEST(test05);
   DO_TEST(test06);
   //DO_TEST(test07);
+  DO_TEST(test10);
+  DO_TEST_F(test11);
 END_MAIN




More information about the PPL-devel mailing list