summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Bagnara <roberto.bagnara@bugseng.com>2013-12-01 18:34:27 +0100
committerRoberto Bagnara <roberto.bagnara@bugseng.com>2013-12-01 18:34:27 +0100
commit52eba5e2a4530e997d5f257c95e5e79d510ecdfd (patch)
treeffa8f726f31a9ce2504716c5db665c40e912c626
parent02d63ee8aae4c60ae85bc85ea24cecf7d96ef09e (diff)
downloadppl-52eba5e2a4530e997d5f257c95e5e79d510ecdfd.tar.gz
ppl-52eba5e2a4530e997d5f257c95e5e79d510ecdfd.tar.bz2
ppl-52eba5e2a4530e997d5f257c95e5e79d510ecdfd.zip
Useless typedefs avoided. Formatting improved on passing.
-rw-r--r--src/Octagonal_Shape_templates.hh10
-rw-r--r--src/Polyhedron_chdims_templates.hh3
-rw-r--r--src/Polyhedron_simplify_templates.hh3
-rw-r--r--src/linearize.hh49
4 files changed, 19 insertions, 46 deletions
diff --git a/src/Octagonal_Shape_templates.hh b/src/Octagonal_Shape_templates.hh
index f4e5ae978..01ca82b0f 100644
--- a/src/Octagonal_Shape_templates.hh
+++ b/src/Octagonal_Shape_templates.hh
@@ -558,8 +558,6 @@ Octagonal_Shape<T>::refine_with_linear_form_inequality(
typedef typename OR_Matrix<N>::row_iterator row_iterator;
typedef typename OR_Matrix<N>::row_reference_type row_reference;
- typedef typename OR_Matrix<N>::const_row_iterator Row_iterator;
- typedef typename OR_Matrix<N>::const_row_reference_type Row_reference;
typedef Interval<T, Interval_Info> FP_Interval_Type;
// FIXME: there is plenty of duplicate code in the following lines. We could
@@ -3122,11 +3120,6 @@ Octagonal_Shape<T>::simplify_using_context_assign(const Octagonal_Shape& y) {
return false;
}
- typedef typename OR_Matrix<N>::row_iterator Row_Iter;
- typedef typename OR_Matrix<N>::const_row_iterator Row_CIter;
- typedef typename OR_Matrix<N>::element_iterator Elem_Iter;
- typedef typename OR_Matrix<N>::const_element_iterator Elem_CIter;
-
// Filter away the case where `x' is empty.
x.strong_closure_assign();
if (x.marked_empty()) {
@@ -5244,8 +5237,6 @@ Octagonal_Shape<T>::affine_form_image(const Variable var,
typedef typename OR_Matrix<N>::row_iterator row_iterator;
typedef typename OR_Matrix<N>::row_reference_type row_reference;
- typedef typename OR_Matrix<N>::const_row_iterator Row_iterator;
- typedef typename OR_Matrix<N>::const_row_reference_type Row_reference;
typedef Interval<T, Interval_Info> FP_Interval_Type;
using std::swap;
@@ -6383,7 +6374,6 @@ Octagonal_Shape<T>::bounded_affine_image(const Variable var,
}
typedef typename OR_Matrix<N>::row_iterator row_iterator;
- typedef typename OR_Matrix<N>::row_reference_type row_reference;
typedef typename OR_Matrix<N>::const_row_iterator Row_iterator;
typedef typename OR_Matrix<N>::const_row_reference_type Row_reference;
diff --git a/src/Polyhedron_chdims_templates.hh b/src/Polyhedron_chdims_templates.hh
index 77692c366..9e615ad70 100644
--- a/src/Polyhedron_chdims_templates.hh
+++ b/src/Polyhedron_chdims_templates.hh
@@ -34,9 +34,6 @@ Polyhedron::add_space_dimensions(Linear_System1& sys1,
Bit_Matrix& sat1,
Bit_Matrix& sat2,
dimension_type add_dim) {
-
- typedef typename Linear_System2::row_type sys2_row_type;
-
PPL_ASSERT(sys1.topology() == sys2.topology());
PPL_ASSERT(sys1.space_dimension() == sys2.space_dimension());
PPL_ASSERT(add_dim != 0);
diff --git a/src/Polyhedron_simplify_templates.hh b/src/Polyhedron_simplify_templates.hh
index ce41ac4ad..9de707877 100644
--- a/src/Polyhedron_simplify_templates.hh
+++ b/src/Polyhedron_simplify_templates.hh
@@ -82,9 +82,6 @@ namespace Parma_Polyhedra_Library {
template <typename Linear_System1>
dimension_type
Polyhedron::simplify(Linear_System1& sys, Bit_Matrix& sat) {
-
- typedef typename Linear_System1::row_type sys_row_type;
-
dimension_type num_rows = sys.num_rows();
const dimension_type num_cols_sat = sat.num_columns();
diff --git a/src/linearize.hh b/src/linearize.hh
index a43ed217f..bad38449c 100644
--- a/src/linearize.hh
+++ b/src/linearize.hh
@@ -109,14 +109,12 @@ template <typename Target, typename FP_Interval_Type>
static bool
add_linearize(const Binary_Operator<Target>& bop_expr,
const FP_Oracle<Target,FP_Interval_Type>& oracle,
- const std::map<dimension_type, Linear_Form<FP_Interval_Type> >& lf_store,
+ const std::map<dimension_type, Linear_Form<FP_Interval_Type> >&
+ lf_store,
Linear_Form<FP_Interval_Type>& result) {
PPL_ASSERT(bop_expr.binary_operator() == Binary_Operator<Target>::ADD);
- typedef typename FP_Interval_Type::boundary_type analyzer_format;
typedef Linear_Form<FP_Interval_Type> FP_Linear_Form;
- typedef Box<FP_Interval_Type> FP_Interval_Abstract_Store;
- typedef std::map<dimension_type, FP_Linear_Form> FP_Linear_Form_Abstract_Store;
if (!linearize(*(bop_expr.left_hand_side()), oracle, lf_store, result))
return false;
@@ -227,10 +225,7 @@ sub_linearize(const Binary_Operator<Target>& bop_expr,
Linear_Form<FP_Interval_Type>& result) {
PPL_ASSERT(bop_expr.binary_operator() == Binary_Operator<Target>::SUB);
- typedef typename FP_Interval_Type::boundary_type analyzer_format;
typedef Linear_Form<FP_Interval_Type> FP_Linear_Form;
- typedef Box<FP_Interval_Type> FP_Interval_Abstract_Store;
- typedef std::map<dimension_type, FP_Linear_Form> FP_Linear_Form_Abstract_Store;
if (!linearize(*(bop_expr.left_hand_side()), oracle, lf_store, result))
return false;
@@ -372,8 +367,6 @@ mul_linearize(const Binary_Operator<Target>& bop_expr,
typedef typename FP_Interval_Type::boundary_type analyzer_format;
typedef Linear_Form<FP_Interval_Type> FP_Linear_Form;
- typedef Box<FP_Interval_Type> FP_Interval_Abstract_Store;
- typedef std::map<dimension_type, FP_Linear_Form> FP_Linear_Form_Abstract_Store;
/*
FIXME: We currently adopt the "Interval-Size Local" strategy in order to
@@ -556,10 +549,7 @@ div_linearize(const Binary_Operator<Target>& bop_expr,
Linear_Form<FP_Interval_Type>& result) {
PPL_ASSERT(bop_expr.binary_operator() == Binary_Operator<Target>::DIV);
- typedef typename FP_Interval_Type::boundary_type analyzer_format;
typedef Linear_Form<FP_Interval_Type> FP_Linear_Form;
- typedef Box<FP_Interval_Type> FP_Interval_Abstract_Store;
- typedef std::map<dimension_type, FP_Linear_Form> FP_Linear_Form_Abstract_Store;
FP_Linear_Form linearized_second_operand;
if (!linearize(*(bop_expr.right_hand_side()), oracle, lf_store,
@@ -571,10 +561,10 @@ div_linearize(const Binary_Operator<Target>& bop_expr,
return false;
// Check if we may divide by zero.
- if ((intervalized_second_operand.lower_is_boundary_infinity() ||
- intervalized_second_operand.lower() <= 0) &&
- (intervalized_second_operand.upper_is_boundary_infinity() ||
- intervalized_second_operand.upper() >= 0))
+ if ((intervalized_second_operand.lower_is_boundary_infinity()
+ || intervalized_second_operand.lower() <= 0) &&
+ (intervalized_second_operand.upper_is_boundary_infinity()
+ || intervalized_second_operand.upper() >= 0))
return false;
if (!linearize(*(bop_expr.left_hand_side()), oracle, lf_store, result))
@@ -632,8 +622,6 @@ cast_linearize(const Cast_Operator<Target>& cast_expr,
Linear_Form<FP_Interval_Type>& result) {
typedef typename FP_Interval_Type::boundary_type analyzer_format;
typedef Linear_Form<FP_Interval_Type> FP_Linear_Form;
- typedef Box<FP_Interval_Type> FP_Interval_Abstract_Store;
- typedef std::map<dimension_type, FP_Linear_Form> FP_Linear_Form_Abstract_Store;
Floating_Point_Format analyzed_format =
cast_expr.type().floating_point_format();
@@ -642,9 +630,9 @@ cast_linearize(const Cast_Operator<Target>& cast_expr,
if (!linearize(*cast_arg, oracle, lf_store, result))
return false;
if (!is_less_precise_than(analyzed_format,
- cast_arg->type().floating_point_format()) ||
- result == FP_Linear_Form(FP_Interval_Type(0)) ||
- result == FP_Linear_Form(FP_Interval_Type(1)))
+ cast_arg->type().floating_point_format())
+ || result == FP_Linear_Form(FP_Interval_Type(0))
+ || result == FP_Linear_Form(FP_Interval_Type(1)))
/*
FIXME: find a general way to check if the casted constant
is exactly representable in the less precise format.
@@ -660,9 +648,9 @@ cast_linearize(const Cast_Operator<Target>& cast_expr,
if (!oracle.get_integer_expr_value(*cast_arg, expr_value))
return false;
result = FP_Linear_Form(expr_value);
- if (is_less_precise_than(Float<analyzer_format>::Binary::floating_point_format, analyzed_format) ||
- result == FP_Linear_Form(FP_Interval_Type(0)) ||
- result == FP_Linear_Form(FP_Interval_Type(1)))
+ if (is_less_precise_than(Float<analyzer_format>::Binary::floating_point_format, analyzed_format)
+ || result == FP_Linear_Form(FP_Interval_Type(0))
+ || result == FP_Linear_Form(FP_Interval_Type(1)))
/*
FIXME: find a general way to check if the casted constant
is exactly representable in the less precise format.
@@ -725,8 +713,8 @@ linearize(const Concrete_Expression<Target>& expr,
Linear_Form<FP_Interval_Type>& result) {
typedef typename FP_Interval_Type::boundary_type analyzer_format;
typedef Linear_Form<FP_Interval_Type> FP_Linear_Form;
- typedef Box<FP_Interval_Type> FP_Interval_Abstract_Store;
- typedef std::map<dimension_type, FP_Linear_Form> FP_Linear_Form_Abstract_Store;
+ typedef std::map<dimension_type, FP_Linear_Form>
+ FP_Linear_Form_Abstract_Store;
PPL_ASSERT(expr.type().is_floating_point());
// Check that analyzer_format is a floating point type.
@@ -818,7 +806,7 @@ linearize(const Concrete_Expression<Target>& expr,
PPL_ASSERT(variable_index != not_a_dimension());
typename FP_Linear_Form_Abstract_Store::const_iterator
- variable_value = lf_store.find(variable_index);
+ variable_value = lf_store.find(variable_index);
if (variable_value == lf_store.end()) {
result = FP_Linear_Form(Variable(variable_index));
return true;
@@ -835,9 +823,10 @@ linearize(const Concrete_Expression<Target>& expr,
of all intervals associated to each space dimension.
*/
PPL_ASSERT(associated_dimensions.size() > 1);
- std::set<dimension_type>::const_iterator i = associated_dimensions.begin();
- std::set<dimension_type>::const_iterator i_end =
- associated_dimensions.end();
+ std::set<dimension_type>::const_iterator i
+ = associated_dimensions.begin();
+ std::set<dimension_type>::const_iterator i_end
+ = associated_dimensions.end();
FP_Interval_Type lub(EMPTY);
for (; i != i_end; ++i) {
FP_Interval_Type curr_int;