Proving and inferring invariants
David Monniaux
CNRS / VERIMAG Grenoble, France
December 13, 2013
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 1 / 54
Proving and inferring invariants David Monniaux CNRS / VERIMAG - - PowerPoint PPT Presentation
Proving and inferring invariants David Monniaux CNRS / VERIMAG Grenoble, France December 13, 2013 David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 1 / 54 Grenoble David Monniaux (CNRS / VERIMAG) Proving
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 1 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 2 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 3 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 4 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 5 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 5 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 6 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 6 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 7 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 7 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 8 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 9 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 10 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 11 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 11 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 12 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 13 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 13 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 14 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 14 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 15 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 16 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 17 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 18 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 19 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 20 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 20 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 20 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 20 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 21 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 22 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 23 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 23 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 23 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 23 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 24 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 25 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 26 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 26 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 27 / 54
◮ test maps [−l, h] to [−l, min(h, 99)] ◮ then i = i + 1 maps [−l, min(h, 99)] to [−(l − 1), min(h, 99) + 1]
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 28 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 29 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 29 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 30 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 31 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 31 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 32 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 33 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 34 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 35 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 35 / 54
1 Start with a problem with explicit or implicit “min” operators in the
2 For each min(a1, . . . , an), pick an ai and replace min(a1, . . . , an) by ai
3 Solve the resulting system (perhaps with overapproximation) 4 For each min(a1, . . . , an), check that the value of picked ai from the
5 Otherwise, terminate (not necessarily with best inductive invariant in
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 36 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 37 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 38 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 39 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 40 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 41 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 42 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 43 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 44 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 45 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 46 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 47 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 48 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 49 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 50 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 51 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 52 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 53 / 54
David Monniaux (CNRS / VERIMAG) Proving and inferring invariants December 13, 2013 54 / 54