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

Allocating managers and setting options

From the user point of view, the benefit of using the APRON interface is to restrict the place where the user is aware of the real library in use to the code initializing the manager, as illustrated by the following example:
#include "ap_global1.h"
#include "pk.h"

/* Allocating a Polka manager, for polyhedra with strict constraints */
manager_t* man = pk_manager_alloc(true);
/* Setting options offered by the common interface,
   but with meaning possibly specific to the library */
  funopt_t funopt;
  funopt.algorithm = 1; /* default value is 0 */
  manager_set_funopt(man,fun_widening,&funopt); /* Setting options for widening */
  funopt_t funopt = manager_get_funopt(man,fun_widening);
  funopt.timeout = 30;
/* Obtaining the internal part of the manager and setting specific options */
pk_internal_t* pk = manager_get_internal(man);
The standard operations can then be used and will have the semantics defined in the interface. Notice however that some generic functions are not formally generic: abstract_fprint, abstract_fdump, abstract_approximate. At any point, options may be modified in the same way as during the initialization.

This document was generated on September, 10 2009 using texi2html