Section: Software
Apron and BDDApron libraries
Participant : Bertrand Jeannet.
Principles
The Apron library(http://apron.cri.ensmp.fr/library/ ) is dedicated to the static analysis of the numerical variables of a program by abstract interpretation [38] . Many abstract domains have been designed and implemented for analysing the possible values of numerical variables during the execution of a program (see Figure 1 ). However, their API diverge largely (datatypes, signatures, ...), and that does not facilitate their diffusion and experimental comparison w.r.t. efficiency and precision aspects.
The Apron library aims to provide:
-
a uniform API for existing numerical abstract domains;
-
a higher-level interface to the client tools, by factorizing functionalities that are largely independent of abstract domains.
From an abstract domain implementor point of view, the benefits of the Apron library are:
-
the ability to focus on core, low-level functionalities;
-
the help of generic services adding higher-level services for free.
For the client static analysis community, the benefits are a unified, higher-level interface, that allows experimenting, comparing and combining abstract domains.
The BDDApron library(http://pop-art.inrialpes.fr/~bjeannet/bjeannet-forge/bddapron/index.html ) aims at a similar goal, by adding finite-types variables and expressions to the concrete semantics of Apron domains. It is built upon the Apron library and provides abstract domains for the combination of finite-type variables (booleans, enumerated types, n-bits integers) and numerical variables (integers, rationals, floating-points). It first allows to manipulate expressions that freely mix, using BDDs and MTBDDs, finite-type and numerical Apron expressions and conditions. It then provides abstract domains that combines BDDs and Apron abstract values for representing invariants holding on both finite-type variables and numerical variables.
Implementation and distribution
The Apron library (Fig. 2 ) is written in ANSI C, with an object-oriented and thread-safe design. Both multi-precision and floating-point numbers are supported. A wrapper for the Ocaml language is available, and a C++ wrapper is on the way. It is distributed since June 2006 under the LGPL license and available at http://apron.cri.ensmp.fr . Its development has still progressed much since. There are already many external users (ProVal/Démons, LRI Orsay, France — CEA-LIST, Saclauy, France — Analysis of Computer Systems Group, New-York University, USA — Sierum software analysis platform, Kansas State University, USA — NEC Labs, Princeton, USA — EADS CCR, Paris, France — IRIT, Toulouse, France) and it is being packaged as a Redhat and Debian package.
The BDDApron library is written in Ocaml , using polymorphism features of Ocaml to make it generic. It is also thread-safe. It provides two different implementations of the same domain, each one presenting pros and cons depending on the application. It is currently used by the ConcurInterproc interprocedural and concurrent program analyzer.