<HTML> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- Created on December, 22 2009 by texi2html 1.64 --> <!-- Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) Karl Berry <karl@freefriends.org> Olaf Bachmann <obachman@mathematik.uni-kl.de> and many others. Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de> Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> --> <HEAD> <TITLE>APRON 0.9.10: Allocating managers and setting options</TITLE> <META NAME="description" CONTENT="APRON 0.9.10: Allocating managers and setting options"> <META NAME="keywords" CONTENT="APRON 0.9.10: Allocating managers and setting options"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="texi2html 1.64"> </HEAD> <BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"> <A NAME="SEC43"></A> <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="apron_11.html#SEC42"> < </A>]</TD> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="apron_13.html#SEC44"> > </A>]</TD> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="apron_8.html#SEC39"> << </A>]</TD> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="apron_9.html#SEC40"> Up </A>]</TD> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="apron_15.html#SEC46"> >> </A>]</TD> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="apron.html#SEC_Top">Top</A>]</TD> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="apron_toc.html#SEC_Contents">Contents</A>]</TD> <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="apron_abt.html#SEC_About"> ? </A>]</TD> </TR></TABLE> <HR SIZE=1> <H3> Allocating managers and setting options </H3> <!--docid::SEC43::--> <P> 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: <TABLE><tr><td> </td><td class=example><pre>#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 */ manager_set_abort_if_exception(man,EXC_OVERFLOW,true); { funopt_t funopt; funopt_init(&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; manager_set_funopt(man,fun_widening,&funopt); } /* Obtaining the internal part of the manager and setting specific options */ pk_internal_t* pk = manager_get_internal(man); pk_set_max_coeff_size(pk,size); </pre></td></tr></table>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: <CODE>abstract_fprint</CODE>, <CODE>abstract_fdump</CODE>, <CODE>abstract_approximate</CODE>. At any point, options may be modified in the same way as during the initialization. </P><P> <A NAME="Sequel of the small example"></A> <HR SIZE=1> <BR> <FONT SIZE="-1"> This document was generated by <I>Bertrand Jeannet</I> on <I>December, 22 2009</I> using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html "><I>texi2html</I></A> </BODY> </HTML>