Algorithmic Verification

# Temporal Verification of Reactive Systems: Safety

This preview shows pages 1–11. Sign up to view the full content.

CS256/Winter 2007 — Lecture #12 Zohar Manna Chapter 5 Algorithmic Verification (of General Formulas) 12-1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithmic Verification of Finite-state Systems Given finite-state program P , i.e., each x V assumes only finitely many values in all P -computations. Example: mux-pet1 (Fig. 3.4) is finite-state s = 1 , 2 y 1 = t , f y 2 = t , f π can assume at most 36 different values. We present an algorithm (decision procedure) for establishing properties specified by an arbitrary (quantifier-free) temporal formula. 12-2
Example: Program mux-pet1 (Fig. 3.4) (Peterson’s Algorithm for mutual exclusion) local y 1 , y 2 : boolean where y 1 = f , y 2 = f s : integer where s = 1 P 1 :: 0 : loop forever do 1 : noncritical 2 : ( y 1 , s ) := ( t , 1) 3 : await ( ¬ y 2 ) ( s 6 = 1) 4 : critical 5 : y 1 := f P 2 :: m 0 : loop forever do m 1 : noncritical m 2 : ( y 2 , s ) := ( t , 2) m 3 : await ( ¬ y 1 ) ( s 6 = 2) m 4 : critical m 5 : y 2 := f 12-3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Overview Given a temporal formula ϕ 1) Is ϕ satisfiable? i.e., is there a model σ such that σ q ϕ ? Apply algorithm for ϕ : YES: ϕ satisfiable produce a model σ satisfying ϕ NO: ϕ unsatisfiable there exists no model σ satisfying ϕ 2) Is ϕ valid? [Is ¬ ϕ unsatisfiable?] Apply algorithm for ¬ ϕ : YES: ¬ ϕ satisfiable = ϕ not valid produce a model σ satisfying ¬ ϕ (counterexample) NO: ¬ ϕ unsatisfiable = ϕ is valid 12-4
Overview (Cont’d) Given a temporal formula ϕ and a finite-state program P 3) Is ϕ P -satisfiable? i.e., is there a P -computation σ such that σ q ϕ ? Apply algorithm for ϕ and P : YES: ϕ P -satisfiable produce a P -computation σ satisfying ϕ NO: ϕ P -unsatisfiable there exists no such computation 12-5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Overview (Cont’d) Given a temporal formula ϕ and a finite-state program P 4) Is ϕ P -valid? [Is ¬ ϕ P -unsatisfiable?] Apply algorithm for ¬ ϕ and P : YES: ¬ ϕ P -satisfiable = ϕ not P -valid (Computation produced is a counterexample) NO: ¬ ϕ P -unsatisfiable = ϕ is P -valid 12-6
Idea of algorithm Construct a directed graph (“tableau”) T ϕ that exactly embeds all models of ϕ , i.e., σ is embedded in T ϕ iff σ q ϕ . Embedding in a graph In the simplest version , the nodes of the graph are la- belled by assertions . A model σ : s 0 , s 1 , . . . s i , . . . is embedded in the graph if there exists a path π : n 0 , n 1 , . . . n i , . . . (where n 0 is an initial node) such that for all i 0 , s i satisfies the assertion A i labeling node n i , i.e., s i q A i . 12-7

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Examples: x = 0 x > 0 embeds all sequences that satisfy ( x = 0) 2 0 ( x > 0) x = 0 x = 5 true embeds all sequences that satisfy ( x = 0) W ( x = 5) 12-8
Example: Construct a graph that embeds exactly all sequences that satisfy p p W q ¬ p ∧ ¬ q p q ¬ p q p ∧ ¬ q 12-9

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Tableau: Motivation Note that 0 ( p ∧ ¬ q ) is embedded in the graph (as it should be since 0 ( p ∧ ¬ q ) implies ( p p W q ) .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern