Constraint-Based Static Analysis of Programs
|
|
- Molly Tyler
- 6 years ago
- Views:
Transcription
1 Constraint-Based Static Analysis of Programs Joint work with Michael Colon, Sriram Sankaranarayanan, Aaron Bradley and Zohar Manna Henny Sipma Stanford University Master Class Seminar at Washington University at St Louis, 2006 Henny Sipma, November 16, 2006 Washington University at St Louis - p 1/66
2 Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based Henny Sipma, November 16, 2006 Washington University at St Louis - p 2/66
3 Motivation Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based Objective: To extract information about the program behavior from the program text invariants termination temporal properties Henny Sipma, November 16, 2006 Washington University at St Louis - p 3/66
4 Trivial Example Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based integer i, j where i=2 j=0 l 0 : while () do if () then i := i+4 else (i, j) := (i+2, j+1) i 2, j 0, and i 2j 2 are invariants Objective: To obtain such invariants automatically Henny Sipma, November 16, 2006 Washington University at St Louis - p 4/66
5 Buffer Overflow Analysis Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based 0 i<n? 1: int *a = malloc( sizeof(int) * n); 2: int i,j,k; 3: for(i=0; i<n; ++i) 4: for(j=0;2*j<=i;++j) 5: if (a[i] <= a[2*j+1]) 6: 7: Check bounds for each array access 0 2j+1<n? Henny Sipma, November 16, 2006 Washington University at St Louis - p 5/66
6 Division by Zero Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based c+b 1>0 1: double a,b,c 2: 3: while ( b > 0 c >= 0 ) { 4: a = a + b/(c+b-1); 5: 6: } Prove every divisor non-zero Henny Sipma, November 16, 2006 Washington University at St Louis - p 6/66
7 Deadlock Freedom x 7 x 13 Overflows Division by Zero Deadlock Freedom x 6 x 9 x 14 x 18 x 21 x 23 Traditional Approach x 15 x 19 Forward Propagation Problems x 1 x 2 x 3 x 25 Common Solution x 10 x 16 - step 1 - step 2 - step 3 x 5 x 8 x 11 x 17 x 20 x 22 - step 4 Constraint-Based x 4 x 12 x 24 Is this Petri net deadlock free? [Zhou et al : 1992] Henny Sipma, November 16, 2006 Washington University at St Louis - p 7/66
8 Preliminaries: Transition Systems Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based integer i, j where i=2 j=0 l 0 : while true do i := i+4 or (i, j) := (i+2, j+1) Transition system: L :{l 0 }, V : { i, j },T:{τ 1,τ 2 },Θ : (i=2 j=0), L 0 : l 0 } {{ }} {{ }} {{ }} {{ }}{{} with locations variables transitions initial condition τ 1 = l 0, l 0,ρ τ1 : (i = i+4 j = j) τ 2 = l 0, l 0,ρ τ2 : (i = i+2 j = j+1) } {{ } transition relation initial location Henny Sipma, November 16, 2006 Washington University at St Louis - p 8/66
9 Transition System: Execution Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based Computation: Infinite sequence of states l i, x i such that Initial Condition satisfied l 0, x 0 τ 1 l 1, x 1 τ 2 l 2, x 2 l 0 = L 0 Θ(x 0 ) Consecutive states l i, x i l i+1, x i+1 satisfy some transition τ k : li,l i+1,ρ τk (x i, x i+1 ) Henny Sipma, November 16, 2006 Washington University at St Louis - p 9/66
10 Static Analysis: Traditional Approach Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based Symbolic forward simulation to obtain an overapproximation of the reachable state space (ie invariants) B Θ F 1 F 2 reachable states Henny Sipma, November 16, 2006 Washington University at St Louis - p 10/66
11 Forward Propagation Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based until with F 0 : Θ F 1 : F 0 ( τ T post τ (F 0 ) ) F 2 : F 1 ( τ T post τ (F 1 ) ) post τ (ϕ) : V 0 F i+1 F i (ϕ(v 0 ) ρ τ (V 0, V)) Henny Sipma, November 16, 2006 Washington University at St Louis - p 11/66
12 Problems Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based 1 May not converge in finite time Example: We never reach: x 0 integer i where i=0 while true do x := x+1 F 0 : i=0 F 1 : i=0 i=1 F 2 : i=1 i=1 i=2 2 May not be able to detect convergence F n+1 F n Henny Sipma, November 16, 2006 Washington University at St Louis - p 12/66
13 Common Solution Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based Abstract Interpretation [Cousot&Cousot,77]: perform the symbolic simulation in an abstract domain: Domain converges? Reference Linear equalities yes Karr 76 Müller-Olm,Seidl, 04 Gulwani+Necula 03 Linear inequalities no Cousot,Halbwachs 79 Intervals no Cousot,Cousot 76 Octagons no Mine 01 Octahedra no Clarisó,Cortadella 04 TCM no SSM 04 Use widening operator to force convergence Henny Sipma, November 16, 2006 Washington University at St Louis - p 13/66
14 Example: Forward Propagation Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based integer i, j where i=2 j=0 l 0 : while true do i := i+4 or (i, j) := (i+2, j+1) Abstract Domain: Linear Inequalities over Reals Henny Sipma, November 16, 2006 Washington University at St Louis - p 14/66
15 Step 1: Iteration Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based η 0 : (j=0) (i=2) post(η 0,τ 1 ) : (j=0) (i=6) post(η 0,τ 2 ) : (j=1) (i=4) η 1 : (0 j 1) (i 2j 2) (i+2j 6) η 0 τ 2 (4, 1) j τ 1 (2, 0) (6, 0) i Henny Sipma, November 16, 2006 Washington University at St Louis - p 15/66
16 Step 2: Iteration Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based η 1 : (0 j 1) (i 2j 2) (i+2j 6) post(η 1,τ 1 ) : (0 j 1) (i 2j 6) (i+2j 10) post(η 1,τ 2 ) : (1 j 2) (i 2j 2) (i+2j 10) η 2 : (0 j 2) (i 2j 2) (i+2j 10) j (6, 2) (4, 1) τ 2 (8, 1) τ 1 η 1 (2, 0) (6, 0) (10, 0) i Henny Sipma, November 16, 2006 Washington University at St Louis - p 16/66
17 Step 3: Widening Iteration Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based η 1 : (0 j 1) (i 2j 2) (i+2j 6) η 2 : (0 j 2) (i 2j 2) (i+2j 10) η 3 : (0 j 3) (i 2j 2) (i+2j 14) η 3 =η 2 η 3 : (0 j) (i 2j 2) (4, 1) (6, 2) η 3 j (2, 0) (6, 0) (10, 0) i Henny Sipma, November 16, 2006 Washington University at St Louis - p 17/66
18 Iteration: Step 4 Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based post(η 3,τ 1) : (0 j) (i 2j 2) post(η 3,τ 2) : (0 j) (i 2j 2) η 4 =η 3 post(η 3,{τ 1,τ 2 }) : (0 j) (i 2j 2) j (2, 0) η 3 i Note: Termination of iteration,η 4 =η 3 The final invariants are 0 j 2 i 2j Henny Sipma, November 16, 2006 Washington University at St Louis - p 18/66
19 Outline Overflows Division by Zero Deadlock Freedom Traditional Approach Forward Propagation Problems Common Solution - step 1 - step 2 - step 3 - step 4 Constraint-Based Computing linear invariants Computing linear ranking functions Computing polynomial invariants Related Work Conclusions Henny Sipma, November 16, 2006 Washington University at St Louis - p 19/66
20 Henny Sipma, November 16, 2006 Washington University at St Louis - p 20/66
21 1 Fix the type and shape of the desired property Examples: linear invariant, linear ranking function polynomial invariant 2 Provide the conditions for the property to hold 3 Encode the conditions on the property as a system of constraints 4 Solve the constraints 5 Every solution is a property of the desired type and shape Henny Sipma, November 16, 2006 Washington University at St Louis - p 21/66
22 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons Henny Sipma, November 16, 2006 Washington University at St Louis - p 22/66
23 1 Fix type and shape Type: Invariant 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons Shape: where and c 1 x 1 + c 2 x 2 ++c n x n + d 0 {x 1,,x n } are the program variables {c 1,,c n, d} are unknown coefficients Henny Sipma, November 16, 2006 Washington University at St Louis - p 23/66
24 2 Property Conditions 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons The property ψ : c 1 x 1 + c 2 x 2 ++c n x n + d 0 is an invariant of transition system Φ : V :{x 1,,x n },Θ,T :{τ 1,,τ k } if Θ = ψ (initiation) ψ ρ τ1 = ψ (consecution) ψ ρ τk = ψ that is, if it is implied by the initial condition, and it is preserved by all transitions of the system Henny Sipma, November 16, 2006 Washington University at St Louis - p 24/66
25 Property Conditions: Example 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons integer i, j where i=2 j=0 l 0 : while true do i := i+4 or (i, j) := (i+2, j+1) Target invariant: ψ : c 1 i+c 2 j+d 0 Conditions: i=2 j=0 } {{ } Θ = c 1 i+c 2 j+d 0 } {{ } c 1 i+c 2 j+d 0 i = i+4 j = j = c 1 i + c 2 j + d 0 c 1 i+c 2 j+d 0 i = i+2 j = j+1 = c 1 i + c 2 j + d 0 } {{ }} {{ }} {{ } ψ ρ τ1,ρ τ2 ψ ψ Henny Sipma, November 16, 2006 Washington University at St Louis - p 25/66
26 Farkas Lemma 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons Let S be a system of linear inequalities over real-valued variables x 1,,x n, a 11 x a 1n x n + b 1 0 S : and ψ a linear inequality, a m1 x a mn x n + b m 0 ψ : c 1 x 1 + +c n x n + d 0 If S is satisfiable, S =ψiff there exist real multipliers λ 1,,λ m 0 such that: c 1 = m λ i a i1 c n = i=1 m λ i a in i=1 d ( m λ i b i ) i=1 Henny Sipma, November 16, 2006 Washington University at St Louis - p 26/66
27 3 Encode the conditions: Initiation 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons Initiation:Θ = c 1 x 1 + +c n x n + d 0is encoded by λ θ,1 θ 11 x θ 1n x n + θ 1,n+1 0 λ θ,m θ m1 x θ mn x n + θ m,n+1 0 c 1 x c n x n + d 0 which produces the constraints S Θ : (λ θ,1 λ θ,m 0) c 1 = m i=1 λ θ,iθ i1 c n = m i=1 λ θ,iθ in d ( m i=1 λ θ,iθ i,n+1 ) Θ Henny Sipma, November 16, 2006 Washington University at St Louis - p 27/66
28 Example:Encoding Initiation 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons Initial ConditionΘ: i=2 j=0 Constraints: λ λ 1 i 2 0 λ 2 i 2 0 λ 3 j 0 λ 4 j 0 c 1 i + c 2 j + d 0 ψ ( λ 0,,4 0) [λ 1 λ 2 = c 1 λ 3 λ 4 = c 2 λ 0 2λ 1 + 2λ 2 = d] Eliminateλ 0,λ 4 : S Θ : 2c 1 + d 0 Henny Sipma, November 16, 2006 Washington University at St Louis - p 28/66
29 3 Encode the Conditions: Consecution 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons Consecution: c 1 x 1 + +c n x n + d 0 ρ τi is encoded by = c 1 x 1 + c nx n+ d 0 µτ i c 1 x 1 + +cnxn + d 0 λ τi,1 τ i,11 x 1 + +τ i,1n xn + τ i,11 x 1 ++τ i,1n x n + τ i,1,n+1 0 λτ i,m τ i,m1 x 1 + +τ i,mn xn + τ i,m1 x 1 ++τ i,mn x n + τ i,m,n+1 0 which produces the constraints S τi : (µ τi,λ τi,1,,λ τi,m 0) c 1 x 1 ++c nx n + d 0 µτ i c 1 + mj=1 λ τi,j τ i,j1 = 0 ρτ i µτ i cn + mj=1 λ τi,j τ i,jn = 0 mj=1 λ τi,j τ i,j1 = c 1 µτ i d + mj=1 λ τi,j τ i,jn = c n mj=1 λ τi,j τ i,j,n+1 d Henny Sipma, November 16, 2006 Washington University at St Louis - p 29/66
30 Example:Encoding Consecution forτ 1 Transition relationρ τ1 : i = i+4 j = j 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons λ µ 1 c 1 i + c 2 j + d 0 ψ } λ 1 i i + 4 = 0 λ2 j j = 0 Constraints: ( λ 0,µ 1 0)( λ 1,λ 2 ) Eliminateλ 0,,λ 2,µ 1 : c 1 i + c 2 j + d 0 ψ ρ τ1 µ 1 c 1 +λ 1 = 0 µ 2 c 2 +λ 2 = 0 λ 1 = c 1 λ 2 = c 2 λ 0 +µ 1 d+4λ 1 = d S τ1 : (c 1 0) (c 1 = 0 c 2 = 0) Henny Sipma, November 16, 2006 Washington University at St Louis - p 30/66
31 Example: Combined Constraint 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons The overall constraint is: which simplifies to (2c 1 + d 0) Initiation (c 1 0) (c 1 = 0 c 2 = 0) τ 1 consecution (2c 1+ c 2 0) (c 1 = 0 c 2 = 0) τ 2 consecution 2c 1 + d 0 c 1 0 2c 1 + c 2 0 Henny Sipma, November 16, 2006 Washington University at St Louis - p 31/66
32 4 Solve the constraints 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons Solve the constraint systems for{c 1,,c n, d} S Θ S τ1 S τk Henny Sipma, November 16, 2006 Washington University at St Louis - p 32/66
33 Example: Solving the Constraints 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons The basic solutions of are 2c 1 + d 0 c 1 0 2c 1 + c 2 0 c 1 c 2 d c 1 i+c 2 j+d j i+2j+2 0 which corresponds to the inductive invariants j 0 and i 2j 2 Henny Sipma, November 16, 2006 Washington University at St Louis - p 33/66
34 5 Solutions The property c 1 x 1 ++c n x n + d 0 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons is an invariant for all solutions of{c 1,,c n, d} Good news: The method is complete for linear systems: The solutions of{c 1,,c n } represent all linear inductive inequalities of the given shape But: Requires individual inductiveness Henny Sipma, November 16, 2006 Washington University at St Louis - p 34/66
35 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons 1 Fix a target property with unknown coefficients, c 1 i+c 2 j+d 0 2 Encode the property conditions 3 Compute constraints on the unknown coefficients, 4 Solve these constraints 2c 1 + d 0 c 1 0 2c 1 + c 2 0 c 1, c 2, d = 0, 1, 0 c 1, c 2, d = 1, 2, 2 5 Generate the invariants 0, 1, 0 0i 1j+0 0 1, 2, 2 1i+2j+2 0 Invariants: j 0 and i 2j 2 Henny Sipma, November 16, 2006 Washington University at St Louis - p 35/66
36 Pros and Cons 1 Fix type and shape 2 Example Farkas Lemma 3Encode Initiation 3Encode Consecution 4 Solve the constraints 4 Example Pros and Cons Advantages: No widening necessary All inductive invariants are generated (or obtained as consequences) System structure can be exploited to obtain linear constraints: Petri nets Disadvantages: The constraint systems S τ1,,s τk hard to solve Tools: QEPCAD are nonlinear and may be But: S τ1,,s τk are parametric linear More efficient solution methods: factorization, polynomial root finding Tool: REDLOG [Weispfennig; Dolzmann,Sturm] Henny Sipma, November 16, 2006 Washington University at St Louis - p 36/66
37 1Fix type and shape 3Encode Bounded 3Encode Ranking 4 Solve the constraints Computing Henny Sipma, November 16, 2006 Washington University at St Louis - p 37/66
38 1 Fix type and shape Type: Ranking function 1Fix type and shape 3Encode Bounded 3Encode Ranking 4 Solve the constraints Shape: where and c 1 x 1 + c 2 x 2 ++c n x n + d {x 1,,x n } are the program variables {c 1,,c n, d} are unknown coefficients Henny Sipma, November 16, 2006 Washington University at St Louis - p 38/66
39 2 Property Conditions 1Fix type and shape 3Encode Bounded 3Encode Ranking 4 Solve the constraints The function δ : c 1 x 1 + c 2 x 2 ++c n x n + d is a ranking function of a loop Φ : V :{x 1,,x n },Θ,T :{τ 1,,τ k } if ρ τ1 =δ 0 bounded ρ τk =δ 0 ρ τ1 =δ δ > 0 ranking ρ τk =δ δ > 0 that is, if it is bounded from below, and it is decreased by each transition Henny Sipma, November 16, 2006 Washington University at St Louis - p 39/66
40 3 Encode the conditions: Bounded 1Fix type and shape 3Encode Bounded 3Encode Ranking 4 Solve the constraints Bounded: is encoded by ρ τi =δ 0 λ τi,1 τ i,11 x 1 + +τ i,1n xn + τ i,11 x 1 ++τ i,1n x n + τ i,1,n+1 0 λτ i,m τ i,m1 x 1 + +τ i,mn xn + τ i,m1 x 1 ++τ i,mn x n + τ i,m,n+1 0 c 1 x 1 cnxn + d 0 which produces the constraints mj=1 λ τi,j τ i,j1 = c 1 ρτ i mj=1 λ τi,j τ i,jn = cn B τi : (λ τi,1,,λ τi,m 0) mj=1 λ τi,j τ i,j1 mj=1 λ τi,j τ i,jn = 0 = 0 m j=1 λ τi,j τ i,j,n+1 d Henny Sipma, November 16, 2006 Washington University at St Louis - p 40/66
41 3 Encode the conditions: Ranking 1Fix type and shape 3Encode Bounded 3Encode Ranking 4 Solve the constraints Ranking: is encoded by ρ τi = δ δ > 0 λ τi,1 τ i,11 x 1 + +τ i,1n xn + τ i,11 x 1 ++τ i,1n x n + τ i,1,n+1 0 λτ i,m τ i,m1 x 1 + +τ i,mn xn + τ i,m1 x 1 ++τ i,mn x n + τ i,m,n+1 0 c 1 x 1 cnxn + c 1 x 1 ++c nx n ǫ 0 which produces the constraints mj=1 λ τi,j τ i,j1 = c 1 ρτ i mj=1 λ τi,j τ i,jn = cn R τi : (λ τi,1,,λ τi,m 0) mj=1 λ τi,j τ i,j1 mj=1 λ τi,j τ i,jn = c 1 = cn m j=1 λ τi,j τ i,j,n+1 ǫ Henny Sipma, November 16, 2006 Washington University at St Louis - p 41/66
42 4 Solve the constraints 1Fix type and shape 3Encode Bounded 3Encode Ranking 4 Solve the constraints Solve the constraint systems for{c 1,,c n, d} B τ1 B τk R τ1 R τk Henny Sipma, November 16, 2006 Washington University at St Louis - p 42/66
43 5 Solutions The function c 1 x 1 + c 2 x 2 ++c n x n + d 1Fix type and shape 3Encode Bounded 3Encode Ranking 4 Solve the constraints is a ranking function for all solutions of{c 1,,c n, d} Good news: The method is complete for linear systems: The solutions represent all linear ranking functions of the given (uninitialized) loop Good news:constraints are all linear: can be solved efficiently Bad news: Most ranking functions require invariants to prove boundedness Henny Sipma, November 16, 2006 Washington University at St Louis - p 43/66
44 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints Computing Henny Sipma, November 16, 2006 Washington University at St Louis - p 44/66
45 1 Fix type and shape Type: Invariant Shape: 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints where and c 1 x 3 + c 2 x 2 y+c 3 x 2 z+c 4 xy 2 + c 5 xyz+c 6 xz 2 + c 7 y 3 + c 8 y 2 z+c 9 yz 2 + c 10 z 3 = 0 {x, y, z} are the program variables {c 1,,c 10 } are unknown coefficients Henny Sipma, November 16, 2006 Washington University at St Louis - p 45/66
46 2 Property Conditions 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints The property p=0with p : c 1 x 3 + c 2 x 2 y+c 3 x 2 z+c 4 xy 2 + c 5 xyz+c 6 xz 2 + c 7 y 3 + c 8 y 2 z+c 9 yz 2 + c 10 z 3 is an invariant of transition system Φ : V :{x 1,,x 10 },Θ,T :{τ 1,,τ k } if Θ = p=0 p=0 ρ τ1 = p = 0 p=0 ρ τk = p = 0 (initiation) that is, if it is implied by the initial condition, and (consecution) it is preserved by all transitions of the system Henny Sipma, November 16, 2006 Washington University at St Louis - p 46/66
47 Linear Equalities vs Nonlinear Equalities 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints Computing Consequences for Polynomial Equalities Linear Equalities λ 1 e 1 = 0 λ m e m = 0 Polynomial Equalities g 1 p 1 = 0 g m p m = 0 e=0 p=0 λ 1,,λ m, reals g 1,, g m, arbitrary polynomials e=λ 1 e 1 + +λ m e m p= g 1 p g m p m e SPACE(e 1,,e m ) p IDEAL(p 1,,p m ) How do we test if p IDEAL(p 1,,p m )? Henny Sipma, November 16, 2006 Washington University at St Louis - p 47/66
48 Ideals 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints Ideal: The ideal generated by P is the set of all polynomials of the form Á Ð(P)={g 1 p 1 ++ g m p m g 1,, g m polynomials} Example: Let P={x 2 y, y z, x+z} g 1 (x 2 y)+ g 2 (y z)+ g 3 (x+z) Á Ð(P)= g 1, g 2, g 3 are polynomials over x, y, z zx z= 1 (x 2 y)+ 1 }{{}}{{} g 1 g 2 Therefore, zx z Á Ð(P) (y z)+ x (x+z) }{{} g 3 Henny Sipma, November 16, 2006 Washington University at St Louis - p 48/66
49 Testing Ideal Membership 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints : To test if p 1 = 0 p 2 = 0 p m = 0 = p=0 we instead test if p Á Ð({p 1,,p m }) ie, p= g 1 p g m p m for some g 1, g m How do we test if p Á Ð(P)? Henny Sipma, November 16, 2006 Washington University at St Louis - p 49/66
50 Gröbner Basis Theorem Given any set of polynomials P, compute special set of polynomials G, such that 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints Á Ð(G)=Á Ð(P), G is confluent and terminating G is called the Gröbner basis of P For any polynomial p, unique normal form p G G NF G (p) Theorem: p Á Ð(P) iff NF G (p)=0 Henny Sipma, November 16, 2006 Washington University at St Louis - p 50/66
51 Testing Ideal Membership How do we test if p IDEAL(p 1,,p m )? 1 Compute Gröbner basis G for{p 1,,p m } Use Buchberger s Algorithm + Refinements 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints 2 Compute normal form for p, denoted NF(p), 3 p IDEAL(p 1,,p m ) iff NF G (p)=0 Henny Sipma, November 16, 2006 Washington University at St Louis - p 51/66
52 Testing Ideal Membership 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints Example: Let P={p 1 : x 2 y, p 2 : y+z, p 3 : x z} Can we find out if x 2 z Á Ð(P) using? P No! Gröbner basis of P is Can we find out using Yes! G={z 2 z, y z, x+z} G? Any sequence of reductions from x 2 z has normal form 0 Henny Sipma, November 16, 2006 Washington University at St Louis - p 52/66
53 Parametric Membership Problem Let P={p 1 : x 2 y, p 2 : y+z, p 3 : x z} Problem: For what values of c 1, c 2,,c 5 is the polynomial 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints p : c 1 x 2 + x 2 y 2 + c 3 z 2 + c 4 z+c 5 Á Ð(P)? Solution: 1 Compute the Gröbner basis of P, 2 Compute Normal Form of P, G={z 2 z, y z, x+z} (c 1 + c 2 + c 3 + c 4 )z+c 5 3 Set every coefficient to be zero, (c 1 + c 2 + c 3 + c 4 = 0) (c 5 = 0) Henny Sipma, November 16, 2006 Washington University at St Louis - p 53/66
54 Parametric Membership Problem 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints Note: For solutions to c 1,,c 5 that satisfy (c 1 + c 2 + c 3 + c 4 = 0) (c 5 = 0) it follows that p : c 1 x 2 + x 2 y 2 + c 3 z 2 + c 4 z+c 5 Á Ð(P) Henny Sipma, November 16, 2006 Washington University at St Louis - p 54/66
55 3 Encode the conditions: Initiation The condition Θ = p=0 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints is encoded by reducing p wrt to the Gröbner basis G of ((Θ)): and setting p G NF(p) NF(p) 0 which produces a set S Θ of linear constraints on{c 1,c 10 } Henny Sipma, November 16, 2006 Washington University at St Louis - p 55/66
56 3 Encode the conditions: Consecution The condition p=0 ρ τi = p = 0 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints is not practical to encode Instead we encode one of which result in a set S τi ρ τi = p = 0 ρ τi = p p=0 of linear constraints λ R ρ τi = p λp=0 q R[x 1,,x n ] ρ τi = p qp=0 which result in a set of nonlinear constraints Henny Sipma, November 16, 2006 Washington University at St Louis - p 56/66
57 4 Solve the constraints Solve for{c 1,,c 10 } S Θ S τ1 S τk 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints Henny Sipma, November 16, 2006 Washington University at St Louis - p 57/66
58 5 Solutions 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints The property c 1 x 3 + c 2 x 2 y+c 3 x 2 z+c 4 xy 2 + c 5 xyz+c 6 xz 2 + c 7 y 3 + c 8 y 2 z+c 9 yz 2 + c 10 z 3 = 0 is an invariant for all solutions of{c 1,,c 10 } Good news: Constraints are all linear: can be solved efficiently Bad news: Invariants are missed because of strengthening the conditions Henny Sipma, November 16, 2006 Washington University at St Louis - p 58/66
59 Example: Nonlinear Invariant Generation 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints integer i, j, k, s where (s=0 j=k j 0) l 0 : while (k 0) do l 1 : (s, k) := (s+i, k 1) l 2 : Target Invariant: p=c 1 s+c 2 ik+c 3 ij+c 4 jk+c 5 Question: For what values of c 1,,c 5, is p=0inductive at l 0? Henny Sipma, November 16, 2006 Washington University at St Louis - p 59/66
60 Example: Nonlinear Invariant Generation 1 Fix type and shape Gröbner Basis Theorem 3Encode Initiation 3Encode Consecution 4 Solve the constraints 1 Fix a template (usually a generic polynomial of degree m ), c 1 s+c 2 ik+c 3 ij+c 4 jk+c 5 2 Generate constraints by encoding initiation and consecution, 3 Solve the constraints, 4 Generate the invariant c 2 + c 3 = 0 c 4 = c 5 = 0 c 1 c 2 = 0 c 3 = 1, c 1 = c 2 = 1, c 4 = c 5 = 0 s ik+ij=0 Invariant: s=i(j k) at l 0 Henny Sipma, November 16, 2006 Washington University at St Louis - p 60/66
61 Advantages Advantages Papers Related Work Current Topics of Investigation Henny Sipma, November 16, 2006 Washington University at St Louis - p 61/66
62 Advantages of Constraint-based Approach Controlling the complexity of the constraints Strengthen the conditions on the property Advantages Advantages Papers Related Work Current Topics of Investigation Θ = ψ ψ ρ τ = ψ = parametric linear constraints Constrain the property Θ = ψ ρ τ = ψ linear constraints c 1 x 3 + c 2 x 2 y+c 3 x 2 z+c 4 xy 2 + c 5 xyz+c 6 xz 2 + c 7 y 3 + c 8 y 2 z+c 9 yz 2 + c 10 z 3 c 1 x 3 + c 2 xy 2 + c 3 xz 2 + c 4 y 2 z Henny Sipma, November 16, 2006 Washington University at St Louis - p 62/66
63 Advantages of Constraint-based Approach Not limited to invariants termination temporal properties (LTL safety) Advantages Advantages Papers Related Work Current Topics of Investigation Applicable to any domain that allows computation of consequences Can exploit system structure to simplify the constraint system Petri nets Can take advantage of new results in constraint solving community Henny Sipma, November 16, 2006 Washington University at St Louis - p 63/66
64 Papers Termination analysis (TACAS 01, CAV 02, CAV 05) Linear invariant generation (CAV 03, SAS 04, VMCAI 05, VMCAI 06) Advantages Advantages Papers Related Work Current Topics of Investigation Nonlinear invariant generation (POPL 04) Nonlinear invariant generation for hybrid systems (HSCC 04) Differential equations (HSCC 06) Sriram Sankaranarayanan, Mathematical Analysis of Programs, PhD Thesis, Stanford, 2005 Henny Sipma, November 16, 2006 Washington University at St Louis - p 64/66
65 Related Work Set-constraint based analysis - [Heintze 93] - [Aiken 99] Advantages Advantages Papers Related Work Current Topics of Investigation Termination analysis - [Podelski,Rybalchenko,VMCAI 04,LICS 04] - [Cousot, VMCAI 05] Nonlinear invariants - [Bensalem et al, SAS 00] - [Müller-Olm,Seidl,SAS 02,POPL 04] - [Tiwari et al, TACAS 01,HSCC 03] - [Rodriguez-Carbonell,Kapur,ISSAC 04] - [Cousot, VMCAI 05] Henny Sipma, November 16, 2006 Washington University at St Louis - p 65/66
66 Current Topics of Investigation Classification of systems with simpler constraint systems Extension to game properties (ATL*) Advantages Advantages Papers Related Work Current Topics of Investigation Extension to other domains, in particular nonlinear inequalities More efficient constraint solving strategies Henny Sipma, November 16, 2006 Washington University at St Louis - p 66/66
Verification Constraint Problems with Strengthening
Verification Constraint Problems with Strengthening Aaron R. Bradley and Zohar Manna Computer Science Department Stanford University Stanford, CA 94305-9045 {arbrad,manna}@cs.stanford.edu Abstract. The
More informationThe Polyranking Principle
The Polyranking Principle Aaron R. Bradley, Zohar Manna, and Henny B. Sipma Computer Science Department Stanford University Stanford, CA 94305-9045 {arbrad,zm,sipma}@theory.stanford.edu Abstract. Although
More informationGeneration of. Polynomial Equality Invariants. by Abstract Interpretation
Generation of Polynomial Equality Invariants by Abstract Interpretation Enric Rodríguez-Carbonell Universitat Politècnica de Catalunya (UPC) Barcelona Joint work with Deepak Kapur (UNM) 1 Introduction
More informationAn Abstract Interpretation Approach. for Automatic Generation of. Polynomial Invariants
An Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants Enric Rodríguez-Carbonell Universitat Politècnica de Catalunya Barcelona Deepak Kapur University of New Mexico Albuquerque
More informationAutomatic Generation of Polynomial Invariants for System Verification
Automatic Generation of Polynomial Invariants for System Verification Enric Rodríguez-Carbonell Technical University of Catalonia Talk at EPFL Nov. 2006 p.1/60 Plan of the Talk Introduction Need for program
More informationTHEORY OF SYSTEMS MODELING AND ANALYSIS. Henny Sipma Stanford University. Master class Washington University at St Louis November 16, 2006
THEORY OF SYSTEMS MODELING AND ANALYSIS Henny Sipma Stanford University Master class Washington University at St Louis November 16, 2006 1 1 COURSE OUTLINE 8:37-10:00 Introduction -- Computational model
More informationTermination Analysis of Loops
Termination Analysis of Loops Zohar Manna with Aaron R. Bradley Computer Science Department Stanford University 1 Example: GCD Algorithm gcd(y 1, y 2 ) = gcd(y 1 y 2, y 2 ) if y 1 > y 2 gcd(y 1, y 2 y
More informationConstructing Invariants for Hybrid Systems
Constructing Invariants for Hybrid Systems Sriram Sankaranarayanan, Henny B. Sipma and Zohar Manna Computer Science Department, Stanford University, Stanford, CA 94305, USA Abstract. We present a new method
More informationConstraint Solving for Program Verification: Theory and Practice by Example
Constraint Solving for Program Verification: Theory and Practice by Example Andrey Rybalchenko Technische Universität München Abstract. Program verification relies on the construction of auxiliary assertions
More informationLinear Ranking with Reachability
Linear Ranking with Reachability Aaron R. Bradley, Zohar Manna, and Henny B. Sipma Computer Science Department Stanford University Stanford, CA 94305-9045 {arbrad,zm,sipma}@theory.stanford.edu Abstract.
More informationDiscovering Non-Linear Ranking Functions by Solving Semi-Algebraic Systems
Discovering Non-Linear Ranking Functions by Solving Semi-Algebraic Systems Yinghua Chen 1, Bican Xia 1, Lu Yang 2, Naijun Zhan 3, and Chaochen Zhou 3 1 LMAM & School of Mathematical Sciences, Peking University
More informationScalable Analysis of Linear Systems using Mathematical Programming
Scalable Analysis of Linear Systems using Mathematical Programming Sriram Sankaranarayanan, Henny B. Sipma, and Zohar Manna Computer Science Department Stanford University Stanford, CA 94305-9045 {srirams,sipma,zm}@theory.stanford.edu
More informationProving Unsatisfiability in Non-linear Arithmetic by Duality
Proving Unsatisfiability in Non-linear Arithmetic by Duality [work in progress] Daniel Larraz, Albert Oliveras, Enric Rodríguez-Carbonell and Albert Rubio Universitat Politècnica de Catalunya, Barcelona,
More informationCS256/Winter 2009 Lecture #6. Zohar Manna
CS256/Winter 2009 Lecture #6 Zohar Manna Chapter 1 Invariance: Proof Methods For assertion q and SPL program P show P Õ ¼ q (i.e., q is P-invariant) 6-1 Proving Invariances Definitions Recall: the variables
More informationWhat s Decidable About Arrays?
What s Decidable About Arrays? Aaron R. Bradley Zohar Manna Henny B. Sipma Computer Science Department Stanford University 1 Outline 0. Motivation 1. Theories of Arrays 2. SAT A 4. Undecidable Problems
More informationConstraint Solving for Program Verification: Theory and Practice by Example
Constraint Solving for Program Verification: Theory and Practice by Example Andrey Rybalchenko Technische Universität München Abstract. Program verification relies on the construction of auxiliary assertions
More informationGeneration of Basic Semi-algebraic Invariants Using Convex Polyhedra
Generation of Basic Semi-algebraic Invariants Using Convex Polyhedra Generation of Invariant Conjunctions of Polynomial Inequalities Using Convex Polyhedra R. Bagnara 1, E. Rodríguez-Carbonell 2, E. Zaffanella
More informationEfficient Strongly Relational Polyhedral Analysis
Efficient Strongly Relational Polyhedral Analysis Sriram Sankaranarayanan 1,3, Michael A. Colón 2, Henny Sipma 3, Zohar Manna 3 1 NEC Laboratories America, Princeton, NJ srirams@nec-labs.com 2 Center for
More informationPrecise Program Analysis through (Linear) Algebra
Precise Program Analysis through (Linear) Algebra Markus Müller-Olm FernUniversität Hagen (on leave from Universität Dortmund) Joint work with Helmut Seidl (TU München) CP+CV 4, Barcelona, March 8, 4 Overview
More informationAn Abstract Domain to Infer Ordinal-Valued Ranking Functions
An Abstract Domain to Infer Ordinal-Valued Ranking Functions Caterina Urban and Antoine Miné ÉNS & CNRS & INRIA, Paris, France urban@di.ens.fr, mine@di.ens.fr Abstract. The traditional method for proving
More informationProgram Verification by Using DISCOVERER
Program Verification by Using DISCOVERER Lu Yang 1, Naijun Zhan 2, Bican Xia 3, and Chaochen Zhou 2 1 Software Engineering Institute, East China Normal University 2 Laboratory of Computer Science, Institute
More informationProgram Verification by Using DISCOVERER
Program Verification by Using DISCOVERER Lu Yang 1, Naijun Zhan 2, Bican Xia 3, and Chaochen Zhou 2 1 Software Engineering Institute, East China Normal University 2 Laboratory of Computer Science, Institute
More informationInterprocedurally Analyzing Polynomial Identities
Interprocedurally Analyzing Polynomial Identities Markus Müller-Olm 1, Michael Petter 2, and Helmut Seidl 2 1 Westfälische Wilhelms-Universität Münster, Institut für Informatik Einsteinstr. 62, 48149 Münster,
More informationOn the minimal free resolution of a monomial ideal.
On the minimal free resolution of a monomial ideal. Caitlin M c Auley August 2012 Abstract Given a monomial ideal I in the polynomial ring S = k[x 1,..., x n ] over a field k, we construct a minimal free
More informationVerifying Safety Properties of Hybrid Systems.
Verifying Safety Properties of Hybrid Systems. Sriram Sankaranarayanan University of Colorado, Boulder, CO. October 22, 2010. Talk Outline 1. Formal Verification 2. Hybrid Systems 3. Invariant Synthesis
More informationCS156: The Calculus of Computation
CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between
More informationSemantic Equivalences and the. Verification of Infinite-State Systems 1 c 2004 Richard Mayr
Semantic Equivalences and the Verification of Infinite-State Systems Richard Mayr Department of Computer Science Albert-Ludwigs-University Freiburg Germany Verification of Infinite-State Systems 1 c 2004
More informationCHAPTER 1 POLYNOMIALS
1 CHAPTER 1 POLYNOMIALS 1.1 Removing Nested Symbols of Grouping Simplify. 1. 4x + 3( x ) + 4( x + 1). ( ) 3x + 4 5 x 3 + x 3. 3 5( y 4) + 6 y ( y + 3) 4. 3 n ( n + 5) 4 ( n + 8) 5. ( x + 5) x + 3( x 6)
More informationA QUANTIFIER-ELIMINATION BASED HEURISTIC FOR AUTOMATICALLY GENERATING INDUCTIVE ASSERTIONS FOR PROGRAMS
Jrl Syst Sci & Complexity (2006) 19: 1 24 A QUANTIFIER-ELIMINATION BASED HEURISTIC FOR AUTOMATICALLY GENERATING INDUCTIVE ASSERTIONS FOR PROGRAMS Deepak KAPUR Received: 8 June 2006 c 2006 Springer Science
More informationAutomatically Generating Loop Invariants Using Quantifier Elimination Preliminary Report
Applications of Computer Algebra (ACA-2004) Automatically Generating Loop Invariants Using Quantifier Elimination Preliminary Report Deepak Kapur Abstract. An approach for automatically generating loop
More informationChange-Of-Bases Abstractions for Non-Linear Systems.
Change-Of-Bases Abstractions for Non-Linear Systems. Sriram Sankaranarayanan Department of Computer Science University of Colorado, Boulder, CO, USA. srirams@colorado.edu April 19, 2012 Abstract We present
More informationHoare Logic I. Introduction to Deductive Program Verification. Simple Imperative Programming Language. Hoare Logic. Meaning of Hoare Triples
Hoare Logic I Introduction to Deductive Program Verification Işıl Dillig Program Spec Deductive verifier FOL formula Theorem prover valid contingent Example specs: safety (no crashes), absence of arithmetic
More informationUnderstanding IC3. Aaron R. Bradley. ECEE, CU Boulder & Summit Middle School. Understanding IC3 1/55
Understanding IC3 Aaron R. Bradley ECEE, CU Boulder & Summit Middle School Understanding IC3 1/55 Further Reading This presentation is based on Bradley, A. R. Understanding IC3. In SAT, June 2012. http://theory.stanford.edu/~arbrad
More informationCEGAR:Counterexample-Guided Abstraction Refinement
CEGAR: Counterexample-guided Abstraction Refinement Sayan Mitra ECE/CS 584: Embedded System Verification November 13, 2012 Outline Finite State Systems: Abstraction Refinement CEGAR Validation Refinment
More informationGenerating All Polynomial Invariants in Simple Loops
Generating All Polynomial Invariants in Simple Loops E. Rodríguez-Carbonell a,, D. Kapur b a Software Department, Technical University of Catalonia, Jordi Girona, 1-3 08034 Barcelona (Spain) b Department
More informationAutomatic determination of numerical properties of software and systems
Automatic determination of numerical properties of software and systems Eric Goubault and Sylvie Putot Modelling and Analysis of Interacting Systems, CEA LIST MASCOT-NUM 2012 Meeting, March 21-23, 2012
More informationProof Calculus for Partial Correctness
Proof Calculus for Partial Correctness Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 7, 2016 Bow-Yaw Wang (Academia Sinica) Proof Calculus for Partial Correctness September
More informationIC3 and Beyond: Incremental, Inductive Verification
IC3 and Beyond: Incremental, Inductive Verification Aaron R. Bradley ECEE, CU Boulder & Summit Middle School IC3 and Beyond: Incremental, Inductive Verification 1/62 Induction Foundation of verification
More informationDisproving Termination with Overapproximation
Disproving Termination with Overapproximation Byron Cook Carsten Fuhs Kaustubh Nimkar Peter O Hearn University College London Microsoft Research FMCAD 2014, Lausanne, Switzerland, 24 October 2014 Proving
More informationGroebner Bases in Boolean Rings. for Model Checking and. Applications in Bioinformatics
Groebner Bases in Boolean Rings for Model Checking and Applications in Bioinformatics Quoc-Nam Tran, Ph.D. Professor of Computer Science Lamar University Invited Talk at CMU on October 8, 2010 Outline
More informationTermination of Polynomial Programs
Termination of Polynomial Programs Aaron R. Bradley, Zohar Manna, and Henny B. Sipma Computer Science Department Stanford University Stanford, CA 94305-9045 {arbrad,zm,sipma}@theory.stanford.edu Abstract.
More informationStatic Analysis in Disjunctive Numerical Domains.
Static Analysis in Disjunctive Numerical Domains. Sriram Sankaranarayanan, Franjo Ivančić, Ilya Shlyakhter, Aarti Gupta NEC Laboratories America, 4 Independence Way, Princeton, NJ Abstract. The convexity
More informationUnderstanding IC3. Aaron R. Bradley. ECEE Department, University of Colorado at Boulder
Understanding IC3 Aaron R. Bradley ECEE Department, University of Colorado at Boulder Email: bradleya@colorado.edu Abstract. The recently introduced model checking algorithm IC3 has proved to be among
More informationFormal Verification and Automated Generation of Invariant Sets
Formal Verification and Automated Generation of Invariant Sets Khalil Ghorbal Carnegie Mellon University Joint work with Andrew Sogokon and André Platzer Toulouse, France 11-12 June, 2015 K. Ghorbal (CMU,
More informationInformation Flow Analysis via Path Condition Refinement
Information Flow Analysis via Path Condition Refinement Mana Taghdiri, Gregor Snelting, Carsten Sinz Karlsruhe Institute of Technology, Germany FAST September 16, 2010 KIT University of the State of Baden-Wuerttemberg
More informationor simply: IC3 A Simplified Description
Incremental Construction of Inductive Clauses for Indubitable Correctness or simply: IC3 A Simplified Description Based on SAT-Based Model Checking without Unrolling Aaron Bradley, VMCAI 2011 Efficient
More informationGeometric Quantifier Elimination Heuristics for Automatically Generating Octagonal and Max-plus Invariants
Geometric Quantifier Elimination Heuristics for Automatically Generating Octagonal and Max-plus Invariants Deepak Kapur 1 Zhihai Zhang 2 Matthias Horbach 1 Hengjun Zhao 3 Qi Lu 1 and ThanhVu Nguyen 1 1
More informationOutline. Time Petri Net State Space Reduction Using Dynamic Programming and Time Paths. Petri Net. Petri Net. Time Petri Net.
Outline Using and Time Paths Humboldt-Universität zu Berlin Institut of Computer Science Unter den Linden 6, 10099 Berlin, Germany IFORS 2005, Hawaii July 11-15, 2005 Definition () The structure N =(P,
More informationSAT-Based Verification with IC3: Foundations and Demands
SAT-Based Verification with IC3: Foundations and Demands Aaron R. Bradley ECEE, CU Boulder & Summit Middle School SAT-Based Verification with IC3:Foundations and Demands 1/55 Induction Foundation of verification
More informationTemporal Logic of Actions
Advanced Topics in Distributed Computing Dominik Grewe Saarland University March 20, 2008 Outline Basic Concepts Transition Systems Temporal Operators Fairness Introduction Definitions Example TLC - A
More informationNon-linear Interpolant Generation and Its Application to Program Verification
Non-linear Interpolant Generation and Its Application to Program Verification Naijun Zhan State Key Laboratory of Computer Science, Institute of Software, CAS Joint work with Liyun Dai, Ting Gan, Bow-Yaw
More informationChapter 7: Exponents
Chapter : Exponents Algebra Chapter Notes Name: Notes #: Sections.. Section.: Review Simplify; leave all answers in positive exponents:.) m -.) y -.) m 0.) -.) -.) - -.) (m ) 0.) 0 x y Evaluate if a =
More informationVerifying Temporal Properties of Reactive Systems: A STeP Tutorial *
Formal Methods in System Design, 16, 1 45 (2000) c 2000 Kluwer Academic Publishers, Boston. Manufactured in The Netherlands. Verifying Temporal Properties of Reactive Systems: A STeP Tutorial * NIKOLAJ
More informationIntroduction to Abstract Interpretation. ECE 584 Sayan Mitra Lecture 18
Introduction to Abstract Interpretation ECE 584 Sayan Mitra Lecture 18 References Patrick Cousot,RadhiaCousot:Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction
More informationStatic Program Analysis using Abstract Interpretation
Static Program Analysis using Abstract Interpretation Introduction Static Program Analysis Static program analysis consists of automatically discovering properties of a program that hold for all possible
More informationAAA616: Program Analysis. Lecture 7 The Octagon Abstract Domain
AAA616: Program Analysis Lecture 7 The Octagon Abstract Domain Hakjoo Oh 2016 Fall Hakjoo Oh AAA616 2016 Fall, Lecture 7 November 3, 2016 1 / 30 Reference Antoine Miné. The Octagon Abstract Domain. Higher-Order
More informationInvariant Generation for P-solvable Loops with Assignments
Invariant Generation for P-solvable Loops with Assignments Laura Kovács EPFL, Swizterland laura.kovacs@epfl.ch Abstract. We discuss interesting properties of a general technique for inferring polynomial
More informationSynthesizing from Components: Building from Blocks
Synthesizing from Components: Building from Blocks Ashish Tiwari SRI International 333 Ravenswood Ave Menlo Park, CA 94025 Joint work with Sumit Gulwani (MSR), Vijay Anand Korthikanti (UIUC), Susmit Jha
More informationCutting Planes for First Level RLT Relaxations of Mixed 0-1 Programs
Cutting Planes for First Level RLT Relaxations of Mixed 0-1 Programs 1 Cambridge, July 2013 1 Joint work with Franklin Djeumou Fomeni and Adam N. Letchford Outline 1. Introduction 2. Literature Review
More informationTowards abstract and executable multivariate polynomials in Isabelle
Towards abstract and executable multivariate polynomials in Isabelle Florian Haftmann Andreas Lochbihler Wolfgang Schreiner Institute for Informatics Institute of Information Security RISC TU Munich ETH
More informationDiscrete abstractions of hybrid systems for verification
Discrete abstractions of hybrid systems for verification George J. Pappas Departments of ESE and CIS University of Pennsylvania pappasg@ee.upenn.edu http://www.seas.upenn.edu/~pappasg DISC Summer School
More informationExpectation Invariants for Probabilistic Program Loops as Fixed Points
Expectation Invariants for Probabilistic Program Loops as Fixed Points Aleksandar Chakarov 1 and Sriram Sankaranarayanan 1 1 University of Colorado, Boulder, CO October 9, 201 Abstract We present static
More informationBuilding Algorithmic Polytopes. David Bremner with D. Avis, H.R. Tiwary, and O. Watanabe December 16, 2014
Building Algorithmic Polytopes David Bremner with D. Avis, H.R. Tiwary, and O. Watanabe December 16, 2014 Outline Matchings in graphs Given G = (V, E), M E is called a matching {e M v e} 1 v V A matching
More informationPolynomials, Ideals, and Gröbner Bases
Polynomials, Ideals, and Gröbner Bases Notes by Bernd Sturmfels for the lecture on April 10, 2018, in the IMPRS Ringvorlesung Introduction to Nonlinear Algebra We fix a field K. Some examples of fields
More informationProgram verification
Program verification Data-flow analyses, numerical domains Laure Gonnord and David Monniaux University of Lyon / LIP September 29, 2015 1 / 75 Context Program Verification / Code generation: Variables
More informationELEMENTARY LINEAR ALGEBRA
ELEMENTARY LINEAR ALGEBRA K R MATTHEWS DEPARTMENT OF MATHEMATICS UNIVERSITY OF QUEENSLAND First Printing, 99 Chapter LINEAR EQUATIONS Introduction to linear equations A linear equation in n unknowns x,
More informationFoundations of Abstract Interpretation
Escuela 03 II / 1 Foundations of Abstract Interpretation David Schmidt Kansas State University www.cis.ksu.edu/~schmidt Escuela 03 II / 2 Outline 1. Lattices and continuous functions 2. Galois connections,
More informationCompiler Optimisation
Compiler Optimisation 8 Dependence Analysis Hugh Leather IF 1.18a hleather@inf.ed.ac.uk Institute for Computing Systems Architecture School of Informatics University of Edinburgh 2018 Introduction This
More informationThe Abstract Domain of Segmented Ranking Functions
The Abstract Domain of Segmented Ranking Functions Caterina Urban To cite this version: Caterina Urban. The Abstract Domain of Segmented Ranking Functions. Logozzo, Francesco and Fähndrich, Manuel. Static
More informationHoare Logic (I): Axiomatic Semantics and Program Correctness
Hoare Logic (I): Axiomatic Semantics and Program Correctness (Based on [Apt and Olderog 1991; Gries 1981; Hoare 1969; Kleymann 1999; Sethi 199]) Yih-Kuen Tsay Dept. of Information Management National Taiwan
More informationAnti-unification algorithms and their applications
Anti-unification algorithms and their applications in program analysis Faculty of Computational Mathematics and Cybernetics, Moscow State University, Moscow, RU-119899, Russia Perspectives of System Informatics,
More informationIC3: Where Monolithic and Incremental Meet
IC3: Where Monolithic and Incremental Meet Fabio Somenzi Dept. of Electrical, Computer, and Energy Engineering University of Colorado at Boulder Email: fabio@colorado.edu Aaron R. Bradley Summit Charter
More informationComputing (the smallest) fixed points of monotone maps arising in static analysis by AI
Computing (the smallest fixed points of monotone maps arising in static analysis by AI Joint work, over the last 4 years: Stéphane Gaubert 1, Assalé Adjé, Eric Goubault 3, Sylvie Putot, Alexandru Costan,
More informationSimplifying Loop Invariant Generation Using Splitter Predicates
Simplifying Loop Invariant Generation Using Splitter Predicates Rahul Sharma, Isil Dillig, Thomas Dillig, and Alex Aiken Department of Computer Science Stanford University {sharmar,isil,tdillig,aiken}@cs.stanford.edu
More informationarxiv: v1 [cs.lo] 29 May 2014
Under consideration for publication in Theory and Practice of Logic Programming 1 arxiv:1405.7739v1 [cs.lo] 29 May 2014 (Quantified) Horn Constraint Solving for Program Verification and Synthesis Andrey
More informationSimplifying Loop Invariant Generation Using Splitter Predicates
Simplifying Loop Invariant Generation Using Splitter Predicates Rahul Sharma, Isil Dillig, Thomas Dillig, and Alex Aiken Department of Computer Science Stanford University {sharmar,isil,tdillig,aiken}@cs.stanford.edu
More informationa 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 11 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,, a n, b are given real
More informationFixed Point Iteration for Computing the Time Elapse Operator
Fixed Point Iteration for Computing the Time Elapse Operator Sriram Sankaranarayanan 1,2, Henny B. Sipma 2, Zohar Manna 2 1 NEC Laboratories America, Princeton, NJ srirams@nec-labs.com 2 Computer Science
More informationSoftware Verification
Software Verification Grégoire Sutre LaBRI, University of Bordeaux, CNRS, France Summer School on Verification Technology, Systems & Applications September 2008 Grégoire Sutre Software Verification VTSA
More informationOptimal abstraction on real-valued programs
Optimal abstraction on real-valued programs David Monniaux Laboratoire d informatique de l École normale supérieure 45, rue d Ulm, 75230 Paris cedex 5, France June 30, 2007 Abstract In this paper, we show
More informationELEMENTARY LINEAR ALGEBRA
ELEMENTARY LINEAR ALGEBRA K. R. MATTHEWS DEPARTMENT OF MATHEMATICS UNIVERSITY OF QUEENSLAND Second Online Version, December 1998 Comments to the author at krm@maths.uq.edu.au Contents 1 LINEAR EQUATIONS
More informationNew Complexity Results for Some Linear Counting Problems Using Minimal Solutions to Linear Diophantine Equations
New Complexity Results for Some Linear Counting Problems Using Minimal Solutions to Linear Diophantine Equations (Extended Abstract) Gaoyan Xie, Cheng Li and Zhe Dang School of Electrical Engineering and
More informationTheory of Computation 1 Sets and Regular Expressions
Theory of Computation 1 Sets and Regular Expressions Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Theory of Computation
More informationOn Boolean functions which are bent and negabent
On Boolean functions which are bent and negabent Matthew G. Parker 1 and Alexander Pott 2 1 The Selmer Center, Department of Informatics, University of Bergen, N-5020 Bergen, Norway 2 Institute for Algebra
More informationTransition Predicate Abstraction and Fair Termination
Transition Predicate Abstraction and Fair Termination Andreas Podelski Andrey Rybalchenko Max-Planck-Institut für Informatik Saarbrücken, Germany ABSTRACT Predicate abstraction is the basis of many program
More informationInfinite elementary divisor structure-preserving transformations for polynomial matrices
Infinite elementary divisor structure-preserving transformations for polynomial matrices N P Karampetakis and S Vologiannidis Aristotle University of Thessaloniki, Department of Mathematics, Thessaloniki
More informationDesign of Distributed Systems Melinda Tóth, Zoltán Horváth
Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Publication date 2014 Copyright 2014 Melinda Tóth, Zoltán Horváth Supported by TÁMOP-412A/1-11/1-2011-0052
More informationDiscrete Fixpoint Approximation Methods in Program Static Analysis
Discrete Fixpoint Approximation Methods in Program Static Analysis P. Cousot Département de Mathématiques et Informatique École Normale Supérieure Paris
More informationFMCAD 2013 Parameter Synthesis with IC3
FMCAD 2013 Parameter Synthesis with IC3 A. Cimatti, A. Griggio, S. Mover, S. Tonetta FBK, Trento, Italy Motivations and Contributions Parametric descriptions of systems arise in many domains E.g. software,
More informationStability and Stabilization of polynomial dynamical systems. Hadi Ravanbakhsh Sriram Sankaranarayanan University of Colorado, Boulder
Stability and Stabilization of polynomial dynamical systems Hadi Ravanbakhsh Sriram Sankaranarayanan University of Colorado, Boulder Proving Asymptotic Stability: Lyapunov Functions Lyapunov Function:
More informationCS156: The Calculus of Computation
Page 1 of 61 CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 5: Program Correctness: Mechanics Page 2 of 61 Program A: LinearSearch with function specification @pre 0 l u < a @post rv
More informationAn Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants
An Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants Enric Rodríguez-Carbonell and Deepak Kapur Technical University of Catalonia, Barcelona www.lsi.upc.es/~erodri University
More informationSolutions. Problem 1: Suppose a polynomial in n of degree d has the form
Assignment 1 1. Problem 3-1 on p. 57 2. Problem 3-2 on p. 58 3. Problem 4-5 on p. 86 4. Problem 6-1 on p. 142 5. Problem 7-4 on p. 162 6. Prove correctness (including halting) of SelectionSort (use loop
More informationCS156: The Calculus of Computation Zohar Manna Autumn 2008
Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)
More informationProblem One: Order Relations i. What three properties does a binary relation have to have to be a partial order?
CS103 Handout 16 Fall 2011 November 4, 2011 Extra Practice Problems Many of you have expressed interest in additional practice problems to review the material from the first four weeks of CS103. This handout
More informationSpecification models and their analysis Petri Nets
Specification models and their analysis Petri Nets Kai Lampka December 10, 2010 1 30 Part I Petri Nets Basics Petri Nets Introduction A Petri Net (PN) is a weighted(?), bipartite(?) digraph(?) invented
More informationEventual Linear Ranking Functions
Eventual Linear Ranking Functions Roberto BAGNARA 1 Fred MESNARD 2 1 BUGSENG & Dipartimento di Matematica e Informatica, Università di Parma, Italy 2 LIM, université de la Réunion, France PPDP 2013 Bagnara,
More informationDepth and Stanley depth of the canonical form of a factor of monomial ideals
Bull. Math. Soc. Sci. Math. Roumanie Tome 57(105) No. 2, 2014, 207 216 Depth and Stanley depth of the canonical form of a factor of monomial ideals by Adrian Popescu Abstract We introduce a so called canonical
More informationCombining Logic and Algebraic Techniques for Program Verification in Theorema
Second International Symposium on Leveraging Applications of Formal Methods, Verification and Validation Combining Logic and Algebraic Techniques for Program Verification in Theorema Laura Kovács, Nikolaj
More information