[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Managers (‘ap_manager.h’)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Datatypes

datatype: tbool_t
 
typedef enum tbool_t {
  tbool_false=0,
  tbool_true=1,
  tbool_top=2,   /* don't know */
} tbool_t;
static inline tbool_t tbool_of_bool(bool a);
static inline tbool_t tbool_or(tbool_t a, tbool_t b);
static inline tbool_t tbool_and(tbool_t a, tbool_t b);

Booleans with a third unknown value.

datatype: ap_membuf_t
 
typedef struct ap_membuf_t {
  void* ptr;
  size_t size;
} ap_membuf_t;

For serialization.

datatype: ap_manager_t

APRON managers (opaque type).

datatype: ap_funid_t

For identifying functions in excpetions, and when reading/setting options attached to them.

 
typedef enum ap_funid_t {
  AP_FUNID_UNKNOWN,
  AP_FUNID_COPY,
  AP_FUNID_FREE,
  AP_FUNID_ASIZE, /* For avoiding name conflict with AP_FUNID_SIZE */
  AP_FUNID_MINIMIZE,
  AP_FUNID_CANONICALIZE,
  AP_FUNID_HASH,
  AP_FUNID_APPROXIMATE,
  AP_FUNID_FPRINT,
  AP_FUNID_FPRINTDIFF,
  AP_FUNID_FDUMP,
  AP_FUNID_SERIALIZE_RAW,
  AP_FUNID_DESERIALIZE_RAW,
  AP_FUNID_BOTTOM,
  AP_FUNID_TOP,
  AP_FUNID_OF_BOX,
  AP_FUNID_DIMENSION,
  AP_FUNID_IS_BOTTOM,
  AP_FUNID_IS_TOP,
  AP_FUNID_IS_LEQ,
  AP_FUNID_IS_EQ,
  AP_FUNID_IS_DIMENSION_UNCONSTRAINED,
  AP_FUNID_SAT_INTERVAL,
  AP_FUNID_SAT_LINCONS,
  AP_FUNID_SAT_TCONS,
  AP_FUNID_BOUND_DIMENSION,
  AP_FUNID_BOUND_LINEXPR,
  AP_FUNID_BOUND_TEXPR,
  AP_FUNID_TO_BOX,
  AP_FUNID_TO_LINCONS_ARRAY,
  AP_FUNID_TO_TCONS_ARRAY,
  AP_FUNID_TO_GENERATOR_ARRAY,
  AP_FUNID_MEET,
  AP_FUNID_MEET_ARRAY,
  AP_FUNID_MEET_LINCONS_ARRAY,
  AP_FUNID_MEET_TCONS_ARRAY,
  AP_FUNID_JOIN,
  AP_FUNID_JOIN_ARRAY,
  AP_FUNID_ADD_RAY_ARRAY,
  AP_FUNID_ASSIGN_LINEXPR_ARRAY,
  AP_FUNID_SUBSTITUTE_LINEXPR_ARRAY,
  AP_FUNID_ASSIGN_TEXPR_ARRAY,
  AP_FUNID_SUBSTITUTE_TEXPR_ARRAY,
  AP_FUNID_ADD_DIMENSIONS,
  AP_FUNID_REMOVE_DIMENSIONS,
  AP_FUNID_PERMUTE_DIMENSIONS,
  AP_FUNID_FORGET_ARRAY,
  AP_FUNID_EXPAND,
  AP_FUNID_FOLD,
  AP_FUNID_WIDENING,
  AP_FUNID_CLOSURE,
  AP_FUNID_SIZE,
  AP_FUNID_CHANGE_ENVIRONMENT,
  AP_FUNID_RENAME_ARRAY,
  AP_FUNID_SIZE2
} ap_funid_t;

extern const char* ap_name_of_funid[AP_FUNID_SIZE2];
/* give the name of a function identifier */
datatype: ap_exc_t
datatype: ap_exc_log_t

Exceptions and exception logs (chained in a list, the first one being the last one).

 
typedef enum ap_exc_t {
  AP_EXC_NONE,           /* no exception detected */
  AP_EXC_TIMEOUT,        /* timeout detected */
  AP_EXC_OUT_OF_SPACE,   /* out of space detected */
  AP_EXC_OVERFLOW,        /* magnitude overflow detected */
  AP_EXC_INVALID_ARGUMENT, /* invalid arguments */
  AP_EXC_NOT_IMPLEMENTED, /* not implemented */
  AP_EXC_SIZE
} ap_exc_t;
extern const char* ap_name_of_exception[AP_EXC_SIZE];
typedef struct ap_exclog_t {
  ap_exc_t exn;
  ap_funid_t funid;
  char* msg;                   /* dynamically allocated */
  struct ap_exclog_t* tail;
} ap_exclog_t;

datatype: ap_funopt_t

Options attached to functions.

 
typedef struct ap_funopt_t {
  int algorithm;
  /* Algorithm selection:
     - 0 is default algorithm;
     - MAX_INT is most accurate available;
     - MIN_INT is most efficient available;
     - otherwise, no accuracy or speed meaning
  */
  size_t timeout; /* unit !? */
  /* Above the given computation time, the function may abort with the
     exception flag flag_time_out on.
  */
  size_t max_object_size; /* in abstract object size unit. */
  /* If during the computation, the size of some object reach this limit, the
     function may abort with the exception flag flag_out_of_space on.
  */
  bool flag_exact_wanted;
  /* return information about exactitude if possible
  */
  bool flag_best_wanted;
  /* return information about best correct approximation if possible
  */
} ap_funopt_t;

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Functions related to managers

Function: void ap_manager_free (ap_manager_t* man)

Free a manager (dereference a counter, and possibly deallocate).

Function: const char* ap_manager_get_library (ap_manager_t* man)
Function: const char* ap_manager_get_version (ap_manager_t* man)

Reading the name and the version of the attached underlying library.

Function: bool ap_manager_get_flag_exact (ap_manager_t* man)
Function: bool ap_manager_get_flag_best (ap_manager_t* man)

Return true if the last called APRON function returned an exact (resp. a best approximation) result.

Options

See ap_funopt_t.

Function: ap_funopt_t ap_manager_get_funopt (ap_manager_t* man, ap_funid_t funid)

Getting the option attached to the specified function in the manager. funid should be less than AP_FUNID_SIZE (no option associated to other identifiers). Otherwise, abort with a message.

Function: void ap_manager_set_funopt (ap_manager_t* man, ap_funid_t funid, ap_funopt_t* fopt)

Setting the option attached to the specified function in the manager. fopt is copied (and not only referenced). funid should be less than AP_FUNID_SIZE (no option associated to other identifiers). Otherwise, do nothing.

Function: void ap_funopt_init (ap_funopt_t* fopt)

Initialize fopt with default values.

Exceptions

Function: bool ap_manager_get_abort_if_exception (ap_manager_t* man, ap_exc_t exn)

Return true if the program abort when the exception exn is raised by some function. Otherwise, in such a case, a valid (but dummy) value should be returned by the function that raises the exception.

Function: void ap_manager_set_abort_if_exception (ap_manager_t* man, ap_exc_t exn, bool flag)

Position the above-described option.

Function: ap_exc_t ap_manager_get_exception (ap_manager_t* man)

Get the last exception raised.

Function: ap_exclog_t ap_manager_get_exclog (ap_manager_t* man)

Get the full log of exceptions. The first one in the list is the last raised one.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by root on September 20, 2019 using texi2html 1.82.