The entire library is confined to this namespace. More...
Namespaces | |
| namespace | Checked |
Types and functions implementing checked numbers. | |
| namespace | Implementation |
Implementation related data and functions. | |
| namespace | Interfaces |
Data and functions related to language interfaces. | |
| namespace | Interval_NS |
| namespace | IO_Operators |
All input/output operators are confined to this namespace. | |
Classes | |
| struct | Compile_Time_Check< true > |
A class that is only defined if b evaluates to true. More... | |
| struct | Bool |
A class holding a constant called value that evaluates to b. More... | |
| struct | True |
A class holding a constant called value that evaluates to true. More... | |
| struct | False |
A class holding a constant called value that evaluates to false. More... | |
| struct | Is_Same |
A class holding a constant called value that evaluates to true if and only if T1 is the same type as T2. More... | |
| struct | 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 | Is_Same_Or_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 | Enable_If |
A class that provides a type member called type equivalent to T if and only if b is true. More... | |
| struct | Enable_If_Is |
| struct | Enable_If< true, T > |
A class that provides a type member called type equivalent to T if and only if b is true. More... | |
| struct | Is_Native |
| struct | Is_Native< char > |
| struct | Is_Native< signed char > |
| struct | Is_Native< signed short > |
| struct | Is_Native< signed int > |
| struct | Is_Native< signed long > |
| struct | Is_Native< signed long long > |
| struct | Is_Native< unsigned char > |
| struct | Is_Native< unsigned short > |
| struct | Is_Native< unsigned int > |
| struct | Is_Native< unsigned long > |
| struct | Is_Native< unsigned long long > |
| struct | Is_Native< mpz_class > |
| struct | Is_Native< mpq_class > |
| struct | float_ieee754_half |
| struct | float_ieee754_single |
| struct | float_ieee754_double |
| struct | float_ibm_single |
| struct | float_ibm_double |
| struct | float_intel_double_extended |
| struct | float_ieee754_quad |
| class | Float |
| struct | Extended_Number_Policy |
| struct | Check_Overflow_Policy |
| A policy checking for overflows. More... | |
| struct | Native_Checked_From_Wrapper< T, typename Enable_If< Is_Native< T >::value >::type > |
| struct | Native_Checked_From_Wrapper< Checked_Number< T, P > > |
| struct | Native_Checked_To_Wrapper< T, typename Enable_If< Is_Native< T >::value >::type > |
| struct | Native_Checked_To_Wrapper< Checked_Number< T, P > > |
| struct | Is_Checked |
| struct | Is_Checked< Checked_Number< T, P > > |
| struct | Is_Native_Or_Checked |
| class | Checked_Number |
| A wrapper for numeric types implementing a given policy. More... | |
| struct | Slow_Copy< Checked_Number< T, P > > |
| struct | FPU_Related< Checked_Number< T, Policy > > |
| struct | Coefficient_traits_template< GMP_Integer > |
| Coefficient traits specialization for unbounded integers. More... | |
| struct | Coefficient_traits_template |
| Coefficient traits. More... | |
| struct | Minus_Infinity |
| struct | Plus_Infinity |
| struct | Not_A_Number |
| struct | Is_Special |
| struct | Is_Special< Minus_Infinity > |
| struct | Is_Special< Plus_Infinity > |
| struct | Is_Special< Not_A_Number > |
| struct | Checked_Number_Transparent_Policy |
| class | Init |
| Class for initialization and finalization. More... | |
| struct | Weightwatch_Traits |
| Traits class for the deterministic timeout mechanism. More... | |
| class | Throwable |
| User objects the PPL can throw. More... | |
| struct | Recycle_Input |
| A tag class. More... | |
| struct | Fit |
| struct | Fit< T, v, typename Enable_If< C_Integer< T >::value >::type > |
| struct | TConstant |
| struct | Constant_ |
| struct | Constant_< T, v, prefer_signed, typename Enable_If<(Fit< typename C_Integer< T >::smaller_signed_type, v >::value &&(prefer_signed||!Fit< typename C_Integer< T >::smaller_unsigned_type, v >::value))>::type > |
| struct | Constant_< T, v, prefer_signed, typename Enable_If<(Fit< typename C_Integer< T >::smaller_unsigned_type, v >::value &&(!prefer_signed||!Fit< typename C_Integer< T >::smaller_signed_type, v >::value))>::type > |
| struct | Constant |
| struct | Has_OK |
| struct | Has_OK< T, typename Enable_If_Is< bool(T::*)() const,&T::OK >::type > |
| struct | Rectilinear_Distance_Specialization |
| struct | Euclidean_Distance_Specialization |
| struct | L_Infinity_Distance_Specialization |
| struct | maybe_assign_struct |
| struct | maybe_assign_struct< Type, Type > |
| class | stdiobuf |
| class | Row_Impl_Handler |
| The handler of the actual Row implementation. More... | |
| class | Row |
| A finite sequence of coefficients. More... | |
| class | Matrix |
| A 2-dimensional matrix of coefficients. More... | |
| class | Linear_Row |
| The base class for linear expressions, constraints and generators. More... | |
| class | Linear_System |
| The base class for systems of constraints and generators. More... | |
| class | MIP_Problem |
| A Mixed Integer (linear) Programming problem. More... | |
| class | Bit_Row |
| A row in a matrix of bits. More... | |
| class | Bit_Matrix |
| A matrix of bits. More... | |
| class | Variable |
| A dimension of the vector space. More... | |
| class | Variables_Set |
| An std::set of variables' indexes. More... | |
| class | Linear_Expression |
| A linear expression. More... | |
| class | Constraint |
| A linear equality or inequality. More... | |
| class | Congruence |
| A linear congruence. More... | |
| class | Generator |
| A line, ray, point or closure point. More... | |
| class | Grid_Generator |
| A grid line, parameter or grid point. More... | |
| class | Constraint_System |
| A system of constraints. More... | |
| class | Congruence_System |
| A system of congruences. More... | |
| class | Generator_System |
| A system of generators. More... | |
| class | Grid_Generator_System |
| A system of grid generators. More... | |
| class | Scalar_Products |
| A class implementing various scalar product functions. More... | |
| class | Topology_Adjusted_Scalar_Product_Sign |
| Scalar product sign function object depending on topology. More... | |
| class | Polyhedron |
| The base class for convex polyhedra. More... | |
| class | Grid |
| A grid. More... | |
| class | Poly_Con_Relation |
| The relation between a polyhedron and a constraint. More... | |
| class | Poly_Gen_Relation |
| The relation between a polyhedron and a generator. More... | |
| struct | Boundary_Value |
| struct | Boundary_Value< T, typename Enable_If< Is_Same_Or_Derived< Interval_Base, T >::value >::type > |
| class | Interval_Restriction_None_Base |
| class | Interval_Restriction_None |
| class | Interval_Restriction_Integer_Base |
| class | Interval_Restriction_Integer |
| class | Simple_Restriction_Integer |
| struct | Restriction_Integer< From, Base, typename Enable_If< Is_Native_Or_Checked< From >::value >::type > |
| struct | Restriction_Integer< From, Base, typename Enable_If< Is_Same_Or_Derived< Interval_Restriction_None_Base, typename From::info_type >::value >::type > |
| struct | Restriction_Integer< From, Base, typename Enable_If< Is_Same_Or_Derived< Interval_Restriction_Integer_Base, typename From::info_type >::value >::type > |
| class | Interval_Restriction_Integer_Modulo_Base |
| class | Interval_Restriction_Integer_Modulo |
| struct | Slow_Copy< Interval_Restriction_Integer_Modulo< T, Base > > |
| struct | Restriction_Integer< From, Base, typename Enable_If< Is_Same_Or_Derived< Interval_Restriction_Integer_Modulo_Base, typename From::info_type >::value >::type > |
| struct | Simple_Restriction_Integer_Modulo |
| struct | Restriction_Integer_Modulo< From, T, Base, typename Enable_If< Is_Native_Or_Checked< From >::value >::type > |
| struct | Restriction_Integer_Modulo< From, T, Base, typename Enable_If< Is_Same_Or_Derived< Interval_Restriction_None_Base, typename From::info_type >::value >::type > |
| struct | Restriction_Integer_Modulo< From, T, Base, typename Enable_If< Is_Same_Or_Derived< Interval_Restriction_Integer_Base, typename From::info_type >::value >::type > |
| struct | Restriction_Integer_Modulo< From, T, Base, typename Enable_If< Is_Same_Or_Derived< Interval_Restriction_Integer_Modulo_Base, typename From::info_type >::value >::type > |
| class | Interval_Info_Null |
| class | Interval_Info_Null_Open |
| class | Interval_Info_Bitset |
| struct | Interval_Base |
| struct | Is_Singleton |
| struct | Is_Interval |
| class | Interval |
| A generic, not necessarily closed, possibly restricted interval. More... | |
| struct | Select_Temp_Boundary_Type |
| struct | Select_Temp_Boundary_Type< float > |
| struct | Select_Temp_Boundary_Type< char > |
| struct | Select_Temp_Boundary_Type< signed char > |
| struct | Select_Temp_Boundary_Type< unsigned char > |
| struct | Select_Temp_Boundary_Type< signed short > |
| struct | Select_Temp_Boundary_Type< unsigned short > |
| struct | Select_Temp_Boundary_Type< signed int > |
| struct | Select_Temp_Boundary_Type< unsigned int > |
| struct | Select_Temp_Boundary_Type< signed long > |
| struct | Select_Temp_Boundary_Type< unsigned long > |
| struct | Select_Temp_Boundary_Type< unsigned long long > |
| class | C_Polyhedron |
| A closed convex polyhedron. More... | |
| class | NNC_Polyhedron |
| A not necessarily closed convex polyhedron. More... | |
| class | Widening_Function |
| Wraps a widening method into a function object. More... | |
| class | Limited_Widening_Function |
| Wraps a limited widening method into a function object. More... | |
| class | BHRZ03_Certificate |
| The convergence certificate for the BHRZ03 widening operator. More... | |
| class | H79_Certificate |
| A convergence certificate for the H79 widening operator. More... | |
| class | Grid_Certificate |
| The convergence certificate for the Grid widening operator. More... | |
| class | Determinate |
| A wrapper for PPL pointsets, providing them with a determinate constraint system interface, as defined in [Bag98]. More... | |
| class | iterator_to_const |
| An iterator on a sequence of read-only objects. More... | |
| class | const_iterator_to_const |
| A const_iterator on a sequence of read-only objects. More... | |
| class | Powerset |
| The powerset construction on a base-level domain. More... | |
| class | Pointset_Powerset |
| The powerset construction instantiated on PPL pointset domains. More... | |
| class | Smash_Reduction |
| This class provides the reduction method for the Smash_Product domain. More... | |
| class | Constraints_Reduction |
| This class provides the reduction method for the Constraints_Product domain. More... | |
| class | Congruences_Reduction |
| This class provides the reduction method for the Congruences_Product domain. More... | |
| class | Shape_Preserving_Reduction |
| This class provides the reduction method for the Shape_Preserving_Product domain. More... | |
| class | No_Reduction |
| This class provides the reduction method for the Direct_Product domain. More... | |
| class | Partially_Reduced_Product |
| The partially reduced product of two abstractions. More... | |
| class | Domain_Product |
| This class is temporary and will be removed when template typedefs will be supported in C++. More... | |
| class | Box |
| A not necessarily closed, iso-oriented hyperrectangle. More... | |
| class | DB_Row_Impl_Handler |
| The handler of the actual DB_Row implementation. More... | |
| class | DB_Row |
| The base class for the single rows of matrices. More... | |
| class | DB_Matrix |
| The base class for the square matrices. More... | |
| class | BD_Shape |
| A bounded difference shape. More... | |
| class | OR_Matrix |
| A matrix representing octagonal constraints. More... | |
| class | Octagonal_Shape |
| An octagonal shape. More... | |
| class | PIP_Problem |
| A Parametric Integer (linear) Programming problem. More... | |
| class | PIP_Tree_Node |
| A node of the PIP solution tree. More... | |
| class | PIP_Solution_Node |
| A tree node representing part of the space of solutions. More... | |
| class | PIP_Decision_Node |
| A tree node representing a decision in the space of solutions. More... | |
| class | GMP_Integer |
| Unbounded integers as provided by the GMP library. More... | |
Typedefs | |
| typedef mpz_class | GMP_Integer |
| typedef PPL_COEFFICIENT_TYPE | Coefficient |
| An alias for easily naming the type of PPL coefficients. | |
| typedef Coefficient_traits_template < Coefficient > | Coefficient_traits |
| An alias for easily naming the coefficient traits. | |
| typedef size_t | dimension_type |
| An unsigned integral type for representing space dimensions. | |
| typedef size_t | memory_size_type |
| An unsigned integral type for representing memory size in bytes. | |
| typedef const PIP_Tree_Node * | PIP_Tree |
Enumerations | |
| enum | Degenerate_Element { UNIVERSE, EMPTY } |
Kinds of degenerate abstract elements. More... | |
| enum | Relation_Symbol { EQUAL, LESS_THAN, LESS_OR_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, NOT_EQUAL } |
Relation symbols. More... | |
| enum | Complexity_Class { POLYNOMIAL_COMPLEXITY, SIMPLEX_COMPLEXITY, ANY_COMPLEXITY } |
Complexity pseudo-classes. More... | |
| enum | Optimization_Mode { MINIMIZATION, MAXIMIZATION } |
Possible optimization modes. More... | |
| enum | Bounded_Integer_Type_Width { BITS_8, BITS_16, BITS_32, BITS_64, BITS_128 } |
Widths of bounded integer types. More... | |
| enum | Bounded_Integer_Type_Representation { UNSIGNED, SIGNED_2_COMPLEMENT } |
Representation of bounded integer types. More... | |
| enum | Bounded_Integer_Type_Overflow { OVERFLOW_WRAPS, OVERFLOW_UNDEFINED, OVERFLOW_IMPOSSIBLE } |
Overflow behavior of bounded integer types. More... | |
| enum | Topology { NECESSARILY_CLOSED = 0, NOT_NECESSARILY_CLOSED = 1 } |
Kinds of polyhedra domains. More... | |
| enum | MIP_Problem_Status { UNFEASIBLE_MIP_PROBLEM, UNBOUNDED_MIP_PROBLEM, OPTIMIZED_MIP_PROBLEM } |
Possible outcomes of the MIP_Problem solver. More... | |
| enum | Ternary { T_YES, T_NO, T_MAYBE } |
| enum | PIP_Problem_Status { UNFEASIBLE_PIP_PROBLEM, OPTIMIZED_PIP_PROBLEM } |
Possible outcomes of the PIP_Problem solver. More... | |
Functions | |
| unsigned | version_major () |
| Returns the major number of the PPL version. | |
| unsigned | version_minor () |
| Returns the minor number of the PPL version. | |
| unsigned | version_revision () |
| Returns the revision number of the PPL version. | |
| unsigned | version_beta () |
| Returns the beta number of the PPL version. | |
| const char * | version () |
| Returns a character string containing the PPL version. | |
| const char * | banner () |
| Returns a character string containing the PPL banner. | |
| void | throw_result_exception (Result r) |
| template<typename T > | |
| T | plus_infinity () |
| template<typename T > | |
| T | minus_infinity () |
| template<typename T > | |
| T | not_a_number () |
| template<typename T > | |
| void | maybe_reset_fpu_inexact () |
| template<typename T > | |
| int | maybe_check_fpu_inexact () |
| Rounding_Dir | rounding_dir (Rounding_Dir dir) |
| Result | check_result (Result r, Rounding_Dir dir) |
| template<typename To , typename From > | |
| Enable_If < Is_Native_Or_Checked< To > ::value &&Is_Special< From > ::value, Result >::type | assign_r (To &to, const From &, Rounding_Dir dir) |
| template<typename To , typename From > | |
| Enable_If < Is_Native_Or_Checked< To > ::value &&Is_Special< From > ::value, Result >::type | construct (To &to, const From &, Rounding_Dir dir) |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, bool >::type | is_minus_infinity (const T &x) |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, bool >::type | is_plus_infinity (const T &x) |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, int >::type | is_infinity (const T &x) |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, bool >::type | is_not_a_number (const T &x) |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, bool >::type | is_integer (const T &x) |
| template<typename T , typename Policy > | |
| bool | is_not_a_number (const Checked_Number< T, Policy > &x) |
| template<typename T , typename Policy > | |
| bool | is_minus_infinity (const Checked_Number< T, Policy > &x) |
| template<typename T , typename Policy > | |
| bool | is_plus_infinity (const Checked_Number< T, Policy > &x) |
| template<typename T , typename Policy > | |
| void | exact_div_assign (Checked_Number< T, Policy > &x, const Checked_Number< T, Policy > &y, const Checked_Number< T, Policy > &z) |
| void | neg_assign (GMP_Integer &x) |
| void | neg_assign (GMP_Integer &x, const GMP_Integer &y) |
| void | abs_assign (GMP_Integer &x) |
| void | abs_assign (GMP_Integer &x, const GMP_Integer &y) |
| void | gcd_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
| void | rem_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
| void | gcdext_assign (GMP_Integer &x, GMP_Integer &s, GMP_Integer &t, const GMP_Integer &y, const GMP_Integer &z) |
| void | lcm_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
| void | add_mul_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
| void | sub_mul_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
| void | mul_2exp_assign (GMP_Integer &x, const GMP_Integer &y, unsigned int exp) |
| void | div_2exp_assign (GMP_Integer &x, const GMP_Integer &y, unsigned int exp) |
| void | exact_div_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
| void | sqrt_assign (GMP_Integer &x, const GMP_Integer &y) |
| int | cmp (const GMP_Integer &x, const GMP_Integer &y) |
| const mpz_class & | raw_value (const GMP_Integer &x) |
| mpz_class & | raw_value (GMP_Integer &x) |
| void | Coefficient_constants_initialize () |
| Initializes the Coefficient constants. | |
| void | Coefficient_constants_finalize () |
| Finalizes the Coefficient constants. | |
| Coefficient_traits::const_reference | Coefficient_zero () |
| Returns a const reference to a Coefficient with value 0. | |
| Coefficient_traits::const_reference | Coefficient_one () |
| Returns a const reference to a Coefficient with value 1. | |
| unsigned | irrational_precision () |
| Returns the precision parameter used for irrational calculations. | |
| void | set_irrational_precision (const unsigned p) |
| Sets the precision parameter used for irrational calculations. | |
| void | set_rounding_for_PPL () |
| Sets the FPU rounding mode so that the PPL abstractions based on floating point numbers work correctly. | |
| void | restore_pre_PPL_rounding () |
| Sets the FPU rounding mode as it was before initialization of the PPL. | |
| void | initialize () |
| Initializes the library. | |
| void | finalize () |
| Finalizes the library. | |
| dimension_type | not_a_dimension () |
| Returns a value that does not designate a valid dimension. | |
| template<typename T > | |
| Enable_If< Slow_Copy< T > ::value, void >::type | swap (T &, T &) |
| Make sure swap() is specialized when needed. | |
| dimension_type | compute_capacity (dimension_type requested_size, dimension_type maximum_size) |
| Speculative allocation function. | |
| template<typename T > | |
| Enable_If< Has_OK< T >::value, bool >::type | f_OK (const T &to) |
| void | maybe_abandon () |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, void >::type | numer_denom (const T &from, Coefficient &num, Coefficient &den) |
Extract the numerator and denominator components of from. | |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, void >::type | div_round_up (T &to, Coefficient_traits::const_reference x, Coefficient_traits::const_reference y) |
Divides x by y into to, rounding the result towards plus infinity. | |
| template<typename N > | |
| void | min_assign (N &x, const N &y) |
Assigns to x the minimum between x and y. | |
| template<typename N > | |
| void | max_assign (N &x, const N &y) |
Assigns to x the maximum between x and y. | |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, bool >::type | is_even (const T &x) |
Returns true if and only if x is an even number. | |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, bool >::type | is_additive_inverse (const T &x, const T &y) |
Returns true if and only if . | |
| void | normalize2 (Coefficient_traits::const_reference x, Coefficient_traits::const_reference y, Coefficient &nx, Coefficient &ny) |
If is the GCD of x and y, the values of x and y divided by are assigned to nx and ny, respectively. | |
| bool | is_canonical (const mpq_class &x) |
Returns true if and only if x is in canonical form. | |
| template<typename T > | |
| T | low_bits_mask (unsigned n) |
Returns a mask for the lowest n bits,. | |
| template<typename To , typename From > | |
| Result | maybe_assign (const To *&top, To &tmp, const From &from, Rounding_Dir dir) |
Assigns to top a pointer to a location that holds the conversion, according to dir, of from to type To. When necessary, and only when necessary, the variable tmp is used to hold the result of conversion. | |
| template<typename PSET > | |
| bool | termination_test_MS (const PSET &pset) |
| Termination test using an improvement of the method by Mesnard and Serebrenik [BMPZ10]. | |
| template<typename PSET > | |
| bool | 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<typename PSET > | |
| bool | 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<typename PSET > | |
| bool | 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<typename PSET > | |
| void | 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<typename PSET > | |
| void | 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<typename PSET > | |
| void | 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<typename PSET > | |
| void | 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<typename PSET > | |
| bool | termination_test_PR (const PSET &pset) |
| Like termination_test_MS() but using the method by Podelski and Rybalchenko [BMPZ10]. | |
| template<typename PSET > | |
| bool | 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]. | |
| template<typename PSET > | |
| bool | 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]. | |
| template<typename PSET > | |
| bool | 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]. | |
| template<typename PSET > | |
| void | 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]. | |
| template<typename PSET > | |
| void | 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]. | |
| bool | eq_restriction (const Interval_Restriction_None_Base &, const Interval_Restriction_None_Base) |
| template<typename T > | |
| bool | contains_restriction (const Interval_Restriction_None_Base &, const T &) |
| template<typename T > | |
| bool | assign_restriction (Interval_Restriction_None_Base &, const T &) |
| template<typename T1 , typename T2 > | |
| bool | join_restriction (Interval_Restriction_None_Base &, const T1 &, const T2 &) |
| template<typename T1 , typename T2 > | |
| bool | intersect_restriction (Interval_Restriction_None_Base &, const T1 &, const T2 &) |
| template<typename T1 , typename T2 > | |
| bool | diff_restriction (Interval_Restriction_None_Base &, const T1 &, const T2 &) |
| template<typename T > | |
| bool | neg_restriction (Interval_Restriction_None_Base &, const T &) |
| template<typename T1 , typename T2 > | |
| bool | add_restriction (Interval_Restriction_None_Base &, const T1 &, const T2 &) |
| template<typename T1 , typename T2 > | |
| bool | sub_restriction (Interval_Restriction_None_Base &, const T1 &, const T2 &) |
| template<typename T1 , typename T2 > | |
| bool | mul_restriction (Interval_Restriction_None_Base &, const T1 &, const T2 &) |
| template<typename T1 , typename T2 > | |
| bool | div_restriction (Interval_Restriction_None_Base &, const T1 &, const T2 &) |
| void | output_restriction (std::ostream &, const Interval_Restriction_None_Base &) |
| template<typename T1 , typename T2 > | |
| Enable_If< Is_Same_Or_Derived < Interval_Restriction_Integer_Base, T1 >::value &&Is_Same_Or_Derived < Interval_Restriction_Integer_Base, T2 >::value, bool >::type | eq_restriction (const T1 &x, const T2 &y) |
| template<typename T1 , typename T2 > | |
| Enable_If< Is_Same_Or_Derived < Interval_Restriction_Integer_Base, T1 >::value &&Is_Same_Or_Derived < Interval_Restriction_Integer_Base, T2 >::value, bool >::type | contains_restriction (const T1 &x, const T2 &y) |
| template<typename Base , typename From > | |
| bool | assign_restriction (Interval_Restriction_Integer< Base > &to, const From &x) |
| template<typename Base , typename From1 , typename From2 > | |
| bool | join_restriction (Interval_Restriction_Integer< Base > &to, const From1 &x, const From2 &y) |
| template<typename Base , typename From1 , typename From2 > | |
| bool | intersect_restriction (Interval_Restriction_Integer< Base > &to, const From1 &x, const From2 &y) |
| template<typename Base , typename From1 , typename From2 > | |
| bool | diff_restriction (Interval_Restriction_Integer< Base > &to, const From1 &x, const From2 &) |
| template<typename Base , typename From > | |
| bool | neg_restriction (Interval_Restriction_Integer< Base > &to, const From &x) |
| template<typename Base , typename From1 , typename From2 > | |
| bool | add_restriction (Interval_Restriction_Integer< Base > &to, const From1 &x, const From2 &y) |
| template<typename Base , typename From1 , typename From2 > | |
| bool | sub_restriction (Interval_Restriction_Integer< Base > &to, const From1 &x, const From2 &y) |
| template<typename Base , typename From1 , typename From2 > | |
| bool | mul_restriction (Interval_Restriction_Integer< Base > &to, const From1 &x, const From2 &y) |
| template<typename Base , typename From1 , typename From2 > | |
| bool | div_restriction (Interval_Restriction_Integer< Base > &to, const From1 &, const From2 &) |
| template<typename Base > | |
| void | output_restriction (std::ostream &s, const Interval_Restriction_Integer< Base > &x) |
| template<typename T , typename Base > | |
| bool | set_unrestricted (Interval_Restriction_Integer_Modulo< T, Base > &to) |
| template<typename T , typename Base > | |
| bool | set_integer (Interval_Restriction_Integer_Modulo< T, Base > &to) |
| template<typename T , typename Base , typename From > | |
| bool | assign_restriction (Interval_Restriction_Integer_Modulo< T, Base > &to, const From &x) |
| template<typename T , typename Base , typename From1 , typename From2 > | |
| bool | join_restriction (Interval_Restriction_Integer_Modulo< T, Base > &to, const From1 &x, const From2 &y) |
| template<typename T , typename Base , typename From1 , typename From2 > | |
| bool | intersect_restriction (Interval_Restriction_Integer_Modulo< T, Base > &to, const From1 &x, const From2 &y) |
| template<typename T , typename Base , typename From1 , typename From2 > | |
| bool | diff_restriction (Interval_Restriction_Integer_Modulo< T, Base > &to, const From1 &x, const From2 &y) |
| template<typename T , typename Base , typename From > | |
| bool | neg_restriction (Interval_Restriction_Integer_Modulo< T, Base > &to, const From &x) |
| template<typename T > | |
| void | addmod (T &to, const T &x, const T &y, const T &to_m, const T &y_m) |
| template<typename M , typename T > | |
| bool | assign_rem (M &rem, const T &n, const M &div) |
| template<typename T , typename Base , typename From1 , typename From2 > | |
| bool | add_restriction (Interval_Restriction_Integer_Modulo< T, Base > &to, const From1 &x, const From2 &y) |
| template<typename T > | |
| void | submod (T &to, const T &x, const T &y, const T &to_m, const T &y_m) |
| template<typename T , typename Base , typename From1 , typename From2 > | |
| bool | sub_restriction (Interval_Restriction_Integer_Modulo< T, Base > &to, const From1 &x, const From2 &y) |
| template<typename T > | |
| void | mulmod (T &to, const T &x, const T &y, const T &to_m) |
| template<typename T , typename Base , typename From1 , typename From2 > | |
| bool | mul_restriction (Interval_Restriction_Integer_Modulo< T, Base > &to, const From1 &x, const From2 &y) |
| template<typename T , typename Base , typename From1 , typename From2 > | |
| bool | div_restriction (Interval_Restriction_Integer_Modulo< T, Base > &to, const From1 &x, const From2 &y) |
| template<typename T , typename Base > | |
| void | output_restriction (std::ostream &s, const Interval_Restriction_Integer_Modulo< T, Base > &x) |
| I_Result | combine (Result l, Result u) |
| template<typename From > | |
| Enable_If< Is_Interval< From > ::value, I_Result >::type | neg_assign (From &x) |
| template<typename Boundary , typename Info > | |
| bool | f_is_empty (const Interval< Boundary, Info > &x) |
| template<typename Boundary , typename Info > | |
| bool | f_is_singleton (const Interval< Boundary, Info > &x) |
| template<typename Boundary , typename Info > | |
| int | is_infinity (const Interval< Boundary, Info > &x) |
| template<typename T > | |
| Enable_If< Is_Singleton< T > ::value||Is_Interval< T > ::value, bool >::type | is_singleton_integer (const T &x) |
| template<typename T > | |
| Enable_If< Is_Singleton< T > ::value||Is_Interval< T > ::value, bool >::type | check_empty_arg (const T &x) |
| template<typename T1 , typename T2 > | |
| Enable_If<((Is_Singleton< T1 > ::value||Is_Interval< T1 > ::value)&&(Is_Singleton< T2 > ::value||Is_Interval< T2 > ::value)&&(Is_Interval< T1 > ::value||Is_Interval< T2 > ::value)), bool >::type | operator== (const T1 &x, const T2 &y) |
| template<typename T1 , typename T2 > | |
| Enable_If<((Is_Singleton< T1 > ::value||Is_Interval< T1 > ::value)&&(Is_Singleton< T2 > ::value||Is_Interval< T2 > ::value)&&(Is_Interval< T1 > ::value||Is_Interval< T2 > ::value)), bool >::type | operator!= (const T1 &x, const T2 &y) |
| template<typename B , typename Info , typename T > | |
| Enable_If< Is_Singleton< T > ::value, Interval< B, Info > >::type | operator+ (const Interval< B, Info > &x, const T &y) |
| template<typename B , typename Info , typename T > | |
| Enable_If< Is_Singleton< T > ::value, Interval< B, Info > >::type | operator+ (const T &x, const Interval< B, Info > &y) |
| template<typename B , typename Info > | |
| Interval< B, Info > | operator+ (const Interval< B, Info > &x, const Interval< B, Info > &y) |
| template<typename B , typename Info , typename T > | |
| Enable_If< Is_Singleton< T > ::value, Interval< B, Info > >::type | operator- (const Interval< B, Info > &x, const T &y) |
| template<typename B , typename Info , typename T > | |
| Enable_If< Is_Singleton< T > ::value, Interval< B, Info > >::type | operator- (const T &x, const Interval< B, Info > &y) |
| template<typename B , typename Info > | |
| Interval< B, Info > | operator- (const Interval< B, Info > &x, const Interval< B, Info > &y) |
| template<typename B , typename Info , typename T > | |
| Enable_If< Is_Singleton< T > ::value, Interval< B, Info > >::type | operator* (const Interval< B, Info > &x, const T &y) |
| template<typename B , typename Info , typename T > | |
| Enable_If< Is_Singleton< T > ::value, Interval< B, Info > >::type | operator* (const T &x, const Interval< B, Info > &y) |
| template<typename B , typename Info > | |
| Interval< B, Info > | operator* (const Interval< B, Info > &x, const Interval< B, Info > &y) |
| template<typename B , typename Info , typename T > | |
| Enable_If< Is_Singleton< T > ::value, Interval< B, Info > >::type | operator/ (const Interval< B, Info > &x, const T &y) |
| template<typename B , typename Info , typename T > | |
| Enable_If< Is_Singleton< T > ::value, Interval< B, Info > >::type | operator/ (const T &x, const Interval< B, Info > &y) |
| template<typename B , typename Info > | |
| Interval< B, Info > | operator/ (const Interval< B, Info > &x, const Interval< B, Info > &y) |
| template<typename Boundary , typename Info > | |
| std::ostream & | operator<< (std::ostream &os, const Interval< Boundary, Info > &x) |
| template<typename D1 , typename D2 > | |
| bool | shrink_to_congruence_no_check (D1 &d1, D2 &d2, const Congruence &cg) |
| template<typename ITV > | |
| Poly_Con_Relation | interval_relation (const ITV &i, const Constraint::Type constraint_type, Coefficient_traits::const_reference num, Coefficient_traits::const_reference den=1) |
| Returns the relations holding between an interval and an interval constraint. | |
| bool | extract_interval_congruence (const Congruence &cg, dimension_type cg_space_dim, dimension_type &cg_num_vars, dimension_type &cg_only_var) |
| template<typename ITV > | |
| bool | operator!= (const Box< ITV > &x, const Box< ITV > &y) |
| template<typename ITV > | |
| bool | operator== (const Box< ITV > &x, const Box< ITV > &y) |
| unsigned long | isqrt (unsigned long x) |
Returns the integer square root of x. | |
Relational Operators and Comparison Functions | |
| template<typename T1 , typename T2 > | |
| Enable_If < Is_Native_Or_Checked< T1 > ::value &&Is_Native_Or_Checked < T2 >::value, bool >::type | equal (const T1 &x, const T2 &y) |
| template<typename T1 , typename T2 > | |
| Enable_If < Is_Native_Or_Checked< T1 > ::value &&Is_Native_Or_Checked < T2 >::value, bool >::type | not_equal (const T1 &x, const T2 &y) |
| template<typename T1 , typename T2 > | |
| Enable_If < Is_Native_Or_Checked< T1 > ::value &&Is_Native_Or_Checked < T2 >::value, bool >::type | greater_or_equal (const T1 &x, const T2 &y) |
| template<typename T1 , typename T2 > | |
| Enable_If < Is_Native_Or_Checked< T1 > ::value &&Is_Native_Or_Checked < T2 >::value, bool >::type | greater_than (const T1 &x, const T2 &y) |
| template<typename T1 , typename T2 > | |
| Enable_If < Is_Native_Or_Checked< T1 > ::value &&Is_Native_Or_Checked < T2 >::value, bool >::type | less_or_equal (const T1 &x, const T2 &y) |
| template<typename T1 , typename T2 > | |
| Enable_If < Is_Native_Or_Checked< T1 > ::value &&Is_Native_Or_Checked < T2 >::value, bool >::type | less_than (const T1 &x, const T2 &y) |
Input-Output Operators | |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, void >::type | ascii_dump (std::ostream &s, const T &t) |
| Ascii dump for native or checked. | |
| template<typename T > | |
| Enable_If < Is_Native_Or_Checked< T > ::value, bool >::type | ascii_load (std::ostream &s, T &t) |
| Ascii load for native or checked. | |
Memory Size Inspection Functions | |
| memory_size_type | total_memory_in_bytes (const GMP_Integer &x) |
| memory_size_type | external_memory_in_bytes (const GMP_Integer &x) |
| template<typename T > | |
| Enable_If< Is_Native< T > ::value, memory_size_type > ::type | total_memory_in_bytes (const T &) |
| For native types, returns the total size in bytes of the memory occupied by the type of the (unused) parameter, i.e., 0. | |
| template<typename T > | |
| Enable_If< Is_Native< T > ::value, memory_size_type > ::type | external_memory_in_bytes (const T &) |
| For native types, returns the size in bytes of the memory managed by the type of the (unused) parameter, i.e., 0. | |
| memory_size_type | total_memory_in_bytes (const mpz_class &x) |
Returns the total size in bytes of the memory occupied by x. | |
| memory_size_type | external_memory_in_bytes (const mpz_class &x) |
Returns the size in bytes of the memory managed by x. | |
| memory_size_type | total_memory_in_bytes (const mpq_class &x) |
Returns the total size in bytes of the memory occupied by x. | |
| memory_size_type | external_memory_in_bytes (const mpq_class &x) |
Returns the size in bytes of the memory managed by x. | |
Variables | |
| Minus_Infinity | MINUS_INFINITY |
| Plus_Infinity | PLUS_INFINITY |
| Not_A_Number | NOT_A_NUMBER |
| const Throwable *volatile | abandon_expensive_computations = 0 |
| A pointer to an exception object. | |
The entire library is confined to this namespace.
| typedef mpz_class Parma_Polyhedra_Library::GMP_Integer |
Definition at line 31 of file GMP_Integer.types.hh.
| typedef const PIP_Tree_Node* Parma_Polyhedra_Library::PIP_Tree |
Definition at line 20 of file PIP_Tree.types.hh.
Definition at line 40 of file Interval.defs.hh.
| void Parma_Polyhedra_Library::abs_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y | |||
| ) | [related] |
Definition at line 47 of file GMP_Integer.inlines.hh.
| void Parma_Polyhedra_Library::abs_assign | ( | GMP_Integer & | x | ) | [related] |
Definition at line 42 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::MIP_Problem::compute_simplex_using_steepest_edge_float(), and Parma_Polyhedra_Library::MIP_Problem::get_exiting_base_index().
| void Parma_Polyhedra_Library::add_mul_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y, | |||
| const GMP_Integer & | z | |||
| ) | [related] |
Definition at line 75 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::add_constraint(), Parma_Polyhedra_Library::Constraint_System::affine_preimage(), Parma_Polyhedra_Library::Congruence_System::affine_preimage(), Parma_Polyhedra_Library::Scalar_Products::assign(), Parma_Polyhedra_Library::MIP_Problem::compute_generator(), Parma_Polyhedra_Library::PIP_Solution_Node::generate_cut(), Parma_Polyhedra_Library::Scalar_Products::homogeneous_assign(), Parma_Polyhedra_Library::Grid::reduce_pc_with_pc(), Parma_Polyhedra_Library::Scalar_Products::reduced_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::PIP_Solution_Node::solve(), Parma_Polyhedra_Library::MIP_Problem::steepest_edge_exact_entering_index(), Parma_Polyhedra_Library::PIP_Solution_Node::update_solution(), and Parma_Polyhedra_Library::PIP_Solution_Node::update_tableau().
| bool Parma_Polyhedra_Library::add_restriction | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 679 of file Interval_Restriction.defs.hh.
References addmod(), assign_r(), assign_rem(), Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::divisor, Parma_Polyhedra_Library::Interval_NS::f_lower(), Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::remainder, Parma_Polyhedra_Library::Checked::Result, set_integer(), and set_unrestricted().
00679 { 00680 typedef Restriction_Integer_Modulo<From1, T, Base> Rx; 00681 const typename Rx::type& rx = Rx::get(x); 00682 if (rx.divisor == 0) 00683 return set_unrestricted(to); 00684 typedef Restriction_Integer_Modulo<From2, T, Base> Ry; 00685 const typename Ry::type& ry = Ry::get(y); 00686 if (ry.divisor == 0) 00687 return set_unrestricted(to); 00688 Result r; 00689 PPL_DIRTY_TEMP(T, rem); 00690 if (is_singleton(x)) { 00691 if (is_singleton(y)) 00692 return set_integer(to); 00693 if (!assign_rem(rem, f_lower(x), ry.divisor)) 00694 return set_integer(to); 00695 r = assign_r(to.divisor, ry.divisor, ROUND_NOT_NEEDED); 00696 PPL_ASSERT(r == V_EQ); 00697 addmod(to.remainder, rem, ry.remainder, to.divisor, ry.divisor); 00698 } 00699 else if (is_singleton(y)) { 00700 if (!assign_rem(rem, f_lower(y), rx.divisor)) 00701 return set_integer(to); 00702 r = assign_r(to.divisor, rx.divisor, ROUND_NOT_NEEDED); 00703 PPL_ASSERT(r == V_EQ); 00704 addmod(to.remainder, rx.remainder, rem, to.divisor, to.divisor); 00705 } 00706 else { 00707 r = gcd_assign_r(to.divisor, rx.divisor, ry.divisor, ROUND_NOT_NEEDED); 00708 PPL_ASSERT(r == V_EQ); 00709 addmod(to.remainder, rx.remainder, ry.remainder, to.divisor, ry.divisor); 00710 } 00711 return true; 00712 }
| bool Parma_Polyhedra_Library::add_restriction | ( | Interval_Restriction_Integer< Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 279 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer().
| bool Parma_Polyhedra_Library::add_restriction | ( | Interval_Restriction_None_Base & | , | |
| const T1 & | , | |||
| const T2 & | ||||
| ) | [inline] |
Definition at line 104 of file Interval_Restriction.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign().
| void Parma_Polyhedra_Library::addmod | ( | T & | to, | |
| const T & | x, | |||
| const T & | y, | |||
| const T & | to_m, | |||
| const T & | y_m | |||
| ) | [inline] |
Definition at line 633 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Checked::Result.
Referenced by add_restriction().
00633 { 00634 Result r; 00635 if (std::numeric_limits<T>::is_bounded) { 00636 r = sub_assign_r(to, y_m, y, ROUND_NOT_NEEDED); 00637 PPL_ASSERT(r == V_EQ); 00638 if (x <= to) { 00639 r = add_assign_r(to, x, y, ROUND_NOT_NEEDED); 00640 PPL_ASSERT(r == V_EQ); 00641 } 00642 else { 00643 r = sub_assign_r(to, x, to, ROUND_NOT_NEEDED); 00644 PPL_ASSERT(r == V_EQ); 00645 } 00646 } 00647 else { 00648 r = add_assign_r(to, x, y, ROUND_NOT_NEEDED); 00649 PPL_ASSERT(r == V_EQ); 00650 } 00651 r = rem_assign_r(to, to, to_m, ROUND_NOT_NEEDED); 00652 PPL_ASSERT(r == V_EQ); 00653 }
| void Parma_Polyhedra_Library::all_affine_quasi_ranking_functions_MS | ( | const PSET & | pset, | |
| C_Polyhedron & | decreasing_mu_space, | |||
| C_Polyhedron & | bounded_mu_space | |||
| ) | [inline] |
Computes the spaces of affine quasi ranking functions using an improvement of the method by Mesnard and Serebrenik [BMPZ10].
| PSET | Any pointset supported by the PPL that provides the minimized_constraints() method. |
| pset | A pointset approximating the behavior of a loop whose termination is being analyzed. The variables indices are allocated as follows:
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_space | This is assigned a closed polyhedron of space dimension representing the space of all the decreasing affine functions for the loops that are precisely characterized by pset. | |
| bounded_mu_space | This is assigned a closed polyhedron of space dimension 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
where
identify any point of the decreasing_mu_space and bounded_mu_space polyhedrons. The variables
correspond to the space dimensions
, 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 350 of file termination.templates.hh.
References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and UNIVERSE.
Referenced by all_affine_quasi_ranking_functions_MS_2().
00352 { 00353 const dimension_type space_dim = pset.space_dimension(); 00354 if (space_dim % 2 != 0) { 00355 std::ostringstream s; 00356 s << "PPL::all_affine_quasi_ranking_functions_MS" 00357 << "(pset, decr_space, bounded_space):\n" 00358 << "pset.space_dimension() == " << space_dim 00359 << " is odd."; 00360 throw std::invalid_argument(s.str()); 00361 } 00362 00363 if (pset.is_empty()) { 00364 decreasing_mu_space = C_Polyhedron(1 + space_dim/2, UNIVERSE); 00365 bounded_mu_space = decreasing_mu_space; 00366 return; 00367 } 00368 00369 using namespace Implementation::Termination; 00370 Constraint_System cs; 00371 assign_all_inequalities_approximation(pset, cs); 00372 all_affine_quasi_ranking_functions_MS(cs, 00373 decreasing_mu_space, 00374 bounded_mu_space); 00375 }
| 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 | |||
| ) | [inline] |
Computes the spaces of affine quasi ranking functions using an improvement of the method by Mesnard and Serebrenik [BMPZ10].
| PSET | Any pointset supported by the PPL that provides the minimized_constraints() method. |
| pset_before | A 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:
| |
| pset_after | A 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:
|
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.
| decreasing_mu_space | This is assigned a closed polyhedron of space dimension representing the space of all the decreasing affine functions for the loops that are precisely characterized by pset. | |
| bounded_mu_space | This is assigned a closed polyhedron of space dimension 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
where
identify any point of the decreasing_mu_space and bounded_mu_space polyhedrons. The variables
correspond to the space dimensions
, 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 379 of file termination.templates.hh.
References all_affine_quasi_ranking_functions_MS(), Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and UNIVERSE.
00382 { 00383 const dimension_type before_space_dim = pset_before.space_dimension(); 00384 const dimension_type after_space_dim = pset_after.space_dimension(); 00385 if (after_space_dim != 2*before_space_dim) { 00386 std::ostringstream s; 00387 s << "PPL::all_affine_quasi_ranking_functions_MS_2" 00388 << "(pset_before, pset_after, decr_space, bounded_space):\n" 00389 << "pset_before.space_dimension() == " << before_space_dim 00390 << ", pset_after.space_dimension() == " << after_space_dim 00391 << ";\nthe latter should be twice the former."; 00392 throw std::invalid_argument(s.str()); 00393 } 00394 00395 if (pset_before.is_empty()) { 00396 decreasing_mu_space = C_Polyhedron(1 + before_space_dim, UNIVERSE); 00397 bounded_mu_space = decreasing_mu_space; 00398 return; 00399 } 00400 00401 using namespace Implementation::Termination; 00402 Constraint_System cs; 00403 assign_all_inequalities_approximation(pset_before, pset_after, cs); 00404 all_affine_quasi_ranking_functions_MS(cs, 00405 decreasing_mu_space, 00406 bounded_mu_space); 00407 }
| void Parma_Polyhedra_Library::all_affine_ranking_functions_MS | ( | const PSET & | pset, | |
| C_Polyhedron & | mu_space | |||
| ) | [inline] |
Termination test with ranking function space using an improvement of the method by Mesnard and Serebrenik [BMPZ10].
| PSET | Any pointset supported by the PPL that provides the minimized_constraints() method. |
| pset | A pointset approximating the behavior of a loop whose termination is being analyzed. The variables indices are allocated as follows:
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_space | This is assigned a closed polyhedron of space dimension 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 where identify any point of the mu_space polyhedron. The variables correspond to the space dimensions of mu_space , 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 299 of file termination.templates.hh.
References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and UNIVERSE.
Referenced by all_affine_ranking_functions_MS_2().
00299 { 00300 const dimension_type space_dim = pset.space_dimension(); 00301 if (space_dim % 2 != 0) { 00302 std::ostringstream s; 00303 s << "PPL::all_affine_ranking_functions_MS(pset, mu_space):\n" 00304 "pset.space_dimension() == " << space_dim 00305 << " is odd."; 00306 throw std::invalid_argument(s.str()); 00307 } 00308 00309 if (pset.is_empty()) { 00310 mu_space = C_Polyhedron(1 + space_dim/2, UNIVERSE); 00311 return; 00312 } 00313 00314 using namespace Implementation::Termination; 00315 Constraint_System cs; 00316 assign_all_inequalities_approximation(pset, cs); 00317 all_affine_ranking_functions_MS(cs, mu_space); 00318 }
| void Parma_Polyhedra_Library::all_affine_ranking_functions_MS_2 | ( | const PSET & | pset_before, | |
| const PSET & | pset_after, | |||
| C_Polyhedron & | mu_space | |||
| ) | [inline] |
Termination test with ranking function space using an improvement of the method by Mesnard and Serebrenik [BMPZ10].
| PSET | Any pointset supported by the PPL that provides the minimized_constraints() method. |
| pset_before | A 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:
| |
| pset_after | A 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:
|
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.
| mu_space | This is assigned a closed polyhedron of space dimension 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 where identify any point of the mu_space polyhedron. The variables correspond to the space dimensions of mu_space , 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 322 of file termination.templates.hh.
References all_affine_ranking_functions_MS(), Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and UNIVERSE.
00324 { 00325 const dimension_type before_space_dim = pset_before.space_dimension(); 00326 const dimension_type after_space_dim = pset_after.space_dimension(); 00327 if (after_space_dim != 2*before_space_dim) { 00328 std::ostringstream s; 00329 s << "PPL::all_affine_ranking_functions_MS_2" 00330 << "(pset_before, pset_after, mu_space):\n" 00331 << "pset_before.space_dimension() == " << before_space_dim 00332 << ", pset_after.space_dimension() == " << after_space_dim 00333 << ";\nthe latter should be twice the former."; 00334 throw std::invalid_argument(s.str()); 00335 } 00336 00337 if (pset_before.is_empty()) { 00338 mu_space = C_Polyhedron(1 + before_space_dim, UNIVERSE); 00339 return; 00340 } 00341 00342 using namespace Implementation::Termination; 00343 Constraint_System cs; 00344 assign_all_inequalities_approximation(pset_before, pset_after, cs); 00345 all_affine_ranking_functions_MS(cs, mu_space); 00346 }
| void Parma_Polyhedra_Library::all_affine_ranking_functions_PR | ( | const PSET & | pset, | |
| NNC_Polyhedron & | mu_space | |||
| ) | [inline] |
Like all_affine_ranking_functions_MS() but using the method by Podelski and Rybalchenko [BMPZ10].
Definition at line 524 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().
Referenced by all_affine_ranking_functions_PR_2().
00525 { 00526 const dimension_type space_dim = pset_after.space_dimension(); 00527 if (space_dim % 2 != 0) { 00528 std::ostringstream s; 00529 s << "PPL::all_affine_ranking_functions_PR(pset, mu_space):\n" 00530 << "pset.space_dimension() == " << space_dim 00531 << " is odd."; 00532 throw std::invalid_argument(s.str()); 00533 } 00534 00535 if (pset_after.is_empty()) { 00536 mu_space = NNC_Polyhedron(1 + space_dim/2); 00537 return; 00538 } 00539 00540 using namespace Implementation::Termination; 00541 Constraint_System cs; 00542 assign_all_inequalities_approximation(pset_after, cs); 00543 all_affine_ranking_functions_PR_original(cs, mu_space); 00544 }
| void Parma_Polyhedra_Library::all_affine_ranking_functions_PR_2 | ( | const PSET & | pset_before, | |
| const PSET & | pset_after, | |||
| NNC_Polyhedron & | mu_space | |||
| ) | [inline] |
Like all_affine_ranking_functions_MS_2() but using an alternative formalization of the method by Podelski and Rybalchenko [BMPZ10].
Definition at line 494 of file termination.templates.hh.
References all_affine_ranking_functions_PR(), and Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation().
00496 { 00497 const dimension_type before_space_dim = pset_before.space_dimension(); 00498 const dimension_type after_space_dim = pset_after.space_dimension(); 00499 if (after_space_dim != 2*before_space_dim) { 00500 std::ostringstream s; 00501 s << "PPL::all_affine_ranking_functions_MS_2" 00502 << "(pset_before, pset_after, mu_space):\n" 00503 << "pset_before.space_dimension() == " << before_space_dim 00504 << ", pset_after.space_dimension() == " << after_space_dim 00505 << ";\nthe latter should be twice the former."; 00506 throw std::invalid_argument(s.str()); 00507 } 00508 00509 if (pset_before.is_empty()) { 00510 mu_space = NNC_Polyhedron(1 + before_space_dim); 00511 return; 00512 } 00513 00514 using namespace Implementation::Termination; 00515 Constraint_System cs_before; 00516 Constraint_System cs_after; 00517 assign_all_inequalities_approximation(pset_before, cs_before); 00518 assign_all_inequalities_approximation(pset_after, cs_after); 00519 all_affine_ranking_functions_PR(cs_before, cs_after, mu_space); 00520 }
| Enable_If<Is_Native_Or_Checked<T>::value, void>::type Parma_Polyhedra_Library::ascii_dump | ( | std::ostream & | s, | |
| const T & | t | |||
| ) | [inline] |
Ascii dump for native or checked.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::ascii_dump().
| Enable_If<Is_Native_Or_Checked<T>::value, bool>::type Parma_Polyhedra_Library::ascii_load | ( | std::ostream & | s, | |
| T & | t | |||
| ) | [inline] |
Ascii load for native or checked.
Referenced by Parma_Polyhedra_Library::Matrix::ascii_load(), Parma_Polyhedra_Library::Linear_System::ascii_load(), Parma_Polyhedra_Library::Interval< Boundary, Info >::ascii_load(), and Parma_Polyhedra_Library::Congruence_System::ascii_load().
| Enable_If<Is_Native_Or_Checked<To>::value && Is_Special<From>::value, Result>::type Parma_Polyhedra_Library::assign_r | ( | To & | to, | |
| const From & | , | |||
| Rounding_Dir | dir | |||
| ) | [related] |
Definition at line 205 of file Checked_Number.inlines.hh.
References check_result(), raw_value(), and rounding_dir().
Referenced by add_restriction(), Parma_Polyhedra_Library::Octagonal_Shape< T >::add_space_dimensions_and_project(), Parma_Polyhedra_Library::BD_Shape< T >::add_space_dimensions_and_project(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), assign_rem(), Parma_Polyhedra_Library::BD_Shape< T >::BD_Shape(), Parma_Polyhedra_Library::Octagonal_Shape< T >::BHMZ05_widening_assign(), Parma_Polyhedra_Library::BD_Shape< T >::BHMZ05_widening_assign(), Parma_Polyhedra_Library::BD_Shape< T >::BHZ09_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_preimage(), Parma_Polyhedra_Library::Box< ITV >::Box(), Parma_Polyhedra_Library::Octagonal_Shape< T >::CC76_extrapolation_assign(), Parma_Polyhedra_Library::BD_Shape< T >::CC76_extrapolation_assign(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::construct_upward_approximation(), Parma_Polyhedra_Library::Polyhedron::contains_integer_point(), Parma_Polyhedra_Library::Octagonal_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::BD_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_minus_v_pm_u_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_u_minus_v_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_v_minus_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_v_pm_u_bounds(), div_round_up(), Parma_Polyhedra_Library::Octagonal_Shape< T >::drop_some_non_integer_points(), Parma_Polyhedra_Library::Octagonal_Shape< T >::euclidean_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::euclidean_distance_assign(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::expand_within_capacity(), Parma_Polyhedra_Library::BD_Shape< T >::forget_all_dbm_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::forget_all_octagonal_constraints(), Parma_Polyhedra_Library::BD_Shape< T >::forget_binary_dbm_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::forget_binary_octagonal_constraints(), Parma_Polyhedra_Library::Polyhedron::frequency(), Parma_Polyhedra_Library::Box< ITV >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::maybe_assign_struct< To, From >::function(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Box< ITV >::get_lower_bound(), Parma_Polyhedra_Library::Box< ITV >::get_upper_bound(), Parma_Polyhedra_Library::BD_Shape< T >::incremental_shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::incremental_strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::integer_upper_bound_assign_if_exact(), interval_relation(), Parma_Polyhedra_Library::MIP_Problem::is_mip_satisfiable(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_strongly_reduced(), join_restriction(), Parma_Polyhedra_Library::Octagonal_Shape< T >::l_infinity_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::l_infinity_distance_assign(), Parma_Polyhedra_Library::OR_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Generator::l_m_distance_assign(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Box< ITV >::l_m_distance_assign(), Parma_Polyhedra_Library::Polyhedron::max_min(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::Box< ITV >::max_min(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), mul_restriction(), mulmod(), numer_denom(), Parma_Polyhedra_Library::Octagonal_Shape< T >::Octagonal_Shape(), Parma_Polyhedra_Library::Box< ITV >::propagate_constraint_no_check(), Parma_Polyhedra_Library::Octagonal_Shape< T >::rectilinear_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::rectilinear_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Box< ITV >::refine_interval_no_check(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::Box< ITV >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::restrict(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::simplify_using_context_assign(), Parma_Polyhedra_Library::BD_Shape< T >::simplify_using_context_assign(), Parma_Polyhedra_Library::MIP_Problem::solve_mip(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_reduction_assign(), sub_restriction(), Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_closure_assign(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::upper_bound_assign_if_exact().
00205 { 00206 return check_result(Checked::assign_special<typename Native_Checked_To_Wrapper<To> 00207 ::Policy>(Native_Checked_To_Wrapper<To>::raw_value(to), 00208 From::vclass, 00209 rounding_dir(dir)), 00210 dir); 00211 }
| bool Parma_Polyhedra_Library::assign_rem | ( | M & | rem, | |
| const T & | n, | |||
| const M & | div | |||
| ) | [inline] |
Definition at line 657 of file Interval_Restriction.defs.hh.
References assign_r(), and Parma_Polyhedra_Library::Checked::Result.
Referenced by add_restriction(), and sub_restriction().
00657 { 00658 PPL_DIRTY_TEMP(T, divisor); 00659 PPL_DIRTY_TEMP(T, remainder); 00660 Result r; 00661 r = assign_r(divisor, div, ROUND_CHECK); 00662 if (r != V_EQ) 00663 return false; 00664 r = rem_assign_r(remainder, n, divisor, ROUND_CHECK); 00665 if (r != V_EQ) 00666 return false; 00667 if (sgn(remainder) < 0) { 00668 r = add_assign_r(remainder, remainder, divisor, ROUND_CHECK); 00669 if (r != V_EQ) 00670 return false; 00671 } 00672 r = assign_r(rem, remainder, ROUND_CHECK); 00673 return r == V_EQ; 00674 }
| bool Parma_Polyhedra_Library::assign_restriction | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to, | |
| const From & | x | |||
| ) | [inline] |
| bool Parma_Polyhedra_Library::assign_restriction | ( | Interval_Restriction_Integer< Base > & | to, | |
| const From & | x | |||
| ) | [inline] |
Definition at line 241 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer().
| bool Parma_Polyhedra_Library::assign_restriction | ( | Interval_Restriction_None_Base & | , | |
| const T & | ||||
| ) | [inline] |
Definition at line 74 of file Interval_Restriction.defs.hh.
Referenced by neg_restriction().
| const char * Parma_Polyhedra_Library::banner | ( | ) |
Returns a character string containing the PPL banner.
The banner provides information about the PPL version, the licensing, the lack of any warranty whatsoever, the C++ compiler used to build the library, where to report bugs and where to look for further information.
Definition at line 104 of file version.cc.
| Enable_If<Is_Singleton<T>::value || Is_Interval<T>::value, bool>::type Parma_Polyhedra_Library::check_empty_arg | ( | const T & | x | ) | [inline] |
Definition at line 150 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval_NS::f_info(), and f_is_empty().
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::contains(), Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::is_disjoint_from(), Parma_Polyhedra_Library::Interval< Boundary, Info >::join_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::neg_assign(), operator<<(), operator==(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_existential(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_universal(), Parma_Polyhedra_Library::Interval< Boundary, Info >::strictly_contains(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
00150 { 00151 if (f_info(x).may_be_empty) 00152 return f_is_empty(x); 00153 else { 00154 PPL_ASSERT(!f_is_empty(x)); 00155 return false; 00156 } 00157 }
| Result Parma_Polyhedra_Library::check_result | ( | Result | r, | |
| Rounding_Dir | dir | |||
| ) | [inline] |
Definition at line 48 of file Checked_Number.inlines.hh.
References Parma_Polyhedra_Library::Checked::result_relation().
Referenced by Parma_Polyhedra_Library::Checked_Number< T, Policy >::assign_r(), assign_r(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::Checked_Number(), construct(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::input(), and Parma_Polyhedra_Library::Checked_Number< T, Policy >::output().
00048 { 00049 if (dir == ROUND_NOT_NEEDED) { 00050 #ifdef DEBUG_ROUND_NOT_NEEDED 00051 PPL_ASSERT(result_relation(r) == VR_EQ); 00052 #endif 00053 return r; 00054 } 00055 return r; 00056 }
| int Parma_Polyhedra_Library::cmp | ( | const GMP_Integer & | x, | |
| const GMP_Integer & | y | |||
| ) | [related] |
| void Parma_Polyhedra_Library::Coefficient_constants_finalize | ( | ) |
Finalizes the Coefficient constants.
Referenced by Parma_Polyhedra_Library::Init::~Init().
| void Parma_Polyhedra_Library::Coefficient_constants_initialize | ( | ) |
Initializes the Coefficient constants.
Referenced by Parma_Polyhedra_Library::Init::Init().
| Coefficient_traits::const_reference Parma_Polyhedra_Library::Coefficient_one | ( | ) |
Returns a const reference to a Coefficient with value 1.
Referenced by Parma_Polyhedra_Library::Constraint::initialize(), Parma_Polyhedra_Library::Grid::wrap_assign(), and Parma_Polyhedra_Library::Box< ITV >::wrap_assign().
| Coefficient_traits::const_reference Parma_Polyhedra_Library::Coefficient_zero | ( | ) |
Returns a const reference to a Coefficient with value 0.
Referenced by Parma_Polyhedra_Library::Linear_Expression::coefficient(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::Linear_Expression::initialize(), Parma_Polyhedra_Library::Linear_Expression::operator<<(), Parma_Polyhedra_Library::Constraint::operator<<(), Parma_Polyhedra_Library::Congruence::operator<<(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), and Parma_Polyhedra_Library::BD_Shape< T >::relation_with().
| I_Result Parma_Polyhedra_Library::combine | ( | Result | l, | |
| Result | u | |||
| ) | [inline] |
Definition at line 43 of file Interval.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::difference_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::join_assign(), Parma_Polyhedra_Library::OR_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Generator::l_m_distance_assign(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Box< ITV >::l_m_distance_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::neg_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::normalize(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_existential(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_universal(), Parma_Polyhedra_Library::Interval< Boundary, Info >::set_infinities(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
| dimension_type Parma_Polyhedra_Library::compute_capacity | ( | dimension_type | requested_size, | |
| dimension_type | maximum_size | |||
| ) | [inline] |
Speculative allocation function.
| requested_size | The number of elements we need. | |
| maximum_size | The maximum number of elements to be allocated. It is assumed to be no less than requested_size. |
Computes a capacity given a requested size. Allows for speculative allocation aimed at reducing the number of reallocations enough to guarantee amortized constant insertion time for our vector-like data structures. In all cases, the speculative allocation will not exceed maximum_size.
Definition at line 69 of file globals.inlines.hh.
Referenced by Parma_Polyhedra_Library::Linear_System::add_pending_row(), Parma_Polyhedra_Library::Matrix::add_recycled_row(), Parma_Polyhedra_Library::Bit_Matrix::add_recycled_row(), Parma_Polyhedra_Library::Matrix::add_zero_columns(), Parma_Polyhedra_Library::Matrix::add_zero_rows(), Parma_Polyhedra_Library::Matrix::add_zero_rows_and_columns(), Parma_Polyhedra_Library::DB_Row< T >::DB_Row(), Parma_Polyhedra_Library::DB_Matrix< T >::grow(), Parma_Polyhedra_Library::Linear_System::merge_rows_assign(), Parma_Polyhedra_Library::OR_Matrix< T >::operator=(), Parma_Polyhedra_Library::Matrix::operator=(), Parma_Polyhedra_Library::DB_Matrix< T >::operator=(), Parma_Polyhedra_Library::Bit_Matrix::resize(), Parma_Polyhedra_Library::Matrix::resize_no_copy(), Parma_Polyhedra_Library::DB_Matrix< T >::resize_no_copy(), Parma_Polyhedra_Library::Row::Row(), and Parma_Polyhedra_Library::Polyhedron::simplify().
00070 { 00071 assert(requested_size <= maximum_size); 00072 // Speculation factor 2. 00073 return (requested_size < maximum_size / 2) 00074 ? 2*(requested_size + 1) 00075 : maximum_size; 00076 // Speculation factor 1.5. 00077 // return (maximum_size - requested_size > requested_size/2) 00078 // ? requested_size + requested_size/2 + 1 00079 // : maximum_size; 00080 }
| Enable_If<Is_Native_Or_Checked<To>::value && Is_Special<From>::value, Result>::type Parma_Polyhedra_Library::construct | ( | To & | to, | |
| const From & | , | |||
| Rounding_Dir | dir | |||
| ) | [related] |
Definition at line 215 of file Checked_Number.inlines.hh.
References check_result(), raw_value(), and rounding_dir().
Referenced by Parma_Polyhedra_Library::Linear_System::add_pending_row(), Parma_Polyhedra_Library::Matrix::add_zero_rows(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::construct_upward_approximation(), Parma_Polyhedra_Library::DB_Matrix< T >::DB_Matrix(), Parma_Polyhedra_Library::DB_Matrix< T >::grow(), Parma_Polyhedra_Library::Matrix::Matrix(), Parma_Polyhedra_Library::Matrix::resize_no_copy(), and Parma_Polyhedra_Library::DB_Matrix< T >::resize_no_copy().
00215 { 00216 return check_result(Checked::construct_special<typename Native_Checked_To_Wrapper<To> 00217 ::Policy>(Native_Checked_To_Wrapper<To>::raw_value(to), 00218 From::vclass, 00219 rounding_dir(dir)), 00220 dir); 00221 }
| Enable_If< Is_Same_Or_Derived< Interval_Restriction_Integer_Modulo_Base, T1 >::value &&Is_Same_Or_Derived< Interval_Restriction_Integer_Modulo_Base, T2 >::value, bool >::type Parma_Polyhedra_Library::contains_restriction | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
Definition at line 484 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Checked::Result.
00484 { 00485 if (x.divisor == 0) 00486 return true; 00487 if (y.divisor == 0) 00488 return false; 00489 if (x.divisor == y.divisor) 00490 return x.remainder == y.remainder; 00491 PPL_DIRTY_TEMP(typename T1::modulo_type, v); 00492 Result r; 00493 r = rem_assign_r(v, y.divisor, x.divisor, ROUND_NOT_NEEDED); 00494 PPL_ASSERT(r == V_EQ); 00495 if (v != 0) 00496 return false; 00497 r = rem_assign_r(v, y.remainder, x.divisor, ROUND_NOT_NEEDED); 00498 PPL_ASSERT(r == V_EQ); 00499 return v == x.remainder; 00500 }
| bool Parma_Polyhedra_Library::contains_restriction | ( | const Interval_Restriction_None_Base & | , | |
| const T & | ||||
| ) | [inline] |
Definition at line 68 of file Interval_Restriction.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::contains(), join_restriction(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::strictly_contains().
| bool Parma_Polyhedra_Library::diff_restriction | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 618 of file Interval_Restriction.defs.hh.
| bool Parma_Polyhedra_Library::diff_restriction | ( | Interval_Restriction_Integer< Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | ||||
| ) | [inline] |
Definition at line 264 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer().
| bool Parma_Polyhedra_Library::diff_restriction | ( | Interval_Restriction_None_Base & | , | |
| const T1 & | , | |||
| const T2 & | ||||
| ) | [inline] |
Definition at line 92 of file Interval_Restriction.defs.hh.
| void Parma_Polyhedra_Library::div_2exp_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y, | |||
| unsigned int | exp | |||
| ) | [related] |
Definition at line 90 of file GMP_Integer.inlines.hh.
| bool Parma_Polyhedra_Library::div_restriction | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 853 of file Interval_Restriction.defs.hh.
References set_unrestricted().
00854 { 00855 if (is_singleton(y)) { 00856 if (is_singleton(x)) { 00857 // FIXME: to be written 00858 } 00859 } 00860 return set_unrestricted(to); 00861 }
| bool Parma_Polyhedra_Library::div_restriction | ( | Interval_Restriction_Integer< Base > & | to, | |
| const From1 & | , | |||
| const From2 & | ||||
| ) | [inline] |
Definition at line 303 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer().
| bool Parma_Polyhedra_Library::div_restriction | ( | Interval_Restriction_None_Base & | , | |
| const T1 & | , | |||
| const T2 & | ||||
| ) | [inline] |
Definition at line 122 of file Interval_Restriction.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign().
| Enable_If< Is_Native_Or_Checked< T >::value, void >::type Parma_Polyhedra_Library::div_round_up | ( | T & | to, | |
| Coefficient_traits::const_reference | x, | |||
| Coefficient_traits::const_reference | y | |||
| ) | [inline] |
Divides x by y into to, rounding the result towards plus infinity.
Definition at line 65 of file math_utilities.inlines.hh.
References assign_r().
Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::add_constraint(), Parma_Polyhedra_Library::BD_Shape< T >::add_constraint(), Parma_Polyhedra_Library::BD_Shape< T >::add_dbm_constraint(), Parma_Polyhedra_Library::Octagonal_Shape< T >::add_octagonal_constraint(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::BD_Shape(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::get_limiting_octagon(), Parma_Polyhedra_Library::BD_Shape< T >::get_limiting_shape(), Parma_Polyhedra_Library::Octagonal_Shape< T >::Octagonal_Shape(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_no_check(), and Parma_Polyhedra_Library::BD_Shape< T >::refine_no_check().
00067 { 00068 PPL_DIRTY_TEMP0(mpq_class, qx); 00069 PPL_DIRTY_TEMP0(mpq_class, qy); 00070 // Note: this code assumes that a Coefficient is always convertible 00071 // to an mpq_class without loss of precision. 00072 assign_r(qx, x, ROUND_NOT_NEEDED); 00073 assign_r(qy, y, ROUND_NOT_NEEDED); 00074 div_assign_r(qx, qx, qy, ROUND_NOT_NEEDED); 00075 assign_r(to, qx, ROUND_UP); 00076 }
| Enable_If< Is_Same_Or_Derived< Interval_Restriction_Integer_Modulo_Base, T1 >::value &&Is_Same_Or_Derived< Interval_Restriction_Integer_Modulo_Base, T2 >::value, bool >::type Parma_Polyhedra_Library::eq_restriction | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
Definition at line 477 of file Interval_Restriction.defs.hh.
| bool Parma_Polyhedra_Library::eq_restriction | ( | const Interval_Restriction_None_Base & | , | |
| const | Interval_Restriction_None_Base | |||
| ) | [inline] |
Definition at line 62 of file Interval_Restriction.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::can_be_exactly_joined_to(), operator==(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::strictly_contains().
| Enable_If<Is_Native_Or_Checked<T1>::value && Is_Native_Or_Checked<T2>::value, bool>::type Parma_Polyhedra_Library::equal | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
| void Parma_Polyhedra_Library::exact_div_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y, | |||
| const GMP_Integer & | z | |||
| ) | [related] |
Definition at line 95 of file GMP_Integer.inlines.hh.
| void Parma_Polyhedra_Library::exact_div_assign | ( | Checked_Number< T, Policy > & | x, | |
| const Checked_Number< T, Policy > & | y, | |||
| const Checked_Number< T, Policy > & | z | |||
| ) | [related] |
Definition at line 710 of file Checked_Number.inlines.hh.
Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::Artificial_Parameter(), Parma_Polyhedra_Library::PIP_Tree_Node::compatibility_check(), Parma_Polyhedra_Library::MIP_Problem::compute_generator(), Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::Polyhedron::drop_some_non_integer_points(), Parma_Polyhedra_Library::Grid::frequency_no_check(), Parma_Polyhedra_Library::MIP_Problem::get_exiting_base_index(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Generator::is_matching_closure_point(), Parma_Polyhedra_Library::Grid::max_min(), Parma_Polyhedra_Library::Box< ITV >::max_min(), Parma_Polyhedra_Library::Row::normalize(), Parma_Polyhedra_Library::PIP_Solution_Node::Tableau::normalize(), normalize2(), Parma_Polyhedra_Library::Congruence_System::normalize_moduli(), Parma_Polyhedra_Library::Grid::reduce_congruence_with_equality(), Parma_Polyhedra_Library::Grid::reduce_equality_with_equality(), Parma_Polyhedra_Library::Grid::reduce_line_with_line(), Parma_Polyhedra_Library::Grid::reduce_parameter_with_line(), Parma_Polyhedra_Library::Grid::reduce_pc_with_pc(), Parma_Polyhedra_Library::Grid_Generator::scale_to_divisor(), Parma_Polyhedra_Library::PIP_Solution_Node::solve(), and Parma_Polyhedra_Library::MIP_Problem::steepest_edge_exact_entering_index().
| memory_size_type Parma_Polyhedra_Library::external_memory_in_bytes | ( | const mpq_class & | x | ) | [inline] |
Returns the size in bytes of the memory managed by x.
Definition at line 107 of file globals.inlines.hh.
References external_memory_in_bytes().
00107 { 00108 return external_memory_in_bytes(x.get_num()) 00109 + external_memory_in_bytes(x.get_den()); 00110 }
| memory_size_type Parma_Polyhedra_Library::external_memory_in_bytes | ( | const mpz_class & | x | ) | [inline] |
Returns the size in bytes of the memory managed by x.
Definition at line 97 of file globals.inlines.hh.
| Enable_If< Is_Native< T >::value, memory_size_type >::type Parma_Polyhedra_Library::external_memory_in_bytes | ( | const T & | ) | [inline] |
For native types, returns the size in bytes of the memory managed by the type of the (unused) parameter, i.e., 0.
Definition at line 85 of file globals.inlines.hh.
| memory_size_type Parma_Polyhedra_Library::external_memory_in_bytes | ( | const GMP_Integer & | x | ) |
Referenced by Parma_Polyhedra_Library::Row_Impl_Handler::Impl::external_memory_in_bytes(), external_memory_in_bytes(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::external_memory_in_bytes(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::external_memory_in_bytes(), and total_memory_in_bytes().
| bool Parma_Polyhedra_Library::extract_interval_congruence | ( | const Congruence & | cg, | |
| dimension_type | cg_space_dim, | |||
| dimension_type & | cg_num_vars, | |||
| dimension_type & | cg_only_var | |||
| ) |
Definition at line 55 of file Box.cc.
References Parma_Polyhedra_Library::Congruence::coefficient(), Parma_Polyhedra_Library::Congruence::is_equality(), and Parma_Polyhedra_Library::Congruence::space_dimension().
Referenced by Parma_Polyhedra_Library::Box< ITV >::add_congruence_no_check().
00058 { 00059 // Check for preconditions. 00060 PPL_ASSERT(cg.space_dimension() == cg_space_dim); 00061 PPL_ASSERT(cg_num_vars == 0 && cg_only_var == 0); 00062 // Only equality congruences can be intervals. 00063 PPL_ASSERT(cg.is_equality()); 00064 00065 // Collect the non-zero components of `cg'. 00066 for (dimension_type i = cg_space_dim; i-- > 0; ) 00067 if (cg.coefficient(Variable(i)) != 0) { 00068 if (cg_num_vars == 0) { 00069 cg_only_var = i; 00070 ++cg_num_vars; 00071 } 00072 else 00073 // Congruence `cg' is not an interval congruence. 00074 return false; 00075 } 00076 return true; 00077 }
| bool Parma_Polyhedra_Library::f_is_empty | ( | const Interval< Boundary, Info > & | x | ) | [inline] |
Definition at line 63 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::is_empty().
Referenced by check_empty_arg().
| bool Parma_Polyhedra_Library::f_is_singleton | ( | const Interval< Boundary, Info > & | x | ) | [inline] |
Definition at line 68 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::is_singleton().
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_existential(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_universal().
| Enable_If<Has_OK<T>::value, bool>::type Parma_Polyhedra_Library::f_OK | ( | const T & | to | ) | [inline] |
Definition at line 444 of file globals.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::contains(), Parma_Polyhedra_Library::Interval< Boundary, Info >::difference_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::intersect_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::is_disjoint_from(), Parma_Polyhedra_Library::Interval< Boundary, Info >::join_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::neg_assign(), operator==(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_existential(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_universal(), Parma_Polyhedra_Library::Interval< Boundary, Info >::strictly_contains(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
| void Parma_Polyhedra_Library::finalize | ( | ) | [inline] |
Finalizes the library.
Definition at line 56 of file initializer.hh.
Referenced by Parma_Polyhedra_Library::OR_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Generator::l_m_distance_assign(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Box< ITV >::l_m_distance_assign(), and Parma_Polyhedra_Library::Init::~Init().
| void Parma_Polyhedra_Library::gcd_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y, | |||
| const GMP_Integer & | z | |||
| ) | [related] |
Definition at line 52 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::Artificial_Parameter(), Parma_Polyhedra_Library::MIP_Problem::choose_branching_variable(), Parma_Polyhedra_Library::PIP_Tree_Node::compatibility_check(), Parma_Polyhedra_Library::Polyhedron::contains_integer_point(), Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::Polyhedron::drop_some_non_integer_points(), Parma_Polyhedra_Library::Grid::frequency_no_check(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Generator::is_matching_closure_point(), Parma_Polyhedra_Library::MIP_Problem::is_mip_satisfiable(), Parma_Polyhedra_Library::Grid::max_min(), Parma_Polyhedra_Library::Row::normalize(), Parma_Polyhedra_Library::PIP_Solution_Node::Tableau::normalize(), normalize2(), Parma_Polyhedra_Library::MIP_Problem::OK(), Parma_Polyhedra_Library::Grid::reduce_congruence_with_equality(), Parma_Polyhedra_Library::Grid::reduce_equality_with_equality(), Parma_Polyhedra_Library::Grid::reduce_line_with_line(), Parma_Polyhedra_Library::Grid::reduce_parameter_with_line(), Parma_Polyhedra_Library::Grid::relation_with(), Parma_Polyhedra_Library::PIP_Solution_Node::solve(), and Parma_Polyhedra_Library::MIP_Problem::solve_mip().
| void Parma_Polyhedra_Library::gcdext_assign | ( | GMP_Integer & | x, | |
| GMP_Integer & | s, | |||
| GMP_Integer & | t, | |||
| const GMP_Integer & | y, | |||
| const GMP_Integer & | z | |||
| ) | [related] |
Definition at line 62 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::Grid::reduce_pc_with_pc().
| Enable_If<Is_Native_Or_Checked<T1>::value && Is_Native_Or_Checked<T2>::value, bool>::type Parma_Polyhedra_Library::greater_or_equal | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
| Enable_If<Is_Native_Or_Checked<T1>::value && Is_Native_Or_Checked<T2>::value, bool>::type Parma_Polyhedra_Library::greater_than | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
| void Parma_Polyhedra_Library::initialize | ( | ) | [inline] |
Initializes the library.
Definition at line 47 of file initializer.hh.
Referenced by Parma_Polyhedra_Library::Init::Init().
| bool Parma_Polyhedra_Library::intersect_restriction | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 579 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::divisor, Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::remainder, Parma_Polyhedra_Library::Checked::Result, and set_integer().
00579 { 00580 typedef Restriction_Integer_Modulo<From1, T, Base> Rx; 00581 const typename Rx::type& rx = Rx::get(x); 00582 typedef Restriction_Integer_Modulo<From2, T, Base> Ry; 00583 const typename Ry::type& ry = Ry::get(y); 00584 if (rx.divisor == 0) { 00585 to.remainder = ry.remainder; 00586 to.divisor = ry.divisor; 00587 return true; 00588 } 00589 if (ry.divisor == 0) { 00590 to.remainder = rx.remainder; 00591 to.divisor = rx.divisor; 00592 return true; 00593 } 00594 PPL_DIRTY_TEMP(T, g); 00595 Result r; 00596 r = gcd_assign_r(g, rx.divisor, ry.divisor, ROUND_DIRECT); 00597 if (r != V_EQ) 00598 return set_integer(to); 00599 PPL_DIRTY_TEMP(T, d); 00600 if (rx.remainder > ry.remainder) 00601 r = sub_assign_r(d, rx.remainder, ry.remainder, ROUND_DIRECT); 00602 else 00603 r = sub_assign_r(d, ry.remainder, rx.remainder, ROUND_DIRECT); 00604 if (r != V_EQ) 00605 return set_integer(to); 00606 r = div_assign_r(d, d, g, ROUND_DIRECT); 00607 if (r != V_EQ) 00608 return false; 00609 r = lcm_assign_r(to.divisor, rx.divisor, ry.divisor, ROUND_DIRECT); 00610 if (r != V_EQ) 00611 return set_integer(to); 00612 // FIXME: to be completed 00613 return true; 00614 }
| bool Parma_Polyhedra_Library::intersect_restriction | ( | Interval_Restriction_Integer< Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 256 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer().
| bool Parma_Polyhedra_Library::intersect_restriction | ( | Interval_Restriction_None_Base & | , | |
| const T1 & | , | |||
| const T2 & | ||||
| ) | [inline] |
Definition at line 86 of file Interval_Restriction.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::intersect_assign().
| Poly_Con_Relation Parma_Polyhedra_Library::interval_relation | ( | const ITV & | i, | |
| const Constraint::Type | constraint_type, | |||
| Coefficient_traits::const_reference | num, | |||
| Coefficient_traits::const_reference | den = 1 | |||
| ) | [inline] |
Returns the relations holding between an interval and an interval constraint.
| i | The interval; | |
| constraint_type | The constraint type; | |
| num | The numerator of the constraint bound; | |
| den | The denominator of the constraint bound |
The interval constraint has the form den * Variable(0) relsym num where relsym is ==, > or >= depending on the constraint_type.
Definition at line 584 of file Box.templates.hh.
References assign_r(), Parma_Polyhedra_Library::Constraint::EQUALITY, Parma_Polyhedra_Library::Poly_Con_Relation::is_disjoint(), Parma_Polyhedra_Library::Poly_Con_Relation::is_included(), Parma_Polyhedra_Library::Constraint::NONSTRICT_INEQUALITY, Parma_Polyhedra_Library::Poly_Con_Relation::saturates(), Parma_Polyhedra_Library::Constraint::STRICT_INEQUALITY, and Parma_Polyhedra_Library::Poly_Con_Relation::strictly_intersects().
Referenced by Parma_Polyhedra_Library::Box< ITV >::get_limiting_box(), and Parma_Polyhedra_Library::Box< ITV >::relation_with().
00587 { 00588 00589 if (i.is_universe()) 00590 return Poly_Con_Relation::strictly_intersects(); 00591 00592 PPL_DIRTY_TEMP0(mpq_class, bound); 00593 assign_r(bound.get_num(), num, ROUND_NOT_NEEDED); 00594 assign_r(bound.get_den(), den, ROUND_NOT_NEEDED); 00595 bound.canonicalize(); 00596 neg_assign_r(bound, bound, ROUND_NOT_NEEDED); 00597 const bool is_lower_bound = (den > 0); 00598 00599 PPL_DIRTY_TEMP0(mpq_class, bound_diff); 00600 if (constraint_type == Constraint::EQUALITY) { 00601 if (i.lower_is_boundary_infinity()) { 00602 PPL_ASSERT(!i.upper_is_boundary_infinity()); 00603 assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED); 00604 sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED); 00605 switch (sgn(bound_diff)) { 00606 case 1: 00607 return Poly_Con_Relation::strictly_intersects(); 00608 case 0: 00609 return i.upper_is_open() 00610 ? Poly_Con_Relation::is_disjoint() 00611 : Poly_Con_Relation::strictly_intersects(); 00612 case -1: 00613 return Poly_Con_Relation::is_disjoint(); 00614 } 00615 } 00616 else { 00617 assign_r(bound_diff, i.lower(), ROUND_NOT_NEEDED); 00618 sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED); 00619 switch (sgn(bound_diff)) { 00620 case 1: 00621 return Poly_Con_Relation::is_disjoint(); 00622 case 0: 00623 if (i.lower_is_open()) 00624 return Poly_Con_Relation::is_disjoint(); 00625 if (i.is_singleton()) 00626 return Poly_Con_Relation::is_included() 00627 && Poly_Con_Relation::saturates(); 00628 return Poly_Con_Relation::strictly_intersects(); 00629 case -1: 00630 if (i.upper_is_boundary_infinity()) 00631 return Poly_Con_Relation::strictly_intersects(); 00632 else { 00633 assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED); 00634 sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED); 00635 switch (sgn(bound_diff)) { 00636 case 1: 00637 return Poly_Con_Relation::strictly_intersects(); 00638 case 0: 00639 if (i.upper_is_open()) 00640 return Poly_Con_Relation::is_disjoint(); 00641 else 00642 return Poly_Con_Relation::strictly_intersects(); 00643 case -1: 00644 return Poly_Con_Relation::is_disjoint(); 00645 } 00646 } 00647 } 00648 } 00649 } 00650 00651 PPL_ASSERT(constraint_type != Constraint::EQUALITY); 00652 if (is_lower_bound) { 00653 if (i.lower_is_boundary_infinity()) { 00654 PPL_ASSERT(!i.upper_is_boundary_infinity()); 00655 assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED); 00656 sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED); 00657 switch (sgn(bound_diff)) { 00658 case 1: 00659 return Poly_Con_Relation::strictly_intersects(); 00660 case 0: 00661 if (constraint_type == Constraint::STRICT_INEQUALITY 00662 || i.upper_is_open()) 00663 return Poly_Con_Relation::is_disjoint(); 00664 else 00665 return Poly_Con_Relation::strictly_intersects(); 00666 case -1: 00667 return Poly_Con_Relation::is_disjoint(); 00668 } 00669 } 00670 else { 00671 assign_r(bound_diff, i.lower(), ROUND_NOT_NEEDED); 00672 sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED); 00673 switch (sgn(bound_diff)) { 00674 case 1: 00675 return Poly_Con_Relation::is_included(); 00676 case 0: 00677 if (constraint_type == Constraint::NONSTRICT_INEQUALITY 00678 || i.lower_is_open()) { 00679 Poly_Con_Relation result = Poly_Con_Relation::is_included(); 00680 if (i.is_singleton()) 00681 result = result && Poly_Con_Relation::saturates(); 00682 return result; 00683 } 00684 else { 00685 PPL_ASSERT(constraint_type == Constraint::STRICT_INEQUALITY 00686 && !i.lower_is_open()); 00687 if (i.is_singleton()) 00688 return Poly_Con_Relation::is_disjoint() 00689 && Poly_Con_Relation::saturates(); 00690 else 00691 return Poly_Con_Relation::strictly_intersects(); 00692 } 00693 case -1: 00694 if (i.upper_is_boundary_infinity()) 00695 return Poly_Con_Relation::strictly_intersects(); 00696 else { 00697 assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED); 00698 sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED); 00699 switch (sgn(bound_diff)) { 00700 case 1: 00701 return Poly_Con_Relation::strictly_intersects(); 00702 case 0: 00703 if (constraint_type == Constraint::STRICT_INEQUALITY 00704 || i.upper_is_open()) 00705 return Poly_Con_Relation::is_disjoint(); 00706 else 00707 return Poly_Con_Relation::strictly_intersects(); 00708 case -1: 00709 return Poly_Con_Relation::is_disjoint(); 00710 } 00711 } 00712 } 00713 } 00714 } 00715 else { 00716 // `c' is an upper bound. 00717 if (i.upper_is_boundary_infinity()) 00718 return Poly_Con_Relation::strictly_intersects(); 00719 else { 00720 assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED); 00721 sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED); 00722 switch (sgn(bound_diff)) { 00723 case -1: 00724 return Poly_Con_Relation::is_included(); 00725 case 0: 00726 if (constraint_type == Constraint::NONSTRICT_INEQUALITY 00727 || i.upper_is_open()) { 00728 Poly_Con_Relation result = Poly_Con_Relation::is_included(); 00729 if (i.is_singleton()) 00730 result = result && Poly_Con_Relation::saturates(); 00731 return result; 00732 } 00733 else { 00734 PPL_ASSERT(constraint_type == Constraint::STRICT_INEQUALITY 00735 && !i.upper_is_open()); 00736 if (i.is_singleton()) 00737 return Poly_Con_Relation::is_disjoint() 00738 && Poly_Con_Relation::saturates(); 00739 else 00740 return Poly_Con_Relation::strictly_intersects(); 00741 } 00742 case 1: 00743 if (i.lower_is_boundary_infinity()) 00744 return Poly_Con_Relation::strictly_intersects(); 00745 else { 00746 assign_r(bound_diff, i.lower(), ROUND_NOT_NEEDED); 00747 sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED); 00748 switch (sgn(bound_diff)) { 00749 case -1: 00750 return Poly_Con_Relation::strictly_intersects(); 00751 case 0: 00752 if (constraint_type == Constraint::STRICT_INEQUALITY 00753 || i.lower_is_open()) 00754 return Poly_Con_Relation::is_disjoint(); 00755 else 00756 return Poly_Con_Relation::strictly_intersects(); 00757 case 1: 00758 return Poly_Con_Relation::is_disjoint(); 00759 } 00760 } 00761 } 00762 } 00763 } 00764 00765 // Quiet a compiler warning: this program point is unreachable. 00766 throw std::runtime_error("PPL internal error"); 00767 }
| unsigned Parma_Polyhedra_Library::irrational_precision | ( | ) | [inline] |
Returns the precision parameter used for irrational calculations.
Definition at line 534 of file checked_mpq.inlines.hh.
References Parma_Polyhedra_Library::Checked::irrational_precision.
00534 { 00535 return Checked::irrational_precision; 00536 }
| Enable_If< Is_Native_Or_Checked< T >::value, bool >::type Parma_Polyhedra_Library::is_additive_inverse | ( | const T & | x, | |
| const T & | y | |||
| ) | [inline] |
Returns true if and only if
.
Definition at line 102 of file math_utilities.inlines.hh.
Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::compute_leaders(), Parma_Polyhedra_Library::BD_Shape< T >::compute_predecessors(), Parma_Polyhedra_Library::Octagonal_Shape< T >::compute_successors(), Parma_Polyhedra_Library::Octagonal_Shape< T >::constraints(), Parma_Polyhedra_Library::BD_Shape< T >::constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::is_shortest_path_reduced(), Parma_Polyhedra_Library::Octagonal_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::Octagonal_Shape< T >::operator<<(), Parma_Polyhedra_Library::BD_Shape< T >::operator<<(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::Octagonal_Shape< T >::simplify_using_context_assign(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_coherence_would_make_empty().
| bool Parma_Polyhedra_Library::is_canonical | ( | const mpq_class & | x | ) | [inline] |
Returns true if and only if x is in canonical form.
Definition at line 109 of file math_utilities.inlines.hh.
Referenced by Parma_Polyhedra_Library::Box< ITV >::Box(), Parma_Polyhedra_Library::Polyhedron::contains_integer_point(), Parma_Polyhedra_Library::Box< ITV >::max_min(), and Parma_Polyhedra_Library::MIP_Problem::solve_mip().
| Enable_If< Is_Native_Or_Checked< T >::value, bool >::type Parma_Polyhedra_Library::is_even | ( | const T & | x | ) | [inline] |
Returns true if and only if x is an even number.
Definition at line 94 of file math_utilities.inlines.hh.
Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::drop_some_non_integer_points(), Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_closure_assign(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_coherence_would_make_empty().
| int Parma_Polyhedra_Library::is_infinity | ( | const Interval< Boundary, Info > & | x | ) | [inline] |
Definition at line 73 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::is_infinity().
| Enable_If<Is_Native_Or_Checked<T>::value, int>::type Parma_Polyhedra_Library::is_infinity | ( | const T & | x | ) | [related] |
Definition at line 239 of file Checked_Number.inlines.hh.
References is_minus_infinity(), and is_plus_infinity().
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
00239 { 00240 return is_minus_infinity(x) ? -1 : is_plus_infinity(x) ? 1 : 0; 00241 }
| Enable_If<Is_Native_Or_Checked<T>::value, bool>::type Parma_Polyhedra_Library::is_integer | ( | const T & | x | ) | [related] |
Definition at line 252 of file Checked_Number.inlines.hh.
References raw_value().
Referenced by Parma_Polyhedra_Library::BD_Shape< T >::BHZ09_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Octagonal_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::BD_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::Octagonal_Shape< T >::drop_some_non_integer_points(), Parma_Polyhedra_Library::Box< ITV >::drop_some_non_integer_points(), Parma_Polyhedra_Library::BD_Shape< T >::drop_some_non_integer_points(), Parma_Polyhedra_Library::Octagonal_Shape< T >::drop_some_non_integer_points_helper(), Parma_Polyhedra_Library::BD_Shape< T >::drop_some_non_integer_points_helper(), Parma_Polyhedra_Library::Restriction_Integer_Modulo< From, T, Base, typename Enable_If< Is_Same_Or_Derived< Interval_Restriction_None_Base, typename From::info_type >::value >::type >::get(), Parma_Polyhedra_Library::Restriction_Integer_Modulo< From, T, Base, typename Enable_If< Is_Native_Or_Checked< From >::value >::type >::get(), Parma_Polyhedra_Library::Restriction_Integer< From, Base, typename Enable_If< Is_Same_Or_Derived< Interval_Restriction_None_Base, typename From::info_type >::value >::type >::get(), Parma_Polyhedra_Library::Restriction_Integer< From, Base, typename Enable_If< Is_Native_Or_Checked< From >::value >::type >::get(), Parma_Polyhedra_Library::Octagonal_Shape< T >::integer_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::BD_Shape< T >::integer_upper_bound_assign_if_exact(), is_singleton_integer(), Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::restrict(), Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_closure_assign(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_coherence_would_make_empty().
00252 { 00253 return Checked::is_int<typename Native_Checked_From_Wrapper<T> 00254 ::Policy>(Native_Checked_From_Wrapper<T>::raw_value(x)); 00255 }
| bool Parma_Polyhedra_Library::is_minus_infinity | ( | const Checked_Number< T, Policy > & | x | ) | [inline] |
Definition at line 310 of file Checked_Number.inlines.hh.
References Parma_Polyhedra_Library::Checked_Number< T, Policy >::raw_value().
| Enable_If<Is_Native_Or_Checked<T>::value, bool>::type Parma_Polyhedra_Library::is_minus_infinity | ( | const T & | x | ) | [related] |
Definition at line 225 of file Checked_Number.inlines.hh.
References raw_value().
Referenced by Parma_Polyhedra_Library::OR_Matrix< T >::ascii_load(), Parma_Polyhedra_Library::DB_Matrix< T >::ascii_load(), is_infinity(), numer_denom(), Parma_Polyhedra_Library::Octagonal_Shape< T >::OK(), Parma_Polyhedra_Library::Interval< Boundary, Info >::OK(), and Parma_Polyhedra_Library::BD_Shape< T >::OK().
00225 { 00226 return Checked::is_minf<typename Native_Checked_From_Wrapper<T> 00227 ::Policy>(Native_Checked_From_Wrapper<T>::raw_value(x)); 00228 }
| bool Parma_Polyhedra_Library::is_not_a_number | ( | const Checked_Number< T, Policy > & | x | ) | [inline] |
Definition at line 304 of file Checked_Number.inlines.hh.
References Parma_Polyhedra_Library::Checked_Number< T, Policy >::raw_value().
| Enable_If<Is_Native_Or_Checked<T>::value, bool>::type Parma_Polyhedra_Library::is_not_a_number | ( | const T & | x | ) | [related] |
Definition at line 245 of file Checked_Number.inlines.hh.
References raw_value().
Referenced by Parma_Polyhedra_Library::Interval_NS::f_is_empty(), numer_denom(), Parma_Polyhedra_Library::Interval< Boundary, Info >::OK(), and Parma_Polyhedra_Library::DB_Row< T >::OK().
00245 { 00246 return Checked::is_nan<typename Native_Checked_From_Wrapper<T> 00247 ::Policy>(Native_Checked_From_Wrapper<T>::raw_value(x)); 00248 }
| bool Parma_Polyhedra_Library::is_plus_infinity | ( | const Checked_Number< T, Policy > & | x | ) | [inline] |
Definition at line 316 of file Checked_Number.inlines.hh.
References Parma_Polyhedra_Library::Checked_Number< T, Policy >::raw_value().
| Enable_If<Is_Native_Or_Checked<T>::value, bool>::type Parma_Polyhedra_Library::is_plus_infinity | ( | const T & | x | ) | [related] |
Definition at line 232 of file Checked_Number.inlines.hh.
References raw_value().
Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::BFT00_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounds(), Parma_Polyhedra_Library::BD_Shape< T >::bounds(), Parma_Polyhedra_Library::Box< ITV >::Box(), Parma_Polyhedra_Library::Octagonal_Shape< T >::CC76_narrowing_assign(), Parma_Polyhedra_Library::BD_Shape< T >::CC76_narrowing_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::constrains(), Parma_Polyhedra_Library::BD_Shape< T >::constrains(), Parma_Polyhedra_Library::Octagonal_Shape< T >::constraints(), Parma_Polyhedra_Library::BD_Shape< T >::constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::BD_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_minus_v_pm_u_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_u_minus_v_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_v_minus_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_v_pm_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::drop_some_non_integer_points(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::incremental_shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::incremental_strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_bounded(), Parma_Polyhedra_Library::BD_Shape< T >::is_bounded(), is_infinity(), Parma_Polyhedra_Library::BD_Shape< T >::is_shortest_path_reduced(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_strong_coherent(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_strongly_reduced(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_universe(), Parma_Polyhedra_Library::BD_Shape< T >::is_universe(), Parma_Polyhedra_Library::OR_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_constraints(), numer_denom(), Parma_Polyhedra_Library::Octagonal_Shape< T >::OK(), Parma_Polyhedra_Library::Interval< Boundary, Info >::OK(), Parma_Polyhedra_Library::BD_Shape< T >::OK(), Parma_Polyhedra_Library::Octagonal_Shape< T >::operator<<(), Parma_Polyhedra_Library::BD_Shape< T >::operator<<(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::simplify_using_context_assign(), Parma_Polyhedra_Library::BD_Shape< T >::simplify_using_context_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_coherence_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_closure_assign(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_coherence_would_make_empty().
00232 { 00233 return Checked::is_pinf<typename Native_Checked_From_Wrapper<T> 00234 ::Policy>(Native_Checked_From_Wrapper<T>::raw_value(x)); 00235 }
| Enable_If<Is_Singleton<T>::value || Is_Interval<T>::value, bool>::type Parma_Polyhedra_Library::is_singleton_integer | ( | const T & | x | ) | [inline] |
Definition at line 144 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval_NS::f_lower(), and is_integer().
00144 { 00145 return is_singleton(x) && is_integer(f_lower(x)); 00146 }
| unsigned long Parma_Polyhedra_Library::isqrt | ( | unsigned long | x | ) | [inline] |
Returns the integer square root of x.
Definition at line 409 of file OR_Matrix.inlines.hh.
Referenced by Parma_Polyhedra_Library::OR_Matrix< T >::max_num_rows().
| bool Parma_Polyhedra_Library::join_restriction | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 528 of file Interval_Restriction.defs.hh.
References assign_r(), contains_restriction(), Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::divisor, Parma_Polyhedra_Library::Interval_NS::f_lower(), Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::remainder, Parma_Polyhedra_Library::Checked::Result, set_integer(), and set_unrestricted().
00528 { 00529 typedef Restriction_Integer_Modulo<From1, T, Base> Rx; 00530 const typename Rx::type& rx = Rx::get(x); 00531 if (rx.divisor == 0) 00532 return set_unrestricted(to); 00533 typedef Restriction_Integer_Modulo<From2, T, Base> Ry; 00534 const typename Ry::type& ry = Ry::get(y); 00535 if (ry.divisor == 0) 00536 return set_unrestricted(to); 00537 else if (rx.divisor == 1 && ry.divisor == 1 00538 && is_singleton(x) && is_singleton(y)) { 00539 PPL_DIRTY_TEMP(typename Boundary_Value<From1>::type, a); 00540 PPL_DIRTY_TEMP(typename Boundary_Value<From2>::type, b); 00541 Result r; 00542 r = abs_assign_r(a, f_lower(x), ROUND_CHECK); 00543 if (r != V_EQ) 00544 return set_integer(to); 00545 r = abs_assign_r(b, f_lower(y), ROUND_CHECK); 00546 if (r != V_EQ) 00547 return set_integer(to); 00548 if (a > b) 00549 r = sub_assign_r(a, a, b, ROUND_CHECK); 00550 else 00551 r = sub_assign_r(a, b, a, ROUND_CHECK); 00552 if (r != V_EQ) 00553 return set_integer(to); 00554 r = assign_r(to.divisor, a, ROUND_CHECK); 00555 if (r != V_EQ) 00556 return set_integer(to); 00557 r = rem_assign_r(b, b, a, ROUND_CHECK); 00558 if (r != V_EQ) 00559 return set_integer(to); 00560 r = assign_r(to.remainder, b, ROUND_CHECK); 00561 if (r != V_EQ) 00562 return set_integer(to); 00563 } 00564 else if (contains_restriction(rx, ry)) { 00565 to.remainder = rx.remainder; 00566 to.divisor = rx.divisor; 00567 } 00568 else if (contains_restriction(ry, rx)) { 00569 to.remainder = ry.remainder; 00570 to.divisor = ry.divisor; 00571 } 00572 else 00573 return set_integer(to); 00574 return true; 00575 }
| bool Parma_Polyhedra_Library::join_restriction | ( | Interval_Restriction_Integer< Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 248 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer().
| bool Parma_Polyhedra_Library::join_restriction | ( | Interval_Restriction_None_Base & | , | |
| const T1 & | , | |||
| const T2 & | ||||
| ) | [inline] |
Definition at line 80 of file Interval_Restriction.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::join_assign().
| void Parma_Polyhedra_Library::lcm_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y, | |||
| const GMP_Integer & | z | |||
| ) | [related] |
Definition at line 70 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::MIP_Problem::compute_generator(), Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::MIP_Problem::get_exiting_base_index(), Parma_Polyhedra_Library::Box< ITV >::max_min(), Parma_Polyhedra_Library::Grid::normalize_divisors(), Parma_Polyhedra_Library::Congruence_System::normalize_moduli(), and Parma_Polyhedra_Library::MIP_Problem::steepest_edge_exact_entering_index().
| Enable_If<Is_Native_Or_Checked<T1>::value && Is_Native_Or_Checked<T2>::value, bool>::type Parma_Polyhedra_Library::less_or_equal | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
| Enable_If<Is_Native_Or_Checked<T1>::value && Is_Native_Or_Checked<T2>::value, bool>::type Parma_Polyhedra_Library::less_than | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
| T Parma_Polyhedra_Library::low_bits_mask | ( | unsigned | n | ) | [inline] |
Returns a mask for the lowest n bits,.
Definition at line 45 of file math_utilities.inlines.hh.
| void Parma_Polyhedra_Library::max_assign | ( | N & | x, | |
| const N & | y | |||
| ) | [inline] |
Assigns to x the maximum between x and y.
Definition at line 87 of file math_utilities.inlines.hh.
Referenced by Parma_Polyhedra_Library::BD_Shape< T >::BD_Shape(), Parma_Polyhedra_Library::Octagonal_Shape< T >::fold_space_dimensions(), Parma_Polyhedra_Library::BD_Shape< T >::fold_space_dimensions(), Parma_Polyhedra_Library::Interval< Boundary, Info >::intersect_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::join_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::Octagonal_Shape(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::upper_bound_assign().
| void Parma_Polyhedra_Library::maybe_abandon | ( | ) | [related] |
Definition at line 57 of file globals.inlines.hh.
References abandon_expensive_computations, Parma_Polyhedra_Library::Weightwatch_Traits::check_function, and Parma_Polyhedra_Library::Implementation::in_assert.
Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::compatibility_check(), Parma_Polyhedra_Library::MIP_Problem::compute_simplex_using_exact_pricing(), Parma_Polyhedra_Library::MIP_Problem::compute_simplex_using_steepest_edge_float(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::Box< ITV >::propagate_constraints_no_check(), and Parma_Polyhedra_Library::PIP_Solution_Node::solve().
00057 { 00058 #ifndef NDEBUG 00059 if (Implementation::in_assert) 00060 return; 00061 #endif 00062 if (Weightwatch_Traits::check_function) 00063 Weightwatch_Traits::check_function(); 00064 if (const Throwable* p = abandon_expensive_computations) 00065 p->throw_me(); 00066 }
| Result Parma_Polyhedra_Library::maybe_assign | ( | const To *& | top, | |
| To & | tmp, | |||
| const From & | from, | |||
| Rounding_Dir | dir | |||
| ) | [inline] |
Assigns to top a pointer to a location that holds the conversion, according to dir, of from to type To. When necessary, and only when necessary, the variable tmp is used to hold the result of conversion.
Definition at line 64 of file distances.inlines.hh.
References Parma_Polyhedra_Library::maybe_assign_struct< To, From >::function().
Referenced by Parma_Polyhedra_Library::OR_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Generator::l_m_distance_assign(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), and Parma_Polyhedra_Library::Box< ITV >::l_m_distance_assign().
| int Parma_Polyhedra_Library::maybe_check_fpu_inexact | ( | ) | [inline] |
Definition at line 835 of file Checked_Number.inlines.hh.
| void Parma_Polyhedra_Library::maybe_reset_fpu_inexact | ( | ) | [inline] |
Definition at line 828 of file Checked_Number.inlines.hh.
| void Parma_Polyhedra_Library::min_assign | ( | N & | x, | |
| const N & | y | |||
| ) | [inline] |
Assigns to x the minimum between x and y.
Definition at line 80 of file math_utilities.inlines.hh.
Referenced by Parma_Polyhedra_Library::BD_Shape< T >::incremental_shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::incremental_strong_closure_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::intersect_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::join_assign(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_closure_assign(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_coherence_assign().
| T Parma_Polyhedra_Library::minus_infinity | ( | ) | [inline] |
Definition at line 808 of file Checked_Number.inlines.hh.
References MINUS_INFINITY.
00808 { 00809 return MINUS_INFINITY; 00810 }
| void Parma_Polyhedra_Library::mul_2exp_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y, | |||
| unsigned int | exp | |||
| ) | [related] |
Definition at line 85 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::Grid::wrap_assign(), and Parma_Polyhedra_Library::Box< ITV >::wrap_assign().
| bool Parma_Polyhedra_Library::mul_restriction | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 800 of file Interval_Restriction.defs.hh.
References assign_r(), Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::divisor, Parma_Polyhedra_Library::Interval_NS::f_lower(), mulmod(), Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::remainder, Parma_Polyhedra_Library::Checked::Result, set_integer(), and set_unrestricted().
00800 { 00801 typedef Restriction_Integer_Modulo<From1, T, Base> Rx; 00802 const typename Rx::type& rx = Rx::get(x); 00803 if (rx.divisor == 0) 00804 return set_unrestricted(to); 00805 typedef Restriction_Integer_Modulo<From2, T, Base> Ry; 00806 const typename Ry::type& ry = Ry::get(y); 00807 if (ry.divisor == 0) 00808 return set_unrestricted(to); 00809 Result r; 00810 PPL_DIRTY_TEMP(T, mul); 00811 if (is_singleton(x)) { 00812 if (is_singleton(y)) 00813 return set_integer(to); 00814 PPL_DIRTY_TEMP(typename Boundary_Value<From1>::type, n); 00815 r = abs_assign_r(n, f_lower(x), ROUND_CHECK); 00816 if (r != V_EQ) 00817 return set_integer(to); 00818 r = assign_r(mul, n, ROUND_CHECK); 00819 if (r != V_EQ) 00820 return set_integer(to); 00821 r = mul_assign_r(to.remainder, mul, ry.remainder, ROUND_NOT_NEEDED); 00822 if (r != V_EQ) 00823 return set_integer(to); 00824 r = mul_assign_r(to.divisor, mul, ry.divisor, ROUND_NOT_NEEDED); 00825 if (r != V_EQ) 00826 return set_integer(to); 00827 } 00828 else if (is_singleton(y)) { 00829 PPL_DIRTY_TEMP(typename Boundary_Value<From2>::type, n); 00830 r = abs_assign_r(n, f_lower(y), ROUND_CHECK); 00831 if (r != V_EQ) 00832 return set_integer(to); 00833 r = assign_r(mul, n, ROUND_CHECK); 00834 if (r != V_EQ) 00835 return set_integer(to); 00836 r = mul_assign_r(to.remainder, rx.remainder, mul, ROUND_NOT_NEEDED); 00837 if (r != V_EQ) 00838 return set_integer(to); 00839 r = mul_assign_r(to.divisor, rx.divisor, mul, ROUND_NOT_NEEDED); 00840 if (r != V_EQ) 00841 return set_integer(to); 00842 } 00843 else { 00844 r = gcd_assign_r(to.divisor, rx.divisor, ry.divisor, ROUND_NOT_NEEDED); 00845 PPL_ASSERT(r == V_EQ); 00846 mulmod(to.remainder, rx.remainder, ry.remainder, to.divisor); 00847 } 00848 return true; 00849 }
| bool Parma_Polyhedra_Library::mul_restriction | ( | Interval_Restriction_Integer< Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 295 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer().
| bool Parma_Polyhedra_Library::mul_restriction | ( | Interval_Restriction_None_Base & | , | |
| const T1 & | , | |||
| const T2 & | ||||
| ) | [inline] |
Definition at line 116 of file Interval_Restriction.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign().
| void Parma_Polyhedra_Library::mulmod | ( | T & | to, | |
| const T & | x, | |||
| const T & | y, | |||
| const T & | to_m | |||
| ) | [inline] |
Definition at line 771 of file Interval_Restriction.defs.hh.
References assign_r(), and Parma_Polyhedra_Library::Checked::Result.
Referenced by mul_restriction().
00771 { 00772 Result r; 00773 if (std::numeric_limits<T>::is_bounded) { 00774 PPL_DIRTY_TEMP0(mpz_class, a); 00775 PPL_DIRTY_TEMP0(mpz_class, b); 00776 r = assign_r(a, x, ROUND_NOT_NEEDED); 00777 PPL_ASSERT(r == V_EQ); 00778 r = assign_r(b, y, ROUND_NOT_NEEDED); 00779 PPL_ASSERT(r == V_EQ); 00780 r = mul_assign_r(a, a, b, ROUND_NOT_NEEDED); 00781 PPL_ASSERT(r == V_EQ); 00782 r = assign_r(b, to_m, ROUND_NOT_NEEDED); 00783 PPL_ASSERT(r == V_EQ); 00784 r = rem_assign_r(a, a, b, ROUND_NOT_NEEDED); 00785 PPL_ASSERT(r == V_EQ); 00786 r = assign_r(to, a, ROUND_NOT_NEEDED); 00787 PPL_ASSERT(r == V_EQ); 00788 } 00789 else { 00790 r = mul_assign_r(to, x, y, ROUND_NOT_NEEDED); 00791 PPL_ASSERT(r == V_EQ); 00792 r = rem_assign_r(to, to, to_m, ROUND_NOT_NEEDED); 00793 PPL_ASSERT(r == V_EQ); 00794 } 00795 }
| Enable_If< Is_Interval< From >::value, I_Result >::type Parma_Polyhedra_Library::neg_assign | ( | From & | x | ) | [inline] |
Definition at line 31 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Checked::From.
00031 { 00032 // FIXME: Avoid the creation of a temporary. 00033 From y; 00034 typename Enable_If<Is_Interval<From>::value, I_Result>::type res = 00035 y.neg_assign(x); 00036 x = y; 00037 return res; 00038 }
| void Parma_Polyhedra_Library::neg_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y | |||
| ) | [related] |
Definition at line 37 of file GMP_Integer.inlines.hh.
| void Parma_Polyhedra_Library::neg_assign | ( | GMP_Integer & | x | ) | [related] |
Definition at line 32 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::add_constraint(), Parma_Polyhedra_Library::BD_Shape< T >::add_constraint(), Parma_Polyhedra_Library::Polyhedron::affine_image(), Parma_Polyhedra_Library::Grid::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Polyhedron::affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::Grid::affine_preimage(), Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::Artificial_Parameter(), Parma_Polyhedra_Library::Linear_System::back_substitute(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::MIP_Problem::compute_generator(), Parma_Polyhedra_Library::MIP_Problem::compute_simplex_using_steepest_edge_float(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_minus_v_pm_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_v_pm_u_bounds(), Parma_Polyhedra_Library::Polyhedron::drop_some_non_integer_points(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Grid::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Grid::generalized_affine_preimage(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::PIP_Solution_Node::generate_cut(), Parma_Polyhedra_Library::Octagonal_Shape< T >::get_limiting_octagon(), Parma_Polyhedra_Library::BD_Shape< T >::get_limiting_shape(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::Grid_Generator::negate(), Parma_Polyhedra_Library::Congruence::negate(), Parma_Polyhedra_Library::Row::normalize(), Parma_Polyhedra_Library::Linear_Expression::operator<<(), Parma_Polyhedra_Library::Grid_Generator::operator<<(), Parma_Polyhedra_Library::Generator::operator<<(), Parma_Polyhedra_Library::Constraint::operator<<(), Parma_Polyhedra_Library::Congruence::operator<<(), Parma_Polyhedra_Library::MIP_Problem::process_pending_constraints(), Parma_Polyhedra_Library::Grid::reduce_congruence_with_equality(), Parma_Polyhedra_Library::Grid::reduce_parameter_with_line(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_no_check(), Parma_Polyhedra_Library::BD_Shape< T >::refine_no_check(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::MIP_Problem::second_phase(), Parma_Polyhedra_Library::Linear_Row::sign_normalize(), Parma_Polyhedra_Library::Congruence::sign_normalize(), Parma_Polyhedra_Library::PIP_Problem::solve(), Parma_Polyhedra_Library::Grid::wrap_assign(), and Parma_Polyhedra_Library::Box< ITV >::wrap_assign().
| bool Parma_Polyhedra_Library::neg_restriction | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to, | |
| const From & | x | |||
| ) | [inline] |
Definition at line 626 of file Interval_Restriction.defs.hh.
References assign_restriction().
00627 { 00628 return assign_restriction(to, x); 00629 }
| bool Parma_Polyhedra_Library::neg_restriction | ( | Interval_Restriction_Integer< Base > & | to, | |
| const From & | x | |||
| ) | [inline] |
Definition at line 272 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer().
| bool Parma_Polyhedra_Library::neg_restriction | ( | Interval_Restriction_None_Base & | , | |
| const T & | ||||
| ) | [inline] |
Definition at line 98 of file Interval_Restriction.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::neg_assign().
| void Parma_Polyhedra_Library::normalize2 | ( | Coefficient_traits::const_reference | x, | |
| Coefficient_traits::const_reference | y, | |||
| Coefficient & | nx, | |||
| Coefficient & | ny | |||
| ) | [inline] |
If
is the GCD of x and y, the values of x and y divided by
are assigned to nx and ny, respectively.
x and nx may be the same object and likewise for y and ny. Any other aliasing results in undefined behavior. Definition at line 34 of file math_utilities.inlines.hh.
References exact_div_assign(), gcd_assign(), and PPL_DIRTY_TEMP_COEFFICIENT.
Referenced by Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::MIP_Problem::evaluate_objective_function(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::Box< ITV >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::MIP_Problem::linear_combine(), and Parma_Polyhedra_Library::Linear_Row::linear_combine().
00036 { 00037 PPL_DIRTY_TEMP_COEFFICIENT(gcd); 00038 gcd_assign(gcd, x, y); 00039 exact_div_assign(nx, x, gcd); 00040 exact_div_assign(ny, y, gcd); 00041 }
| dimension_type Parma_Polyhedra_Library::not_a_dimension | ( | ) | [inline] |
Returns a value that does not designate a valid dimension.
Definition at line 33 of file globals.inlines.hh.
Referenced by Parma_Polyhedra_Library::PIP_Problem::clear(), Parma_Polyhedra_Library::PIP_Tree_Node::compatibility_check(), Parma_Polyhedra_Library::PIP_Solution_Node::generate_cut(), Parma_Polyhedra_Library::Polyhedron::map_space_dimensions(), Parma_Polyhedra_Library::Grid::map_space_dimensions(), Parma_Polyhedra_Library::Variable::max_space_dimension(), Parma_Polyhedra_Library::MIP_Problem::merge_split_variable(), Parma_Polyhedra_Library::PIP_Problem::OK(), Parma_Polyhedra_Library::PIP_Problem::operator<<(), Parma_Polyhedra_Library::MIP_Problem::process_pending_constraints(), Parma_Polyhedra_Library::PIP_Solution_Node::row_sign(), Parma_Polyhedra_Library::PIP_Solution_Node::solve(), and Parma_Polyhedra_Library::PIP_Solution_Node::update_tableau().
| T Parma_Polyhedra_Library::not_a_number | ( | ) | [inline] |
Definition at line 814 of file Checked_Number.inlines.hh.
References NOT_A_NUMBER.
00814 { 00815 return NOT_A_NUMBER; 00816 }
| Enable_If<Is_Native_Or_Checked<T1>::value && Is_Native_Or_Checked<T2>::value, bool>::type Parma_Polyhedra_Library::not_equal | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
| Enable_If< Is_Native_Or_Checked< T >::value, void >::type Parma_Polyhedra_Library::numer_denom | ( | const T & | from, | |
| Coefficient & | num, | |||
| Coefficient & | den | |||
| ) | [inline] |
Extract the numerator and denominator components of from.
Definition at line 52 of file math_utilities.inlines.hh.
References assign_r(), is_minus_infinity(), is_not_a_number(), and is_plus_infinity().
Referenced by Parma_Polyhedra_Library::BD_Shape< T >::BFT00_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Octagonal_Shape< T >::constraints(), Parma_Polyhedra_Library::BD_Shape< T >::constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::Octagonal_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), and Parma_Polyhedra_Library::BD_Shape< T >::relation_with().
00053 { 00054 PPL_ASSERT(!is_not_a_number(from) 00055 && !is_minus_infinity(from) 00056 && !is_plus_infinity(from)); 00057 PPL_DIRTY_TEMP0(mpq_class, q); 00058 assign_r(q, from, ROUND_NOT_NEEDED); 00059 num = q.get_num(); 00060 den = q.get_den(); 00061 }
| bool Parma_Polyhedra_Library::one_affine_ranking_function_MS | ( | const PSET & | pset, | |
| Generator & | mu | |||
| ) | [inline] |
Termination test with witness ranking function using an improvement of the method by Mesnard and Serebrenik [BMPZ10].
| PSET | Any pointset supported by the PPL that provides the minimized_constraints() method. |
| pset | A pointset approximating the behavior of a loop whose termination is being analyzed. The variables indices are allocated as follows:
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 | When true is returned, this is assigned a point of space dimension encoding one (not further specified) affine ranking function for the loop being analyzed. The ranking function is of the form where are the coefficients of mu corresponding to the space dimensions , respectively. |
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 259 of file termination.templates.hh.
References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation().
Referenced by one_affine_ranking_function_MS_2().
00259 { 00260 const dimension_type space_dim = pset.space_dimension(); 00261 if (space_dim % 2 != 0) { 00262 std::ostringstream s; 00263 s << "PPL::one_affine_ranking_function_MS(pset, mu):\n" 00264 "pset.space_dimension() == " << space_dim 00265 << " is odd."; 00266 throw std::invalid_argument(s.str()); 00267 } 00268 00269 using namespace Implementation::Termination; 00270 Constraint_System cs; 00271 assign_all_inequalities_approximation(pset, cs); 00272 return one_affine_ranking_function_MS(cs, mu); 00273 }
| bool Parma_Polyhedra_Library::one_affine_ranking_function_MS_2 | ( | const PSET & | pset_before, | |
| const PSET & | pset_after, | |||
| Generator & | mu | |||
| ) | [inline] |
Termination test with witness ranking function using an improvement of the method by Mesnard and Serebrenik [BMPZ10].
| PSET | Any pointset supported by the PPL that provides the minimized_constraints() method. |
| pset_before | A 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:
| |
| pset_after | A 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:
|
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.
| mu | When true is returned, this is assigned a point of space dimension encoding one (not further specified) affine ranking function for the loop being analyzed. The ranking function is of the form where are the coefficients of mu corresponding to the space dimensions , respectively. |
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 277 of file termination.templates.hh.
References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and one_affine_ranking_function_MS().
00279 { 00280 const dimension_type before_space_dim = pset_before.space_dimension(); 00281 const dimension_type after_space_dim = pset_after.space_dimension(); 00282 if (after_space_dim != 2*before_space_dim) { 00283 std::ostringstream s; 00284 s << "PPL::one_affine_ranking_function_MS_2(pset_before, pset_after, mu):\n" 00285 "pset_before.space_dimension() == " << before_space_dim 00286 << ", pset_after.space_dimension() == " << after_space_dim 00287 << ";\nthe latter should be twice the former."; 00288 throw std::invalid_argument(s.str()); 00289 } 00290 00291 using namespace Implementation::Termination; 00292 Constraint_System cs; 00293 assign_all_inequalities_approximation(pset_before, pset_after, cs); 00294 return one_affine_ranking_function_MS(cs, mu); 00295 }
| bool Parma_Polyhedra_Library::one_affine_ranking_function_PR | ( | const PSET & | pset, | |
| Generator & | mu | |||
| ) | [inline] |
Like one_affine_ranking_function_MS() but using 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_original().
Referenced by one_affine_ranking_function_PR_2().
00476 { 00477 const dimension_type space_dim = pset_after.space_dimension(); 00478 if (space_dim % 2 != 0) { 00479 std::ostringstream s; 00480 s << "PPL::one_affine_ranking_function_PR(pset, mu):\n" 00481 << "pset.space_dimension() == " << space_dim 00482 << " is odd."; 00483 throw std::invalid_argument(s.str()); 00484 } 00485 00486 using namespace Implementation::Termination; 00487 Constraint_System cs; 00488 assign_all_inequalities_approximation(pset_after, cs); 00489 return one_affine_ranking_function_PR_original(cs, mu); 00490 }
| bool Parma_Polyhedra_Library::one_affine_ranking_function_PR_2 | ( | const PSET & | pset_before, | |
| const PSET & | pset_after, | |||
| Generator & | mu | |||
| ) | [inline] |
Like one_affine_ranking_function_MS_2() but using an alternative formalization of the method by Podelski and Rybalchenko [BMPZ10].
Definition at line 451 of file termination.templates.hh.
References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and one_affine_ranking_function_PR().
00453 { 00454 const dimension_type before_space_dim = pset_before.space_dimension(); 00455 const dimension_type after_space_dim = pset_after.space_dimension(); 00456 if (after_space_dim != 2*before_space_dim) { 00457 std::ostringstream s; 00458 s << "PPL::one_affine_ranking_function_PR_2" 00459 << "(pset_before, pset_after, mu):\n" 00460 << "pset_before.space_dimension() == " << before_space_dim 00461 << ", pset_after.space_dimension() == " << after_space_dim 00462 << ";\nthe latter should be twice the former."; 00463 throw std::invalid_argument(s.str()); 00464 } 00465 00466 using namespace Implementation::Termination; 00467 Constraint_System cs_before; 00468 Constraint_System cs_after; 00469 assign_all_inequalities_approximation(pset_before, cs_before); 00470 assign_all_inequalities_approximation(pset_after, cs_after); 00471 return one_affine_ranking_function_PR(cs_before, cs_after, mu); 00472 }
| bool Parma_Polyhedra_Library::operator!= | ( | const Box< ITV > & | x, | |
| const Box< ITV > & | y | |||
| ) | [related] |
Definition at line 254 of file Box.inlines.hh.
| Enable_If<((Is_Singleton<T1>::value || Is_Interval<T1>::value) && (Is_Singleton<T2>::value || Is_Interval<T2>::value) && (Is_Interval<T1>::value || Is_Interval<T2>::value)), bool>::type Parma_Polyhedra_Library::operator!= | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [related] |
Definition at line 183 of file Interval.inlines.hh.
| Interval<B, Info> Parma_Polyhedra_Library::operator* | ( | const Interval< B, Info > & | x, | |
| const Interval< B, Info > & | y | |||
| ) | [inline] |
Definition at line 1035 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign().
| Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator* | ( | const T & | x, | |
| const Interval< B, Info > & | y | |||
| ) | [inline] |
Definition at line 1027 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign().
| Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator* | ( | const Interval< B, Info > & | x, | |
| const T & | y | |||
| ) | [inline] |
Definition at line 1019 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign().
| Interval<B, Info> Parma_Polyhedra_Library::operator+ | ( | const Interval< B, Info > & | x, | |
| const Interval< B, Info > & | y | |||
| ) | [inline] |
Definition at line 987 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign().
| Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator+ | ( | const T & | x, | |
| const Interval< B, Info > & | y | |||
| ) | [inline] |
Definition at line 979 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign().
| Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator+ | ( | const Interval< B, Info > & | x, | |
| const T & | y | |||
| ) | [inline] |
Definition at line 971 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign().
| Interval<B, Info> Parma_Polyhedra_Library::operator- | ( | const Interval< B, Info > & | x, | |
| const Interval< B, Info > & | y | |||
| ) | [inline] |
Definition at line 1011 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
| Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator- | ( | const T & | x, | |
| const Interval< B, Info > & | y | |||
| ) | [inline] |
Definition at line 1003 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
| Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator- | ( | const Interval< B, Info > & | x, | |
| const T & | y | |||
| ) | [inline] |
Definition at line 995 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
| Interval<B, Info> Parma_Polyhedra_Library::operator/ | ( | const Interval< B, Info > & | x, | |
| const Interval< B, Info > & | y | |||
| ) | [inline] |
Definition at line 1059 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign().
| Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator/ | ( | const T & | x, | |
| const Interval< B, Info > & | y | |||
| ) | [inline] |
Definition at line 1051 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign().
| Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator/ | ( | const Interval< B, Info > & | x, | |
| const T & | y | |||
| ) | [inline] |
Definition at line 1043 of file Interval.inlines.hh.
References Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign().
| std::ostream& Parma_Polyhedra_Library::operator<< | ( | std::ostream & | os, | |
| const Interval< Boundary, Info > & | x | |||
| ) | [inline] |
Definition at line 1067 of file Interval.inlines.hh.
References check_empty_arg(), and output_restriction().
01067 { 01068 // PPL_ASSERT(x.OK()); 01069 if (check_empty_arg(x)) 01070 return os << "[]"; 01071 if (x.is_singleton()) { 01072 output(os, x.lower(), Numeric_Format(), ROUND_NOT_NEEDED); 01073 return os; 01074 } 01075 os << (x.lower_is_open() ? "(" : "["); 01076 if (x.info().get_boundary_property(LOWER, SPECIAL)) 01077 os << "-inf"; 01078 else 01079 output(os, x.lower(), Numeric_Format(), ROUND_NOT_NEEDED); 01080 os << ", "; 01081 if (x.info().get_boundary_property(UPPER, SPECIAL)) 01082 os << "+inf"; 01083 else 01084 output(os, x.upper(), Numeric_Format(), ROUND_NOT_NEEDED); 01085 os << (x.upper_is_open() ? ")" : "]"); 01086 output_restriction(os, x.info()); 01087 return os; 01088 }
| bool Parma_Polyhedra_Library::operator== | ( | const Box< ITV > & | x, | |
| const Box< ITV > & | y | |||
| ) | [inline] |
Definition at line 533 of file Box.templates.hh.
References Parma_Polyhedra_Library::Box< ITV >::is_empty(), Parma_Polyhedra_Library::Box< ITV >::seq, and Parma_Polyhedra_Library::Box< ITV >::space_dimension().
00533 { 00534 const dimension_type x_space_dim = x.space_dimension(); 00535 if (x_space_dim != y.space_dimension()) 00536 return false; 00537 00538 if (x.is_empty()) 00539 return y.is_empty(); 00540 00541 if (y.is_empty()) 00542 return x.is_empty(); 00543 00544 for (dimension_type k = x_space_dim; k-- > 0; ) 00545 if (x.seq[k] != y.seq[k]) 00546 return false; 00547 return true; 00548 }
| Enable_If<((Is_Singleton<T1>::value || Is_Interval<T1>::value) && (Is_Singleton<T2>::value || Is_Interval<T2>::value) && (Is_Interval<T1>::value || Is_Interval<T2>::value)), bool>::type Parma_Polyhedra_Library::operator== | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [related] |
Definition at line 164 of file Interval.inlines.hh.
References check_empty_arg(), Parma_Polyhedra_Library::Checked::eq, eq_restriction(), Parma_Polyhedra_Library::Interval_NS::f_info(), Parma_Polyhedra_Library::Interval_NS::f_lower(), f_OK(), and Parma_Polyhedra_Library::Interval_NS::f_upper().
Referenced by Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator!=().
00164 { 00165 PPL_ASSERT(f_OK(x)); 00166 PPL_ASSERT(f_OK(y)); 00167 if (check_empty_arg(x)) 00168 return check_empty_arg(y); 00169 else if (check_empty_arg(y)) 00170 return false; 00171 // FIXME: the two restrictions should be evaluated in the context of 00172 // the specific interval 00173 return eq_restriction(f_info(x), f_info(y)) 00174 && eq(LOWER, f_lower(x), f_info(x), LOWER, f_lower(y), f_info(y)) 00175 && eq(UPPER, f_upper(x), f_info(x), UPPER, f_upper(y), f_info(y)); 00176 }
| void Parma_Polyhedra_Library::output_restriction | ( | std::ostream & | s, | |
| const Interval_Restriction_Integer_Modulo< T, Base > & | x | |||
| ) | [inline] |
| void Parma_Polyhedra_Library::output_restriction | ( | std::ostream & | s, | |
| const Interval_Restriction_Integer< Base > & | x | |||
| ) | [inline] |
Definition at line 310 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::get_integer().
| void Parma_Polyhedra_Library::output_restriction | ( | std::ostream & | , | |
| const Interval_Restriction_None_Base & | ||||
| ) | [inline] |
Definition at line 127 of file Interval_Restriction.defs.hh.
Referenced by operator<<().
| T Parma_Polyhedra_Library::plus_infinity | ( | ) | [inline] |
Definition at line 802 of file Checked_Number.inlines.hh.
References PLUS_INFINITY.
00802 { 00803 return PLUS_INFINITY; 00804 }
| mpz_class& Parma_Polyhedra_Library::raw_value | ( | GMP_Integer & | x | ) | [related] |
Definition at line 116 of file GMP_Integer.inlines.hh.
| const mpz_class& Parma_Polyhedra_Library::raw_value | ( | const GMP_Integer & | x | ) | [related] |
Definition at line 111 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::Checked_Number< T, Policy >::assign_r(), assign_r(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::cmp(), construct(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::input(), is_integer(), is_minus_infinity(), is_not_a_number(), is_plus_infinity(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::output(), Parma_Polyhedra_Library::Native_Checked_To_Wrapper< Checked_Number< T, P > >::raw_value(), Parma_Polyhedra_Library::Native_Checked_To_Wrapper< T, typename Enable_If< Is_Native< T >::value >::type >::raw_value(), Parma_Polyhedra_Library::Native_Checked_From_Wrapper< Checked_Number< T, P > >::raw_value(), Parma_Polyhedra_Library::Native_Checked_From_Wrapper< T, typename Enable_If< Is_Native< T >::value >::type >::raw_value(), and Parma_Polyhedra_Library::Checked_Number< T, Policy >::sgn().
| void Parma_Polyhedra_Library::rem_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y, | |||
| const GMP_Integer & | z | |||
| ) | [related] |
Definition at line 57 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PSET >::approximate_partition_aux().
| void Parma_Polyhedra_Library::restore_pre_PPL_rounding | ( | ) | [inline] |
Sets the FPU rounding mode as it was before initialization of the PPL.
After calling this function it is absolutely necessary to call set_rounding_for_PPL() before using any PPL abstractions based on floating point numbers. This is performed automatically at finalization-time.
Definition at line 40 of file Init.inlines.hh.
References Parma_Polyhedra_Library::Init::old_rounding_direction.
| Rounding_Dir Parma_Polyhedra_Library::rounding_dir | ( | Rounding_Dir | dir | ) | [inline] |
Definition at line 38 of file Checked_Number.inlines.hh.
Referenced by Parma_Polyhedra_Library::Checked_Number< T, Policy >::assign_r(), assign_r(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::Checked_Number(), construct(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::input(), and Parma_Polyhedra_Library::Checked_Number< T, Policy >::output().
| bool Parma_Polyhedra_Library::set_integer | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to | ) | [inline] |
Definition at line 512 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::divisor, and Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::remainder.
Referenced by add_restriction(), intersect_restriction(), join_restriction(), mul_restriction(), and sub_restriction().
| void Parma_Polyhedra_Library::set_irrational_precision | ( | const unsigned | p | ) | [inline] |
Sets the precision parameter used for irrational calculations.
The lesser between numerator and denominator is limited to 2**p.
If p is less than or equal to INT_MAX, sets the precision parameter used for irrational calculations to p.
| std::invalid_argument | Thrown if p is greater than INT_MAX. |
Definition at line 548 of file checked_mpq.inlines.hh.
References Parma_Polyhedra_Library::Checked::irrational_precision.
Referenced by Parma_Polyhedra_Library::Init::Init().
00548 { 00549 if (p <= INT_MAX) 00550 Checked::irrational_precision = p; 00551 else 00552 throw std::invalid_argument("PPL::set_irrational_precision(p)" 00553 " with p > INT_MAX"); 00554 }
| void Parma_Polyhedra_Library::set_rounding_for_PPL | ( | ) | [inline] |
Sets the FPU rounding mode so that the PPL abstractions based on floating point numbers work correctly.
This is performed automatically at initialization-time. Calling this function is needed only if restore_pre_PPL_rounding() has been previously called.
Definition at line 33 of file Init.inlines.hh.
| bool Parma_Polyhedra_Library::set_unrestricted | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to | ) | [inline] |
Definition at line 504 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::divisor, and Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::remainder.
Referenced by add_restriction(), div_restriction(), join_restriction(), mul_restriction(), and sub_restriction().
| bool Parma_Polyhedra_Library::shrink_to_congruence_no_check | ( | D1 & | d1, | |
| D2 & | d2, | |||
| const Congruence & | cg | |||
| ) | [inline] |
Definition at line 497 of file Partially_Reduced_Product.templates.hh.
References Parma_Polyhedra_Library::Congruence::coefficient(), EMPTY, Parma_Polyhedra_Library::Congruence::inhomogeneous_term(), Parma_Polyhedra_Library::Poly_Con_Relation::is_included(), Parma_Polyhedra_Library::Congruence::modulus(), PPL_DIRTY_TEMP_COEFFICIENT, Parma_Polyhedra_Library::Congruence::space_dimension(), and swap().
Referenced by Parma_Polyhedra_Library::Congruences_Reduction< D1, D2 >::product_reduce().
00497 { 00498 // It is assumed that cg is a proper congruence. 00499 PPL_ASSERT(cg.modulus() != 0); 00500 // It is assumed that cg is satisfied by all points in d1. 00501 PPL_ASSERT(d1.relation_with(cg) == Poly_Con_Relation::is_included()); 00502 00503 // Build the linear expression for the congruence cg. 00504 Linear_Expression e; 00505 for (dimension_type i = cg.space_dimension(); i-- > 0; ) 00506 e += cg.coefficient(Variable(i)) * Variable(i); 00507 e += cg.inhomogeneous_term(); 00508 00509 // Find the maximum and minimum bounds for the domain element d with the 00510 // linear expression e. 00511 PPL_DIRTY_TEMP_COEFFICIENT(max_num); 00512 PPL_DIRTY_TEMP_COEFFICIENT(max_den); 00513 bool max_included; 00514 PPL_DIRTY_TEMP_COEFFICIENT(min_num); 00515 PPL_DIRTY_TEMP_COEFFICIENT(min_den); 00516 bool min_included; 00517 if (d2.maximize(e, max_num, max_den, max_included)) { 00518 if (d2.minimize(e, min_num, min_den, min_included)) { 00519 // Adjust values to allow for the denominators max_den and min_den. 00520 max_num *= min_den; 00521 min_num *= max_den; 00522 PPL_DIRTY_TEMP_COEFFICIENT(den); 00523 PPL_DIRTY_TEMP_COEFFICIENT(mod); 00524 den = max_den * min_den; 00525 mod = cg.modulus() * den; 00526 // If the difference between the maximum and minimum bounds is more than 00527 // twice the modulus, then there will be two neighboring hyperplanes 00528 // defined by cg that are intersected by the domain element d; 00529 // there is no possible reduction in this case. 00530 PPL_DIRTY_TEMP_COEFFICIENT(mod2); 00531 mod2 = 2 * mod; 00532 if (max_num - min_num < mod2 00533 || (max_num - min_num == mod2 && (!max_included || !min_included))) 00534 { 00535 PPL_DIRTY_TEMP_COEFFICIENT(shrink_amount); 00536 PPL_DIRTY_TEMP_COEFFICIENT(max_decreased); 00537 PPL_DIRTY_TEMP_COEFFICIENT(min_increased); 00538 // Find the amount by which the maximum value may be decreased. 00539 shrink_amount = max_num % mod; 00540 if (!max_included && shrink_amount == 0) 00541 shrink_amount = mod; 00542 if (shrink_amount < 0) 00543 shrink_amount += mod; 00544 max_decreased = max_num - shrink_amount; 00545 // Find the amount by which the minimum value may be increased. 00546 shrink_amount = min_num % mod; 00547 if (!min_included && shrink_amount == 0) 00548 shrink_amount = - mod; 00549 if (shrink_amount > 0) 00550 shrink_amount -= mod; 00551 min_increased = min_num - shrink_amount; 00552 if (max_decreased == min_increased) { 00553 // The domain element d2 intersects exactly one hyperplane 00554 // defined by cg, so add the equality to d1 and d2. 00555 Constraint new_c(den * e == min_increased); 00556 d1.refine_with_constraint(new_c); 00557 d2.refine_with_constraint(new_c); 00558 return true; 00559 } 00560 else { 00561 if (max_decreased < min_increased) { 00562 // In this case, d intersects no hyperplanes defined by cg, 00563 // so set d to empty and return false. 00564 D1 new_d1(d1.space_dimension(), EMPTY); 00565 std::swap(d1, new_d1); 00566 D2 new_d2(d2.space_dimension(), EMPTY); 00567 std::swap(d2, new_d2); 00568 return false; 00569 } 00570 } 00571 } 00572 } 00573 } 00574 return true; 00575 }
| void Parma_Polyhedra_Library::sqrt_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y | |||
| ) | [related] |
Definition at line 101 of file GMP_Integer.inlines.hh.
| void Parma_Polyhedra_Library::sub_mul_assign | ( | GMP_Integer & | x, | |
| const GMP_Integer & | y, | |||
| const GMP_Integer & | z | |||
| ) | [related] |
Definition at line 80 of file GMP_Integer.inlines.hh.
Referenced by Parma_Polyhedra_Library::Polyhedron::BHRZ03_evolving_rays(), Parma_Polyhedra_Library::MIP_Problem::compute_generator(), Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::MIP_Problem::linear_combine(), Parma_Polyhedra_Library::Linear_Row::linear_combine(), Parma_Polyhedra_Library::Grid::reduce_congruence_with_equality(), Parma_Polyhedra_Library::Grid::reduce_equality_with_equality(), Parma_Polyhedra_Library::Grid::reduce_line_with_line(), Parma_Polyhedra_Library::Grid::reduce_parameter_with_line(), Parma_Polyhedra_Library::Grid::reduce_pc_with_pc(), and Parma_Polyhedra_Library::Grid::reduce_reduced().
| bool Parma_Polyhedra_Library::sub_restriction | ( | Interval_Restriction_Integer_Modulo< T, Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 734 of file Interval_Restriction.defs.hh.
References assign_r(), assign_rem(), Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::divisor, Parma_Polyhedra_Library::Interval_NS::f_lower(), Parma_Polyhedra_Library::Interval_Restriction_Integer_Modulo< T, Base >::remainder, Parma_Polyhedra_Library::Checked::Result, set_integer(), set_unrestricted(), and submod().
00734 { 00735 typedef Restriction_Integer_Modulo<From1, T, Base> Rx; 00736 const typename Rx::type& rx = Rx::get(x); 00737 if (rx.divisor == 0) 00738 return set_unrestricted(to); 00739 typedef Restriction_Integer_Modulo<From2, T, Base> Ry; 00740 const typename Ry::type& ry = Ry::get(y); 00741 if (ry.divisor == 0) 00742 return set_unrestricted(to); 00743 Result r; 00744 PPL_DIRTY_TEMP(T, rem); 00745 if (is_singleton(x)) { 00746 if (is_singleton(y)) 00747 return set_integer(to); 00748 if (!assign_rem(rem, f_lower(x), ry.divisor)) 00749 return set_integer(to); 00750 r = assign_r(to.divisor, ry.divisor, ROUND_NOT_NEEDED); 00751 PPL_ASSERT(r == V_EQ); 00752 submod(to.remainder, rem, ry.remainder, to.divisor, ry.divisor); 00753 } 00754 else if (is_singleton(y)) { 00755 if (!assign_rem(rem, f_lower(y), rx.divisor)) 00756 return set_integer(to); 00757 r = assign_r(to.divisor, rx.divisor, ROUND_NOT_NEEDED); 00758 PPL_ASSERT(r == V_EQ); 00759 submod(to.remainder, rx.remainder, rem, to.divisor, to.divisor); 00760 } 00761 else { 00762 r = gcd_assign_r(to.divisor, rx.divisor, ry.divisor, ROUND_NOT_NEEDED); 00763 PPL_ASSERT(r == V_EQ); 00764 submod(to.remainder, rx.remainder, ry.remainder, to.divisor, ry.divisor); 00765 } 00766 return true; 00767 }
| bool Parma_Polyhedra_Library::sub_restriction | ( | Interval_Restriction_Integer< Base > & | to, | |
| const From1 & | x, | |||
| const From2 & | y | |||
| ) | [inline] |
Definition at line 287 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer().
| bool Parma_Polyhedra_Library::sub_restriction | ( | Interval_Restriction_None_Base & | , | |
| const T1 & | , | |||
| const T2 & | ||||
| ) | [inline] |
Definition at line 110 of file Interval_Restriction.defs.hh.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
| void Parma_Polyhedra_Library::submod | ( | T & | to, | |
| const T & | x, | |||
| const T & | y, | |||
| const T & | to_m, | |||
| const T & | y_m | |||
| ) | [inline] |
Definition at line 716 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Checked::Result.
Referenced by sub_restriction().
00716 { 00717 Result r; 00718 if (x >= y) { 00719 r = sub_assign_r(to, x, y, ROUND_NOT_NEEDED); 00720 PPL_ASSERT(r == V_EQ); 00721 } 00722 else { 00723 r = sub_assign_r(to, y_m, y, ROUND_NOT_NEEDED); 00724 PPL_ASSERT(r == V_EQ); 00725 r = add_assign_r(to, x, to, ROUND_NOT_NEEDED); 00726 PPL_ASSERT(r == V_EQ); 00727 } 00728 r = rem_assign_r(to, to, to_m, ROUND_NOT_NEEDED); 00729 PPL_ASSERT(r == V_EQ); 00730 }
| Enable_If<Slow_Copy<T>::value, void>::type Parma_Polyhedra_Library::swap | ( | T & | , | |
| T & | ||||
| ) | [inline] |
Make sure swap() is specialized when needed.
This will cause a compile-time error whenever a specialization for T is beneficial but missing.
Definition at line 51 of file globals.defs.hh.
References PPL_COMPILE_TIME_CHECK.
Referenced by Parma_Polyhedra_Library::Polyhedron::add_recycled_constraints(), Parma_Polyhedra_Library::Polyhedron::add_recycled_generators(), Parma_Polyhedra_Library::Linear_System::add_rows_and_columns(), Parma_Polyhedra_Library::Polyhedron::add_space_dimensions(), Parma_Polyhedra_Library::Congruence_System::add_unit_rows_and_columns(), Parma_Polyhedra_Library::Constraint_System::adjust_topology_and_space_dimension(), Parma_Polyhedra_Library::Grid_Generator::coefficient_swap(), Parma_Polyhedra_Library::PIP_Tree_Node::compatibility_check(), Parma_Polyhedra_Library::Congruence_System::concatenate(), Parma_Polyhedra_Library::Polyhedron::concatenate_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::integer_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Row::iter_swap(), Parma_Polyhedra_Library::Linear_Row::iter_swap(), Parma_Polyhedra_Library::DB_Row< T >::iter_swap(), Parma_Polyhedra_Library::Bit_Row::iter_swap(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::Partially_Reduced_Product(), Parma_Polyhedra_Library::Matrix::permute_columns(), Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >::product_reduce(), Parma_Polyhedra_Library::Smash_Reduction< D1, D2 >::product_reduce(), Parma_Polyhedra_Library::Congruence_System::recycling_insert(), Parma_Polyhedra_Library::Grid::remove_higher_space_dimensions(), Parma_Polyhedra_Library::Generator_System::remove_invalid_lines_and_rays(), shrink_to_congruence_no_check(), Parma_Polyhedra_Library::Linear_System::simplify(), Parma_Polyhedra_Library::Linear_System::sort_and_remove_with_sat(), Parma_Polyhedra_Library::Linear_System::sort_pending_and_remove_duplicates(), Parma_Polyhedra_Library::PIP_Problem::swap(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::swap(), and Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::upper_bound_assign_if_exact().
00051 { 00052 PPL_COMPILE_TIME_CHECK(!Slow_Copy<T>::value, "missing swap specialization"); 00053 }
| bool Parma_Polyhedra_Library::termination_test_MS | ( | const PSET & | pset | ) | [inline] |
Termination test using an improvement of the method by Mesnard and Serebrenik [BMPZ10].
| PSET | Any pointset supported by the PPL that provides the minimized_constraints() method. |
| pset | A pointset approximating the behavior of a loop whose termination is being analyzed. The variables indices are allocated as follows:
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. |
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 221 of file termination.templates.hh.
References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation().
Referenced by termination_test_MS_2().
00221 { 00222 const dimension_type space_dim = pset.space_dimension(); 00223 if (space_dim % 2 != 0) { 00224 std::ostringstream s; 00225 s << "PPL::termination_test_MS(pset):\n" 00226 "pset.space_dimension() == " << space_dim 00227 << " is odd."; 00228 throw std::invalid_argument(s.str()); 00229 } 00230 00231 using namespace Implementation::Termination; 00232 Constraint_System cs; 00233 assign_all_inequalities_approximation(pset, cs); 00234 return termination_test_MS(cs); 00235 }
| bool Parma_Polyhedra_Library::termination_test_MS_2 | ( | const PSET & | pset_before, | |
| const PSET & | pset_after | |||
| ) | [inline] |
Termination test using an improvement of the method by Mesnard and Serebrenik [BMPZ10].
| PSET | Any pointset supported by the PPL that provides the minimized_constraints() method. |
| pset_before | A 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:
| |
| pset_after | A 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:
|
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.
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 239 of file termination.templates.hh.
References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and termination_test_MS().
00239 { 00240 const dimension_type before_space_dim = pset_before.space_dimension(); 00241 const dimension_type after_space_dim = pset_after.space_dimension(); 00242 if (after_space_dim != 2*before_space_dim) { 00243 std::ostringstream s; 00244 s << "PPL::termination_test_MS_2(pset_before, pset_after):\n" 00245 "pset_before.space_dimension() == " << before_space_dim 00246 << ", pset_after.space_dimension() == " << after_space_dim 00247 << ";\nthe latter should be twice the former."; 00248 throw std::invalid_argument(s.str()); 00249 } 00250 00251 using namespace Implementation::Termination; 00252 Constraint_System cs; 00253 assign_all_inequalities_approximation(pset_before, pset_after, cs); 00254 return termination_test_MS(cs); 00255 }
| bool Parma_Polyhedra_Library::termination_test_PR | ( | const PSET & | pset | ) | [inline] |
Like termination_test_MS() but using the method by Podelski and Rybalchenko [BMPZ10].
Definition at line 433 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().
Referenced by termination_test_PR_2().
00433 { 00434 const dimension_type space_dim = pset_after.space_dimension(); 00435 if (space_dim % 2 != 0) { 00436 std::ostringstream s; 00437 s << "PPL::termination_test_PR(pset):\n" 00438 << "pset.space_dimension() == " << space_dim 00439 << " is odd."; 00440 throw std::invalid_argument(s.str()); 00441 } 00442 00443 using namespace Implementation::Termination; 00444 Constraint_System cs; 00445 assign_all_inequalities_approximation(pset_after, cs); 00446 return termination_test_PR_original(cs); 00447 }
| bool Parma_Polyhedra_Library::termination_test_PR_2 | ( | const PSET & | pset_before, | |
| const PSET & | pset_after | |||
| ) | [inline] |
Like termination_test_MS_2() but using an alternative formalization of the method by Podelski and Rybalchenko [BMPZ10].
Definition at line 411 of file termination.templates.hh.
References Parma_Polyhedra_Library::Implementation::Termination::assign_all_inequalities_approximation(), and termination_test_PR().
00411 { 00412 const dimension_type before_space_dim = pset_before.space_dimension(); 00413 const dimension_type after_space_dim = pset_after.space_dimension(); 00414 if (after_space_dim != 2*before_space_dim) { 00415 std::ostringstream s; 00416 s << "PPL::termination_test_PR_2(pset_before, pset_after):\n" 00417 << "pset_before.space_dimension() == " << before_space_dim 00418 << ", pset_after.space_dimension() == " << after_space_dim 00419 << ";\nthe latter should be twice the former."; 00420 throw std::invalid_argument(s.str()); 00421 } 00422 00423 using namespace Implementation::Termination; 00424 Constraint_System cs_before; 00425 Constraint_System cs_after; 00426 assign_all_inequalities_approximation(pset_before, cs_before); 00427 assign_all_inequalities_approximation(pset_after, cs_after); 00428 return termination_test_PR(cs_before, cs_after); 00429 }
| void Parma_Polyhedra_Library::throw_result_exception | ( | Result | r | ) |
Definition at line 30 of file Checked_Number.cc.
Referenced by Parma_Polyhedra_Library::Extended_Number_Policy::handle_result().
00030 { 00031 switch (r - V_UNREPRESENTABLE) { 00032 case V_EMPTY: 00033 throw std::domain_error("Exact result is not comparable to computable one."); 00034 case V_EQ: 00035 throw std::logic_error("Exact result is equal to computed one."); 00036 case V_LT: 00037 throw std::logic_error("Exact result is less than computed one."); 00038 case V_LE: 00039 throw std::logic_error("Exact result is less than or equal to " 00040 "computed one."); 00041 case V_GT: 00042 throw std::logic_error("Exact result is greater than computed one."); 00043 case V_GE: 00044 throw std::logic_error("Exact result is greater than or equal to " 00045 "computed one."); 00046 case V_NE: 00047 throw std::logic_error("Exact result is less than or greater than " 00048 "computed one."); 00049 case V_LGE: 00050 throw std::logic_error("Exact result is less than, greater than or " 00051 "equal to computed one."); 00052 case V_EQ_MINUS_INFINITY: 00053 throw std::overflow_error("Minus infinity."); 00054 case V_GT_MINUS_INFINITY: 00055 case V_LT_INF: 00056 throw std::overflow_error("Negative overflow."); 00057 case V_UNKNOWN_NEG_OVERFLOW: 00058 throw std::overflow_error("Unknown result due to intermediate negative overflow."); 00059 case V_EQ_PLUS_INFINITY: 00060 throw std::overflow_error("Plus infinity."); 00061 case V_LT_PLUS_INFINITY: 00062 case V_GT_SUP: 00063 throw std::overflow_error("Positive overflow."); 00064 case V_UNKNOWN_POS_OVERFLOW: 00065 throw std::overflow_error("Unknown result due to intermediate positive overflow."); 00066 case V_NAN: 00067 throw std::domain_error("Not-a-Number."); 00068 case V_CVT_STR_UNK: 00069 throw std::domain_error("Invalid numeric string."); 00070 case V_DIV_ZERO: 00071 throw std::domain_error("Division by zero."); 00072 case V_INF_ADD_INF: 00073 throw std::domain_error("Infinities addition."); 00074 case V_INF_DIV_INF: 00075 throw std::domain_error("Infinities division."); 00076 case V_INF_MOD: 00077 throw std::domain_error("Remainder of division of infinity."); 00078 case V_INF_MUL_ZERO: 00079 throw std::domain_error("Multiplication of infinity and zero."); 00080 case V_INF_SUB_INF: 00081 throw std::domain_error("Subtraction of infinities."); 00082 case V_MOD_ZERO: 00083 throw std::domain_error("Remainder of division by zero."); 00084 case V_SQRT_NEG: 00085 throw std::domain_error("Square root of negative number."); 00086 default: 00087 throw std::logic_error("Unexpected result."); 00088 } 00089 }
| memory_size_type Parma_Polyhedra_Library::total_memory_in_bytes | ( | const mpq_class & | x | ) | [inline] |
Returns the total size in bytes of the memory occupied by x.
Definition at line 113 of file globals.inlines.hh.
References external_memory_in_bytes().
00113 { 00114 return sizeof(x) + external_memory_in_bytes(x); 00115 }
| memory_size_type Parma_Polyhedra_Library::total_memory_in_bytes | ( | const mpz_class & | x | ) | [inline] |
Returns the total size in bytes of the memory occupied by x.
Definition at line 102 of file globals.inlines.hh.
References external_memory_in_bytes().
00102 { 00103 return sizeof(x) + external_memory_in_bytes(x); 00104 }
| Enable_If< Is_Native< T >::value, memory_size_type >::type Parma_Polyhedra_Library::total_memory_in_bytes | ( | const T & | ) | [inline] |
For native types, returns the total size in bytes of the memory occupied by the type of the (unused) parameter, i.e., 0.
Definition at line 92 of file globals.inlines.hh.
| memory_size_type Parma_Polyhedra_Library::total_memory_in_bytes | ( | const GMP_Integer & | x | ) |
| const char * Parma_Polyhedra_Library::version | ( | ) |
Returns a character string containing the PPL version.
Definition at line 99 of file version.cc.
| unsigned Parma_Polyhedra_Library::version_beta | ( | ) |
Returns the beta number of the PPL version.
Definition at line 94 of file version.cc.
References PPL_VERSION_BETA.
00094 { 00095 return PPL_VERSION_BETA; 00096 }
| unsigned Parma_Polyhedra_Library::version_major | ( | ) |
Returns the major number of the PPL version.
Definition at line 79 of file version.cc.
References PPL_VERSION_MAJOR.
00079 { 00080 return PPL_VERSION_MAJOR; 00081 }
| unsigned Parma_Polyhedra_Library::version_minor | ( | ) |
Returns the minor number of the PPL version.
Definition at line 84 of file version.cc.
References PPL_VERSION_MINOR.
00084 { 00085 return PPL_VERSION_MINOR; 00086 }
| unsigned Parma_Polyhedra_Library::version_revision | ( | ) |
Returns the revision number of the PPL version.
Definition at line 89 of file version.cc.
References PPL_VERSION_REVISION.
00089 { 00090 return PPL_VERSION_REVISION; 00091 }
Definition at line 30 of file checked.cc.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), minus_infinity(), Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
Definition at line 32 of file checked.cc.
Referenced by not_a_number().
Definition at line 31 of file checked.cc.
Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), Parma_Polyhedra_Library::BD_Shape< T >::BD_Shape(), Parma_Polyhedra_Library::Octagonal_Shape< T >::BHMZ05_widening_assign(), Parma_Polyhedra_Library::BD_Shape< T >::BHMZ05_widening_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::CC76_extrapolation_assign(), Parma_Polyhedra_Library::BD_Shape< T >::CC76_extrapolation_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::euclidean_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::euclidean_distance_assign(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::expand_within_capacity(), Parma_Polyhedra_Library::BD_Shape< T >::forget_all_dbm_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::forget_all_octagonal_constraints(), Parma_Polyhedra_Library::BD_Shape< T >::forget_binary_dbm_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::forget_binary_octagonal_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::incremental_shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::incremental_strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_strongly_reduced(), Parma_Polyhedra_Library::Octagonal_Shape< T >::l_infinity_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::l_infinity_distance_assign(), Parma_Polyhedra_Library::OR_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Box< ITV >::l_m_distance_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::Octagonal_Shape(), plus_infinity(), Parma_Polyhedra_Library::Octagonal_Shape< T >::rectilinear_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::rectilinear_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_reduction_assign(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().
1.6.3