|
Abstract: This article presents the octagon
abstract domain, a relational numerical abstract domain for
static analysis by abstract interpretation. It allows representing
conjunctions of constraints of the form +-X +-Y
<= c where X and Y range among
program variables and c is a constant in Z,
Q, or R automatically inferred. Abstract elements are
represented using modified Difference Bound Matrices and we use a
normalization algorithm loosely based on the shortest-path closure to
compute canonical representations and construct best-precision
abstract transfer functions. We achieve a quadratic memory cost per
abstract element and a cubic worst-case time cost per abstract
operation, with respect to the number of program variables.
In terms of cost and precision, our domain is in between the
well-known fast but imprecise interval domain and the costly
polyhedron domain. We show that it is precise enough to treat
interesting examples requiring relational invariants, and
hence, out of the reach of the interval domain. We also present a
packing strategy that allows scaling our domain up to large
programs by tuning the amount of relationality. The octagon domain was
incorporated into the ASTRÉE industrial strength static analyzer and
was key in proving the absence of run-time errors in large critical
embedded flight control software for Airbus planes.
|