SLIDE 1
On the Monniaux Problem in Abstract Interpretation Nathana el - - PowerPoint PPT Presentation
On the Monniaux Problem in Abstract Interpretation Nathana el - - PowerPoint PPT Presentation
On the Monniaux Problem in Abstract Interpretation Nathana el Fijalkow, Engel Lefaucheux, Pierre Ohlmann, Jo el Ouaknine, Amaury Pouly and James Worrell LaBRI, Max Planck Institute for Software Systems, IRIF, Oxford University IRISA,
SLIDE 2
SLIDE 3
The MU Puzzle
A string-rewriting system using letters M, I, and U
SLIDE 4
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
SLIDE 5
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
SLIDE 6
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I
SLIDE 7
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
SLIDE 8
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
SLIDE 9
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
You can double the string after the M
SLIDE 10
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
You can double the string after the M Example: MIU becomes MIUIU
SLIDE 11
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
You can double the string after the M Example: MIU becomes MIUIU
- 3. XIIIY → XUY
SLIDE 12
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
You can double the string after the M Example: MIU becomes MIUIU
- 3. XIIIY → XUY
You can replace any III with a U
SLIDE 13
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
You can double the string after the M Example: MIU becomes MIUIU
- 3. XIIIY → XUY
You can replace any III with a U Example: MUIIIU becomes MUUU
SLIDE 14
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
You can double the string after the M Example: MIU becomes MIUIU
- 3. XIIIY → XUY
You can replace any III with a U Example: MUIIIU becomes MUUU
- 4. XUUY → XY
SLIDE 15
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
You can double the string after the M Example: MIU becomes MIUIU
- 3. XIIIY → XUY
You can replace any III with a U Example: MUIIIU becomes MUUU
- 4. XUUY → XY
You can remove any UU
SLIDE 16
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
You can double the string after the M Example: MIU becomes MIUIU
- 3. XIIIY → XUY
You can replace any III with a U Example: MUIIIU becomes MUUU
- 4. XUUY → XY
You can remove any UU Example: MUUU becomes MU
SLIDE 17
The MU Puzzle
A string-rewriting system using letters M, I, and U
- 0. We start with MI
- 1. XI → XIU
You can add U at the end of any string ending in I Example: MI becomes MIU
- 2. MX → MXX
You can double the string after the M Example: MIU becomes MIUIU
- 3. XIIIY → XUY
You can replace any III with a U Example: MUIIIU becomes MUUU
- 4. XUUY → XY
You can remove any UU Example: MUUU becomes MU
Starting from MI, the goal is to produce MU
SLIDE 18
Can It Be Solved?
MIU MI MIU MIUIU MIUIUIUIU MII MIIII MIIIIU MIIU MIIUIIU MIIIIIIII MUI ? ? ? ? ? ? MU 2 2 2 3 2 1 2 1 1 2 3
SLIDE 19
Can This (Nondeterministic) Program Halt?
s := MI; while s = MU do choose {s = XI} → s := XIU; {s = MX} → s := MXX; {s = XIIIY} → s := XUY; {s = XUUY} → s := XY;
Y XIIIY? XX
SLIDE 20
Can This (Nondeterministic) Program Halt?
s := MI; while s = MU do choose {s = XI} → s := XIU; {s = MX} → s := MXX; {s = XIIIY} → s := XUY; {s = XUUY} → s := XY;
XY :=XUY XIU XI = ? s := MX = s ? = s XIIIY? = s UU X Y? s s :=MI s :=MXX s := s
SLIDE 21
Can This (Nondeterministic) Program Halt?
s := MI; while s = MU do choose {s = XI} → s := XIU; {s = MX} → s := MXX; {s = XIIIY} → s := XUY; {s = XUUY} → s := XY;
XX :=XUY XIU XI = ? s := MX = s ? = s XIIIY? = s UU X Y? s s :=MI the number of " " in I s introduce " " to count i s :=XY s :=M s
SLIDE 22
Can This (Nondeterministic) Program Halt?
s := MI; while s = MU do choose {s = XI} → s := XIU; {s = MX} → s := MXX; {s = XIIIY} → s := XUY; {s = XUUY} → s := XY;
XX :=XUY XIU := 1 i XI = ? s := MX = s ? = s XIIIY? = s UU X Y? s the number of " " in I s introduce " " to count i s :=XY s :=M s
SLIDE 23
Can This (Nondeterministic) Program Halt?
s := MI; while s = MU do choose {s = XI} → s := XIU; {s = MX} → s := MXX; {s = XIIIY} → s := XUY; {s = XUUY} → s := XY;
:= :=XUY := 1 i MX = s ? = s XIIIY? = s UU X Y? the number of " " in I s introduce " " to count i s :=XY MXX s s
SLIDE 24
Can This (Nondeterministic) Program Halt?
s := MI; while s = MU do choose {s = XI} → s := XIU; {s = MX} → s := MXX; {s = XIIIY} → s := XUY; {s = XUUY} → s := XY;
XX :=XUY := 1 i := 2 i i = s XIIIY? = s UU X Y? the number of " " in I s introduce " " to count i s :=XY s
SLIDE 25
Can This (Nondeterministic) Program Halt?
s := MI; while s = MU do choose {s = XI} → s := XIU; {s = MX} → s := MXX; {s = XIIIY} → s := XUY; {s = XUUY} → s := XY;
:= i := 2 i i i := 1 = s UU X Y? the number of " " in I s introduce " " to count i s :=XY XX Y i −3
SLIDE 26
Can This (Nondeterministic) Program Halt?
s := MI; while s = MU do choose {s = XI} → s := XIU; {s = MX} → s := MXX; {s = XIIIY} → s := XUY; {s = XUUY} → s := XY;
:= i := 2 i i i := 1 the number of " " in I s introduce " " to count i XX Y i −3
SLIDE 27
Can This (Nondeterministic) Program Halt?
s := MI; while s = MU do choose {s = XI} → s := XIU; {s = MX} → s := MXX; {s = XIIIY} → s := XUY; {s = XUUY} → s := XY;
:= 1 i := 2 i i i := i ≡ the number of " " in I s introduce " " to count i XX Y i −3 1 or 2 (mod 3)
SLIDE 28
A Polynomial Program Invariant
:= 1 i := 2 i i i := i ≡ i −3 1 or 2 (mod 3)
SLIDE 29
A Polynomial Program Invariant
:= 1 i := 2 i i i := i ≡ i −3 1 or 2 (mod 3) Define the polynomial p(x) = (x − 1)(x − 2)
SLIDE 30
A Polynomial Program Invariant
:= 1 i := 2 i i i := i ≡ i −3 1 or 2 (mod 3) Define the polynomial p(x) = (x − 1)(x − 2) Then this program satisfies p(i) = 0 (over Z3)
SLIDE 31
Automated Invariant Generation: A Challenge
The classical approach to the verification of temporal safety properties of programs requires the construction of inductive invariants at each program point, that is, assertions that are true on every program execution reaching that point, and moreover, that are closed under the strongest postcondition operator. Automation
- f this construction is the main challenge in
program verification.
- D. Beyer, T. Henzinger, R. Majumdar, and A. Rybelchenko
Invariant Synthesis for Combined Theories, 2007
SLIDE 32
Inductive Invariants
invariant = overapproximation (of the reachable states)
SLIDE 33
Inductive Invariants
invariant = overapproximation (of the reachable states) inductive invariant =
- verapproximation
preserved by the transition relation
SLIDE 34
Inductive Invariants
x, y, z range over Z (or Q)
2 1 3 f1 f4 f3 f2 f5
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 35
Inductive Invariants
x, y, z range over Z (or Q)
2 1 3 f1 f4 f3 f2 f5
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 36
Inductive Invariants
x, y, z range over Z (or Q)
3 f1 f4 f3 f2 f5 2 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 37
Inductive Invariants
x, y, z range over Z (or Q)
3 f1 f4 f3 f2 f5 2 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 38
Inductive Invariants
x, y, z range over Z (or Q)
3 f4 f3 f2 f5 2 f1 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 39
Inductive Invariants
x, y, z range over Z (or Q)
3 f4 f3 f2 f5 2 f1 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 40
Inductive Invariants
x, y, z range over Z (or Q)
3 f4 f3 f5 2 f1 f2 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 41
Inductive Invariants
x, y, z range over Z (or Q)
3 f4 f3 f5 2 f1 f2 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 42
Inductive Invariants
x, y, z range over Z (or Q)
3 f4 f3 f5 2 f1 f2 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 43
Inductive Invariants
x, y, z range over Z (or Q)
3 f5 2 f1 f2 f4 f3 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 44
Inductive Invariants
x, y, z range over Z (or Q)
3 2 f1 f2 f4
3
f5 f 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 45
Inductive Invariants
x, y, z range over Z (or Q)
3 2 f1 f2 f4
3
f5 f 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 46
Inductive Invariants
x, y, z range over Z (or Q)
3 2 f1 f2 f4
3
f5 f 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 47
Inductive Invariants
x, y, z range over Z (or Q)
3 2 f1 f2 f4 f3 f5 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 48
Inductive Invariants
x, y, z range over Z (or Q)
2 f1 f2 f4 f3 f5 1 3
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 49
Inductive Invariants
x, y, z range over Z (or Q)
2 f1 f2 f4 f3 f5 1 3
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 50
Inductive Invariants
x, y, z range over Z (or Q)
2 f1 f2 f4 f3 f5 1 3
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 51
Inductive Invariants
x, y, z range over Z (or Q)
2 f1 f2 f4 f3 f5 1 3
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 52
Inductive Invariants
x, y, z range over Z (or Q)
1
S 2 S S3 2
1
f2 f4 f3 f5 f 3 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 53
Inductive Invariants
x, y, z range over Z (or Q)
S
3
S 2
1
S 2
1
f2 f4 f3 f5 f 3 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 54
Inductive Invariants
x, y, z range over Z (or Q)
I S1
1
S3 I 2 I 3 S 2 2
1
f2 f4 f3 f5 f 3 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 55
Inductive Invariants
x, y, z range over Z (or Q)
I I 3 I
1 2
2
1
f2 f4 f3
5
f 3 f 1
I1, I2, I3 is an invariant (I1, I2, I3 ⊆ R3)
SLIDE 56
Inductive Invariants
x, y, z range over Z (or Q)
2
I1 I I 3 f 1
3 5
f 3 2
1
f2 f4 f
I1, I2, I3 is an inductive invariant (I1, I2, I3 ⊆ R3)
SLIDE 57
Inductive Invariants
x, y, z range over Z (or Q)
I
3 2 1
I I 2
1
f2 f4 f3
5
f 3 f 1
I1, I2, I3 is an inductive invariant (I1, I2, I3 ⊆ R3)
SLIDE 58
Inductive Invariants
x, y, z range over Z (or Q)
I S1
1
S3 I 2 I 3 S 2 2
1
f2 f4 f3 f5 f 3 1
I1, I2, I3 is an inductive invariant (I1, I2, I3 ⊆ R3)
SLIDE 59
Inductive Invariants
x, y, z range over Z (or Q)
1
S 2 S S3 2
1
f2 f4 f3 f5 f 3 1
S1, S2, S3 is always an inductive invariant I1, I2, I3 ⊆ R3
SLIDE 60
Inductive Invariants
x, y, z range over Z (or Q)
2
1
f2 f4 f3 f5 f 3 1
R3, R3, R3 is also always an inductive invariant I1, I2, I3 ⊆ R3
SLIDE 61
Inductive Invariants
x, y, z range over Z (or Q)
I
3 1 1
S3 I 2 I S 2 S 2
1
f2 f4 f3 f5 f 3
BAD!
1
B A D !
B A D !
A good invariant is worth a thousand reachability queries!R3
SLIDE 62
Generating Inductive Invariants
Choose the right abstract domain
Some domains always have ‘best’ (strongest, smallest) invariants, others not
SLIDE 63
Generating Inductive Invariants
Choose the right abstract domain
Some domains always have ‘best’ (strongest, smallest) invariants, others not
Compute an invariant!
Many eclectic methods: fixed-point computations, constraint solving, interpolation, abduction, machine learning, . . . Some approaches require ‘widening’ to ensure termination Other techniques invoke e.g. dimension or algebraic arguments Often trade-off between precision and complexity . . .
SLIDE 64
A Menagerie of Abstract Domains
Intervals [Cousot, Cousot 76], [Harrison 77] x ∈ [0, 4] ∧ y ∈ [2, ∞)
SLIDE 65
A Menagerie of Abstract Domains
Intervals [Cousot, Cousot 76], [Harrison 77] x ∈ [0, 4] ∧ y ∈ [2, ∞) Octagons [Min´ e 06] x + y − 2 ≤ 2 ∧ x ≤ 3 ∧ y − x ≤ 1
SLIDE 66
A Menagerie of Abstract Domains
Intervals [Cousot, Cousot 76], [Harrison 77] x ∈ [0, 4] ∧ y ∈ [2, ∞) Octagons [Min´ e 06] x + y − 2 ≤ 2 ∧ x ≤ 3 ∧ y − x ≤ 1 Linear / Algebraic sets [M¨ uller-Olm, Seidl 04] x3 − y2 = 0 ∧ x2yz5 − 3yz = 0
SLIDE 67
A Menagerie of Abstract Domains
Intervals [Cousot, Cousot 76], [Harrison 77] x ∈ [0, 4] ∧ y ∈ [2, ∞) Octagons [Min´ e 06] x + y − 2 ≤ 2 ∧ x ≤ 3 ∧ y − x ≤ 1 Linear / Algebraic sets [M¨ uller-Olm, Seidl 04] x3 − y2 = 0 ∧ x2yz5 − 3yz = 0 Polyhedral / Semilinear sets [Cousot, Halbwachs 78] x + 2y − 3z + 4 ≤ 0 ∨ 2x + 7y + 2z ≥ 0
SLIDE 68
A Menagerie of Abstract Domains
Intervals [Cousot, Cousot 76], [Harrison 77] x ∈ [0, 4] ∧ y ∈ [2, ∞) Octagons [Min´ e 06] x + y − 2 ≤ 2 ∧ x ≤ 3 ∧ y − x ≤ 1 Linear / Algebraic sets [M¨ uller-Olm, Seidl 04] x3 − y2 = 0 ∧ x2yz5 − 3yz = 0 Polyhedral / Semilinear sets [Cousot, Halbwachs 78] x + 2y − 3z + 4 ≤ 0 ∨ 2x + 7y + 2z ≥ 0 Semialgebraic sets [Bagnara et al. 05] x2 + y2 + z2 ≤ 0 ∨ x2yz5 − 3yz + 6 ≥ 0
SLIDE 69
Comparing Abstractions
Original set:
SLIDE 70
Comparing Abstractions
Interval abstraction: g
SLIDE 71
Comparing Abstractions
Octagonal abstraction:
SLIDE 72
Comparing Abstractions
Polyhedral abstraction:
SLIDE 73
Comparing Abstractions
Algebraic/semialgebraic/semilinear abstraction :
SLIDE 74
Comparing Abstractions
Interval ≤ Octagonal ≤ Semilinear ≤ Semialgebraic ≤ ≤ Linear ≤ Algebraic
- linear
polynomial
SLIDE 75
Why Linear Invariants Are Not Enough
s := 0; x := 0; while . . . do x := x + 1; s := s + x;
SLIDE 76
Why Linear Invariants Are Not Enough
s := 0; x := 0; while . . . do x := x + 1; s := s + x; The loop invariant is: s = x(x + 1) 2
SLIDE 77
Why Linear Invariants Are Not Enough
s := 0; x := 0; while . . . do x := x + 1; s := s + x; The loop invariant is: s = x(x + 1) 2 Or equivalently: p(s, x) = 2s − x2 − x = 0
SLIDE 78
Does This Program Halt?
x := 3; y := 2; while 2y − x ≥ −2 do x y
- :=
10 −8 6 −4 x y
- ;
Polynomial invariant: 9x2 − 24xy − x + 16y2 + y = 0
SLIDE 79
Does This Program Halt?
x := 3; y := 2; while 2y − x ≥ −2 do x y
- :=
10 −8 6 −4 x y
- ;
Polynomial invariant: 9x2 − 24xy − x + 16y2 + y = 0
SLIDE 80
Does This Program Halt?
x := 3; y := 2; while 2y − x ≥ −2 do x y
- :=
10 −8 6 −4 x y
- ;
Polynomial invariant: 9x2 − 24xy − x + 16y2 + y = 0
SLIDE 81
Does This Program Halt?
x := 3; y := 2; while 2y − x ≥ −2 do x y
- :=
10 −8 6 −4 x y
- ;
Polynomial invariant: 9x2 − 24xy − x + 16y2 + y = 0
SLIDE 82
Does This Program Halt?
x := 3; y := 2; while 2y − x ≥ −2 do x y
- :=
10 −8 6 −4 x y
- ;
Polynomial invariant: 9x2 − 24xy − x + 16y2 + y = 0
SLIDE 83
Does This Program Halt?
x := 3; y := 2; while 2y − x ≥ −2 do x y
- :=
10 −8 6 −4 x y
- ;
Polynomial invariant: 9x2 − 24xy − x + 16y2 + y = 0
SLIDE 84
Does This Program Halt?
x := 3; y := 2; while 2y − x ≥ −2 do x y
- :=
10 −8 6 −4 x y
- ;
Deciding termination of simple linear loops is open! “It is faintly outrageous that this problem is still open; it is saying that we do not know how to decide the Halting Problem even for ‘linear’ automata!” Terence Tao
SLIDE 85
A Class of Decision Problems
The Monniaux Problem Given a program, a safety specification and an abstract domain does there exist an adequate inductive invariant?
SLIDE 86
A Class of Decision Problems
The Monniaux Problem Given a program, a safety specification and an abstract domain does there exist an adequate inductive invariant? “We started this work hoping to vindicate forty years of research on heuristics by showing that the existence of polyhedral inductive separating invariants in a system with transitions in linear arithmetic (integer or rational) is undecidable.” David Monniaux
SLIDE 87
What Are Affine Programs? 2 1 3 f1 f4 f3 f2 f5
SLIDE 88
What Are Affine Programs? 2 1 3 f1 f4 f3 f2 f5
SLIDE 89
What Are Affine Programs? 2 1 3 f1 f4 f3 f2 f5
Only ‘nondeterministic’ branching (no conditionals)
SLIDE 90
What Are Affine Programs? 2 1 3 f1 f4 f3 f2 f5
Only ‘nondeterministic’ branching (no conditionals) All assignments are affine (or linear)
SLIDE 91
What Are Affine Programs? 1 3 f4 f3 f2 f5 2 − 3 :=7 x + 2 z y
Only ‘nondeterministic’ branching (no conditionals) All assignments are affine (or linear)
SLIDE 92
What Are Affine Programs? 1 3 f4 f3 f2 f5 2 − 3 :=7 x + 2 z y
Only ‘nondeterministic’ branching (no conditionals) All assignments are affine (or linear) Also allow nondeterministic assignments x := ?
SLIDE 93
What Are Affine Programs? 1 3 f3 f2 f5 2 := x :=7 − 3 + 2 z y y ?
Only ‘nondeterministic’ branching (no conditionals) All assignments are affine (or linear) Also allow nondeterministic assignments x := ?
SLIDE 94
What Are Affine Programs? 1 3 f3 f2 f5 2 := x :=7 − 3 + 2 z y y ?
Only ‘nondeterministic’ branching (no conditionals) All assignments are affine (or linear) Also allow nondeterministic assignments x := ? Affine programs: can overapproximate more complex programs
SLIDE 95
What Are Affine Programs? 1 3 f3 f2 f5 2 := x :=7 − 3 + 2 z y y ?
Only ‘nondeterministic’ branching (no conditionals) All assignments are affine (or linear) Also allow nondeterministic assignments x := ? Affine programs: can overapproximate more complex programs already cover a range of existing formalisms, e.g. probabilistic / quantum / quantitative automata, . . .
SLIDE 96
From Affine Programs to Linear Semigroups
2 1 3 f1 f4 f3 f2 f5
1
M
4
M
5
M
2
M
3
M
each Mi ∈ Qd2
SLIDE 97
Some Hard Problems for Linear Semigroups
Theorem (Markov 1947) There is a fixed set of 6 × 6 integer matrices M1, . . . , Mk such that the membership problem “M ∈ M1, . . . , Mk?” is undecidable.
SLIDE 98
Some Hard Problems for Linear Semigroups
Theorem (Markov 1947) There is a fixed set of 6 × 6 integer matrices M1, . . . , Mk such that the membership problem “M ∈ M1, . . . , Mk?” is undecidable. Mortality: Is the zero matrix contained in the semigroup generated by a given set of n × n matrices with integer entries?
SLIDE 99
Some Hard Problems for Linear Semigroups
Theorem (Markov 1947) There is a fixed set of 6 × 6 integer matrices M1, . . . , Mk such that the membership problem “M ∈ M1, . . . , Mk?” is undecidable. Mortality: Is the zero matrix contained in the semigroup generated by a given set of n × n matrices with integer entries? Theorem (Paterson 1970) The mortality problem is undecidable for 3 × 3 matrices.
SLIDE 100
State of the Menagerie
Intervals [Cousot, Cousot 76], [Harrison 77] x ∈ [0, 4] ∧ y ∈ [2, ∞) Octagons [Min´ e 06] x + y − 2 ≤ 2 ∧ x ≤ 3 ∧ y − x ≤ 1 Linear / Algebraic sets [M¨ uller-Olm, Seidl 04] x3 − y2 = 0 ∧ x2yz5 − 3yz = 0 Polyhedral / Semilinear sets [Cousot, Halbwachs 78] x + 2y − 3z + 4 ≤ 0 ∨ 2x + 7y + 2z ≥ 0 Semialgebraic sets [Bagnara et al. 05] x2 + y2 + z2 ≤ 0 ∨ x2yz5 − 3yz + 6 ≥ 0
SLIDE 101
State of the Menagerie
Intervals [Cousot, Cousot 76], [Harrison 77] x ∈ [0, 4] ∧ y ∈ [2, ∞) Octagons [Min´ e 06] x + y − 2 ≤ 2 ∧ x ≤ 3 ∧ y − x ≤ 1 Linear / Algebraic sets [M¨ uller-Olm, Seidl 04] x3 − y2 = 0 ∧ x2yz5 − 3yz = 0 Polyhedral / Semilinear sets [Cousot, Halbwachs 78] x + 2y − 3z + 4 ≤ 0 ∨ 2x + 7y + 2z ≥ 0 Semialgebraic sets [Bagnara et al. 05] x2 + y2 + z2 ≤ 0 ∨ x2yz5 − 3yz + 6 ≥ 0
SLIDE 102
Karr’s Algorithm, Acta Informatica 76
Theorem (Karr 76) There is an algorithm which computes, for any given affine program over Q, its strongest linear inductive invariant.
SLIDE 103
Smallest Algebraic Invariants
Theorem (Hrushovski, Ouaknine, Pouly, Worrell 18) The problem of the existence of algebraic inductive safety invariants for affine program is decidable.
SLIDE 104
Smallest Algebraic Invariants
Theorem (Hrushovski, Ouaknine, Pouly, Worrell 18) The problem of the existence of algebraic inductive safety invariants for affine program is decidable. Smallest algebraic set containing all reachable configurations ⇐ ⇒ Zariski closure of the set of reachable configurations
SLIDE 105
Smallest Algebraic Invariants
Theorem (Hrushovski, Ouaknine, Pouly, Worrell 18) The problem of the existence of algebraic inductive safety invariants for affine program is decidable. Smallest algebraic set containing all reachable configurations ⇐ ⇒ Zariski closure of the set of reachable configurations Theorem (Hrushovski, Ouaknine, Pouly, Worrell 18) The presence of guards or polynomial transitions makes the problem undecidable.
SLIDE 106
State of the Menagerie
Intervals [Cousot, Cousot 76], [Harrison 77] x ∈ [0, 4] ∧ y ∈ [2, ∞) Octagons [Min´ e 06] x + y − 2 ≤ 2 ∧ x ≤ 3 ∧ y − x ≤ 1 Linear / Algebraic sets [M¨ uller-Olm, Seidl 04] x3 − y2 = 0 ∧ x2yz5 − 3yz = 0 Polyhedral / Semilinear sets [Cousot, Halbwachs 78] x + 2y − 3z + 4 ≤ 0 ∨ 2x + 7y + 2z ≥ 0 Semialgebraic sets [Bagnara et al. 05] x2 + y2 + z2 ≤ 0 ∨ x2yz5 − 3yz + 6 ≥ 0
SLIDE 107
Undecidability for Semilinear invariants
Theorem The problem of the existence of semilinear safety invariants is undecidable.
SLIDE 108
Undecidability for Semilinear invariants
Theorem The problem of the existence of semilinear safety invariants is undecidable. M1 M2 Only two transitions required (matrices of size 336). A single ”bad” point.
SLIDE 109
Undecidability for Semilinear invariants
Theorem The problem of the existence of semilinear safety invariants is undecidable. M1 M2 Only two transitions required (matrices of size 336). A single ”bad” point. Reachability of the ”bad” point is not possible.
SLIDE 110
Undecidability for Semilinear invariants
Theorem The problem of the existence of semilinear safety invariants is undecidable. M1 M2 Only two transitions required (matrices of size 336). A single ”bad” point. Reachability of the ”bad” point is not possible. Invariant of the form: I = S ∪ F S is a simple safe set. F is a finite number of points.
SLIDE 111
Decidability for Single Loop
While x / ∈ Bad do x := Mx
SLIDE 112
Decidability for Single Loop
While x / ∈ Bad do x := Mx Theorem The problem of the existence of semilinear safety invariants for while loop is decidable.
SLIDE 113
Decidability for Single Loop
While x / ∈ Bad do x := Mx Theorem The problem of the existence of semilinear safety invariants for while loop is decidable. Build the Jordan normal form;
SLIDE 114
Decidability for Single Loop
While x / ∈ Bad do x := Mx Theorem The problem of the existence of semilinear safety invariants for while loop is decidable. Build the Jordan normal form; Build invariant if there exist ”simple” eigenvalues;
SLIDE 115
Decidability for Single Loop
While x / ∈ Bad do x := Mx Theorem The problem of the existence of semilinear safety invariants for while loop is decidable. Build the Jordan normal form; Build invariant if there exist ”simple” eigenvalues; Prove the absence of non-trivial semilinear invariant otherwise.
SLIDE 116
Case |λ| > 1
Starting in x Bad =y Sequence in the eigenspace is a diverging spiral
SLIDE 117
Case |λ| > 1
Starting in x Bad =y Sequence in the eigenspace is a diverging spiral Most difficult case: modulus 1 and not root of unity.
SLIDE 118
Case |λ| > 1
Starting in x Bad =y Sequence in the eigenspace is a diverging spiral Most difficult case: modulus 1 and not root of unity. → Only semilinear invariant given by relations between eigenvalues
SLIDE 119
What about Convex Invariant?
simplicity of representation and implementation algorithmic tractability and scalability good termination heuristics
SLIDE 120
What about Convex Invariant?
simplicity of representation and implementation algorithmic tractability and scalability good termination heuristics ✗ lack of expressivity
SLIDE 121
What about Convex Invariant?
simplicity of representation and implementation algorithmic tractability and scalability good termination heuristics ✗ lack of expressivity Theorem (Monniaux 19) The problem of the existence of convex semilinear safety invariants for affine programs with polynomial guards is undecidable.
SLIDE 122
What about Convex Invariant?
simplicity of representation and implementation algorithmic tractability and scalability good termination heuristics ✗ lack of expressivity Theorem (Monniaux 19) The problem of the existence of convex semilinear safety invariants for affine programs with polynomial guards is undecidable. The general case remains open and challenging.
SLIDE 123
Ongoing Research Programme
The Monniaux Problem for convex invariants Orbit-finiteness for polynomial programs Algebraic and semialgebraic invariants for continuous dynamical systems & hybrid automata
SLIDE 124
A Bouncing Ball
SLIDE 125
A Linear Hybrid Automaton (LHA)
SLIDE 126
Strongest Algebraic Invariants for LHA
vx = c
SLIDE 127
Strongest Algebraic Invariants for LHA
vx = c x = tc
SLIDE 128