Skip to main content

Week 7: Frama-C and ACSL: deductive verification

Annotating real C with ACSL contracts and discharging the resulting proof obligations against the source, not a model of it

5 April 2027

Frama-C runs on unmodified C, extended with annotations written in ACSL (a specification language embedded in comments) that state preconditions, postconditions, loop invariants, and — this is the part that connects straight back to last week — separation assertions between pointers. Its WP plugin turns an annotated function into a set of proof obligations and hands them to an SMT solver; a green result means the function provably meets its contract, for every input, not just the ones you tested.

The cost is annotation burden, and it’s steep: a loop usually needs an explicit invariant before WP can say anything about it at all, and a function that isn’t already separation-logic-shaped in your head is hard to annotate correctly on the first try. This week’s studio has you feel that cost directly, on a function small enough that the whole proof fits on one screen.

Outline

Teaching team