PPL  1.2
C++ Language Interface

The core implementation of the Parma Polyhedra Library is written in C++. More...

Namespaces

 Parma_Polyhedra_Library::IO_Operators
 All input/output operators are confined to this namespace.
 
 Parma_Polyhedra_Library::Checked
 Types and functions implementing checked numbers.
 
 Parma_Polyhedra_Library::Implementation
 Implementation related data and functions.
 
 std
 The standard C++ namespace.
 

Classes

class  Parma_Polyhedra_Library::Affine_Space
 An affine space. More...
 
class  Parma_Polyhedra_Library::Any_Pointset
 Any PPL pointset. More...
 
class  Parma_Polyhedra_Library::Ask_Tell_Pair< D >
 A pair of ask and tell descriptions. More...
 
class  Parma_Polyhedra_Library::BD_Shape< T >::Status
 A conjunctive assertion about a BD_Shape<T> object. More...
 
class  Parma_Polyhedra_Library::BD_Shape< T >
 A bounded difference shape. More...
 
struct  Parma_Polyhedra_Library::BHRZ03_Certificate::Compare
 A total ordering on BHRZ03 certificates. More...
 
class  Parma_Polyhedra_Library::BHRZ03_Certificate
 The convergence certificate for the BHRZ03 widening operator. More...
 
struct  Parma_Polyhedra_Library::Bit_Matrix::Bit_Row_Less_Than
 Ordering predicate (used when implementing the sort algorithm). More...
 
class  Parma_Polyhedra_Library::Bit_Matrix
 A matrix of bits. More...
 
class  Parma_Polyhedra_Library::Bit_Row
 A row in a matrix of bits. More...
 
class  Parma_Polyhedra_Library::Box< ITV >::Status
 
class  Parma_Polyhedra_Library::Box< ITV >
 A not necessarily closed, iso-oriented hyperrectangle. More...
 
class  Parma_Polyhedra_Library::C_Polyhedron
 A closed convex polyhedron. More...
 
class  Parma_Polyhedra_Library::Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format >
 A generic Cast Floating Point Expression. More...
 
struct  Parma_Polyhedra_Library::Checked_Number_Transparent_Policy< T >
 
struct  Parma_Polyhedra_Library::Extended_Number_Policy
 
struct  Parma_Polyhedra_Library::Check_Overflow_Policy< T >
 A policy checking for overflows. More...
 
struct  Parma_Polyhedra_Library::Native_Checked_From_Wrapper< T, Enable >
 
struct  Parma_Polyhedra_Library::Native_Checked_From_Wrapper< T, typename Enable_If< Is_Native< T >::value >::type >
 
struct  Parma_Polyhedra_Library::Native_Checked_From_Wrapper< Checked_Number< T, P > >
 
struct  Parma_Polyhedra_Library::Native_Checked_To_Wrapper< T, Enable >
 
struct  Parma_Polyhedra_Library::Native_Checked_To_Wrapper< T, typename Enable_If< Is_Native< T >::value >::type >
 
struct  Parma_Polyhedra_Library::Native_Checked_To_Wrapper< Checked_Number< T, P > >
 
struct  Parma_Polyhedra_Library::Is_Checked< T >
 
struct  Parma_Polyhedra_Library::Is_Checked< Checked_Number< T, P > >
 
struct  Parma_Polyhedra_Library::Is_Native_Or_Checked< T >
 
class  Parma_Polyhedra_Library::Checked_Number< T, Policy >
 A wrapper for numeric types implementing a given policy. More...
 
struct  Parma_Polyhedra_Library::Slow_Copy< Checked_Number< T, P > >
 
class  Parma_Polyhedra_Library::CO_Tree::const_iterator
 A const iterator on the tree elements, ordered by key. More...
 
class  Parma_Polyhedra_Library::CO_Tree::iterator
 An iterator on the tree elements, ordered by key. More...
 
class  Parma_Polyhedra_Library::CO_Tree
 A cache-oblivious binary search tree of pairs. More...
 
struct  Parma_Polyhedra_Library::Coefficient_traits_template< Coefficient >
 Coefficient traits. More...
 
class  Parma_Polyhedra_Library::Congruence
 A linear congruence. More...
 
class  Parma_Polyhedra_Library::Congruence_System::const_iterator
 An iterator over a system of congruences. More...
 
class  Parma_Polyhedra_Library::Congruence_System
 A system of congruences. More...
 
class  Parma_Polyhedra_Library::Constant_Floating_Point_Expression< FP_Interval_Type, FP_Format >
 A generic Constant Floating Point Expression. More...
 
class  Parma_Polyhedra_Library::Constraint
 A linear equality or inequality. More...
 
class  Parma_Polyhedra_Library::Constraint_System
 A system of constraints. More...
 
class  Parma_Polyhedra_Library::Constraint_System_const_iterator
 An iterator over a system of constraints. More...
 
class  Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator
 A read-only iterator over the rows of the matrix. More...
 
class  Parma_Polyhedra_Library::DB_Matrix< T >
 The base class for the square matrices. More...
 
class  Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl
 The real implementation of a DB_Row object. More...
 
class  Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >
 The handler of the actual DB_Row implementation. More...
 
class  Parma_Polyhedra_Library::DB_Row< T >
 The base class for the single rows of matrices. More...
 
struct  Parma_Polyhedra_Library::Dense_Row::Impl
 
class  Parma_Polyhedra_Library::Dense_Row
 A finite sequence of coefficients. More...
 
class  Parma_Polyhedra_Library::Determinate< PSET >::Binary_Operator_Assign_Lifter< Binary_Operator_Assign >
 A function adapter for the Determinate class. More...
 
class  Parma_Polyhedra_Library::Determinate< PSET >::Rep
 The possibly shared representation of a Determinate object. More...
 
class  Parma_Polyhedra_Library::Determinate< PSET >
 A wrapper for PPL pointsets, providing them with a determinate constraint system interface, as defined in [Bag98]. More...
 
class  Parma_Polyhedra_Library::Difference_Floating_Point_Expression< FP_Interval_Type, FP_Format >
 A generic Difference Floating Point Expression. More...
 
class  Parma_Polyhedra_Library::Division_Floating_Point_Expression< FP_Interval_Type, FP_Format >
 A generic Division Floating Point Expression. More...
 
struct  Parma_Polyhedra_Library::float_ieee754_half
 
struct  Parma_Polyhedra_Library::float_ieee754_single
 
struct  Parma_Polyhedra_Library::float_ieee754_double
 
struct  Parma_Polyhedra_Library::float_ibm_single
 
struct  Parma_Polyhedra_Library::float_ibm_double
 
struct  Parma_Polyhedra_Library::float_intel_double_extended
 
struct  Parma_Polyhedra_Library::float_ieee754_quad
 
class  Parma_Polyhedra_Library::Float< T >
 
class  Parma_Polyhedra_Library::Generator
 A line, ray, point or closure point. More...
 
class  Parma_Polyhedra_Library::Generator_System
 A system of generators. More...
 
class  Parma_Polyhedra_Library::Generator_System_const_iterator
 An iterator over a system of generators. More...
 
struct  Parma_Polyhedra_Library::Weightwatch_Traits
 Traits class for the deterministic timeout mechanism. More...
 
class  Parma_Polyhedra_Library::Throwable
 User objects the PPL can throw. More...
 
struct  Parma_Polyhedra_Library::Recycle_Input
 A tag class. More...
 
struct  Parma_Polyhedra_Library::Coefficient_traits_template< GMP_Integer >
 Coefficient traits specialization for unbounded integers. More...
 
struct  Parma_Polyhedra_Library::Grid_Certificate::Compare
 A total ordering on Grid certificates. More...
 
class  Parma_Polyhedra_Library::Grid_Certificate
 The convergence certificate for the Grid widening operator. More...
 
class  Parma_Polyhedra_Library::Grid::Status
 A conjunctive assertion about a grid. More...
 
class  Parma_Polyhedra_Library::Grid
 A grid. More...
 
class  Parma_Polyhedra_Library::Grid_Generator
 A grid line, parameter or grid point. More...
 
class  Parma_Polyhedra_Library::Grid_Generator_System::const_iterator
 An iterator over a system of grid generators. More...
 
class  Parma_Polyhedra_Library::Grid_Generator_System
 A system of grid generators. More...
 
struct  Parma_Polyhedra_Library::H79_Certificate::Compare
 A total ordering on H79 certificates. More...
 
class  Parma_Polyhedra_Library::H79_Certificate
 A convergence certificate for the H79 widening operator. More...
 
struct  Parma_Polyhedra_Library::Has_Assign_Or_Swap< T, Enable >
 
struct  Parma_Polyhedra_Library::Has_Assign_Or_Swap< T, typename Enable_If_Is< void(T::*)(T &x), &T::assign_or_swap >::type >
 
class  Parma_Polyhedra_Library::Init
 Class for initialization and finalization. More...
 
class  Parma_Polyhedra_Library::Interval< Boundary, Info >
 A generic, not necessarily closed, possibly restricted interval. More...
 
class  Parma_Polyhedra_Library::iterator_to_const< Container >
 An iterator on a sequence of read-only objects. More...
 
class  Parma_Polyhedra_Library::const_iterator_to_const< Container >
 A const_iterator on a sequence of read-only objects. More...
 
class  Parma_Polyhedra_Library::Linear_Expression::const_iterator
 
class  Parma_Polyhedra_Library::Linear_Expression
 A linear expression. More...
 
class  Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::const_iterator
 
class  Parma_Polyhedra_Library::Linear_Expression_Impl< Row >
 A linear expression. More...
 
class  Parma_Polyhedra_Library::Linear_Expression_Interface::const_iterator_interface
 
class  Parma_Polyhedra_Library::Linear_Expression_Interface
 A linear expression. More...
 
class  Parma_Polyhedra_Library::Linear_Form< C >
 A linear form with interval coefficients. More...
 
struct  Parma_Polyhedra_Library::Linear_System< Row >::With_Pending
 A tag class. More...
 
struct  Parma_Polyhedra_Library::Linear_System< Row >::Row_Less_Than
 Ordering predicate (used when implementing the sort algorithm). More...
 
struct  Parma_Polyhedra_Library::Linear_System< Row >::Unique_Compare
 Comparison predicate (used when implementing the unique algorithm). More...
 
class  Parma_Polyhedra_Library::Linear_System< Row >
 The base class for systems of constraints and generators. More...
 
struct  Parma_Polyhedra_Library::Compile_Time_Check< b >
 A class that is only defined if b evaluates to true. More...
 
struct  Parma_Polyhedra_Library::Compile_Time_Check< true >
 A class that is only defined if b evaluates to true. More...
 
struct  Parma_Polyhedra_Library::Bool< b >
 A class holding a constant called value that evaluates to b. More...
 
struct  Parma_Polyhedra_Library::True
 A class holding a constant called value that evaluates to true. More...
 
struct  Parma_Polyhedra_Library::False
 A class holding a constant called value that evaluates to false. More...
 
struct  Parma_Polyhedra_Library::Is_Same< T1, T2 >
 A class holding a constant called value that evaluates to true if and only if T1 is the same type as T2. More...
 
struct  Parma_Polyhedra_Library::Is_Same< T, T >
 A class holding a constant called value that evaluates to true if and only if T1 is the same type as T2. More...
 
struct  Parma_Polyhedra_Library::Is_Same_Or_Derived< Base, Derived >::Any
 A class that is constructible from just anything. More...
 
struct  Parma_Polyhedra_Library::Is_Same_Or_Derived< Base, Derived >
 A class holding a constant called value that evaluates to true if and only if Base is the same type as Derived or Derived is a class derived from Base. More...
 
struct  Parma_Polyhedra_Library::Enable_If< b, T >
 A class that provides a type member called type equivalent to T if and only if b is true. More...
 
struct  Parma_Polyhedra_Library::Enable_If< true, T >
 A class that provides a type member called type equivalent to T if and only if b is true. More...
 
class  Parma_Polyhedra_Library::MIP_Problem::const_iterator
 A read-only iterator on the constraints defining the feasible region. More...
 
struct  Parma_Polyhedra_Library::MIP_Problem::RAII_Temporary_Real_Relaxation
 A helper class to temporarily relax a MIP problem using RAII. More...
 
class  Parma_Polyhedra_Library::MIP_Problem
 A Mixed Integer (linear) Programming problem. More...
 
class  Parma_Polyhedra_Library::Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format >
 A generic Multiplication Floating Point Expression. More...
 
class  Parma_Polyhedra_Library::NNC_Polyhedron
 A not necessarily closed convex polyhedron. More...
 
class  Parma_Polyhedra_Library::Octagonal_Shape< T >::Status
 A conjunctive assertion about a Octagonal_Shape<T> object. More...
 
class  Parma_Polyhedra_Library::Octagonal_Shape< T >
 An octagonal shape. More...
 
class  Parma_Polyhedra_Library::Opposite_Floating_Point_Expression< FP_Interval_Type, FP_Format >
 A generic Opposite Floating Point Expression. More...
 
class  Parma_Polyhedra_Library::Smash_Reduction< D1, D2 >
 This class provides the reduction method for the Smash_Product domain. More...
 
class  Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >
 This class provides the reduction method for the Constraints_Product domain. More...
 
class  Parma_Polyhedra_Library::Congruences_Reduction< D1, D2 >
 This class provides the reduction method for the Congruences_Product domain. More...
 
class  Parma_Polyhedra_Library::Shape_Preserving_Reduction< D1, D2 >
 This class provides the reduction method for the Shape_Preserving_Product domain. More...
 
class  Parma_Polyhedra_Library::No_Reduction< D1, D2 >
 This class provides the reduction method for the Direct_Product domain. More...
 
class  Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >
 The partially reduced product of two abstractions. More...
 
class  Parma_Polyhedra_Library::PIP_Problem
 A Parametric Integer (linear) Programming problem. More...
 
class  Parma_Polyhedra_Library::Pointset_Ask_Tell< PSET >
 The ask-and-tell construction instantiated on PPL polyhedra. More...
 
class  Parma_Polyhedra_Library::Pointset_Powerset< PSET >
 The powerset construction instantiated on PPL pointset domains. More...
 
class  Parma_Polyhedra_Library::Poly_Con_Relation
 The relation between a polyhedron and a constraint. More...
 
class  Parma_Polyhedra_Library::Poly_Gen_Relation
 The relation between a polyhedron and a generator. More...
 
class  Parma_Polyhedra_Library::Polyhedron::Status
 A conjunctive assertion about a polyhedron. More...
 
class  Parma_Polyhedra_Library::Polyhedron
 The base class for convex polyhedra. More...
 
class  Parma_Polyhedra_Library::Powerset< D >
 The powerset construction on a base-level domain. More...
 
class  Parma_Polyhedra_Library::Scalar_Products
 A class implementing various scalar product functions. More...
 
class  Parma_Polyhedra_Library::Topology_Adjusted_Scalar_Product_Sign
 Scalar product sign function object depending on topology. More...
 
struct  Parma_Polyhedra_Library::Slow_Copy< T >
 
struct  Parma_Polyhedra_Library::Slow_Copy< mpz_class >
 
struct  Parma_Polyhedra_Library::Slow_Copy< mpq_class >
 
class  Parma_Polyhedra_Library::Sparse_Row
 A finite sparse sequence of coefficients. More...
 
class  Parma_Polyhedra_Library::Sum_Floating_Point_Expression< FP_Interval_Type, FP_Format >
 A generic Sum Floating Point Expression. More...
 
struct  Parma_Polyhedra_Library::Variable::Compare
 Binary predicate defining the total ordering on variables. More...
 
class  Parma_Polyhedra_Library::Variable
 A dimension of the vector space. More...
 
class  Parma_Polyhedra_Library::Variable_Floating_Point_Expression< FP_Interval_Type, FP_Format >
 A generic Variable Floating Point Expression. More...
 
class  Parma_Polyhedra_Library::Widening_Function< PSET >
 Wraps a widening method into a function object. More...
 
class  Parma_Polyhedra_Library::Limited_Widening_Function< PSET, CSYS >
 Wraps a limited widening method into a function object. More...
 
struct  Parma_Polyhedra_Library::WRD_Extended_Number_Policy
 
struct  Parma_Polyhedra_Library::Debug_WRD_Extended_Number_Policy
 
class  Parma_Polyhedra_Library::GMP_Integer
 Unbounded integers as provided by the GMP library. More...
 

Macros

#define PPL_VERSION_MAJOR   1
 The major number of the PPL version. More...
 
#define PPL_VERSION_MINOR   2
 The minor number of the PPL version. More...
 
#define PPL_VERSION_REVISION   0
 The revision number of the PPL version. More...
 
#define PPL_VERSION_BETA   0
 The beta number of the PPL version. This is zero for official releases and nonzero for development snapshots. More...
 
#define PPL_VERSION   "1.2"
 A string containing the PPL version. More...
 
#define const_bool_nodef(name, value)    enum const_bool_value_ ## name { PPL_U(name) = (value) }
 Declares a per-class constant of type bool, called name and with value value. More...
 
#define const_int_nodef(name, value)   enum anonymous_enum_ ## name { PPL_U(name) = (value) }
 Declares a per-class constant of type int, called name and with value value. More...
 
#define const_value_nodef(type, name, value)
 Declares a per-class constant of type type, called name and with value value. The value of the constant is accessible by means of the syntax name(). More...
 
#define const_ref_nodef(type, name, value)
 Declares a per-class constant of type type, called name and with value value. A constant reference to the constant is accessible by means of the syntax name(). More...
 
#define PPL_COMPILE_TIME_CHECK(e, msg)   PPL_COMPILE_TIME_CHECK_AUX(e, __LINE__)
 Produces a compilation error if the compile-time constant e does not evaluate to true More...
 

Typedefs

typedef PPL_COEFFICIENT_TYPE Parma_Polyhedra_Library::Coefficient
 An alias for easily naming the type of PPL coefficients. More...
 
typedef Coefficient_traits_template< Coefficient > Parma_Polyhedra_Library::Coefficient_traits
 An alias for easily naming the coefficient traits. More...
 
typedef size_t Parma_Polyhedra_Library::dimension_type
 An unsigned integral type for representing space dimensions. More...
 
typedef size_t Parma_Polyhedra_Library::memory_size_type
 An unsigned integral type for representing memory size in bytes. More...
 

Enumerations

enum  Parma_Polyhedra_Library::Constraint::Type { Parma_Polyhedra_Library::Constraint::EQUALITY, Parma_Polyhedra_Library::Constraint::NONSTRICT_INEQUALITY, Parma_Polyhedra_Library::Constraint::STRICT_INEQUALITY }
 The constraint type. More...
 
enum  Parma_Polyhedra_Library::Constraint::Kind { Parma_Polyhedra_Library::Constraint::LINE_OR_EQUALITY = 0, Parma_Polyhedra_Library::Constraint::RAY_OR_POINT_OR_INEQUALITY = 1 }
 The possible kinds of Constraint objects. More...
 
enum  Parma_Polyhedra_Library::Generator::Type { Parma_Polyhedra_Library::Generator::LINE, Parma_Polyhedra_Library::Generator::RAY, Parma_Polyhedra_Library::Generator::POINT, Parma_Polyhedra_Library::Generator::CLOSURE_POINT }
 The generator type. More...
 
enum  Parma_Polyhedra_Library::Generator::Kind { Parma_Polyhedra_Library::Generator::LINE_OR_EQUALITY = 0, Parma_Polyhedra_Library::Generator::RAY_OR_POINT_OR_INEQUALITY = 1 }
 The possible kinds of Generator objects. More...
 
enum  Parma_Polyhedra_Library::Degenerate_Element { Parma_Polyhedra_Library::UNIVERSE, Parma_Polyhedra_Library::EMPTY }
 Kinds of degenerate abstract elements. More...
 
enum  Parma_Polyhedra_Library::Relation_Symbol {
  Parma_Polyhedra_Library::EQUAL, Parma_Polyhedra_Library::LESS_THAN, Parma_Polyhedra_Library::LESS_OR_EQUAL, Parma_Polyhedra_Library::GREATER_THAN,
  Parma_Polyhedra_Library::GREATER_OR_EQUAL, Parma_Polyhedra_Library::NOT_EQUAL
}
 Relation symbols. More...
 
enum  Parma_Polyhedra_Library::Complexity_Class { Parma_Polyhedra_Library::POLYNOMIAL_COMPLEXITY, Parma_Polyhedra_Library::SIMPLEX_COMPLEXITY, Parma_Polyhedra_Library::ANY_COMPLEXITY }
 Complexity pseudo-classes. More...
 
enum  Parma_Polyhedra_Library::Optimization_Mode { Parma_Polyhedra_Library::MINIMIZATION, Parma_Polyhedra_Library::MAXIMIZATION }
 Possible optimization modes. More...
 
enum  Parma_Polyhedra_Library::Bounded_Integer_Type_Width {
  Parma_Polyhedra_Library::BITS_8, Parma_Polyhedra_Library::BITS_16, Parma_Polyhedra_Library::BITS_32, Parma_Polyhedra_Library::BITS_64,
  Parma_Polyhedra_Library::BITS_128
}
 
enum  Parma_Polyhedra_Library::Bounded_Integer_Type_Representation { Parma_Polyhedra_Library::UNSIGNED, Parma_Polyhedra_Library::SIGNED_2_COMPLEMENT }
 
enum  Parma_Polyhedra_Library::Bounded_Integer_Type_Overflow { Parma_Polyhedra_Library::OVERFLOW_WRAPS, Parma_Polyhedra_Library::OVERFLOW_UNDEFINED, Parma_Polyhedra_Library::OVERFLOW_IMPOSSIBLE }
 
enum  Parma_Polyhedra_Library::Representation { Parma_Polyhedra_Library::DENSE, Parma_Polyhedra_Library::SPARSE }
 
enum  Parma_Polyhedra_Library::Floating_Point_Format {
  Parma_Polyhedra_Library::IEEE754_HALF, Parma_Polyhedra_Library::IEEE754_SINGLE, Parma_Polyhedra_Library::IEEE754_DOUBLE, Parma_Polyhedra_Library::IEEE754_QUAD,
  Parma_Polyhedra_Library::INTEL_DOUBLE_EXTENDED, Parma_Polyhedra_Library::IBM_SINGLE, Parma_Polyhedra_Library::IBM_DOUBLE
}
 
enum  Parma_Polyhedra_Library::Grid::Dimension_Kind {
  Parma_Polyhedra_Library::Grid::PARAMETER = 0, Parma_Polyhedra_Library::Grid::LINE = 1, Parma_Polyhedra_Library::Grid::GEN_VIRTUAL = 2, Parma_Polyhedra_Library::Grid::PROPER_CONGRUENCE = PARAMETER,
  Parma_Polyhedra_Library::Grid::CON_VIRTUAL = LINE, Parma_Polyhedra_Library::Grid::EQUALITY = GEN_VIRTUAL
}
 
enum  Parma_Polyhedra_Library::Grid::Three_Valued_Boolean { Parma_Polyhedra_Library::Grid::TVB_TRUE, Parma_Polyhedra_Library::Grid::TVB_FALSE, Parma_Polyhedra_Library::Grid::TVB_DONT_KNOW }
 
enum  Parma_Polyhedra_Library::Grid_Generator::Kind { Parma_Polyhedra_Library::Grid_Generator::LINE_OR_EQUALITY = 0, Parma_Polyhedra_Library::Grid_Generator::RAY_OR_POINT_OR_INEQUALITY = 1 }
 The possible kinds of Grid_Generator objects. More...
 
enum  Parma_Polyhedra_Library::Grid_Generator::Type { Parma_Polyhedra_Library::Grid_Generator::LINE, Parma_Polyhedra_Library::Grid_Generator::PARAMETER, Parma_Polyhedra_Library::Grid_Generator::POINT }
 The generator type. More...
 
enum  Parma_Polyhedra_Library::I_Result {
  Parma_Polyhedra_Library::I_EMPTY, Parma_Polyhedra_Library::I_SINGLETON, Parma_Polyhedra_Library::I_SOME, Parma_Polyhedra_Library::I_UNIVERSE,
  Parma_Polyhedra_Library::I_NOT_EMPTY, Parma_Polyhedra_Library::I_ANY, Parma_Polyhedra_Library::I_NOT_UNIVERSE, Parma_Polyhedra_Library::I_NOT_DEGENERATE,
  Parma_Polyhedra_Library::I_EXACT, Parma_Polyhedra_Library::I_INEXACT, Parma_Polyhedra_Library::I_CHANGED, Parma_Polyhedra_Library::I_UNCHANGED,
  Parma_Polyhedra_Library::I_SINGULARITIES
}
 The result of an operation on intervals. More...
 
enum  Parma_Polyhedra_Library::Bool< b >::const_bool_value { Parma_Polyhedra_Library::Bool< b >::value = b }
 
enum  Parma_Polyhedra_Library::Is_Same_Or_Derived< Base, Derived >::const_bool_value { Parma_Polyhedra_Library::Is_Same_Or_Derived< Base, Derived >::value = (sizeof(func(derived_object())) == sizeof(char)) }
 
enum  Parma_Polyhedra_Library::MIP_Problem::Control_Parameter_Name { Parma_Polyhedra_Library::MIP_Problem::PRICING }
 Names of MIP problems' control parameters. More...
 
enum  Parma_Polyhedra_Library::MIP_Problem::Control_Parameter_Value { Parma_Polyhedra_Library::MIP_Problem::PRICING_STEEPEST_EDGE_FLOAT, Parma_Polyhedra_Library::MIP_Problem::PRICING_STEEPEST_EDGE_EXACT, Parma_Polyhedra_Library::MIP_Problem::PRICING_TEXTBOOK }
 Possible values for MIP problem's control parameters. More...
 
enum  Parma_Polyhedra_Library::MIP_Problem::Status {
  Parma_Polyhedra_Library::MIP_Problem::UNSATISFIABLE, Parma_Polyhedra_Library::MIP_Problem::SATISFIABLE, Parma_Polyhedra_Library::MIP_Problem::UNBOUNDED, Parma_Polyhedra_Library::MIP_Problem::OPTIMIZED,
  Parma_Polyhedra_Library::MIP_Problem::PARTIALLY_SATISFIABLE
}
 An enumerated type describing the internal status of the MIP problem. More...
 
enum  Parma_Polyhedra_Library::MIP_Problem_Status { Parma_Polyhedra_Library::UNFEASIBLE_MIP_PROBLEM, Parma_Polyhedra_Library::UNBOUNDED_MIP_PROBLEM, Parma_Polyhedra_Library::OPTIMIZED_MIP_PROBLEM }
 Possible outcomes of the MIP_Problem solver. More...
 
enum  Parma_Polyhedra_Library::PIP_Problem::Control_Parameter_Name { Parma_Polyhedra_Library::PIP_Problem::CUTTING_STRATEGY, Parma_Polyhedra_Library::PIP_Problem::PIVOT_ROW_STRATEGY, Parma_Polyhedra_Library::PIP_Problem::CONTROL_PARAMETER_NAME_SIZE }
 Possible names for PIP_Problem control parameters. More...
 
enum  Parma_Polyhedra_Library::PIP_Problem::Control_Parameter_Value {
  Parma_Polyhedra_Library::PIP_Problem::CUTTING_STRATEGY_FIRST, Parma_Polyhedra_Library::PIP_Problem::CUTTING_STRATEGY_DEEPEST, Parma_Polyhedra_Library::PIP_Problem::CUTTING_STRATEGY_ALL, Parma_Polyhedra_Library::PIP_Problem::PIVOT_ROW_STRATEGY_FIRST,
  Parma_Polyhedra_Library::PIP_Problem::PIVOT_ROW_STRATEGY_MAX_COLUMN, Parma_Polyhedra_Library::PIP_Problem::CONTROL_PARAMETER_VALUE_SIZE
}
 Possible values for PIP_Problem control parameters. More...
 
enum  Parma_Polyhedra_Library::PIP_Problem::Status { Parma_Polyhedra_Library::PIP_Problem::UNSATISFIABLE, Parma_Polyhedra_Library::PIP_Problem::OPTIMIZED, Parma_Polyhedra_Library::PIP_Problem::PARTIALLY_SATISFIABLE }
 An enumerated type describing the internal status of the PIP problem. More...
 
enum  Parma_Polyhedra_Library::PIP_Problem_Status { Parma_Polyhedra_Library::UNFEASIBLE_PIP_PROBLEM, Parma_Polyhedra_Library::OPTIMIZED_PIP_PROBLEM }
 Possible outcomes of the PIP_Problem solver. More...
 
enum  Parma_Polyhedra_Library::Polyhedron::Three_Valued_Boolean { Parma_Polyhedra_Library::Polyhedron::TVB_TRUE, Parma_Polyhedra_Library::Polyhedron::TVB_FALSE, Parma_Polyhedra_Library::Polyhedron::TVB_DONT_KNOW }
 
enum  Parma_Polyhedra_Library::Result {
  Parma_Polyhedra_Library::V_EMPTY, Parma_Polyhedra_Library::V_EQ, Parma_Polyhedra_Library::V_LT, Parma_Polyhedra_Library::V_GT,
  Parma_Polyhedra_Library::V_NE, Parma_Polyhedra_Library::V_LE, Parma_Polyhedra_Library::V_GE, Parma_Polyhedra_Library::V_LGE,
  Parma_Polyhedra_Library::V_OVERFLOW, Parma_Polyhedra_Library::V_LT_INF, Parma_Polyhedra_Library::V_GT_SUP, Parma_Polyhedra_Library::V_LT_PLUS_INFINITY,
  Parma_Polyhedra_Library::V_GT_MINUS_INFINITY, Parma_Polyhedra_Library::V_EQ_MINUS_INFINITY, Parma_Polyhedra_Library::V_EQ_PLUS_INFINITY, Parma_Polyhedra_Library::V_NAN,
  Parma_Polyhedra_Library::V_CVT_STR_UNK, Parma_Polyhedra_Library::V_DIV_ZERO, Parma_Polyhedra_Library::V_INF_ADD_INF, Parma_Polyhedra_Library::V_INF_DIV_INF,
  Parma_Polyhedra_Library::V_INF_MOD, Parma_Polyhedra_Library::V_INF_MUL_ZERO, Parma_Polyhedra_Library::V_INF_SUB_INF, Parma_Polyhedra_Library::V_MOD_ZERO,
  Parma_Polyhedra_Library::V_SQRT_NEG, Parma_Polyhedra_Library::V_UNKNOWN_NEG_OVERFLOW, Parma_Polyhedra_Library::V_UNKNOWN_POS_OVERFLOW, Parma_Polyhedra_Library::V_UNREPRESENTABLE
}
 Possible outcomes of a checked arithmetic computation. More...
 
enum  Parma_Polyhedra_Library::Rounding_Dir {
  Parma_Polyhedra_Library::ROUND_DOWN, Parma_Polyhedra_Library::ROUND_UP, Parma_Polyhedra_Library::ROUND_IGNORE, Parma_Polyhedra_Library::ROUND_NATIVE = ROUND_IGNORE,
  Parma_Polyhedra_Library::ROUND_NOT_NEEDED, Parma_Polyhedra_Library::ROUND_DIRECT = ROUND_UP, Parma_Polyhedra_Library::ROUND_INVERSE = ROUND_DOWN, Parma_Polyhedra_Library::ROUND_DIR_MASK = 7U,
  Parma_Polyhedra_Library::ROUND_STRICT_RELATION, Parma_Polyhedra_Library::ROUND_CHECK = ROUND_DIRECT | ROUND_STRICT_RELATION
}
 Rounding directions for arithmetic computations. More...
 
enum  Parma_Polyhedra_Library::Topology { Parma_Polyhedra_Library::NECESSARILY_CLOSED = 0, Parma_Polyhedra_Library::NOT_NECESSARILY_CLOSED = 1 }
 Kinds of polyhedra domains. More...
 

Functions

template<typename T >
Enable_If< Has_Assign_Or_Swap< T >::value, void >::type Parma_Polyhedra_Library::assign_or_swap (T &to, T &from)
 

Variables

const Throwable *volatile Parma_Polyhedra_Library::abandon_expensive_computations = 0
 A pointer to an exception object. More...
 

Functions Inspecting and/or Combining Result Values

Result Parma_Polyhedra_Library::operator& (Result x, Result y)
 
Result Parma_Polyhedra_Library::operator| (Result x, Result y)
 
Result Parma_Polyhedra_Library::operator- (Result x, Result y)
 
Result_Class Parma_Polyhedra_Library::result_class (Result r)
 
Result_Relation Parma_Polyhedra_Library::result_relation (Result r)
 
Result Parma_Polyhedra_Library::result_relation_class (Result r)
 

Functions Inspecting and/or Combining Rounding_Dir Values

Rounding_Dir Parma_Polyhedra_Library::operator& (Rounding_Dir x, Rounding_Dir y)
 
Rounding_Dir Parma_Polyhedra_Library::operator| (Rounding_Dir x, Rounding_Dir y)
 
Rounding_Dir Parma_Polyhedra_Library::inverse (Rounding_Dir dir)
 
Rounding_Dir Parma_Polyhedra_Library::round_dir (Rounding_Dir dir)
 
bool Parma_Polyhedra_Library::round_down (Rounding_Dir dir)
 
bool Parma_Polyhedra_Library::round_up (Rounding_Dir dir)
 
bool Parma_Polyhedra_Library::round_ignore (Rounding_Dir dir)
 
bool Parma_Polyhedra_Library::round_not_needed (Rounding_Dir dir)
 
bool Parma_Polyhedra_Library::round_not_requested (Rounding_Dir dir)
 
bool Parma_Polyhedra_Library::round_direct (Rounding_Dir dir)
 
bool Parma_Polyhedra_Library::round_inverse (Rounding_Dir dir)
 
bool Parma_Polyhedra_Library::round_strict_relation (Rounding_Dir dir)
 
fpu_rounding_direction_type Parma_Polyhedra_Library::round_fpu_dir (Rounding_Dir dir)
 

Functions for the Synthesis of Linear Rankings

template<typename PSET >
bool Parma_Polyhedra_Library::termination_test_MS (const PSET &pset)
 
template<typename PSET >
bool Parma_Polyhedra_Library::termination_test_MS_2 (const PSET &pset_before, const PSET &pset_after)
 
template<typename PSET >
bool Parma_Polyhedra_Library::one_affine_ranking_function_MS (const PSET &pset, Generator &mu)
 
template<typename PSET >
bool Parma_Polyhedra_Library::one_affine_ranking_function_MS_2 (const PSET &pset_before, const PSET &pset_after, Generator &mu)
 
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_ranking_functions_MS (const PSET &pset, C_Polyhedron &mu_space)
 
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_ranking_functions_MS_2 (const PSET &pset_before, const PSET &pset_after, C_Polyhedron &mu_space)
 
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_quasi_ranking_functions_MS (const PSET &pset, C_Polyhedron &decreasing_mu_space, C_Polyhedron &bounded_mu_space)
 
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_quasi_ranking_functions_MS_2 (const PSET &pset_before, const PSET &pset_after, C_Polyhedron &decreasing_mu_space, C_Polyhedron &bounded_mu_space)
 
template<typename PSET >
bool Parma_Polyhedra_Library::termination_test_PR (const PSET &pset)
 
template<typename PSET >
bool Parma_Polyhedra_Library::termination_test_PR_2 (const PSET &pset_before, const PSET &pset_after)
 
template<typename PSET >
bool Parma_Polyhedra_Library::one_affine_ranking_function_PR (const PSET &pset, Generator &mu)
 
template<typename PSET >
bool Parma_Polyhedra_Library::one_affine_ranking_function_PR_2 (const PSET &pset_before, const PSET &pset_after, Generator &mu)
 
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_ranking_functions_PR (const PSET &pset, NNC_Polyhedron &mu_space)
 
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_ranking_functions_PR_2 (const PSET &pset_before, const PSET &pset_after, NNC_Polyhedron &mu_space)
 

Detailed Description

The core implementation of the Parma Polyhedra Library is written in C++.

See Namespace, Hierarchical and Compound indexes for additional information about each single data type.

Macro Definition Documentation

#define const_bool_nodef (   name,
  value 
)    enum const_bool_value_ ## name { PPL_U(name) = (value) }

Declares a per-class constant of type bool, called name and with value value.

Differently from static constants, name needs not (and cannot) be defined (for static constants, the need for a further definition is mandated by Section 9.4.2/4 of the C++ standard).

Definition at line 42 of file meta_programming.hh.

#define const_int_nodef (   name,
  value 
)    enum anonymous_enum_ ## name { PPL_U(name) = (value) }

Declares a per-class constant of type int, called name and with value value.

Differently from static constants, name needs not (and cannot) be defined (for static constants, the need for a further definition is mandated by Section 9.4.2/4 of the C++ standard).

Definition at line 56 of file meta_programming.hh.

#define const_ref_nodef (   type,
  name,
  value 
)
Value:
static const type& PPL_U(name)() { \
static type PPL_U(name) = (value); \
return (name); \
}
Coefficient value
Definition: PIP_Tree.cc:618

Declares a per-class constant of type type, called name and with value value. A constant reference to the constant is accessible by means of the syntax name().

Differently from static constants, name needs not (and cannot) be defined (for static constants, the need for a further definition is mandated by Section 9.4.2/4 of the C++ standard).

Definition at line 88 of file meta_programming.hh.

#define const_value_nodef (   type,
  name,
  value 
)
Value:
static type PPL_U(name)() { \
return (value); \
}
Coefficient value
Definition: PIP_Tree.cc:618

Declares a per-class constant of type type, called name and with value value. The value of the constant is accessible by means of the syntax name().

Differently from static constants, name needs not (and cannot) be defined (for static constants, the need for a further definition is mandated by Section 9.4.2/4 of the C++ standard).

Definition at line 71 of file meta_programming.hh.

#define PPL_COMPILE_TIME_CHECK (   e,
  msg 
)    PPL_COMPILE_TIME_CHECK_AUX(e, __LINE__)

Produces a compilation error if the compile-time constant e does not evaluate to true

Definition at line 133 of file meta_programming.hh.

Referenced by Parma_Polyhedra_Library::Box< ITV >::affine_form_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_form_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_form_image(), Parma_Polyhedra_Library::Polyhedron::affine_form_image(), Parma_Polyhedra_Library::BD_Shape< T >::BHZ09_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Octagonal_Shape< T >::integer_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::BD_Shape< T >::integer_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Octagonal_Shape< T >::interval_coefficient_upper_bound(), Parma_Polyhedra_Library::Octagonal_Shape< T >::linear_form_upper_bound(), Parma_Polyhedra_Library::BD_Shape< T >::linear_form_upper_bound(), Parma_Polyhedra_Library::Concrete_Expression< Target >::linearize(), Parma_Polyhedra_Library::Polyhedron::overapproximate_linear_form(), Parma_Polyhedra_Library::Polyhedron::refine_fp_interval_abstract_store(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_fp_interval_abstract_store(), Parma_Polyhedra_Library::BD_Shape< T >::refine_fp_interval_abstract_store(), Parma_Polyhedra_Library::Polyhedron::refine_with_linear_form_inequality(), Parma_Polyhedra_Library::BD_Shape< T >::refine_with_linear_form_inequality(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_with_linear_form_inequality(), Parma_Polyhedra_Library::Boundary_NS::set_unbounded(), Parma_Polyhedra_Library::swap(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_closure_assign().

#define PPL_VERSION   "1.2"

A string containing the PPL version.

Let M and m denote the numbers associated to PPL_VERSION_MAJOR and PPL_VERSION_MINOR, respectively. The format of PPL_VERSION is M "." m if both PPL_VERSION_REVISION (r) and PPL_VERSION_BETA (b)are zero, M "." m "pre" b if PPL_VERSION_REVISION is zero and PPL_VERSION_BETA is not zero, M "." m "." r if PPL_VERSION_REVISION is not zero and PPL_VERSION_BETA is zero, M "." m "." r "pre" b if neither PPL_VERSION_REVISION nor PPL_VERSION_BETA are zero.

Definition at line 59 of file version.hh.

#define PPL_VERSION_BETA   0

The beta number of the PPL version. This is zero for official releases and nonzero for development snapshots.

Definition at line 45 of file version.hh.

Referenced by Parma_Polyhedra_Library::version_beta().

#define PPL_VERSION_MAJOR   1

The major number of the PPL version.

Definition at line 30 of file version.hh.

Referenced by Parma_Polyhedra_Library::version_major().

#define PPL_VERSION_MINOR   2

The minor number of the PPL version.

Definition at line 34 of file version.hh.

Referenced by Parma_Polyhedra_Library::version_minor().

#define PPL_VERSION_REVISION   0

The revision number of the PPL version.

Definition at line 38 of file version.hh.

Referenced by Parma_Polyhedra_Library::version_revision().

Typedef Documentation

typedef PPL_COEFFICIENT_TYPE Parma_Polyhedra_Library::Coefficient

An alias for easily naming the type of PPL coefficients.

Objects of type Coefficient are used to implement the integral valued coefficients occurring in linear expressions, constraints, generators, intervals, bounding boxes and so on. Depending on the chosen configuration options (see file README.configure), a Coefficient may actually be:

  • The GMP_Integer type, which in turn is an alias for the mpz_class type implemented by the C++ interface of the GMP library (this is the default configuration).
  • An instance of the Checked_Number class template: with the policy Bounded_Integer_Coefficient_Policy, this implements overflow detection on top of a native integral type (available template instances include checked integers having 8, 16, 32 or 64 bits); with the Checked_Number_Transparent_Policy, this is a wrapper for native integral types with no overflow detection (available template instances are as above).

Definition at line 172 of file Coefficient_types.hh.

typedef Coefficient_traits_template<Coefficient> Parma_Polyhedra_Library::Coefficient_traits

An alias for easily naming the coefficient traits.

Definition at line 178 of file Coefficient_types.hh.

An unsigned integral type for representing space dimensions.

Definition at line 22 of file globals_types.hh.

An unsigned integral type for representing memory size in bytes.

Definition at line 26 of file globals_types.hh.

Enumeration Type Documentation

\ Overflow behavior of bounded integer types.

See the section on approximating bounded integers.

Enumerator
OVERFLOW_WRAPS 

On overflow, wrapping takes place.

This means that, for a $w$-bit bounded integer, the computation happens modulo $2^w$.

OVERFLOW_UNDEFINED 

On overflow, the result is undefined.

This simply means that the result of the operation resulting in an overflow can take any value.

Note
Even though something more serious can happen in the system being analyzed —due to, e.g., C's undefined behavior—, here we are only concerned with the results of arithmetic operations. It is the responsibility of the analyzer to ensure that other manifestations of undefined behavior are conservatively approximated.
OVERFLOW_IMPOSSIBLE 

Overflow is impossible.

This is for the analysis of languages where overflow is trapped before it affects the state, for which, thus, any indication that an overflow may have affected the state is necessarily due to the imprecision of the analysis.

Definition at line 121 of file globals_types.hh.

121  {
129 
144 
154 };
On overflow, wrapping takes place.
On overflow, the result is undefined.

\ Representation of bounded integer types.

See the section on approximating bounded integers.

Enumerator
UNSIGNED 

Unsigned binary.

SIGNED_2_COMPLEMENT 

Signed binary where negative values are represented by the two's complement of the absolute value.

Definition at line 104 of file globals_types.hh.

104  {
106  UNSIGNED,
107 
113 };
Signed binary where negative values are represented by the two's complement of the absolute value...

\ Widths of bounded integer types.

See the section on approximating bounded integers.

Enumerator
BITS_8 

8 bits.

BITS_16 

16 bits.

BITS_32 

32 bits.

BITS_64 

64 bits.

BITS_128 

128 bits.

Definition at line 81 of file globals_types.hh.

81  {
83  BITS_8 = 8,
84 
86  BITS_16 = 16,
87 
89  BITS_32 = 32,
90 
92  BITS_64 = 64,
93 
95  BITS_128 = 128
96 };

Complexity pseudo-classes.

Enumerator
POLYNOMIAL_COMPLEXITY 

Worst-case polynomial complexity.

SIMPLEX_COMPLEXITY 

Worst-case exponential complexity but typically polynomial behavior.

ANY_COMPLEXITY 

Any complexity.

Definition at line 57 of file globals_types.hh.

57  {
64 };
Worst-case polynomial complexity.
Worst-case exponential complexity but typically polynomial behavior.
Enumerator
value 

Definition at line 144 of file meta_programming.hh.

template<typename Base, typename Derived>
enum Parma_Polyhedra_Library::Is_Same_Or_Derived::const_bool_value
Enumerator
value 

Assuming sizeof(char) != sizeof(double), the C++ overload resolution mechanism guarantees that value evaluates to true if and only if Base is the same type as Derived or Derived is a class derived from Base.

Definition at line 247 of file meta_programming.hh.

247  {
255  value = (sizeof(func(derived_object())) == sizeof(char))
256  };
static const Derived & derived_object()
A function obtaining a const reference to a Derived object.
static char func(const Base &)
Overloading with Base.

Names of MIP problems' control parameters.

Enumerator
PRICING 

The pricing rule.

Definition at line 475 of file MIP_Problem_defs.hh.

475  {
477  PRICING
478  };

Possible names for PIP_Problem control parameters.

Enumerator
CUTTING_STRATEGY 

Cutting strategy.

PIVOT_ROW_STRATEGY 

Pivot row strategy.

CONTROL_PARAMETER_NAME_SIZE 

Number of different enumeration values.

Definition at line 708 of file PIP_Problem_defs.hh.

708  {
713 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
714 #endif // PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
717  };

Possible values for MIP problem's control parameters.

Enumerator
PRICING_STEEPEST_EDGE_FLOAT 

Steepest edge pricing method, using floating points (default).

PRICING_STEEPEST_EDGE_EXACT 

Steepest edge pricing method, using Coefficient.

PRICING_TEXTBOOK 

Textbook pricing method.

Definition at line 481 of file MIP_Problem_defs.hh.

481  {
488  };
Steepest edge pricing method, using floating points (default).
Steepest edge pricing method, using Coefficient.

Possible values for PIP_Problem control parameters.

Enumerator
CUTTING_STRATEGY_FIRST 

Choose the first non-integer row.

CUTTING_STRATEGY_DEEPEST 

Choose row which generates the deepest cut.

CUTTING_STRATEGY_ALL 

Always generate all possible cuts.

PIVOT_ROW_STRATEGY_FIRST 

Choose the first row with negative parameter sign.

PIVOT_ROW_STRATEGY_MAX_COLUMN 

Choose a row that generates a lexicographically maximal pivot column.

CONTROL_PARAMETER_VALUE_SIZE 

Number of different enumeration values.

Definition at line 720 of file PIP_Problem_defs.hh.

720  {
727 
732 
733 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
734 #endif // PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
737  };
Choose the first row with negative parameter sign.
Choose a row that generates a lexicographically maximal pivot column.

Kinds of degenerate abstract elements.

Enumerator
UNIVERSE 

The universe element, i.e., the whole vector space.

EMPTY 

The empty element, i.e., the empty set.

Definition at line 30 of file globals_types.hh.

30  {
32  UNIVERSE,
34  EMPTY
35 };
The empty element, i.e., the empty set.
The universe element, i.e., the whole vector space.

\ Floating point formats known to the library.

The parameters of each format are defined by a specific struct in file Float_defs.hh. See the section on Analysis of floating point computations for more information.

Enumerator
IEEE754_HALF 

IEEE 754 half precision, 16 bits (5 exponent, 10 mantissa).

IEEE754_SINGLE 

IEEE 754 single precision, 32 bits (8 exponent, 23 mantissa).

IEEE754_DOUBLE 

IEEE 754 double precision, 64 bits (11 exponent, 52 mantissa).

IEEE754_QUAD 

IEEE 754 quad precision, 128 bits (15 exponent, 112 mantissa).

INTEL_DOUBLE_EXTENDED 

Intel double extended precision, 80 bits (15 exponent, 64 mantissa)

IBM_SINGLE 

IBM single precision, 32 bits (7 exponent, 24 mantissa).

IBM_DOUBLE 

IBM double precision, 64 bits (7 exponent, 56 mantissa).

Definition at line 187 of file globals_types.hh.

187  {
189  IEEE754_HALF,
190 
193 
196 
198  IEEE754_QUAD,
199 
202 
204  IBM_SINGLE,
205 
207  IBM_DOUBLE
208 };
IEEE 754 half precision, 16 bits (5 exponent, 10 mantissa).
IEEE 754 quad precision, 128 bits (15 exponent, 112 mantissa).
IBM single precision, 32 bits (7 exponent, 24 mantissa).
Intel double extended precision, 80 bits (15 exponent, 64 mantissa)
IBM double precision, 64 bits (7 exponent, 56 mantissa).
IEEE 754 double precision, 64 bits (11 exponent, 52 mantissa).
IEEE 754 single precision, 32 bits (8 exponent, 23 mantissa).

The result of an operation on intervals.

Enumerator
I_EMPTY 

Result may be empty.

I_SINGLETON 

Result may have only one value.

I_SOME 

Result may have more than one value, but it is not the domain universe.

I_UNIVERSE 

Result may be the domain universe.

I_NOT_EMPTY 

Result is not empty.

I_ANY 

Result may be empty or not empty.

I_NOT_UNIVERSE 

Result may be empty or not empty.

I_NOT_DEGENERATE 

Result is neither empty nor the domain universe.

I_EXACT 

Result is definitely exact.

I_INEXACT 

Result is definitely inexact.

I_CHANGED 

Operation has definitely changed the set.

I_UNCHANGED 

Operation has left the set definitely unchanged.

I_SINGULARITIES 

Operation is undefined for some combination of values.

Definition at line 37 of file intervals_defs.hh.

37  {
38 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
39 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
41  I_EMPTY = 1U,
42 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
43 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
45  I_SINGLETON = 2U,
46 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
47 
50 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
51  I_SOME = 4U,
52 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
53 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
55  I_UNIVERSE = 8U,
56 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
57 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
59  I_NOT_EMPTY = I_SINGLETON | I_SOME | I_UNIVERSE,
60 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
61 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
64 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
65 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
67  I_NOT_UNIVERSE = I_EMPTY | I_SINGLETON | I_SOME,
68 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
69 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
71  I_NOT_DEGENERATE = I_SINGLETON | I_SOME,
72 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
73 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
75  I_EXACT = 16,
76 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
77 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
79  I_INEXACT = 32,
80 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
81 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
83  I_CHANGED = 64,
84 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
85 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
87  I_UNCHANGED = 128,
88 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
89 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
91  I_SINGULARITIES = 256
92 };
Result may be empty or not empty.
Result is definitely inexact.
Result is neither empty nor the domain universe.
Result may be empty or not empty.
Result may have only one value.
Operation is undefined for some combination of values.
Result may be the domain universe.
Result may have more than one value, but it is not the domain universe.
Result is definitely exact.
Operation has definitely changed the set.
Operation has left the set definitely unchanged.

The possible kinds of Constraint objects.

Enumerator
LINE_OR_EQUALITY 
RAY_OR_POINT_OR_INEQUALITY 

Definition at line 528 of file Constraint_defs.hh.

The possible kinds of Generator objects.

Enumerator
LINE_OR_EQUALITY 
RAY_OR_POINT_OR_INEQUALITY 

Definition at line 537 of file Generator_defs.hh.

Possible outcomes of the MIP_Problem solver.

Enumerator
UNFEASIBLE_MIP_PROBLEM 

The problem is unfeasible.

UNBOUNDED_MIP_PROBLEM 

The problem is unbounded.

OPTIMIZED_MIP_PROBLEM 

The problem has an optimal solution.

Definition at line 20 of file MIP_Problem_types.hh.

Possible optimization modes.

Enumerator
MINIMIZATION 

Minimization is requested.

MAXIMIZATION 

Maximization is requested.

Definition at line 68 of file globals_types.hh.

68  {
73 };
Minimization is requested.
Maximization is requested.

Possible outcomes of the PIP_Problem solver.

Enumerator
UNFEASIBLE_PIP_PROBLEM 

The problem is unfeasible.

OPTIMIZED_PIP_PROBLEM 

The problem has an optimal solution.

Definition at line 20 of file PIP_Problem_types.hh.

Relation symbols.

Enumerator
EQUAL 

Equal to.

LESS_THAN 

Less than.

LESS_OR_EQUAL 

Less than or equal to.

GREATER_THAN 

Greater than.

GREATER_OR_EQUAL 

Greater than or equal to.

NOT_EQUAL 

Not equal to.

Definition at line 40 of file globals_types.hh.

40  {
42  EQUAL = 1U,
44  LESS_THAN = 2U,
46  LESS_OR_EQUAL = LESS_THAN | EQUAL,
48  GREATER_THAN = 4U,
50  GREATER_OR_EQUAL = GREATER_THAN | EQUAL,
52  NOT_EQUAL = LESS_THAN | GREATER_THAN
53 };

\ Possible representations of coefficient sequences (i.e. linear expressions and more complex objects containing linear expressions, e.g. Constraints, Generators, etc.).

Enumerator
DENSE 

Dense representation: the coefficient sequence is represented as a vector of coefficients, including the zero coefficients. If there are only a few nonzero coefficients, this representation is faster and also uses a bit less memory.

SPARSE 

Sparse representation: only the nonzero coefficient are stored. If there are many nonzero coefficients, this improves memory consumption and run time (both because there is less data to process in O(n) operations and because finding zeroes/nonzeroes is much faster since zeroes are not stored at all, so any stored coefficient is nonzero).

Definition at line 161 of file globals_types.hh.

161  {
168  DENSE,
169 
177  SPARSE
178 };
Dense representation: the coefficient sequence is represented as a vector of coefficients, including the zero coefficients. If there are only a few nonzero coefficients, this representation is faster and also uses a bit less memory.
Sparse representation: only the nonzero coefficient are stored. If there are many nonzero coefficient...

Possible outcomes of a checked arithmetic computation.

Enumerator
V_EMPTY 

The exact result is not comparable.

V_EQ 

The computed result is exact.

V_LT 

The computed result is inexact and rounded up.

V_GT 

The computed result is inexact and rounded down.

V_NE 

The computed result is inexact.

V_LE 

The computed result may be inexact and rounded up.

V_GE 

The computed result may be inexact and rounded down.

V_LGE 

The computed result may be inexact.

V_OVERFLOW 

The exact result is a number out of finite bounds.

V_LT_INF 

A negative integer overflow occurred (rounding up).

V_GT_SUP 

A positive integer overflow occurred (rounding down).

V_LT_PLUS_INFINITY 

A positive integer overflow occurred (rounding up).

V_GT_MINUS_INFINITY 

A negative integer overflow occurred (rounding down).

V_EQ_MINUS_INFINITY 

Negative infinity result.

V_EQ_PLUS_INFINITY 

Positive infinity result.

V_NAN 

Not a number result.

V_CVT_STR_UNK 

Converting from unknown string.

V_DIV_ZERO 

Dividing by zero.

V_INF_ADD_INF 

Adding two infinities having opposite signs.

V_INF_DIV_INF 

Dividing two infinities.

V_INF_MOD 

Taking the modulus of an infinity.

V_INF_MUL_ZERO 

Multiplying an infinity by zero.

V_INF_SUB_INF 

Subtracting two infinities having the same sign.

V_MOD_ZERO 

Computing a remainder modulo zero.

V_SQRT_NEG 

Taking the square root of a negative number.

V_UNKNOWN_NEG_OVERFLOW 

Unknown result due to intermediate negative overflow.

V_UNKNOWN_POS_OVERFLOW 

Unknown result due to intermediate positive overflow.

V_UNREPRESENTABLE 

The computed result is not representable.

Definition at line 76 of file Result_defs.hh.

76  {
78  V_EMPTY = VR_EMPTY,
79 
81  V_EQ = static_cast<unsigned>(VR_EQ),
82 
84  V_LT = static_cast<unsigned>(VR_LT),
85 
87  V_GT = static_cast<unsigned>(VR_GT),
88 
90  V_NE = VR_NE,
91 
93  V_LE = VR_LE,
94 
96  V_GE = VR_GE,
97 
99  V_LGE = VR_LGE,
100 
102  V_OVERFLOW = 1U << 6,
103 
106 
109 
111  V_LT_PLUS_INFINITY = V_LT | static_cast<unsigned>(VC_PLUS_INFINITY),
112 
114  V_GT_MINUS_INFINITY = V_GT | static_cast<unsigned>(VC_MINUS_INFINITY),
115 
117  V_EQ_MINUS_INFINITY = V_EQ | static_cast<unsigned>(VC_MINUS_INFINITY),
118 
120  V_EQ_PLUS_INFINITY = V_EQ | static_cast<unsigned>(VC_PLUS_INFINITY),
121 
123  V_NAN = static_cast<unsigned>(VC_NAN),
124 
126  V_CVT_STR_UNK = V_NAN | (1U << 8),
127 
129  V_DIV_ZERO = V_NAN | (2U << 8),
130 
132  V_INF_ADD_INF = V_NAN | (3U << 8),
133 
135  V_INF_DIV_INF = V_NAN | (4U << 8),
136 
138  V_INF_MOD = V_NAN | (5U << 8),
139 
141  V_INF_MUL_ZERO = V_NAN | (6U << 8),
142 
144  V_INF_SUB_INF = V_NAN | (7U << 8),
145 
147  V_MOD_ZERO = V_NAN | (8U << 8),
148 
150  V_SQRT_NEG = V_NAN | (9U << 8),
151 
153  V_UNKNOWN_NEG_OVERFLOW = V_NAN | (10U << 8),
154 
156  V_UNKNOWN_POS_OVERFLOW = V_NAN | (11U << 8),
157 
159  V_UNREPRESENTABLE = 1U << 7
160 
161 };
A positive integer overflow occurred (rounding down).
Definition: Result_defs.hh:108
The computed result is exact.
Definition: Result_defs.hh:81
Taking the square root of a negative number.
Definition: Result_defs.hh:150
The exact result is a number out of finite bounds.
Definition: Result_defs.hh:102
Unknown result due to intermediate positive overflow.
Definition: Result_defs.hh:156
All values satisfy the relation.
Definition: Result_defs.hh:69
A positive integer overflow occurred (rounding up).
Definition: Result_defs.hh:111
Computing a remainder modulo zero.
Definition: Result_defs.hh:147
Negative infinity result class.
Definition: Result_defs.hh:34
Less or equal. This need to be accompanied by a value.
Definition: Result_defs.hh:63
Not a number result class.
Definition: Result_defs.hh:40
Not a number result.
Definition: Result_defs.hh:123
Taking the modulus of an infinity.
Definition: Result_defs.hh:138
The computed result is inexact and rounded down.
Definition: Result_defs.hh:87
Not equal. This need to be accompanied by a value.
Definition: Result_defs.hh:60
The exact result is not comparable.
Definition: Result_defs.hh:78
Positive infinity result class.
Definition: Result_defs.hh:37
Unknown result due to intermediate negative overflow.
Definition: Result_defs.hh:153
The computed result is not representable.
Definition: Result_defs.hh:159
Equal. This need to be accompanied by a value.
Definition: Result_defs.hh:51
Less than. This need to be accompanied by a value.
Definition: Result_defs.hh:54
The computed result is inexact.
Definition: Result_defs.hh:90
Converting from unknown string.
Definition: Result_defs.hh:126
Greater or equal. This need to be accompanied by a value.
Definition: Result_defs.hh:66
The computed result may be inexact and rounded up.
Definition: Result_defs.hh:93
Adding two infinities having opposite signs.
Definition: Result_defs.hh:132
Greater than. This need to be accompanied by a value.
Definition: Result_defs.hh:57
The computed result may be inexact and rounded down.
Definition: Result_defs.hh:96
Subtracting two infinities having the same sign.
Definition: Result_defs.hh:144
No values satisfies the relation.
Definition: Result_defs.hh:48
A negative integer overflow occurred (rounding down).
Definition: Result_defs.hh:114
The computed result is inexact and rounded up.
Definition: Result_defs.hh:84
The computed result may be inexact.
Definition: Result_defs.hh:99
Multiplying an infinity by zero.
Definition: Result_defs.hh:141
A negative integer overflow occurred (rounding up).
Definition: Result_defs.hh:105

Rounding directions for arithmetic computations.

Enumerator
ROUND_DOWN 

Round toward $-\infty$.

ROUND_UP 

Round toward $+\infty$.

ROUND_IGNORE 

Rounding is delegated to lower level. Result info is evaluated lazily.

ROUND_NATIVE 
ROUND_NOT_NEEDED 

Rounding is not needed: client code must ensure that the operation result is exact and representable in the destination type. Result info is evaluated lazily.

ROUND_DIRECT 
ROUND_INVERSE 
ROUND_DIR_MASK 
ROUND_STRICT_RELATION 

The client code is willing to pay an extra price to know the exact relation between the exact result and the computed one.

ROUND_CHECK 

Definition at line 34 of file Rounding_Dir_defs.hh.

An enumerated type describing the internal status of the MIP problem.

Enumerator
UNSATISFIABLE 

The MIP problem is unsatisfiable.

SATISFIABLE 

The MIP problem is satisfiable; a feasible solution has been computed.

UNBOUNDED 

The MIP problem is unbounded; a feasible solution has been computed.

OPTIMIZED 

The MIP problem is optimized; an optimal solution has been computed.

PARTIALLY_SATISFIABLE 

The feasible region of the MIP problem has been changed by adding new space dimensions or new constraints; a feasible solution for the old feasible region is still available.

Definition at line 536 of file MIP_Problem_defs.hh.

536  {
540  SATISFIABLE,
542  UNBOUNDED,
544  OPTIMIZED,
551  };
The MIP problem is optimized; an optimal solution has been computed.
The feasible region of the MIP problem has been changed by adding new space dimensions or new constra...
The MIP problem is unbounded; a feasible solution has been computed.
The MIP problem is satisfiable; a feasible solution has been computed.

An enumerated type describing the internal status of the PIP problem.

Enumerator
UNSATISFIABLE 

The PIP problem is unsatisfiable.

OPTIMIZED 

The PIP problem is optimized; the solution tree has been computed.

PARTIALLY_SATISFIABLE 

The feasible region of the PIP problem has been changed by adding new variables, parameters or constraints; a feasible solution for the old feasible region is still available.

Definition at line 773 of file PIP_Problem_defs.hh.

773  {
777  OPTIMIZED,
784  };
The PIP problem is optimized; the solution tree has been computed.
The feasible region of the PIP problem has been changed by adding new variables, parameters or constr...

Kinds of polyhedra domains.

Enumerator
NECESSARILY_CLOSED 
NOT_NECESSARILY_CLOSED 

Definition at line 22 of file Topology_types.hh.

The constraint type.

Enumerator
EQUALITY 

The constraint is an equality.

NONSTRICT_INEQUALITY 

The constraint is a non-strict inequality.

STRICT_INEQUALITY 

The constraint is a strict inequality.

Definition at line 288 of file Constraint_defs.hh.

The generator type.

Enumerator
LINE 

The generator is a grid line.

PARAMETER 

The generator is a parameter.

POINT 

The generator is a grid point.

Definition at line 414 of file Grid_Generator_defs.hh.

The generator type.

Enumerator
LINE 

The generator is a line.

RAY 

The generator is a ray.

POINT 

The generator is a point.

CLOSURE_POINT 

The generator is a closure point.

Definition at line 429 of file Generator_defs.hh.

Function Documentation

template<typename PSET >
void Parma_Polyhedra_Library::all_affine_quasi_ranking_functions_MS ( const PSET &  pset,
C_Polyhedron decreasing_mu_space,
C_Polyhedron bounded_mu_space 
)

\ Computes the spaces of affine quasi ranking functions using an improvement of the method by Mesnard and Serebrenik [BMPZ10].

Template Parameters
PSETAny pointset supported by the PPL that provides the minimized_constraints() method.
Parameters
psetA pointset approximating the behavior of a loop whose termination is being analyzed. The variables indices are allocated as follows:
  • $ x'_1, \ldots, x'_n $ go onto space dimensions $ 0, \ldots, n-1 $,
  • $ x_1, \ldots, x_n $ go onto space dimensions $ n, \ldots, 2n-1 $,
where unprimed variables represent the values of the loop-relevant program variables before the update performed in the loop body, and primed variables represent the values of those program variables after the update.
decreasing_mu_spaceThis is assigned a closed polyhedron of space dimension $ n+1 $ representing the space of all the decreasing affine functions for the loops that are precisely characterized by pset.
bounded_mu_spaceThis is assigned a closed polyhedron of space dimension $ n+1 $ representing the space of all the lower bounded affine functions for the loops that are precisely characterized by pset.

These quasi-ranking functions are of the form $ \mu_0 + \sum_{i=1}^n \mu_i x_i $ where $ \mu_0, \mu_1, \ldots, \mu_n $ identify any point of the decreasing_mu_space and bounded_mu_space polyhedrons. The variables $ \mu_0, \mu_1, \ldots, \mu_n $ correspond to the space dimensions $ n, 0, \ldots, n-1 $, respectively. When decreasing_mu_space (resp., bounded_mu_space) is empty, it means that the test is inconclusive. However, if pset precisely characterizes the effect of the loop body onto the loop-relevant program variables, then decreasing_mu_space (resp., bounded_mu_space) will be empty if and only if there is no decreasing (resp., lower bounded) affine function, so that the loop does not terminate.

Definition at line 374 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::all_affine_quasi_ranking_functions_MS(), Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::UNIVERSE.

376  {
377  const dimension_type space_dim = pset.space_dimension();
378  if (space_dim % 2 != 0) {
379  std::ostringstream s;
380  s << "PPL::all_affine_quasi_ranking_functions_MS"
381  << "(pset, decr_space, bounded_space):\n"
382  << "pset.space_dimension() == " << space_dim
383  << " is odd.";
384  throw std::invalid_argument(s.str());
385  }
386 
387  if (pset.is_empty()) {
388  decreasing_mu_space = C_Polyhedron(1 + space_dim/2, UNIVERSE);
389  bounded_mu_space = decreasing_mu_space;
390  return;
391  }
392 
393  using namespace Implementation::Termination;
394  Constraint_System cs;
397  decreasing_mu_space,
398  bounded_mu_space);
399 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
void all_affine_quasi_ranking_functions_MS(const Constraint_System &cs, C_Polyhedron &decreasing_mu_space, C_Polyhedron &bounded_mu_space)
Definition: termination.cc:558
The universe element, i.e., the whole vector space.
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_quasi_ranking_functions_MS_2 ( const PSET &  pset_before,
const PSET &  pset_after,
C_Polyhedron decreasing_mu_space,
C_Polyhedron bounded_mu_space 
)

\ Computes the spaces of affine quasi ranking functions using an improvement of the method by Mesnard and Serebrenik [BMPZ10].

Template Parameters
PSETAny pointset supported by the PPL that provides the minimized_constraints() method.
Parameters
pset_beforeA pointset approximating the values of loop-relevant variables before the update performed in the loop body that is being analyzed. The variables indices are allocated as follows:
  • $ x_1, \ldots, x_n $ go onto space dimensions $ 0, \ldots, n-1 $.
pset_afterA pointset approximating the values of loop-relevant variables after the update performed in the loop body that is being analyzed. The variables indices are allocated as follows:
  • $ x'_1, \ldots, x'_n $ go onto space dimensions $ 0, \ldots, n-1 $,
  • $ x_1, \ldots, x_n $ go onto space dimensions $ n, \ldots, 2n-1 $,

Note that unprimed variables represent the values of the loop-relevant program variables before the update performed in the loop body, and primed variables represent the values of those program variables after the update. Note also that unprimed variables are assigned to different space dimensions in pset_before and pset_after.

Parameters
decreasing_mu_spaceThis is assigned a closed polyhedron of space dimension $ n+1 $ representing the space of all the decreasing affine functions for the loops that are precisely characterized by pset.
bounded_mu_spaceThis is assigned a closed polyhedron of space dimension $ n+1 $ representing the space of all the lower bounded affine functions for the loops that are precisely characterized by pset.

These ranking functions are of the form $ \mu_0 + \sum_{i=1}^n \mu_i x_i $ where $ \mu_0, \mu_1, \ldots, \mu_n $ identify any point of the decreasing_mu_space and bounded_mu_space polyhedrons. The variables $ \mu_0, \mu_1, \ldots, \mu_n $ correspond to the space dimensions $ n, 0, \ldots, n-1 $, respectively. When decreasing_mu_space (resp., bounded_mu_space) is empty, it means that the test is inconclusive. However, if pset_before and pset_after precisely characterize the effect of the loop body onto the loop-relevant program variables, then decreasing_mu_space (resp., bounded_mu_space) will be empty if and only if there is no decreasing (resp., lower bounded) affine function, so that the loop does not terminate.

Definition at line 403 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::all_affine_quasi_ranking_functions_MS(), Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::UNIVERSE.

406  {
407  const dimension_type before_space_dim = pset_before.space_dimension();
408  const dimension_type after_space_dim = pset_after.space_dimension();
409  if (after_space_dim != 2*before_space_dim) {
410  std::ostringstream s;
411  s << "PPL::all_affine_quasi_ranking_functions_MS_2"
412  << "(pset_before, pset_after, decr_space, bounded_space):\n"
413  << "pset_before.space_dimension() == " << before_space_dim
414  << ", pset_after.space_dimension() == " << after_space_dim
415  << ";\nthe latter should be twice the former.";
416  throw std::invalid_argument(s.str());
417  }
418 
419  if (pset_before.is_empty()) {
420  decreasing_mu_space = C_Polyhedron(1 + before_space_dim, UNIVERSE);
421  bounded_mu_space = decreasing_mu_space;
422  return;
423  }
424 
425  using namespace Implementation::Termination;
426  Constraint_System cs;
428  ::assign_all_inequalities_approximation(pset_before, pset_after, cs);
430  decreasing_mu_space,
431  bounded_mu_space);
432 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
void all_affine_quasi_ranking_functions_MS(const Constraint_System &cs, C_Polyhedron &decreasing_mu_space, C_Polyhedron &bounded_mu_space)
Definition: termination.cc:558
The universe element, i.e., the whole vector space.
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_ranking_functions_MS ( const PSET &  pset,
C_Polyhedron mu_space 
)

\ Termination test with ranking function space using an improvement of the method by Mesnard and Serebrenik [BMPZ10].

Template Parameters
PSETAny pointset supported by the PPL that provides the minimized_constraints() method.
Parameters
psetA pointset approximating the behavior of a loop whose termination is being analyzed. The variables indices are allocated as follows:
  • $ x'_1, \ldots, x'_n $ go onto space dimensions $ 0, \ldots, n-1 $,
  • $ x_1, \ldots, x_n $ go onto space dimensions $ n, \ldots, 2n-1 $,
where unprimed variables represent the values of the loop-relevant program variables before the update performed in the loop body, and primed variables represent the values of those program variables after the update.
mu_spaceThis is assigned a closed polyhedron of space dimension $ n+1 $ representing the space of all the affine ranking functions for the loops that are precisely characterized by pset. These ranking functions are of the form $ \mu_0 + \sum_{i=1}^n \mu_i x_i $ where $ \mu_0, \mu_1, \ldots, \mu_n $ identify any point of the mu_space polyhedron. The variables $ \mu_0, \mu_1, \ldots, \mu_n $ correspond to the space dimensions of mu_space $ n, 0, \ldots, n-1 $, respectively. When mu_space is empty, it means that the test is inconclusive. However, if pset precisely characterizes the effect of the loop body onto the loop-relevant program variables, then mu_space is empty if and only if the loop does not terminate.

Definition at line 322 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::all_affine_ranking_functions_MS(), Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::UNIVERSE.

322  {
323  const dimension_type space_dim = pset.space_dimension();
324  if (space_dim % 2 != 0) {
325  std::ostringstream s;
326  s << "PPL::all_affine_ranking_functions_MS(pset, mu_space):\n"
327  "pset.space_dimension() == " << space_dim
328  << " is odd.";
329  throw std::invalid_argument(s.str());
330  }
331 
332  if (pset.is_empty()) {
333  mu_space = C_Polyhedron(1 + space_dim/2, UNIVERSE);
334  return;
335  }
336 
337  using namespace Implementation::Termination;
338  Constraint_System cs;
340  all_affine_ranking_functions_MS(cs, mu_space);
341 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
void all_affine_ranking_functions_MS(const Constraint_System &cs, C_Polyhedron &mu_space)
Definition: termination.cc:514
The universe element, i.e., the whole vector space.
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_ranking_functions_MS_2 ( const PSET &  pset_before,
const PSET &  pset_after,
C_Polyhedron mu_space 
)

\ Termination test with ranking function space using an improvement of the method by Mesnard and Serebrenik [BMPZ10].

Template Parameters
PSETAny pointset supported by the PPL that provides the minimized_constraints() method.
Parameters
pset_beforeA pointset approximating the values of loop-relevant variables before the update performed in the loop body that is being analyzed. The variables indices are allocated as follows:
  • $ x_1, \ldots, x_n $ go onto space dimensions $ 0, \ldots, n-1 $.
pset_afterA pointset approximating the values of loop-relevant variables after the update performed in the loop body that is being analyzed. The variables indices are allocated as follows:
  • $ x'_1, \ldots, x'_n $ go onto space dimensions $ 0, \ldots, n-1 $,
  • $ x_1, \ldots, x_n $ go onto space dimensions $ n, \ldots, 2n-1 $,

Note that unprimed variables represent the values of the loop-relevant program variables before the update performed in the loop body, and primed variables represent the values of those program variables after the update. Note also that unprimed variables are assigned to different space dimensions in pset_before and pset_after.

Parameters
mu_spaceThis is assigned a closed polyhedron of space dimension $ n+1 $ representing the space of all the affine ranking functions for the loops that are precisely characterized by pset. These ranking functions are of the form $ \mu_0 + \sum_{i=1}^n \mu_i x_i $ where $ \mu_0, \mu_1, \ldots, \mu_n $ identify any point of the mu_space polyhedron. The variables $ \mu_0, \mu_1, \ldots, \mu_n $ correspond to the space dimensions of mu_space $ n, 0, \ldots, n-1 $, respectively. When mu_space is empty, it means that the test is inconclusive. However, if pset_before and pset_after precisely characterize the effect of the loop body onto the loop-relevant program variables, then mu_space is empty if and only if the loop does not terminate.

Definition at line 345 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::all_affine_ranking_functions_MS(), Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::UNIVERSE.

347  {
348  const dimension_type before_space_dim = pset_before.space_dimension();
349  const dimension_type after_space_dim = pset_after.space_dimension();
350  if (after_space_dim != 2*before_space_dim) {
351  std::ostringstream s;
352  s << "PPL::all_affine_ranking_functions_MS_2"
353  << "(pset_before, pset_after, mu_space):\n"
354  << "pset_before.space_dimension() == " << before_space_dim
355  << ", pset_after.space_dimension() == " << after_space_dim
356  << ";\nthe latter should be twice the former.";
357  throw std::invalid_argument(s.str());
358  }
359 
360  if (pset_before.is_empty()) {
361  mu_space = C_Polyhedron(1 + before_space_dim, UNIVERSE);
362  return;
363  }
364 
365  using namespace Implementation::Termination;
366  Constraint_System cs;
368  ::assign_all_inequalities_approximation(pset_before, pset_after, cs);
369  all_affine_ranking_functions_MS(cs, mu_space);
370 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
void all_affine_ranking_functions_MS(const Constraint_System &cs, C_Polyhedron &mu_space)
Definition: termination.cc:514
The universe element, i.e., the whole vector space.
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_ranking_functions_PR ( const PSET &  pset,
NNC_Polyhedron mu_space 
)

\ Like all_affine_ranking_functions_MS() but using the method by Podelski and Rybalchenko [BMPZ10].

Definition at line 549 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::all_affine_ranking_functions_PR_original(), and Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation().

550  {
551  const dimension_type space_dim = pset.space_dimension();
552  if (space_dim % 2 != 0) {
553  std::ostringstream s;
554  s << "PPL::all_affine_ranking_functions_PR(pset, mu_space):\n"
555  << "pset.space_dimension() == " << space_dim
556  << " is odd.";
557  throw std::invalid_argument(s.str());
558  }
559 
560  if (pset.is_empty()) {
561  mu_space = NNC_Polyhedron(1 + space_dim/2);
562  return;
563  }
564 
565  using namespace Implementation::Termination;
566  Constraint_System cs;
569 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
void all_affine_ranking_functions_PR_original(const Constraint_System &cs, NNC_Polyhedron &mu_space)
Definition: termination.cc:664
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
void Parma_Polyhedra_Library::all_affine_ranking_functions_PR_2 ( const PSET &  pset_before,
const PSET &  pset_after,
NNC_Polyhedron mu_space 
)

\ Like all_affine_ranking_functions_MS_2() but using an alternative formalization of the method by Podelski and Rybalchenko [BMPZ10].

Definition at line 519 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::all_affine_ranking_functions_PR(), and Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation().

521  {
522  const dimension_type before_space_dim = pset_before.space_dimension();
523  const dimension_type after_space_dim = pset_after.space_dimension();
524  if (after_space_dim != 2*before_space_dim) {
525  std::ostringstream s;
526  s << "PPL::all_affine_ranking_functions_MS_2"
527  << "(pset_before, pset_after, mu_space):\n"
528  << "pset_before.space_dimension() == " << before_space_dim
529  << ", pset_after.space_dimension() == " << after_space_dim
530  << ";\nthe latter should be twice the former.";
531  throw std::invalid_argument(s.str());
532  }
533 
534  if (pset_before.is_empty()) {
535  mu_space = NNC_Polyhedron(1 + before_space_dim);
536  return;
537  }
538 
539  using namespace Implementation::Termination;
540  Constraint_System cs_before;
541  Constraint_System cs_after;
542  assign_all_inequalities_approximation(pset_before, cs_before);
543  assign_all_inequalities_approximation(pset_after, cs_after);
544  all_affine_ranking_functions_PR(cs_before, cs_after, mu_space);
545 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
void all_affine_ranking_functions_PR(const Constraint_System &cs_before, const Constraint_System &cs_after, NNC_Polyhedron &mu_space)
Definition: termination.cc:656
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
Rounding_Dir Parma_Polyhedra_Library::inverse ( Rounding_Dir  dir)
inline

\ Returns the inverse rounding mode of dir, ROUND_IGNORE being the inverse of itself.

Definition at line 125 of file Rounding_Dir_inlines.hh.

References Parma_Polyhedra_Library::round_dir(), Parma_Polyhedra_Library::ROUND_DOWN, Parma_Polyhedra_Library::ROUND_IGNORE, Parma_Polyhedra_Library::ROUND_STRICT_RELATION, and Parma_Polyhedra_Library::ROUND_UP.

Referenced by Parma_Polyhedra_Library::Grid::affine_image(), Parma_Polyhedra_Library::Polyhedron::affine_image(), Parma_Polyhedra_Library::Box< ITV >::affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::Grid::affine_preimage(), Parma_Polyhedra_Library::Polyhedron::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Generator::l_m_distance_assign(), Parma_Polyhedra_Library::OR_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Box< ITV >::l_m_distance_assign(), and Parma_Polyhedra_Library::Checked::sqrt_mpq().

125  {
126  switch (round_dir(dir)) {
127  case ROUND_UP:
128  return ROUND_DOWN | (dir & ROUND_STRICT_RELATION);
129  case ROUND_DOWN:
130  return ROUND_UP | (dir & ROUND_STRICT_RELATION);
131  case ROUND_IGNORE:
132  return dir;
133  default:
134  PPL_UNREACHABLE;
135  return dir;
136  }
137 }
Rounding_Dir round_dir(Rounding_Dir dir)
template<typename PSET >
bool Parma_Polyhedra_Library::one_affine_ranking_function_MS ( const PSET &  pset,
Generator mu 
)

\ Termination test with witness ranking function using an improvement of the method by Mesnard and Serebrenik [BMPZ10].

Template Parameters
PSETAny pointset supported by the PPL that provides the minimized_constraints() method.
Parameters
psetA pointset approximating the behavior of a loop whose termination is being analyzed. The variables indices are allocated as follows:
  • $ x'_1, \ldots, x'_n $ go onto space dimensions $ 0, \ldots, n-1 $,
  • $ x_1, \ldots, x_n $ go onto space dimensions $ n, \ldots, 2n-1 $,
where unprimed variables represent the values of the loop-relevant program variables before the update performed in the loop body, and primed variables represent the values of those program variables after the update.
muWhen true is returned, this is assigned a point of space dimension $ n+1 $ encoding one (not further specified) affine ranking function for the loop being analyzed. The ranking function is of the form $ \mu_0 + \sum_{i=1}^n \mu_i x_i $ where $ \mu_0, \mu_1, \ldots, \mu_n $ are the coefficients of mu corresponding to the space dimensions $ n, 0, \ldots, n-1 $, respectively.
Returns
true if any loop approximated by pset definitely terminates; false if the test is inconclusive. However, if pset precisely characterizes the effect of the loop body onto the loop-relevant program variables, then true is returned if and only if the loop terminates.

Definition at line 281 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::Implementation::Termination::one_affine_ranking_function_MS().

281  {
282  const dimension_type space_dim = pset.space_dimension();
283  if (space_dim % 2 != 0) {
284  std::ostringstream s;
285  s << "PPL::one_affine_ranking_function_MS(pset, mu):\n"
286  "pset.space_dimension() == " << space_dim
287  << " is odd.";
288  throw std::invalid_argument(s.str());
289  }
290 
291  using namespace Implementation::Termination;
292  Constraint_System cs;
294  return one_affine_ranking_function_MS(cs, mu);
295 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool one_affine_ranking_function_MS(const Constraint_System &cs, Generator &mu)
Definition: termination.cc:497
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
bool Parma_Polyhedra_Library::one_affine_ranking_function_MS_2 ( const PSET &  pset_before,
const PSET &  pset_after,
Generator mu 
)

\ Termination test with witness ranking function using an improvement of the method by Mesnard and Serebrenik [BMPZ10].

Template Parameters
PSETAny pointset supported by the PPL that provides the minimized_constraints() method.
Parameters
pset_beforeA pointset approximating the values of loop-relevant variables before the update performed in the loop body that is being analyzed. The variables indices are allocated as follows:
  • $ x_1, \ldots, x_n $ go onto space dimensions $ 0, \ldots, n-1 $.
pset_afterA pointset approximating the values of loop-relevant variables after the update performed in the loop body that is being analyzed. The variables indices are allocated as follows:
  • $ x'_1, \ldots, x'_n $ go onto space dimensions $ 0, \ldots, n-1 $,
  • $ x_1, \ldots, x_n $ go onto space dimensions $ n, \ldots, 2n-1 $,

Note that unprimed variables represent the values of the loop-relevant program variables before the update performed in the loop body, and primed variables represent the values of those program variables after the update. Note also that unprimed variables are assigned to different space dimensions in pset_before and pset_after.

Parameters
muWhen true is returned, this is assigned a point of space dimension $ n+1 $ encoding one (not further specified) affine ranking function for the loop being analyzed. The ranking function is of the form $ \mu_0 + \sum_{i=1}^n \mu_i x_i $ where $ \mu_0, \mu_1, \ldots, \mu_n $ are the coefficients of mu corresponding to the space dimensions $ n, 0, \ldots, n-1 $, respectively.
Returns
true if any loop approximated by pset definitely terminates; false if the test is inconclusive. However, if pset_before and pset_after precisely characterize the effect of the loop body onto the loop-relevant program variables, then true is returned if and only if the loop terminates.

Definition at line 299 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::Implementation::Termination::one_affine_ranking_function_MS().

301  {
302  const dimension_type before_space_dim = pset_before.space_dimension();
303  const dimension_type after_space_dim = pset_after.space_dimension();
304  if (after_space_dim != 2*before_space_dim) {
305  std::ostringstream s;
306  s << "PPL::one_affine_ranking_function_MS_2(pset_before, pset_after, mu):\n"
307  "pset_before.space_dimension() == " << before_space_dim
308  << ", pset_after.space_dimension() == " << after_space_dim
309  << ";\nthe latter should be twice the former.";
310  throw std::invalid_argument(s.str());
311  }
312 
313  using namespace Implementation::Termination;
314  Constraint_System cs;
316  ::assign_all_inequalities_approximation(pset_before, pset_after, cs);
317  return one_affine_ranking_function_MS(cs, mu);
318 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool one_affine_ranking_function_MS(const Constraint_System &cs, Generator &mu)
Definition: termination.cc:497
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
bool Parma_Polyhedra_Library::one_affine_ranking_function_PR ( const PSET &  pset,
Generator mu 
)

\ Like one_affine_ranking_function_MS() but using the method by Podelski and Rybalchenko [BMPZ10].

Definition at line 501 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::Implementation::Termination::one_affine_ranking_function_PR_original().

501  {
502  const dimension_type space_dim = pset.space_dimension();
503  if (space_dim % 2 != 0) {
504  std::ostringstream s;
505  s << "PPL::one_affine_ranking_function_PR(pset, mu):\n"
506  << "pset.space_dimension() == " << space_dim
507  << " is odd.";
508  throw std::invalid_argument(s.str());
509  }
510 
511  using namespace Implementation::Termination;
512  Constraint_System cs;
515 }
bool one_affine_ranking_function_PR_original(const Constraint_System &cs, Generator &mu)
Definition: termination.cc:650
size_t dimension_type
An unsigned integral type for representing space dimensions.
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
bool Parma_Polyhedra_Library::one_affine_ranking_function_PR_2 ( const PSET &  pset_before,
const PSET &  pset_after,
Generator mu 
)

\ Like one_affine_ranking_function_MS_2() but using an alternative formalization of the method by Podelski and Rybalchenko [BMPZ10].

Definition at line 476 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::Implementation::Termination::one_affine_ranking_function_PR().

478  {
479  const dimension_type before_space_dim = pset_before.space_dimension();
480  const dimension_type after_space_dim = pset_after.space_dimension();
481  if (after_space_dim != 2*before_space_dim) {
482  std::ostringstream s;
483  s << "PPL::one_affine_ranking_function_PR_2"
484  << "(pset_before, pset_after, mu):\n"
485  << "pset_before.space_dimension() == " << before_space_dim
486  << ", pset_after.space_dimension() == " << after_space_dim
487  << ";\nthe latter should be twice the former.";
488  throw std::invalid_argument(s.str());
489  }
490 
491  using namespace Implementation::Termination;
492  Constraint_System cs_before;
493  Constraint_System cs_after;
494  assign_all_inequalities_approximation(pset_before, cs_before);
495  assign_all_inequalities_approximation(pset_after, cs_after);
496  return one_affine_ranking_function_PR(cs_before, cs_after, mu);
497 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool one_affine_ranking_function_PR(const Constraint_System &cs_before, const Constraint_System &cs_after, Generator &mu)
Definition: termination.cc:642
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
Rounding_Dir Parma_Polyhedra_Library::operator& ( Rounding_Dir  x,
Rounding_Dir  y 
)
inline

Definition at line 33 of file Rounding_Dir_inlines.hh.

33  {
34  const unsigned res = static_cast<unsigned>(x) & static_cast<unsigned>(y);
35  return static_cast<Rounding_Dir>(res);
36 }
Rounding_Dir
Rounding directions for arithmetic computations.
Result Parma_Polyhedra_Library::operator& ( Result  x,
Result  y 
)
inline

Definition at line 33 of file Result_inlines.hh.

33  {
34  const unsigned res = static_cast<unsigned>(x) & static_cast<unsigned>(y);
35  return static_cast<Result>(res);
36 }
Result
Possible outcomes of a checked arithmetic computation.
Definition: Result_defs.hh:76
Result Parma_Polyhedra_Library::operator- ( Result  x,
Result  y 
)
inline

Definition at line 47 of file Result_inlines.hh.

47  {
48  const Result y_neg = static_cast<Result>(~static_cast<unsigned>(y));
49  return x & y_neg;
50 }
Result
Possible outcomes of a checked arithmetic computation.
Definition: Result_defs.hh:76
Rounding_Dir Parma_Polyhedra_Library::operator| ( Rounding_Dir  x,
Rounding_Dir  y 
)
inline

Definition at line 40 of file Rounding_Dir_inlines.hh.

40  {
41  const unsigned res = static_cast<unsigned>(x) | static_cast<unsigned>(y);
42  return static_cast<Rounding_Dir>(res);
43 }
Rounding_Dir
Rounding directions for arithmetic computations.
Result Parma_Polyhedra_Library::operator| ( Result  x,
Result  y 
)
inline

Definition at line 40 of file Result_inlines.hh.

40  {
41  const unsigned res = static_cast<unsigned>(x) | static_cast<unsigned>(y);
42  return static_cast<Result>(res);
43 }
Result
Possible outcomes of a checked arithmetic computation.
Definition: Result_defs.hh:76
Result_Class Parma_Polyhedra_Library::result_class ( Result  r)
inline
Result_Relation Parma_Polyhedra_Library::result_relation ( Result  r)
inline
bool Parma_Polyhedra_Library::round_ignore ( Rounding_Dir  dir)
inline
bool Parma_Polyhedra_Library::round_inverse ( Rounding_Dir  dir)
inline
template<typename PSET >
bool Parma_Polyhedra_Library::termination_test_MS ( const PSET &  pset)

\ Termination test using an improvement of the method by Mesnard and Serebrenik [BMPZ10].

Template Parameters
PSETAny pointset supported by the PPL that provides the minimized_constraints() method.
Parameters
psetA pointset approximating the behavior of a loop whose termination is being analyzed. The variables indices are allocated as follows:
  • $ x'_1, \ldots, x'_n $ go onto space dimensions $ 0, \ldots, n-1 $,
  • $ x_1, \ldots, x_n $ go onto space dimensions $ n, \ldots, 2n-1 $,
where unprimed variables represent the values of the loop-relevant program variables before the update performed in the loop body, and primed variables represent the values of those program variables after the update.
Returns
true if any loop approximated by pset definitely terminates; false if the test is inconclusive. However, if pset precisely characterizes the effect of the loop body onto the loop-relevant program variables, then true is returned if and only if the loop terminates.

Definition at line 242 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::Implementation::Termination::termination_test_MS().

242  {
243  const dimension_type space_dim = pset.space_dimension();
244  if (space_dim % 2 != 0) {
245  std::ostringstream s;
246  s << "PPL::termination_test_MS(pset):\n"
247  "pset.space_dimension() == " << space_dim
248  << " is odd.";
249  throw std::invalid_argument(s.str());
250  }
251 
252  using namespace Implementation::Termination;
253  Constraint_System cs;
255  return termination_test_MS(cs);
256 }
bool termination_test_MS(const Constraint_System &cs)
Definition: termination.cc:488
size_t dimension_type
An unsigned integral type for representing space dimensions.
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
bool Parma_Polyhedra_Library::termination_test_MS_2 ( const PSET &  pset_before,
const PSET &  pset_after 
)

\ Termination test using an improvement of the method by Mesnard and Serebrenik [BMPZ10].

Template Parameters
PSETAny pointset supported by the PPL that provides the minimized_constraints() method.
Parameters
pset_beforeA pointset approximating the values of loop-relevant variables before the update performed in the loop body that is being analyzed. The variables indices are allocated as follows:
  • $ x_1, \ldots, x_n $ go onto space dimensions $ 0, \ldots, n-1 $.
pset_afterA pointset approximating the values of loop-relevant variables after the update performed in the loop body that is being analyzed. The variables indices are allocated as follows:
  • $ x'_1, \ldots, x'_n $ go onto space dimensions $ 0, \ldots, n-1 $,
  • $ x_1, \ldots, x_n $ go onto space dimensions $ n, \ldots, 2n-1 $,

Note that unprimed variables represent the values of the loop-relevant program variables before the update performed in the loop body, and primed variables represent the values of those program variables after the update. Note also that unprimed variables are assigned to different space dimensions in pset_before and pset_after.

Returns
true if any loop approximated by pset definitely terminates; false if the test is inconclusive. However, if pset_before and pset_after precisely characterize the effect of the loop body onto the loop-relevant program variables, then true is returned if and only if the loop terminates.

Definition at line 260 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::Implementation::Termination::termination_test_MS().

260  {
261  const dimension_type before_space_dim = pset_before.space_dimension();
262  const dimension_type after_space_dim = pset_after.space_dimension();
263  if (after_space_dim != 2*before_space_dim) {
264  std::ostringstream s;
265  s << "PPL::termination_test_MS_2(pset_before, pset_after):\n"
266  "pset_before.space_dimension() == " << before_space_dim
267  << ", pset_after.space_dimension() == " << after_space_dim
268  << ";\nthe latter should be twice the former.";
269  throw std::invalid_argument(s.str());
270  }
271 
272  using namespace Implementation::Termination;
273  Constraint_System cs;
275  ::assign_all_inequalities_approximation(pset_before, pset_after, cs);
276  return termination_test_MS(cs);
277 }
bool termination_test_MS(const Constraint_System &cs)
Definition: termination.cc:488
size_t dimension_type
An unsigned integral type for representing space dimensions.
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
bool Parma_Polyhedra_Library::termination_test_PR ( const PSET &  pset)

\ Like termination_test_MS() but using the method by Podelski and Rybalchenko [BMPZ10].

Definition at line 458 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::Implementation::Termination::termination_test_PR_original().

458  {
459  const dimension_type space_dim = pset.space_dimension();
460  if (space_dim % 2 != 0) {
461  std::ostringstream s;
462  s << "PPL::termination_test_PR(pset):\n"
463  << "pset.space_dimension() == " << space_dim
464  << " is odd.";
465  throw std::invalid_argument(s.str());
466  }
467 
468  using namespace Implementation::Termination;
469  Constraint_System cs;
471  return termination_test_PR_original(cs);
472 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool termination_test_PR_original(const Constraint_System &cs)
Definition: termination.cc:596
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)
template<typename PSET >
bool Parma_Polyhedra_Library::termination_test_PR_2 ( const PSET &  pset_before,
const PSET &  pset_after 
)

\ Like termination_test_MS_2() but using an alternative formalization of the method by Podelski and Rybalchenko [BMPZ10].

Definition at line 436 of file termination_templates.hh.

References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and Parma_Polyhedra_Library::Implementation::Termination::termination_test_PR().

436  {
437  const dimension_type before_space_dim = pset_before.space_dimension();
438  const dimension_type after_space_dim = pset_after.space_dimension();
439  if (after_space_dim != 2*before_space_dim) {
440  std::ostringstream s;
441  s << "PPL::termination_test_PR_2(pset_before, pset_after):\n"
442  << "pset_before.space_dimension() == " << before_space_dim
443  << ", pset_after.space_dimension() == " << after_space_dim
444  << ";\nthe latter should be twice the former.";
445  throw std::invalid_argument(s.str());
446  }
447 
448  using namespace Implementation::Termination;
449  Constraint_System cs_before;
450  Constraint_System cs_after;
451  assign_all_inequalities_approximation(pset_before, cs_before);
452  assign_all_inequalities_approximation(pset_after, cs_after);
453  return termination_test_PR(cs_before, cs_after);
454 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool termination_test_PR(const Constraint_System &cs_before, const Constraint_System &cs_after)
Definition: termination.cc:611
void assign_all_inequalities_approximation(const PSET &pset, Constraint_System &cs)

Variable Documentation

const Throwable *volatile Parma_Polyhedra_Library::abandon_expensive_computations = 0

A pointer to an exception object.

This pointer, which is initialized to zero, is repeatedly checked along any super-linear (i.e., computationally expensive) computation path in the library. When it is found nonzero the exception it points to is thrown. In other words, making this pointer point to an exception (and leaving it in this state) ensures that the library will return control to the client application, possibly by throwing the given exception, within a time that is a linear function of the size of the representation of the biggest object (powerset of polyhedra, polyhedron, system of constraints or generators) on which the library is operating upon.

Note
The only sensible way to assign to this pointer is from within a signal handler or from a parallel thread. For this reason, the library, apart from ensuring that the pointer is initially set to zero, never assigns to it. In particular, it does not zero it again when the exception is thrown: it is the client's responsibility to do so.

Definition at line 34 of file globals.cc.

Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PSET >::concatenate_assign(), Parma_Polyhedra_Library::maybe_abandon(), and Parma_Polyhedra_Library::Powerset< D >::omega_reduce().