In 1983, the American National Standards Institute (ANSI) commissioned a committee, X3J11, to standardize the C language. The first standard for C was published by ANSI. Although this document was subsequently adopted by International Organization for Standardization (ISO) and subsequent revisions published by ISO have been adopted by ANSI, the name ANSI C continues to be used.
ACSL is a behavioral interface specification language (BISL). It aims at specifying behavioral properties of C source code. The main inspiration for this language comes from the specification language of the Caduceus tool for deductive verification of behavioral properties of C programs. The specification language of Caduceus is itself inspired from JML which aims at similar goals for Java source code.
One difference with JML is that ACSL is intended for static verification and deductive verification whereas JML is designed both for runtime assertion checking and static verification using for instance the ESC/Java tool.
Consider the following example for the prototype of a function named incrstar:
The contract is given by the comment which starts with /*@. Its meaning is as follows:
A valid implementation of the above function would be:
Most of the features of ACSL are supported by Frama-C.
The TrustInSoft static analyzer is a commercial derivative of Frama-C. It verifies program behavior and (with builtin rules based on the language specification) catch instances of undefined behavior.1
"ACSL Properties". TrustInSoft Documentation 1.42-dev documentation. https://man.trust-in-soft.com/man/tis-user-guide/add-acsl.html ↩