[ppl] 25/68: Imported Debian patch 0.10.2-3

Andreas Tille tille at debian.org
Sat Nov 12 08:40:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository ppl.

commit c92c94d941fb0b2d8ae45443c67492f3e8ecc918
Author: Michael Tautschnig <mt at debian.org>
Date:   Fri Oct 16 12:33:08 2009 +0200

    Imported Debian patch 0.10.2-3
---
 debian/README.source                               |   7 +
 debian/changelog                                   |  11 +
 debian/control                                     |  20 +-
 debian/libppl-swi.dirs                             |   2 +
 debian/libppl-swi.install                          |   3 +
 debian/libppl-swi.links                            |   1 +
 .../21c69b39730e0fb032395b07467b2ac3936ca124       |  31 ++
 .../325ba80abd8c06c5dd740d35064302bbe65e251b       | 355 +++++++++++++++++++++
 .../b52a2d273f4f96eec4a2ac5bb453756906e52a88       |  57 ++++
 .../dfff7e13e8817970647c38289b1f4e8d94999ea2       | 267 ++++++++++++++++
 debian/patches/exception_tests_alpha               |  79 +++++
 debian/patches/series                              |   6 +-
 debian/rules                                       |   3 +-
 debian/watch                                       |   4 +-
 14 files changed, 840 insertions(+), 6 deletions(-)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..71b748e
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,7 @@
+We usually package stable releases from
+http://www.cs.unipr.it/ppl/Download/ftp/releases/LATEST/, but it may at some
+point be desirable to package snapshots:
+http://www.cs.unipr.it/ppl/Download/ftp/snapshots/
+
+Patches are best coordinated with upstream, who is quick in responding and
+fixing bugs.
diff --git a/debian/changelog b/debian/changelog
index d494904..0c503fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+ppl (0.10.2-3) unstable; urgency=low
+
+  * Bumped Standars-Version to 3.8.3 (no changes).
+  * Added README.source.
+  * Added current upstream patches for 0.10.2.
+  * Don't watch snapshots, only do stable releases.
+  * Added SWI-Prolog bindings (new package libppl-swi, thanks Israel Herraiz
+    <isra at herraiz.org>). Closes: #540083.
+
+ -- Michael Tautschnig <mt at debian.org>  Fri, 16 Oct 2009 12:33:08 +0200
+
 ppl (0.10.2-2) unstable; urgency=low
 
   * debian/rules: Use findstring instead of filter. This should really run
diff --git a/debian/control b/debian/control
index 005639c..5f44686 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,8 @@ Section: libs
 Priority: optional
 Maintainer: Debian GCC Maintainers <debian-gcc at lists.debian.org>
 Uploaders: Michael Tautschnig <mt at debian.org>, Arthur Loiret <aloiret at debian.org>
-Standards-Version: 3.8.1
-Build-Depends: debhelper (>= 6.0.7~), quilt, libgmp3-dev (>= 4.1.3), autoconf, automake, libtool, autotools-dev
+Standards-Version: 3.8.3
+Build-Depends: debhelper (>= 6.0.7~), quilt, libgmp3-dev (>= 4.1.3), autoconf, automake, libtool, autotools-dev, swi-prolog
 Build-Depends-Indep: doxygen, graphviz, texlive-base-bin, texlive-latex-extra, texlive-latex-recommended, texlive-fonts-recommended, xpdf-utils | poppler-utils, ghostscript, texlive-extra-utils
 Homepage: http://www.cs.unipr.it/ppl/
 
@@ -99,3 +99,19 @@ Description: Parma Polyhedra Library: Documentation
  exception-safe, rather efficient and thoroughly documented.
  .
  This package provides the documentation.
+
+Package: libppl-swi
+Architecture: any
+Depends: libppl7 (= ${binary:Version}), ${shlibs:Depends}, swi-prolog
+Description: Parma Polyhedra Library (SWI Prolog interface)
+ The Parma Polyhedra Library (PPL) is a C++ library for the
+ manipulation of (not necessarily closed) convex polyhedra and other
+ numerical abstractions.  The applications of convex polyhedra include
+ program analysis, optimized compilation, integer and combinatorial
+ optimization and statistical data-editing.  The Parma Polyhedra
+ Library is user friendly (you write `x + 2*y + 5*z <= 7' when you
+ mean it), fully dynamic (available virtual memory is the only
+ limitation to the dimension of anything), written in standard C++,
+ exception-safe, rather efficient and thoroughly documented.
+ .
+ This package provides the SWI Prolog interface.
diff --git a/debian/libppl-swi.dirs b/debian/libppl-swi.dirs
new file mode 100644
index 0000000..0f2e1c8
--- /dev/null
+++ b/debian/libppl-swi.dirs
@@ -0,0 +1,2 @@
+usr/lib/ppl
+usr/bin
diff --git a/debian/libppl-swi.install b/debian/libppl-swi.install
new file mode 100644
index 0000000..553bcac
--- /dev/null
+++ b/debian/libppl-swi.install
@@ -0,0 +1,3 @@
+usr/lib/ppl/libppl_swiprolog*
+usr/lib/ppl/ppl_swiprolog.*
+usr/bin/ppl_pl
diff --git a/debian/libppl-swi.links b/debian/libppl-swi.links
new file mode 100644
index 0000000..a95339a
--- /dev/null
+++ b/debian/libppl-swi.links
@@ -0,0 +1 @@
+usr/share/doc/libppl7 usr/share/doc/libppl-swi
diff --git a/debian/patches/21c69b39730e0fb032395b07467b2ac3936ca124 b/debian/patches/21c69b39730e0fb032395b07467b2ac3936ca124
new file mode 100644
index 0000000..1ba31d0
--- /dev/null
+++ b/debian/patches/21c69b39730e0fb032395b07467b2ac3936ca124
@@ -0,0 +1,31 @@
+From 21c69b39730e0fb032395b07467b2ac3936ca124 Mon Sep 17 00:00:00 2001
+From: Roberto Bagnara <bagnara at cs.unipr.it>
+Date: Wed, 5 Aug 2009 14:48:04 +0200
+Subject: [PATCH] Make sure a definition for member/2 and append/3 is available.
+
+---
+ interfaces/Prolog/SWI/swi_prolog_generated_test.pl |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/interfaces/Prolog/SWI/swi_prolog_generated_test.pl b/interfaces/Prolog/SWI/swi_prolog_generated_test.pl
+index a10edbb..92f8e08 100644
+--- a/interfaces/Prolog/SWI/swi_prolog_generated_test.pl
++++ b/interfaces/Prolog/SWI/swi_prolog_generated_test.pl
+@@ -20,6 +20,14 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
+ For the most up-to-date information see the Parma Polyhedra Library
+ site: http://www.cs.unipr.it/ppl/ . */
+ 
++member(X, [X|_]).
++member(X, [_|T]) :-
++    member(X, T).
++
++append([], L, L).
++append([H|T], L, [H|R]) :-
++    append(T, L, R).
++
+ :-  ensure_loaded('ppl_prolog_generated_test_main.pl').
+ 
+ prolog_system('SWI').
+-- 
+1.6.0.6
+
diff --git a/debian/patches/325ba80abd8c06c5dd740d35064302bbe65e251b b/debian/patches/325ba80abd8c06c5dd740d35064302bbe65e251b
new file mode 100644
index 0000000..8452b18
--- /dev/null
+++ b/debian/patches/325ba80abd8c06c5dd740d35064302bbe65e251b
@@ -0,0 +1,355 @@
+From 325ba80abd8c06c5dd740d35064302bbe65e251b Mon Sep 17 00:00:00 2001
+From: Enea Zaffanella <zaffanella at cs.unipr.it>
+Date: Fri, 7 Aug 2009 10:39:38 +0200
+Subject: [PATCH] Corrected implementation of NNC_Polyhedron::upper_bound_assign_if_exact().
+ Added a few tests for regression checking.
+
+---
+ src/Polyhedron_nonpublic.cc          |  103 +++++++++++++++++------
+ tests/Polyhedron/polyhullifexact2.cc |  152 ++++++++++++++++++++++++++++++++++
+ 2 files changed, 227 insertions(+), 28 deletions(-)
+
+Edited by Michael Tautschnig <mt at debian.org>: Replaced PPL_ASSERT by assert as
+the former is not yet defined in this release
+
+diff --git a/src/Polyhedron_nonpublic.cc b/src/Polyhedron_nonpublic.cc
+index 26bfdf5..1a55c5f 100644
+--- a/src/Polyhedron_nonpublic.cc
++++ b/src/Polyhedron_nonpublic.cc
+@@ -1641,6 +1641,7 @@ PPL::Polyhedron::BHZ09_NNC_poly_hull_assign_if_exact(const Polyhedron& y) {
+     x.update_sat_g();
+   const Bit_Matrix& x_sat = x.sat_g;
+ 
++  Bit_Row x_cs_condition_3;
+   Bit_Row x_gs_condition_3;
+   Bit_Row all_ones;
+   all_ones.set_until(x_gs_num_rows);
+@@ -1658,6 +1659,7 @@ PPL::Polyhedron::BHZ09_NNC_poly_hull_assign_if_exact(const Polyhedron& y) {
+       return false;
+     if (x_c.is_strict_inequality()) {
+       // Postpone check for condition 3.
++      x_cs_condition_3.set(i);
+       set_intersection(x_closure_points, saturators, tmp_set);
+       set_union(x_gs_condition_3, tmp_set, x_gs_condition_3);
+     }
+@@ -1700,6 +1702,7 @@ PPL::Polyhedron::BHZ09_NNC_poly_hull_assign_if_exact(const Polyhedron& y) {
+     y.update_sat_g();
+   const Bit_Matrix& y_sat = y.sat_g;
+ 
++  Bit_Row y_cs_condition_3;
+   Bit_Row y_gs_condition_3;
+   all_ones.clear();
+   all_ones.set_until(y_gs_num_rows);
+@@ -1709,13 +1712,13 @@ PPL::Polyhedron::BHZ09_NNC_poly_hull_assign_if_exact(const Polyhedron& y) {
+     if (x.relation_with(y_c).implies(Poly_Con_Relation::is_included()))
+       continue;
+     set_difference(all_ones, y_sat[i], saturators);
+-    // CHECKME: do we really need to re-check condition 1?
+     // Check condition 1.
+     set_intersection(y_nonpoints_nonred_in_x, saturators, tmp_set);
+     if (!tmp_set.empty())
+       return false;
+     if (y_c.is_strict_inequality()) {
+       // Postpone check for condition 3.
++      y_cs_condition_3.set(i);
+       set_intersection(y_closure_points, saturators, tmp_set);
+       set_union(y_gs_condition_3, tmp_set, y_gs_condition_3);
+     }
+@@ -1727,7 +1730,29 @@ PPL::Polyhedron::BHZ09_NNC_poly_hull_assign_if_exact(const Polyhedron& y) {
+     }
+   }
+ 
+-  // Now check condition 3 on `x_gs_condition_3' and `y_gs_condition_3'.
++  // Now considering condition 3.
++
++  if (x_cs_condition_3.empty() && y_cs_condition_3.empty()) {
++    // No test for condition 3 is needed.
++    // The hull is exact: compute it.
++    for (dimension_type j = y_gs_num_rows; j-- > 0; )
++      if (y_gs_nonred_in_x[j])
++        add_generator(y_gs[j]);
++    return true;
++  }
++
++  // We have anyway to compute the upper bound and its constraints too.
++  Polyhedron ub(x);
++  for (dimension_type j = y_gs_num_rows; j-- > 0; )
++    if (y_gs_nonred_in_x[j])
++      ub.add_generator(y_gs[j]);
++  (void) ub.minimize();
++  assert(!ub.is_empty());
++
++  // NOTE: the following computation of x_gs_condition_3_not_in_y
++  // (resp., y_gs_condition_3_not_in_x) is not required for correctness.
++  // It is done so as to later apply a speculative test
++  // (i.e., a non-conclusive but computationally lighter test).
+ 
+   // Filter away from `x_gs_condition_3' those closure points
+   // that, when considered as points, would belong to `y',
+@@ -1751,7 +1776,6 @@ PPL::Polyhedron::BHZ09_NNC_poly_hull_assign_if_exact(const Polyhedron& y) {
+         break;
+     }
+   }
+-
+   // Symmetrically, filter away from `y_gs_condition_3' those
+   // closure points that, when considered as points, would belong to `x',
+   // i.e., those that violate no strict constraint in `x_cs'.
+@@ -1775,23 +1799,7 @@ PPL::Polyhedron::BHZ09_NNC_poly_hull_assign_if_exact(const Polyhedron& y) {
+     }
+   }
+ 
+-  if (x_gs_condition_3_not_in_y.empty()
+-      && y_gs_condition_3_not_in_x.empty()) {
+-    // The hull is exact: compute it.
+-    for (dimension_type j = y_gs_num_rows; j-- > 0; )
+-      if (y_gs_nonred_in_x[j])
+-        add_generator(y_gs[j]);
+-    return true;
+-  }
+-
+-  // We have anyway to compute the upper bound and its constraints too.
+-  Polyhedron ub(x);
+-  for (dimension_type j = y_gs_num_rows; j-- > 0; )
+-    if (y_gs_nonred_in_x[j])
+-      ub.add_generator(y_gs[j]);
+-  (void) ub.minimize();
+-  assert(!ub.is_empty());
+-
++  // NOTE: here we apply the speculative test.
+   // Check if there exists a closure point in `x_gs_condition_3_not_in_y'
+   // or `y_gs_condition_3_not_in_x' that belongs (as point) to the hull.
+   // If so, the hull is not exact.
+@@ -1820,15 +1828,54 @@ PPL::Polyhedron::BHZ09_NNC_poly_hull_assign_if_exact(const Polyhedron& y) {
+     }
+   }
+ 
+-  if (x_gs_condition_3_not_in_y.empty()
+-      && y_gs_condition_3_not_in_x.empty()) {
+-    // No closure point satisfies condition 3, hence the hull is exact.
+-    swap(ub);
+-    return true;
+-  }
+-  else
+-    // The hull is not exact.
++  if (!(x_gs_condition_3_not_in_y.empty()
++        && y_gs_condition_3_not_in_x.empty()))
++    // There exist a closure point satisfying condition 3,
++    // hence the hull is not exact.
+     return false;
++
++  // The speculative test was not successful:
++  // apply the expensive (but conclusive) test for condition 3.
++
++  // Consider strict inequalities in `x' violated by `y'.
++  for (dimension_type i = x_cs_condition_3.first();
++       i != ULONG_MAX; i = x_cs_condition_3.next(i)) {
++    const Constraint& x_cs_i = x_cs[i];
++    assert(x_cs_i.is_strict_inequality());
++    // Build the equality constraint induced by x_cs_i.
++    Constraint eq_i(Linear_Expression(x_cs_i) == 0);
++    assert(!(ub.relation_with(eq_i)
++                 .implies(Poly_Con_Relation::is_disjoint())));
++    Polyhedron ub_inters_hyperplane(ub);
++    ub_inters_hyperplane.add_constraint(eq_i);
++    Polyhedron y_inters_hyperplane(y);
++    y_inters_hyperplane.add_constraint(eq_i);
++    if (!y_inters_hyperplane.contains(ub_inters_hyperplane))
++      // The hull is not exact.
++      return false;
++  }
++
++  // Consider strict inequalities in `y' violated by `x'.
++  for (dimension_type i = y_cs_condition_3.first();
++       i != ULONG_MAX; i = y_cs_condition_3.next(i)) {
++    const Constraint& y_cs_i = y_cs[i];
++    assert(y_cs_i.is_strict_inequality());
++    // Build the equality constraint induced by y_cs_i.
++    Constraint eq_i(Linear_Expression(y_cs_i) == 0);
++    assert(!(ub.relation_with(eq_i)
++                 .implies(Poly_Con_Relation::is_disjoint())));
++    Polyhedron ub_inters_hyperplane(ub);
++    ub_inters_hyperplane.add_constraint(eq_i);
++    Polyhedron x_inters_hyperplane(x);
++    x_inters_hyperplane.add_constraint(eq_i);
++    if (!x_inters_hyperplane.contains(ub_inters_hyperplane))
++      // The hull is not exact.
++      return false;
++  }
++
++  // The hull is exact.
++  swap(ub);
++  return true;
+ }
+ 
+ bool
+diff --git a/tests/Polyhedron/polyhullifexact2.cc b/tests/Polyhedron/polyhullifexact2.cc
+index 1c77f4f..ede2d5f 100644
+--- a/tests/Polyhedron/polyhullifexact2.cc
++++ b/tests/Polyhedron/polyhullifexact2.cc
+@@ -303,6 +303,154 @@ test09() {
+   return ok;
+ }
+ 
++bool
++test10() {
++  Variable x(0);
++  Variable y(1);
++
++  NNC_Polyhedron ph1(2, UNIVERSE);
++  ph1.add_constraint(x > 0);
++  ph1.add_constraint(x < 1);
++  ph1.add_constraint(y > 0);
++  ph1.add_constraint(y < 2);
++
++  print_constraints(ph1, "*** ph1 ***");
++
++  NNC_Polyhedron ph2(2, UNIVERSE);
++  ph2.add_constraint(x > 1);
++  ph2.add_constraint(x < 2);
++  ph2.add_constraint(y > 0);
++  ph2.add_constraint(y < 2);
++
++  print_constraints(ph2, "*** ph2 ***");
++
++  NNC_Polyhedron known_result(ph1);
++
++  bool ok = !ph1.upper_bound_assign_if_exact(ph2);
++  ok &= (ph1 == known_result);
++
++  print_constraints(ph1, "*** ph1.upper_bound_assign_if_exact(ph2) ***");
++
++  return ok;
++}
++
++bool
++test11() {
++  Variable x(0);
++  Variable y(1);
++
++  NNC_Polyhedron ph1(2, UNIVERSE);
++  ph1.add_constraint(x > 0);
++  ph1.add_constraint(x < 1);
++  ph1.add_constraint(y > 0);
++  ph1.add_constraint(y < 2);
++
++  print_constraints(ph1, "*** ph1 ***");
++
++  NNC_Polyhedron ph2(2, UNIVERSE);
++  ph2.add_constraint(x >= 1);
++  ph2.add_constraint(x < 2);
++  ph2.add_constraint(y > 0);
++  ph2.add_constraint(y < 2);
++
++  print_constraints(ph2, "*** ph2 ***");
++
++  NNC_Polyhedron known_result(2, UNIVERSE);
++  known_result.add_constraint(x > 0);
++  known_result.add_constraint(x < 2);
++  known_result.add_constraint(y > 0);
++  known_result.add_constraint(y < 2);
++
++  bool ok = ph1.upper_bound_assign_if_exact(ph2);
++  ok &= (ph1 == known_result);
++
++  print_constraints(ph1, "*** ph1.upper_bound_assign_if_exact(ph2) ***");
++
++  return ok;
++}
++
++bool
++test12() {
++  Variable x(0);
++  Variable y(1);
++  Variable z(2);
++
++  NNC_Polyhedron ph1(3, UNIVERSE);
++  ph1.add_constraint(x > 0);
++  ph1.add_constraint(x <= 1);
++  ph1.add_constraint(y > 0);
++  ph1.add_constraint(y < 2);
++  ph1.add_constraint(z > 0);
++  ph1.add_constraint(z < 2);
++
++  print_constraints(ph1, "*** ph1 ***");
++
++  NNC_Polyhedron ph2(3, UNIVERSE);
++  ph2.add_constraint(x >= 1);
++  ph2.add_constraint(x < 2);
++  ph2.add_constraint(y > 0);
++  ph2.add_constraint(y < 2);
++  ph2.add_constraint(z > 0);
++  ph2.add_constraint(z < 2);
++
++  print_constraints(ph2, "*** ph2 ***");
++
++  NNC_Polyhedron known_result(3, UNIVERSE);
++  known_result.add_constraint(x > 0);
++  known_result.add_constraint(x < 2);
++  known_result.add_constraint(y > 0);
++  known_result.add_constraint(y < 2);
++  known_result.add_constraint(z > 0);
++  known_result.add_constraint(z < 2);
++
++  bool ok = ph1.upper_bound_assign_if_exact(ph2);
++  ok &= (ph1 == known_result);
++
++  print_constraints(ph1, "*** ph1.upper_bound_assign_if_exact(ph2) ***");
++
++  return ok;
++}
++
++bool
++test13() {
++  Variable x(0);
++  Variable y(1);
++  Variable z(2);
++
++  NNC_Polyhedron ph1(3, UNIVERSE);
++  ph1.add_constraint(x > 0);
++  ph1.add_constraint(x <= 1);
++  ph1.add_constraint(y > 0);
++  ph1.add_constraint(y < 2);
++  ph1.add_constraint(z > 0);
++  ph1.add_constraint(z <= 2);
++  ph1.add_constraint(x + z < 3);
++
++  print_constraints(ph1, "*** ph1 ***");
++  print_generators(ph1.minimized_generators(), "*** ph1 ***");
++
++  NNC_Polyhedron ph2(3, UNIVERSE);
++  ph2.add_constraint(x >= 1);
++  ph2.add_constraint(x < 2);
++  ph2.add_constraint(y > 0);
++  ph2.add_constraint(y < 2);
++  ph2.add_constraint(z > 0);
++  ph2.add_constraint(z <= 2);
++  ph1.add_constraint(x - z > -1);
++
++  print_constraints(ph2, "*** ph2 ***");
++  print_generators(ph2.minimized_generators(), "*** ph2 ***");
++
++  NNC_Polyhedron known_result(ph1);
++
++  bool ok = !ph1.upper_bound_assign_if_exact(ph2);
++  ok &= (ph1 == known_result);
++
++  print_constraints(ph1, "*** ph1.upper_bound_assign_if_exact(ph2) ***");
++
++  return ok;
++}
++
+ } // namespace
+ 
+ BEGIN_MAIN
+@@ -315,4 +463,8 @@ BEGIN_MAIN
+   DO_TEST(test07);
+   DO_TEST(test08);
+   DO_TEST(test09);
++  DO_TEST(test10);
++  DO_TEST(test11);
++  DO_TEST(test12);
++  DO_TEST(test13);
+ END_MAIN
+-- 
+1.6.0.6
+
diff --git a/debian/patches/b52a2d273f4f96eec4a2ac5bb453756906e52a88 b/debian/patches/b52a2d273f4f96eec4a2ac5bb453756906e52a88
new file mode 100644
index 0000000..a014d7d
--- /dev/null
+++ b/debian/patches/b52a2d273f4f96eec4a2ac5bb453756906e52a88
@@ -0,0 +1,57 @@
+From b52a2d273f4f96eec4a2ac5bb453756906e52a88 Mon Sep 17 00:00:00 2001
+From: Enea Zaffanella <zaffanella at cs.unipr.it>
+Date: Sat, 15 Aug 2009 08:15:14 +0200
+Subject: [PATCH] Corrected a bug in Pointset_Powerset methods minimize() and maximize().
+ We now return false if the powerset is found to be empty.
+
+---
+ src/Pointset_Powerset.templates.hh |   12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+diff --git a/src/Pointset_Powerset.templates.hh b/src/Pointset_Powerset.templates.hh
+index ea10566..ff79c36 100644
+--- a/src/Pointset_Powerset.templates.hh
++++ b/src/Pointset_Powerset.templates.hh
+@@ -887,6 +887,9 @@ Pointset_Powerset<PSET>::maximize(const Linear_Expression& expr,
+                                 bool& maximum) const {
+   const Pointset_Powerset& x = *this;
+   x.omega_reduce();
++  if (x.is_empty())
++    return false;
++
+   bool first = true;
+ 
+   PPL_DIRTY_TEMP_COEFFICIENT(supt_n);
+@@ -940,6 +943,9 @@ Pointset_Powerset<PSET>::maximize(const Linear_Expression& expr,
+                                 Generator& g) const {
+   const Pointset_Powerset& x = *this;
+   x.omega_reduce();
++  if (x.is_empty())
++    return false;
++
+   bool first = true;
+ 
+   PPL_DIRTY_TEMP_COEFFICIENT(supt_n);
+@@ -999,6 +1005,9 @@ Pointset_Powerset<PSET>::minimize(const Linear_Expression& expr,
+                                 bool& minimum) const {
+   const Pointset_Powerset& x = *this;
+   x.omega_reduce();
++  if (x.is_empty())
++    return false;
++
+   bool first = true;
+ 
+   PPL_DIRTY_TEMP_COEFFICIENT(inft_n);
+@@ -1052,6 +1061,9 @@ Pointset_Powerset<PSET>::minimize(const Linear_Expression& expr,
+                                 Generator& g) const {
+   const Pointset_Powerset& x = *this;
+   x.omega_reduce();
++  if (x.is_empty())
++    return false;
++
+   bool first = true;
+ 
+   PPL_DIRTY_TEMP_COEFFICIENT(inft_n);
+-- 
+1.6.0.6
+
diff --git a/debian/patches/dfff7e13e8817970647c38289b1f4e8d94999ea2 b/debian/patches/dfff7e13e8817970647c38289b1f4e8d94999ea2
new file mode 100644
index 0000000..e29c8d1
--- /dev/null
+++ b/debian/patches/dfff7e13e8817970647c38289b1f4e8d94999ea2
@@ -0,0 +1,267 @@
+From dfff7e13e8817970647c38289b1f4e8d94999ea2 Mon Sep 17 00:00:00 2001
+From: Enea Zaffanella <zaffanella at cs.unipr.it>
+Date: Sat, 15 Aug 2009 08:10:19 +0200
+Subject: [PATCH] Corrected a few expected results in Powerset/maxmin1.cc.
+ This uncovered a bug in Pointset_Powerset methods maximize() and minimize(),
+ whereby we are returning true even for empty powersets.
+
+---
+ tests/Octagonal_Shape/max_min1.cc |    1 -
+ tests/Polyhedron/max_min1.cc      |   25 ++++++++++-
+ tests/Powerset/maxmin1.cc         |   93 +++++++++++++++++++------------------
+ 3 files changed, 72 insertions(+), 47 deletions(-)
+
+diff --git a/tests/Octagonal_Shape/max_min1.cc b/tests/Octagonal_Shape/max_min1.cc
+index c0915ac..4d87172 100644
+--- a/tests/Octagonal_Shape/max_min1.cc
++++ b/tests/Octagonal_Shape/max_min1.cc
+@@ -326,7 +326,6 @@ test09() {
+ 
+ bool
+ test10() {
+-
+   TOctagonal_Shape oct(0);
+ 
+   print_constraints(oct, "*** oct ***");
+diff --git a/tests/Polyhedron/max_min1.cc b/tests/Polyhedron/max_min1.cc
+index c8da74b..8a73b99 100644
+--- a/tests/Polyhedron/max_min1.cc
++++ b/tests/Polyhedron/max_min1.cc
+@@ -132,7 +132,6 @@ test02() {
+ 
+ bool
+ test03() {
+-
+   C_Polyhedron ph(0);
+ 
+   print_constraints(ph, "*** ph ***");
+@@ -172,10 +171,34 @@ test03() {
+   return ok;
+ }
+ 
++bool
++test04() {
++  C_Polyhedron ph(2, EMPTY);
++
++  print_constraints(ph, "*** ph ***");
++
++  Coefficient num = 0;
++  Coefficient den = 0;
++  bool included = false;
++  Generator g(point());
++  Linear_Expression LE;
++  bool ok = !ph.maximize(LE, num, den, included, g)
++    && num == 0 && den == 0 && !included
++    && g.is_point()
++    && g.divisor() == 1;
++  ok = ok && !ph.minimize(LE, num, den, included, g)
++    && num == 0 && den == 0 && !included
++    && g.is_point()
++    && g.divisor() == 1;
++
++  return ok;
++}
++
+ } // namespace
+ 
+ BEGIN_MAIN
+   DO_TEST(test01);
+   DO_TEST_F8(test02);
+   DO_TEST(test03);
++  DO_TEST(test04);
+ END_MAIN
+diff --git a/tests/Powerset/maxmin1.cc b/tests/Powerset/maxmin1.cc
+index b1a351f..0973762 100644
+--- a/tests/Powerset/maxmin1.cc
++++ b/tests/Powerset/maxmin1.cc
+@@ -29,15 +29,15 @@ namespace {
+ bool
+ test01() {
+   Pointset_Powerset<C_Polyhedron> ps(0, EMPTY);
+-  Coefficient num;
+-  Coefficient den;
+-  bool included;
++  Coefficient num = 0;
++  Coefficient den = 0;
++  bool included = false;
+   Generator g(point());
+   Linear_Expression LE;
+-  bool ok = ps.maximize(LE, num, den, included)
+-    && num == 0 && den == 1 && !included;
+-  ok = ok && ps.maximize(LE, num, den, included, g)
+-    && num == 0 && den == 1 && !included
++  bool ok = !ps.maximize(LE, num, den, included)
++    && num == 0 && den == 0 && !included;
++  ok = ok && !ps.maximize(LE, num, den, included, g)
++    && num == 0 && den == 0 && !included
+     && g.is_point()
+     && g.divisor() == 1;
+ 
+@@ -69,9 +69,9 @@ test02() {
+   Constraint_System cs;
+   Linear_Expression LE = x;
+ 
+-  Coefficient max_n;
+-  Coefficient max_d;
+-  bool max_included;
++  Coefficient max_n = 0;
++  Coefficient max_d = 0;
++  bool max_included = false;
+   Generator max_g(point());
+   Pointset_Powerset<NNC_Polyhedron> ps(1, EMPTY);
+ 
+@@ -123,9 +123,9 @@ test03() {
+   Constraint_System cs;
+   Linear_Expression LE = 9*x + y;
+ 
+-  Coefficient num;
+-  Coefficient den;
+-  bool included;
++  Coefficient num = 0;
++  Coefficient den = 0;
++  bool included = false;
+   Generator g(point());
+   Pointset_Powerset<C_Polyhedron> ps(2, EMPTY);
+ 
+@@ -148,7 +148,6 @@ test03() {
+   print_generator(g);
+   nout << endl;
+ 
+-
+   if (!ok)
+     return false;
+ 
+@@ -180,16 +179,16 @@ test04() {
+   Variable x(0);
+   Linear_Expression LE = x;
+ 
+-  Coefficient num;
+-  Coefficient den;
+-  bool included;
++  Coefficient num = 0;
++  Coefficient den = 0;
++  bool included = false;
+   Generator g(point());
+   Pointset_Powerset<C_Polyhedron> ps(1, EMPTY);
+ 
+-  bool ok = ps.maximize(LE, num, den, included)
+-    && num == 0 && den == 1 && !included;
+-  ok = ok && ps.maximize(LE, num, den, included, g)
+-    && num == 0 && den == 1 && !included
++  bool ok = !ps.maximize(LE, num, den, included)
++    && num == 0 && den == 0 && !included;
++  ok = ok && !ps.maximize(LE, num, den, included, g)
++    && num == 0 && den == 0 && !included
+     && g.is_point()
+     && g.divisor() == 1;
+ 
+@@ -197,7 +196,10 @@ test04() {
+     return false;
+ 
+   ps.add_disjunct(C_Polyhedron(1));
+-  ok = !ps.maximize(LE, num, den, included, g);
++  ok = !ps.maximize(LE, num, den, included, g)
++    && num == 0 && den == 0 && !included
++    && g.is_point()
++    && g.divisor() == 1;
+ 
+   return ok;
+ }
+@@ -206,16 +208,16 @@ test04() {
+ bool
+ test05() {
+   Linear_Expression LE;
+-  Coefficient num;
+-  Coefficient den;
+-  bool included;
++  Coefficient num = 0;
++  Coefficient den = 0;
++  bool included = false;
+   Generator g(point());
+   Pointset_Powerset<C_Polyhedron> ps(0, EMPTY);
+ 
+-  bool ok = ps.minimize(LE, num, den, included)
+-    && num == 0 && den == 1 && !included;
+-  ok = ok && ps.minimize(LE, num, den, included, g)
+-    && num == 0 && den == 1 && !included
++  bool ok = !ps.minimize(LE, num, den, included)
++    && num == 0 && den == 0 && !included;
++  ok = ok && !ps.minimize(LE, num, den, included, g)
++    && num == 0 && den == 0 && !included
+     && g.is_point()
+     && g.divisor() == 1;
+ 
+@@ -247,9 +249,9 @@ test06() {
+   Constraint_System cs;
+   Linear_Expression LE = x;
+ 
+-  Coefficient min_n;
+-  Coefficient min_d;
+-  bool min_included;
++  Coefficient min_n = 0;
++  Coefficient min_d = 0;
++  bool min_included = false;
+   Generator min_g(point());
+ 
+   Pointset_Powerset<NNC_Polyhedron> ps(1, EMPTY);
+@@ -302,9 +304,9 @@ test07() {
+   Constraint_System cs;
+   Linear_Expression LE = x + y;
+ 
+-  Coefficient num;
+-  Coefficient den;
+-  bool included;
++  Coefficient num = 0;
++  Coefficient den = 0;
++  bool included = false;
+   Generator g(point());
+   Pointset_Powerset<C_Polyhedron> ps(2, EMPTY);
+ 
+@@ -327,7 +329,6 @@ test07() {
+   print_generator(g);
+   nout << endl;
+ 
+-
+   if (!ok)
+     return false;
+ 
+@@ -359,25 +360,27 @@ test08() {
+   Variable x(0);
+   Linear_Expression LE = x;
+ 
+-  Coefficient num;
+-  Coefficient den;
+-  bool included;
++  Coefficient num = 0;
++  Coefficient den = 0;
++  bool included = false;
+   Generator g(point());
+   Pointset_Powerset<C_Polyhedron> ps(1, EMPTY);
+ 
+-  bool ok = ps.minimize(LE, num, den, included)
+-    && num == 0 && den == 1 && !included;
+-  ok = ok && ps.minimize(LE, num, den, included, g)
+-    && num == 0 && den == 1 && !included
++  bool ok = !ps.minimize(LE, num, den, included)
++    && num == 0 && den == 0 && !included;
++  ok = ok && !ps.minimize(LE, num, den, included, g)
++    && num == 0 && den == 0 && !included
+     && g.is_point()
+     && g.divisor() == 1;
+ 
+-
+   if (!ok)
+     return false;
+ 
+   ps.add_disjunct(C_Polyhedron(1));
+-  ok = !ps.minimize(LE, num, den, included, g);
++  ok = !ps.minimize(LE, num, den, included, g)
++    && num == 0 && den == 0 && !included
++    && g.is_point()
++    && g.divisor() == 1;
+ 
+   return ok;
+ }
+-- 
+1.6.0.6
+
diff --git a/debian/patches/exception_tests_alpha b/debian/patches/exception_tests_alpha
new file mode 100644
index 0000000..acdc0dc
--- /dev/null
+++ b/debian/patches/exception_tests_alpha
@@ -0,0 +1,79 @@
+Exception handling seems to be partly broken in gcc's optimizations on alpha
+(catch statements are sometimes ignored); just workaround that by disabling the
+respective tests. Most likely this is PR8966.
+--- ppl-0.10.orig/tests/Octagonal_Shape/removespacedims1.cc
++++ ppl-0.10/tests/Octagonal_Shape/removespacedims1.cc
+@@ -364,8 +364,10 @@
+   DO_TEST(test03);
+   DO_TEST(test04);
+   DO_TEST(test05);
++#ifndef __alpha__
+   DO_TEST(test06);
+   DO_TEST(test07);
++#endif
+   DO_TEST(test08);
+   DO_TEST(test09);
+   DO_TEST(test10);
+--- ppl-0.10.orig/tests/Octagonal_Shape/expandspacedim1.cc
++++ ppl-0.10/tests/Octagonal_Shape/expandspacedim1.cc
+@@ -289,6 +289,8 @@
+   DO_TEST(test06);
+   DO_TEST(test07);
+   DO_TEST(test08);
++#ifndef __alpha__
+   DO_TEST(test09);
+   DO_TEST(test10);
++#endif
+ END_MAIN
+--- ppl-0.10.orig/tests/BD_Shape/addconstraints1.cc
++++ ppl-0.10/tests/BD_Shape/addconstraints1.cc
+@@ -173,9 +173,11 @@
+ 
+ BEGIN_MAIN
+   DO_TEST(test01);
++#ifndef __alpha__
+   DO_TEST(test02);
+   DO_TEST(test03);
+   DO_TEST(test04);
+   DO_TEST(test05);
+   DO_TEST(test06);
++#endif
+ END_MAIN
+--- ppl-0.10.orig/tests/BD_Shape/boundedaffineimage1.cc
++++ ppl-0.10/tests/BD_Shape/boundedaffineimage1.cc
+@@ -480,8 +480,10 @@
+   DO_TEST(test10);
+   DO_TEST(test11);
+   DO_TEST(test12);
++#ifndef __alpha__
+   DO_TEST(test13);
+   DO_TEST(test14);
+   DO_TEST(test15);
+   DO_TEST(test16);
++#endif
+ END_MAIN
+--- ppl-0.10.orig/tests/BD_Shape/fromgensys1.cc
++++ ppl-0.10/tests/BD_Shape/fromgensys1.cc
+@@ -148,8 +148,10 @@
+ 
+ BEGIN_MAIN
+   DO_TEST(test01);
++#ifndef __alpha__
+   DO_TEST(test02);
+   DO_TEST(test03);
++#endif
+   DO_TEST(test04);
+   DO_TEST(test05);
+ END_MAIN
+--- ppl-0.10.orig/tests/BD_Shape/constrains1.cc
++++ ppl-0.10/tests/BD_Shape/constrains1.cc
+@@ -219,7 +219,9 @@
+ BEGIN_MAIN
+   DO_TEST(test01);
+   DO_TEST(test02);
++#ifndef __alpha__
+   DO_TEST(test03);
++#endif
+   DO_TEST(test04);
+   DO_TEST(test05);
+   DO_TEST(test06);
diff --git a/debian/patches/series b/debian/patches/series
index 6305ed3..cd26973 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,5 @@
-# none
+dfff7e13e8817970647c38289b1f4e8d94999ea2
+b52a2d273f4f96eec4a2ac5bb453756906e52a88
+325ba80abd8c06c5dd740d35064302bbe65e251b
+21c69b39730e0fb032395b07467b2ac3936ca124
+
diff --git a/debian/rules b/debian/rules
index 48fcb90..8cd0b20 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,7 +32,7 @@ endif
 # FOR AUTOCONF 2.52 AND NEWER ONLY
 confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 # only build the C and C++ interfaces
-confflags += --enable-interfaces=c,cxx --disable-ppl_lpsol --disable-ppl_lcdd
+confflags += --enable-interfaces=c,cxx,swi_prolog --disable-ppl_lpsol --disable-ppl_lcdd
 
 ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
   with_check := disabled by DEB_BUILD_OPTIONS.
@@ -139,6 +139,7 @@ binary-arch: install-arch
 #	dh_installman -s
 #	These directories will be symlinks instead.
 	rm -rf debian/libppl-c2/usr/share/doc/libppl-c2
+	rm -rf debian/libppl-swi/usr/share/doc/libppl-swi
 	dh_link -s
 	dh_strip -s
 	dh_compress -s
diff --git a/debian/watch b/debian/watch
index 3b44a83..cb588d6 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,6 +1,6 @@
 version=3
 
-opts="uversionmangle=s/pre/~pre/" \
-  http://www.cs.unipr.it/ppl/Download/ftp/snapshots/ppl-(.*)\.tar\.gz
+# opts="uversionmangle=s/pre/~pre/" \
+#   http://www.cs.unipr.it/ppl/Download/ftp/snapshots/ppl-(.*)\.tar\.gz
 http://www.cs.unipr.it/ppl/Download/ftp/releases/LATEST/ppl-(.*)\.tar\.gz
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ppl.git



More information about the debian-science-commits mailing list