Nicolas CANIARTwrote:
I'm currently working with PPL throught its C programming interface. For some days now, have been bothered by some missing symbols in the interface. Namely:
ppl_Polyhedron_poly_hull_assign_and_minimize (*) ppl_new_C_Polyhedron_empty_from_dimension ppl_Polyhedron_constraints ppl_new_C_Polyhedron_from_dimension
I'm working on a debian system and using the packaged version of ppl which is not necessarily up-to-date. Checking CVS log I saw that a bug was introduced in file: ppl/interfaces/C/ppl_interface_generator_c_h_code.m4 and fixed at revision 1.29 so I tried to build the lib from CVS sources but with no more success. In fact the function (*) was not missing in the debian package but is now. Since I'm not completely sure that the above-mentionned bug is related to my problem, and where to look in ppl sources, I'm turning to you. Could you, please, shed some light on my problem.
[...]
I'm currently working on a model checker which uses (amongst others) a library that was developped here at LaBRI and is called PresTAF [1]. It is a library used to encode linear sets of Naturals using automata. This library is also capable of formula synthesis from an automata. This is where PPL is used in PresTAF . The version of PPL PresTAF used to be built against is PPL-0.9. The version of PPL installed on my systems is PPL 0.10pre27 (cvs source snapshot made by the Debian Developper) and after my build problem occured I also tryed the CVS head (last update is 2 days old).
But anyway from my point of view, I'm just a client of PresTAF and I don't really know/care how it is implemented. I wrote to you because I thought that the problem I was experiencing, were related to a bug in the C interface generation (I did not find any deprecation message about these symbols in the changelog). But if you say that some of these functions are, indeed, deprecated I guess the solution to my problem is to grab a snapshot of PPL-09 and i'll see with PresTAF maintainer what he decides to do about the newer version of PPL (the maintainer is on vacation right now...)
Dear Nicolas (and AltaRica developers), the interfaces (and, in particular, the C interface) have been slightly improved passing from PPL 0.9 to PPL 0.10 (due to be released in 2 or 3 weeks from now). I attach a patch that can be used to adapt the PresTAF sources. Of course, you can do a slightly better job by conditionalizing the changes on PPL_VERSION_MAJOR and PPL_VERSION_MINOR, but perhaps this is not worth your time: PPL 0.10 will completely supersede PPL 0.9, and I see no reason, apart from licensing*, to use PPL 0.9. All the best, Roberto P.S. PPL 0.9 is GPLv2+, while PPL 0.10 is GPLv3+. -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it --- prestaf-init.c.~1~ 2008-04-04 09:12:03.000000000 +0200 +++ prestaf-init.c 2008-09-29 19:41:57.000000000 +0200 @@ -18,6 +18,7 @@ { if (ppl_initialize () != PPL_ERROR_INVALID_ARGUMENT) { + ppl_restore_pre_PPL_rounding (); PPL_IS_INIT = 1; ppl_set_error_handler (s_error_handler); } --- batof-convhull.c.~1~ 2008-04-04 09:12:03.000000000 +0200 +++ batof-convhull.c 2008-09-29 19:39:32.000000000 +0200 @@ -214,7 +214,7 @@ if (sataf_msa_is_zero (msa)) { result = ccl_new (ppl_Polyhedron_t); - ppl_new_C_Polyhedron_empty_from_dimension (result, m); + ppl_new_C_Polyhedron_from_space_dimension (result, m, 1); } else if (varindex != 0 || !(btf_is_untransient (msa->A) || @@ -396,12 +396,12 @@ if (sataf_msa_is_zero (msa)) { result = ccl_new (ppl_Polyhedron_t); - ppl_new_C_Polyhedron_empty_from_dimension (result, m); + ppl_new_C_Polyhedron_from_space_dimension (result, m, 1); } else if (sataf_msa_is_one (msa)) { result = ccl_new (ppl_Polyhedron_t); - ppl_new_C_Polyhedron_from_dimension (result, m); + ppl_new_C_Polyhedron_from_space_dimension (result, m, 0); } else { @@ -955,7 +955,7 @@ ccl_assert (ppl_Linear_Expression_OK (le) >= 0); - ppl_new_Constraint (result, le, PPL_CONSTRAINT_TYPE_LESS_THAN_OR_EQUAL); + ppl_new_Constraint (result, le, PPL_CONSTRAINT_TYPE_LESS_OR_EQUAL); ppl_delete_Linear_Expression (le); ppl_delete_Coefficient (C); @@ -979,7 +979,7 @@ ppl_Linear_Expression_add_to_coefficient (le, i, C); ccl_assert (ppl_Linear_Expression_OK (le) >= 0); - ppl_new_Constraint (result, le, PPL_CONSTRAINT_TYPE_GREATER_THAN_OR_EQUAL); + ppl_new_Constraint (result, le, PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL); ppl_delete_Linear_Expression (le); ppl_delete_Coefficient (C); @@ -1005,7 +1005,7 @@ mpz_init_set_si (one, 1); - ppl_new_C_Polyhedron_empty_from_dimension (result, m); + ppl_new_C_Polyhedron_from_space_dimension (result, m, 1); ppl_new_Linear_Expression_with_dimension (&le, m); ppl_new_Coefficient_from_mpz_t (&c, one); @@ -1019,7 +1019,7 @@ } else { - ppl_new_C_Polyhedron_from_dimension (result, m); + ppl_new_C_Polyhedron_from_space_dimension (result, m, 0); for (i = 0; i < nb_alphas; i++) { ppl_Constraint_t C; @@ -1053,7 +1053,7 @@ { int i; - ppl_new_C_Polyhedron_empty_from_dimension (result, m); + ppl_new_C_Polyhedron_from_space_dimension (result, m, 1); for (i = 0; i < nb_arrays; i++) { @@ -1061,7 +1061,7 @@ s_build_polyhedron (m, arrays[i].nb_alphas, arrays[i].alphas, xhi, &p); - ppl_Polyhedron_poly_hull_assign_and_minimize (*result, p); + ppl_Polyhedron_poly_hull_assign (*result, p); ppl_delete_Polyhedron (p); } ccl_assert (ppl_Polyhedron_OK (*result) >= 0); @@ -1125,8 +1125,8 @@ ppl_Constraint_System_const_iterator_t ci; ppl_Constraint_System_const_iterator_t ci_end; - ppl_new_C_Polyhedron_from_dimension (&A, m); - ppl_Polyhedron_constraints (P, &cs); + ppl_new_C_Polyhedron_from_space_dimension (&A, m, 0); + ppl_Polyhedron_get_constraints (P, &cs); ppl_new_Constraint_System_const_iterator (&ci); ppl_new_Constraint_System_const_iterator (&ci_end); @@ -1152,7 +1152,7 @@ *R = A; else { - ppl_Polyhedron_poly_hull_assign_and_minimize (*R, A); + ppl_Polyhedron_poly_hull_assign (*R, A); ppl_delete_Polyhedron (A); } @@ -1226,13 +1226,13 @@ case PPL_CONSTRAINT_TYPE_LESS_THAN: B_NE(le, LT, le, c); break; - case PPL_CONSTRAINT_TYPE_LESS_THAN_OR_EQUAL: + case PPL_CONSTRAINT_TYPE_LESS_OR_EQUAL: B_NE(le, LEQ, le, c); break; case PPL_CONSTRAINT_TYPE_EQUAL: B_NE(le, EQ, le, c); break; - case PPL_CONSTRAINT_TYPE_GREATER_THAN_OR_EQUAL: + case PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL: B_NE(le, GEQ, le, c); break; case PPL_CONSTRAINT_TYPE_GREATER_THAN: @@ -1294,7 +1294,7 @@ ppl_Constraint_System_const_iterator_t ci; ppl_Constraint_System_const_iterator_t ci_end; - ppl_Polyhedron_constraints (P, &cs); + ppl_Polyhedron_get_constraints (P, &cs); ppl_new_Constraint_System_const_iterator (&ci); ppl_new_Constraint_System_const_iterator (&ci_end); @@ -1387,9 +1387,9 @@ switch (ppl_Constraint_type (C)) { case PPL_CONSTRAINT_TYPE_LESS_THAN: ccl_log (log, " < "); break; - case PPL_CONSTRAINT_TYPE_LESS_THAN_OR_EQUAL: ccl_log (log, " <= "); break; + case PPL_CONSTRAINT_TYPE_LESS_OR_EQUAL: ccl_log (log, " <= "); break; case PPL_CONSTRAINT_TYPE_EQUAL: ccl_log (log, " = "); break; - case PPL_CONSTRAINT_TYPE_GREATER_THAN_OR_EQUAL: + case PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL: ccl_log (log, " >= "); break; case PPL_CONSTRAINT_TYPE_GREATER_THAN: ccl_log (log, " > "); break; @@ -1419,7 +1419,7 @@ ppl_Constraint_System_const_iterator_t ci; ppl_Constraint_System_const_iterator_t ci_end; - ppl_Polyhedron_constraints (P, &cs); + ppl_Polyhedron_get_constraints (P, &cs); ppl_new_Constraint_System_const_iterator (&ci); ppl_new_Constraint_System_const_iterator (&ci_end);