
Module: ppl/ppl Branch: master Commit: 27d130ce3196cfa2d254fc5a99b265eeb6b27f95 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=27d130ce3196c...
Author: Roberto Bagnara bagnara@cs.unipr.it Date: Thu Jan 6 10:42:46 2011 +0100
Replaced several occurrences of assert() by PPL_ASSERT().
---
src/Interval.templates.hh | 2 +- src/Octagonal_Shape.templates.hh | 2 +- src/PIP_Problem.inlines.hh | 2 +- src/PIP_Tree.cc | 4 ++-- src/Partially_Reduced_Product.inlines.hh | 2 +- src/Partially_Reduced_Product.templates.hh | 4 ++-- src/Polyhedron_public.cc | 2 +- src/conversion.cc | 2 +- src/globals.inlines.hh | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/Interval.templates.hh b/src/Interval.templates.hh index 11dff54..f6e306e 100644 --- a/src/Interval.templates.hh +++ b/src/Interval.templates.hh @@ -144,7 +144,7 @@ Interval<Boundary, Info>::Interval(const char* s) { // Get the upper bound. Boundary upper_bound; Result upper_r = assign_r(upper_bound, s, ROUND_UP); - assert(upper_r != V_CVT_STR_UNK && upper_r != V_NAN); + PPL_ASSERT(upper_r != V_CVT_STR_UNK && upper_r != V_NAN); upper_r = result_relation_class(upper_r);
// Buld the interval. diff --git a/src/Octagonal_Shape.templates.hh b/src/Octagonal_Shape.templates.hh index 8358b85..ff8e003 100644 --- a/src/Octagonal_Shape.templates.hh +++ b/src/Octagonal_Shape.templates.hh @@ -971,7 +971,7 @@ Octagonal_Shape<T>::frequency(const Linear_Expression& expr, // Check the octagonal constraints between `v' and the other dimensions // that have non-zero coefficient in `le'. else { - assert(!constant_v); + PPL_ASSERT(!constant_v); using namespace Implementation::Octagonal_Shapes; const dimension_type ci = coherent_index(i); for (Row_Iterator j_iter = i_iter; j_iter != m_end; j_iter += 2) { diff --git a/src/PIP_Problem.inlines.hh b/src/PIP_Problem.inlines.hh index d09b3c3..1921fa0 100644 --- a/src/PIP_Problem.inlines.hh +++ b/src/PIP_Problem.inlines.hh @@ -74,7 +74,7 @@ PIP_Problem::operator=(const PIP_Problem& y) {
inline PIP_Problem::Control_Parameter_Value PIP_Problem::get_control_parameter(Control_Parameter_Name n) const { - assert(n >= 0 && n < CONTROL_PARAMETER_NAME_SIZE); + PPL_ASSERT(n >= 0 && n < CONTROL_PARAMETER_NAME_SIZE); return control_parameters[n]; }
diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc index 9051c85..65fc77e 100644 --- a/src/PIP_Tree.cc +++ b/src/PIP_Tree.cc @@ -2819,8 +2819,8 @@ PIP_Solution_Node::solve(const PIP_Problem& pip, generate_cut(best_i, all_params, context, space_dim); } else { - assert(cutting_strategy == PIP_Problem::CUTTING_STRATEGY_DEEPEST - || cutting_strategy == PIP_Problem::CUTTING_STRATEGY_ALL); + PPL_ASSERT(cutting_strategy == PIP_Problem::CUTTING_STRATEGY_DEEPEST + || cutting_strategy == PIP_Problem::CUTTING_STRATEGY_ALL); // Find the row with simplest parametric part // which will generate the "deepest" cut. PPL_DIRTY_TEMP_COEFFICIENT(best_score); diff --git a/src/Partially_Reduced_Product.inlines.hh b/src/Partially_Reduced_Product.inlines.hh index a4c0929..2e24c89 100644 --- a/src/Partially_Reduced_Product.inlines.hh +++ b/src/Partially_Reduced_Product.inlines.hh @@ -357,7 +357,7 @@ Partially_Reduced_Product<D1, D2, R> y.reduce(); d1.time_elapse_assign(y.d1); d2.time_elapse_assign(y.d2); - assert(OK()); + PPL_ASSERT(OK()); }
template <typename D1, typename D2, typename R> diff --git a/src/Partially_Reduced_Product.templates.hh b/src/Partially_Reduced_Product.templates.hh index 174a57d..febac01 100644 --- a/src/Partially_Reduced_Product.templates.hh +++ b/src/Partially_Reduced_Product.templates.hh @@ -495,9 +495,9 @@ void Constraints_Reduction<D1, D2>::product_reduce(D1& d1, D2& d2) { template <typename D1, typename D2> bool shrink_to_congruence_no_check(D1& d1, D2& d2, const Congruence& cg) { // It is assumed that cg is a proper congruence. - assert(cg.modulus() != 0); + PPL_ASSERT(cg.modulus() != 0); // It is assumed that cg is satisfied by all points in d1. - assert(d1.relation_with(cg) == Poly_Con_Relation::is_included()); + PPL_ASSERT(d1.relation_with(cg) == Poly_Con_Relation::is_included());
// Build the linear expression for the congruence cg. Linear_Expression e; diff --git a/src/Polyhedron_public.cc b/src/Polyhedron_public.cc index b1d9583..ea2efef 100644 --- a/src/Polyhedron_public.cc +++ b/src/Polyhedron_public.cc @@ -3513,7 +3513,7 @@ PPL::Polyhedron::frequency(const Linear_Expression& expr, } else { // We have a point or a closure point. - assert(gen_sys_i.is_point() || gen_sys_i.is_closure_point()); + PPL_ASSERT(gen_sys_i.is_point() || gen_sys_i.is_closure_point()); // Notice that we are ignoring the constant term in `expr' here. // We will add it to the value if there is a constant value. assign_r(candidate.get_num(), sp, ROUND_NOT_NEEDED); diff --git a/src/conversion.cc b/src/conversion.cc index a7297ec..ba975a0 100644 --- a/src/conversion.cc +++ b/src/conversion.cc @@ -715,7 +715,7 @@ PPL::Polyhedron::conversion(Linear_System& source, redundant = true; break; } - assert(bound >= num_lines_or_equalities); + PPL_ASSERT(bound >= num_lines_or_equalities); WEIGHT_ADD_MUL(15, bound - num_lines_or_equalities); if (!redundant) { // Adding the new ray to `dest' and the corresponding diff --git a/src/globals.inlines.hh b/src/globals.inlines.hh index f44e435..8fd6be5 100644 --- a/src/globals.inlines.hh +++ b/src/globals.inlines.hh @@ -67,7 +67,7 @@ maybe_abandon() { inline dimension_type compute_capacity(const dimension_type requested_size, const dimension_type maximum_size) { - assert(requested_size <= maximum_size); + PPL_ASSERT(requested_size <= maximum_size); // Speculation factor 2. return (requested_size < maximum_size / 2) ? 2*(requested_size + 1)