APRONXX  0.9.12
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
apron::manager Class Reference

Library manager (ap_manager_t wrapper). More...

#include <apxx_manager.hh>

Inherits apron::use_malloc.

Inherited by apron::box_manager, apron::oct_manager, apron::pkgrid_manager, apron::polka_manager, apron::ppl_grid_manager, apron::ppl_poly_manager, and apron::t1p_manager.

Public Member Functions

void raise (const char *msg, ap_abstract0_t *a=NULL)
 Internal use only. Translates APRON exceptions to C++ ones. More...
 
void raise (const char *msg, ap_abstract1_t a)
 Internal use only. Translates APRON exceptions to C++ ones. More...
 
bool exception_raised ()
 Internal use only. Whether APRON has raised an exception. More...
 
Constructor
 manager (const manager &x)
 
Destructor
virtual ~manager ()
 Decrements the reference counter and, when reaching 0, frees the manager. More...
 
Assignment
manageroperator= (const manager &x)
 Assignment (actually performs some reference counter management). More...
 
Accesses
std::string get_library () const
 Returns the name of the library the manager comes from. More...
 
std::string get_version () const
 Returns the version name of the library the manager comes from. More...
 
ap_funopt_t & get_funopt (ap_funid_t funid)
 Returns a (modifiable) reference to the options associated to some abstract function. More...
 
ap_scalar_discr_t & get_scalar_discr ()
 Returns a (modifiable) reference to the user's preferred scalar type. More...
 
bool get_flag_exact ()
 Returns the 'is exact' flag associated to the last computed abstract function. More...
 
bool get_flag_best ()
 Returns the 'is best' flag associated to the last computed abstract function. More...
 
C API compatibility
ap_manager_t * get_ap_manager_t ()
 Returns a pointer to the internal APRON object stored in *this. More...
 
const ap_manager_t * get_ap_manager_t () const
 
- Public Member Functions inherited from apron::use_malloc
void * operator new (size_t sz)
 
void * operator new[] (size_t sz)
 
void operator delete (void *p)
 
void operator delete[] (void *p)
 

Static Public Member Functions

static void raise (ap_manager_t *m, const char *msg, ap_abstract0_t *a=NULL)
 Internal use only. Translates APRON exceptions to C++ ones. More...
 
static void raise (ap_manager_t *m, const char *msg, ap_abstract1_t a)
 Internal use only. Translates APRON exceptions to C++ ones. More...
 
Initialisation
static void fpu_init ()
 Sets the FPU rounding-mode towards +oo. More...
 

Protected Member Functions

 manager (ap_manager_t *m)
 Internal use only (by subclasses). Initialise from a ap_manager_t* and take ownership (no copy). More...
 

Protected Attributes

ap_manager_t * m
 Pointer managed by APRON. More...
 

Friends

Printing
std::ostream & operator<< (std::ostream &os, const manager &s)
 Prints the library name and version. More...
 

Detailed Description

Library manager (ap_manager_t wrapper).

A manager is an instance of a numerical abstract domain library. It has three roles:

The following guidelines should be followed:

The manager class is an abstract base class for all managers. It has no effective constructor. Instead, you should use the derived class corresponding to the numerical domain library you wish to use.

Managers are reference-counted. In particular, copying simply increment the reference counter and does not create an independent manager with its own scratch space. Thus, a manager and its copy cannot be used by concurrent threads.

Constructor & Destructor Documentation

◆ manager() [1/2]

manager::manager ( ap_manager_t *  m)
inlineprotected

Internal use only (by subclasses). Initialise from a ap_manager_t* and take ownership (no copy).

◆ manager() [2/2]

manager::manager ( const manager x)
inline

Increments the reference counter.

Warning
After the assignment, x and the new manager share the same scratch space, and thus, cannot be used by concurrent threads.

◆ ~manager()

manager::~manager ( )
inlinevirtual

Decrements the reference counter and, when reaching 0, frees the manager.

Member Function Documentation

◆ exception_raised()

bool manager::exception_raised ( )
inline

Internal use only. Whether APRON has raised an exception.

◆ fpu_init()

void manager::fpu_init ( )
inlinestatic

Sets the FPU rounding-mode towards +oo.

This is needed to ensure the soundness of all double-manipulating functions in APRON (coefficients or intervals with double bounds, floating-point abstract domains, etc.)

The FPU rounding-mode change is global. It affects all managers (already created or yet to be created) as well as all other floating-point computations in the program.

Exceptions
std::runtime_errorif the APRON was not able to set the rounding-mode.

◆ get_ap_manager_t() [1/2]

ap_manager_t * manager::get_ap_manager_t ( )
inline

Returns a pointer to the internal APRON object stored in *this.

◆ get_ap_manager_t() [2/2]

const ap_manager_t * manager::get_ap_manager_t ( ) const
inline

◆ get_flag_best()

bool manager::get_flag_best ( )
inline

Returns the 'is best' flag associated to the last computed abstract function.

◆ get_flag_exact()

bool manager::get_flag_exact ( )
inline

Returns the 'is exact' flag associated to the last computed abstract function.

◆ get_funopt()

ap_funopt_t & manager::get_funopt ( ap_funid_t  funid)
inline

Returns a (modifiable) reference to the options associated to some abstract function.

Exceptions
std::out_of_rangeif funid is no between AP_FUNID_COPY and AP_FUNID_CLOSURE (inclusive).

◆ get_library()

std::string manager::get_library ( ) const
inline

Returns the name of the library the manager comes from.

◆ get_scalar_discr()

ap_scalar_discr_t & manager::get_scalar_discr ( )
inline

Returns a (modifiable) reference to the user's preferred scalar type.

Returns
the scalar type can be either AP_SCALAR_DOUBLE, AP_SCALAR_MPQ, or AP_SCALAR_MPFR.

◆ get_version()

std::string manager::get_version ( ) const
inline

Returns the version name of the library the manager comes from.

◆ operator=()

manager & manager::operator= ( const manager x)
inline

Assignment (actually performs some reference counter management).

Warning
After the assignment, x and *this share the same scratch space, and thus, cannot be used by concurrent threads.

◆ raise() [1/4]

void apron::manager::raise ( ap_manager_t *  m,
const char *  msg,
ap_abstract0_t *  a = NULL 
)
inlinestatic

Internal use only. Translates APRON exceptions to C++ ones.

◆ raise() [2/4]

void manager::raise ( ap_manager_t *  m,
const char *  msg,
ap_abstract1_t  a 
)
inlinestatic

Internal use only. Translates APRON exceptions to C++ ones.

◆ raise() [3/4]

void apron::manager::raise ( const char *  msg,
ap_abstract0_t *  a = NULL 
)
inline

Internal use only. Translates APRON exceptions to C++ ones.

◆ raise() [4/4]

void manager::raise ( const char *  msg,
ap_abstract1_t  a 
)
inline

Internal use only. Translates APRON exceptions to C++ ones.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const manager s 
)
friend

Prints the library name and version.

Member Data Documentation

◆ m

ap_manager_t* apron::manager::m
protected

Pointer managed by APRON.


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