}
/* Checks for integer feasibility: returns true when the powerset
- polyhedron PS has no integer solutions. NB_PARAMS is the number of
- dimensions used as parameters in PS. If DIM is the dimension of
- PS, the parameter dimensions are in between DIM - NB_PARAMS and
- DIM. */
+ polyhedron PS has no integer solutions. */
bool
-ppl_powerset_is_empty (ppl_Pointset_Powerset_C_Polyhedron_t ps,
- int nb_params ATTRIBUTE_UNUSED)
+ppl_powerset_is_empty (ppl_Pointset_Powerset_C_Polyhedron_t ps)
{
ppl_PIP_Problem_t pip;
ppl_dimension_type d;
ppl_const_Constraint_System_t pcs;
ppl_Constraint_System_const_iterator_t first, last;
ppl_Pointset_Powerset_C_Polyhedron_iterator_t it, end;
- int i;
bool has_integer_solutions = false;
- ppl_dimension_type *ds;
- int dim_first_parameter;
if (ppl_Pointset_Powerset_C_Polyhedron_is_empty (ps))
return true;
ppl_Pointset_Powerset_C_Polyhedron_space_dimension (ps, &d);
- dim_first_parameter = d - nb_params;
- ds = (ppl_dimension_type *) XNEWVEC (ppl_dimension_type, nb_params);
-
- for (i = 0; i < nb_params; i++)
- ds[i] = dim_first_parameter + i;
-
ppl_new_Constraint_System_const_iterator (&first);
ppl_new_Constraint_System_const_iterator (&last);
ppl_new_Pointset_Powerset_C_Polyhedron_iterator (&it);
ppl_Constraint_System_begin (pcs, first);
ppl_Constraint_System_end (pcs, last);
- ppl_new_PIP_Problem_from_constraints (&pip, d, first, last, nb_params, ds);
+ ppl_new_PIP_Problem_from_constraints (&pip, d, first, last, 0, NULL);
has_integer_solutions |= ppl_PIP_Problem_is_satisfiable (pip);
ppl_delete_PIP_Problem (pip);
ppl_delete_Constraint_System_const_iterator (last);
ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (it);
ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (end);
- if (ds)
- free (ds);
return !has_integer_solutions;
}