|
PPL
0.12.1
|
A generic Cast Floating Point Expression. More...
#include <Cast_Floating_Point_Expression.defs.hh>


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. | |
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 (Cast_Floating_Point_Expression &y) |
Swaps *this with y. | |
Constructors and Destructor | |
| Cast_Floating_Point_Expression (Floating_Point_Expression< FP_Interval_Type, FP_Format > *const expr) | |
Builds a cast floating point expression with the value expressed by expr. | |
| ~Cast_Floating_Point_Expression () | |
| Destructor. | |
Private Member Functions | |
| Cast_Floating_Point_Expression (const Cast_Floating_Point_Expression &y) | |
| Inhibited copy constructor. | |
| Cast_Floating_Point_Expression & | operator= (const Cast_Floating_Point_Expression &y) |
| Inhibited assignment operator. | |
Private Attributes | |
| Floating_Point_Expression < FP_Interval_Type, FP_Format > * | expr |
| Pointer to the casted expression. | |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename FP_Interval_Type , typename FP_Format > | |
| void | swap (Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format > &x, Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format > &y) |
Swaps x with y. | |
| template<typename FP_Interval_Type , typename FP_Format > | |
| void | swap (Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format > &x, Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format > &y) |
A generic Cast Floating Point Expression.
FP_Interval_Type represents the type of the intervals used in the abstract domain.FP_Format represents the floating point format used in the concrete domain.Let
and
be two linear forms and
a sound abstract operator on linear forms such that:
Given a floating point expression
and a composite abstract store
, we construct the interval linear form
as follows:
where
is the linear form computed by calling method Floating_Point_Expression::relative_error on
and
is a rounding error defined in Floating_Point_Expression::absolute_error.
Definition at line 90 of file Cast_Floating_Point_Expression.defs.hh.
| typedef Floating_Point_Expression<FP_Interval_Type, FP_Format>:: FP_Interval_Abstract_Store Parma_Polyhedra_Library::Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format >::FP_Interval_Abstract_Store |
Alias for the Box<FP_Interval_Type> from Floating_Point_Expression.
Reimplemented from Parma_Polyhedra_Library::Floating_Point_Expression< FP_Interval_Type, FP_Format >.
Definition at line 109 of file Cast_Floating_Point_Expression.defs.hh.
| typedef Floating_Point_Expression<FP_Interval_Type, FP_Format>:: FP_Linear_Form Parma_Polyhedra_Library::Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format >::FP_Linear_Form |
Alias for the Linear_Form<FP_Interval_Type> from Floating_Point_Expression.
Reimplemented from Parma_Polyhedra_Library::Floating_Point_Expression< FP_Interval_Type, FP_Format >.
Definition at line 101 of file Cast_Floating_Point_Expression.defs.hh.
| typedef Floating_Point_Expression<FP_Interval_Type, FP_Format>:: FP_Linear_Form_Abstract_Store Parma_Polyhedra_Library::Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format >::FP_Linear_Form_Abstract_Store |
Alias for the std::map<dimension_type, FP_Linear_Form> from Floating_Point_Expression.
Reimplemented from Parma_Polyhedra_Library::Floating_Point_Expression< FP_Interval_Type, FP_Format >.
Definition at line 117 of file Cast_Floating_Point_Expression.defs.hh.
|
inline |
Builds a cast floating point expression with the value expressed by expr.
Definition at line 34 of file Cast_Floating_Point_Expression.inlines.hh.
: expr(e) { assert(e != 0); }
|
inline |
Destructor.
Definition at line 43 of file Cast_Floating_Point_Expression.inlines.hh.
{
delete expr;
}
|
private |
Inhibited copy constructor.
|
virtual |
Linearizes the expression in a given astract store.
Makes result become the linearization of *this in the given composite abstract store.
| int_store | The interval abstract store. |
| lf_store | The linear form abstract store. |
| result | The modified linear form. |
true if the linearization succeeded, false otherwise.See the class description for an explanation of how result is computed.
Implements Parma_Polyhedra_Library::Floating_Point_Expression< FP_Interval_Type, FP_Format >.
Definition at line 32 of file Cast_Floating_Point_Expression.templates.hh.
{
if (!expr->linearize(int_store, lf_store, result))
return false;
FP_Linear_Form rel_error;
relative_error(result, rel_error);
result += rel_error;
result += this->absolute_error;
return !this->overflows(result);
}
|
inline |
Swaps *this with y.
Definition at line 50 of file Cast_Floating_Point_Expression.inlines.hh.
References Parma_Polyhedra_Library::Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format >::expr, and Parma_Polyhedra_Library::swap().
Referenced by Parma_Polyhedra_Library::Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format >::swap().
|
private |
Inhibited assignment operator.
|
related |
Swaps x with y.
|
related |
Definition at line 57 of file Cast_Floating_Point_Expression.inlines.hh.
References Parma_Polyhedra_Library::Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap().
{
x.m_swap(y);
}
|
private |
Pointer to the casted expression.
Definition at line 158 of file Cast_Floating_Point_Expression.defs.hh.
Referenced by Parma_Polyhedra_Library::Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap().