PPL 0.12
Parma_Polyhedra_Library::Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format > Class Template Reference

A generic Multiplication Floating Point Expression. More...

#include <ppl.hh>

Inheritance diagram for Parma_Polyhedra_Library::Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format >:

List of all members.

Public Types

typedef
Floating_Point_Expression
< FP_Interval_Type, FP_Format >
::FP_Linear_Form 
FP_Linear_Form
 Alias for the Linear_Form<FP_Interval_Type> from Floating_Point_Expression.
typedef
Floating_Point_Expression
< FP_Interval_Type, FP_Format >
::FP_Interval_Abstract_Store 
FP_Interval_Abstract_Store
 Alias for the Box<FP_Interval_Type> from Floating_Point_Expression.
typedef
Floating_Point_Expression
< FP_Interval_Type, FP_Format >
::FP_Linear_Form_Abstract_Store 
FP_Linear_Form_Abstract_Store
 Alias for the std::map<dimension_type, FP_Linear_Form> from Floating_Point_Expression.
typedef
Floating_Point_Expression
< FP_Interval_Type, FP_Format >
::boundary_type 
boundary_type
 Alias for the FP_Interval_Type::boundary_type from Floating_Point_Expression.
typedef
Floating_Point_Expression
< FP_Interval_Type, FP_Format >
::info_type 
info_type
 Alias for the FP_Interval_Type::info_type from Floating_Point_Expression.

Public Member Functions

bool linearize (const FP_Interval_Abstract_Store &int_store, const FP_Linear_Form_Abstract_Store &lf_store, FP_Linear_Form &result) const
 Linearizes the expression in a given astract store.
void m_swap (Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format > &y)
 Swaps *this with y.
Constructors and Destructor
 Multiplication_Floating_Point_Expression (Floating_Point_Expression< FP_Interval_Type, FP_Format > *const x, Floating_Point_Expression< FP_Interval_Type, FP_Format > *const y)
 Constructor with two parameters: builds the multiplication floating point expression corresponding to x $\otimes$ y.
 ~Multiplication_Floating_Point_Expression ()
 Destructor.

Related Functions

(Note that these are not member functions.)

template<typename FP_Interval_Type , typename FP_Format >
void swap (Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format > &x, Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format > &y)
 Swaps x with y.

Detailed Description

template<typename FP_Interval_Type, typename FP_Format>
class Parma_Polyhedra_Library::Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format >

A generic Multiplication Floating Point Expression.

Template type parameters
  • The class template type parameter FP_Interval_Type represents the type of the intervals used in the abstract domain.
  • The class template type parameter FP_Format represents the floating point format used in the concrete domain.
Linearization of multiplication floating-point expressions

Let $i + \sum_{v \in \cV}i_{v}v $ and $i' + \sum_{v \in \cV}i'_{v}v $ be two linear forms, $\aslf$ and $\amlf$ two sound abstract operators on linear forms such that:

\[ \left(i + \sum_{v \in \cV}i_{v}v\right) \aslf \left(i' + \sum_{v \in \cV}i'_{v}v\right) = \left(i \asifp i'\right) + \sum_{v \in \cV}\left(i_{v} \asifp i'_{v}\right)v, \]

\[ i \amlf \left(i' + \sum_{v \in \cV}i'_{v}v\right) = \left(i \amifp i'\right) + \sum_{v \in \cV}\left(i \amifp i'_{v}\right)v. \]

Given an expression $[a;b] \otimes e_{2}$ and a composite abstract store $\left \llbracket \rho^{\#}, \rho^{\#}_l \right \rrbracket$, we construct the interval linear form $\linexprenv{[a;b] \otimes e_{2}}{\rho^{\#}}{\rho^{\#}_l}$ as follows:

\[ \linexprenv{[a;b] \otimes e_{2}}{\rho^{\#}}{\rho^{\#}_l} = \left([a;b] \amlf \linexprenv{e_{2}}{\rho^{\#}}{\rho^{\#}_l}\right) \aslf \left([a;b] \amlf \varepsilon_{\mathbf{f}}\left(\linexprenv{e_{2}}{\rho^{\#}}{\rho^{\#}_l} \right)\right) \aslf mf_{\mathbf{f}}[-1;1]. \]

.

Given an expression $e_{1} \otimes [a;b]$ and a composite abstract store $\left \llbracket \rho^{\#}, \rho^{\#}_l \right \rrbracket$, we construct the interval linear form $\linexprenv{e_{1} \otimes [a;b]}{\rho^{\#}}{\rho^{\#}_l}$ as follows:

\[ \linexprenv{e_{1} \otimes [a;b]}{\rho^{\#}}{\rho^{\#}_l} = \linexprenv{[a;b] \otimes e_{1}}{\rho^{\#}}{\rho^{\#}_l}. \]

Given an expression $e_{1} \otimes e_{2}$ and a composite abstract store $\left \llbracket \rho^{\#}, \rho^{\#}_l \right \rrbracket$, we construct the interval linear form $\linexprenv{e_{1} \otimes e_{2}}{\rho^{\#}}{\rho^{\#}_l}$ as follows:

\[ \linexprenv{e_{1} \otimes e_{2}}{\rho^{\#}}{\rho^{\#}_l} = \linexprenv{\iota\left(\linexprenv{e_{1}}{\rho^{\#}}{\rho^{\#}_l} \right)\rho^{\#} \otimes e_{2}}{\rho^{\#}}{\rho^{\#}_l}, \]

where $\varepsilon_{\mathbf{f}}(l)$ is the linear form computed by calling method Floating_Point_Expression::relative_error on $l$, $\iota(l)\rho^{\#}$ is the linear form computed by calling method Floating_Point_Expression::intervalize on $l$ and $\rho^{\#}$, and $mf_{\mathbf{f}}$ is a rounding error defined in Floating_Point_Expression::absolute_error.

Even though we intervalize the first operand in the above example, the actual implementation utilizes an heuristics for choosing which of the two operands must be intervalized in order to obtain the most precise result.


Member Function Documentation

template<typename FP_Interval_Type , typename FP_Format >
bool Parma_Polyhedra_Library::Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format >::linearize ( const FP_Interval_Abstract_Store int_store,
const FP_Linear_Form_Abstract_Store lf_store,
FP_Linear_Form result 
) const [virtual]

Linearizes the expression in a given astract store.

Makes result become the linearization of *this in the given composite abstract store.

Parameters:
int_storeThe interval abstract store.
lf_storeThe linear form abstract store.
resultThe modified linear form.
Returns:
true if the linearization succeeded, false otherwise.

Note that all variables occuring in the expressions represented by first_operand and second_operand MUST have an associated value in int_store. If this precondition is not met, calling the method causes an undefined behavior.

See the class description for a detailed explanation of how result is computed.

Implements Parma_Polyhedra_Library::Floating_Point_Expression< FP_Interval_Type, FP_Format >.


Friends And Related Function Documentation

template<typename FP_Interval_Type , typename FP_Format >
void swap ( Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format > &  x,
Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format > &  y 
) [related]

Swaps x with y.


The documentation for this class was generated from the following file: