Model Checking Lecture 3. Specification Automata Syntax, given a set A of atomic observations: Sfinite set of states S 0 Sset of initial states S S transition.

Slides:



Advertisements
Similar presentations
Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Advertisements

Model Checking Lecture 2. Three important decisions when choosing system properties: 1automata vs. logic 2branching vs. linear time 3safety vs. liveness.
Avoiding Determinization Orna Kupferman Hebrew University Joint work with Moshe Vardi.
1 Reasoning with Promela Safety properties bad things do not happen can check by inspecting finite behaviours Liveness properties good things do eventually.
Model Checking and Testing combined
Black Box Checking Book: Chapter 9 Model Checking Finite state description of a system B. LTL formula. Translate into an automaton P. Check whether L(B)
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
Clocked Mazurkiewicz Traces and Partial Order Reductions for Timed Automata D. Lugiez, P. Niebert, S. Zennou Laboratoire d Informatique Fondamentale de.
Tutorial I – An Introduction to Model Checking Peng WU INRIA Futurs LIX, École Polytechnique.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Part 3: Safety and liveness
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
Pushdown Systems Koushik Sen EECS, UC Berkeley Slide Source: Sanjit A. Seshia.
1 Temporal Claims A temporal claim is defined in Promela by the syntax: never { … body … } never is a keyword, like proctype. The body is the same as for.
 Dr. Vered Gafni 1 LTL Decidability Enables consistency check, but also base for verification.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture # 11.
On the Use of Automata Techniques to Decide Satisfiability Mia Minnes May 3, 2005.
1 Completeness and Complexity of Bounded Model Checking Ed Clarke Daniel Kroening Joel Ouaknine Carnegie Mellon University, Pittsburgh, USA Ofer Strichman.
Temporal Logic and Model Checking. Reactive Systems We often classify systems into two types: Transformational: functions from inputs available at the.
Witness and Counterexample Li Tan Oct. 15, 2002.
Review of the automata-theoretic approach to model-checking.
1 Completeness and Complexity of Bounded Model Checking.
Witness and Counterexample Li Tan Oct. 15, 2002.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
1 Translating from LTL to automata. 2 Why translating? Want to write the specification in some logic. Want to check that an automaton (or a Kripke structure)
LTL – model checking Jonas Kongslund Peter Mechlenborg Christian Plesner Kristian Støvring Sørensen.
Flavio Lerda 1 LTL Model Checking Flavio Lerda. 2 LTL Model Checking LTL –Subset of CTL* of the form: A f where f is a path formula LTL model checking.
1 Carnegie Mellon UniversitySPINFlavio Lerda Bug Catching SPIN An explicit state model checker.
15-820A 1 LTL to Büchi Automata Flavio Lerda A 2 LTL to Büchi Automata LTL Formulas Subset of CTL* –Distinct from CTL AFG p  LTL  f  CTL. f.
Wishnu Prasetya LTL Model Checking.
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Basics of automata theory
Model Checking Lecture 3 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Languages of nested trees Swarat Chaudhuri University of Pennsylvania (with Rajeev Alur and P. Madhusudan)
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: LTL Model Checking Copyright , Matt Dwyer, John Hatcliff,
Avoiding Determinization Orna Kupferman Hebrew University Joint work with Moshe Vardi.
Copyright , Doron Peled and Cesare Tinelli. These notes are based on a set of lecture notes originally developed by Doron Peled at the University.
Four Lectures on Model Checking Tom Henzinger University of California, Berkeley.
Lectures on Model Checking Stolen from lectures of Tom Henzinger - EE219C (CS294)
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
LTL Model Checking 张文辉
Constraints Assisted Modeling and Validation Presented in CS294-5 (Spring 2007) Thomas Huining Feng Based on: [1]Constraints Assisted Modeling and Validation.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 9, 2003.
Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.
About Alternating Automata Daniel Choi Provable Software Laboratory KAIST.
Honors Track: Competitive Programming & Problem Solving 2-Satisfiability José Kuiper.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Model Checking Lecture 2. Model-Checking Problem I |= S System modelSystem property.
Model Checking Lecture 2 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Complexity of Compositional Model Checking of Computation Tree Logic on Simple Structures Krishnendu Chatterjee Pallab Dasgupta P.P. Chakrabarti IWDC 2004,
15-820A 1 LTL Model Checking A Flavio Lerda.
Four Lectures on Model Checking Tom Henzinger University of California, Berkeley.
SS 2017 Software Verification LTL monitoring
Automatic Verification
Alternating tree Automata and Parity games
CSEP590 – Model Checking and Automated Verification
Translating Linear Temporal Logic into Büchi Automata
Introduction to verification
Formal Methods in software development
Model Checking CS 680 Formal Methods Jeremy Johnson.
Instructor: Aaron Roth
Presentation transcript:

Model Checking Lecture 3

Specification Automata Syntax, given a set A of atomic observations: Sfinite set of states S 0 Sset of initial states S S transition relation : S PL(A) where the formulas of PL are ::= a | | for a A

Specification Omega Automata Syntax as for finite automata, in addition the following acceptance condition: Buchi:BA S

Language L(M) of specification omega-automaton M = (S, S 0,,, BA ) : infinite trace t 0, t 1,... L(M) iff there exists an infinite run s 0 s 1... of M such that 1. s 0 s 1... satisfies BA 2. for all i 0, t i |= (s i )

Let Inf(s) = { p | p = s i for infinitely many i }. The infinite run s satisfies the acceptance condition BA iff Inf(s) BA

(K,q) |= L M iff L(K,q) L(M) Linear semantics of specification omega automata: omega-language containment infinite traces

Response specification automaton : (a b) assuming (a b) = false a b b a s1s1 s2s2 s3s3 s0s0 Buchi condition { s 0, s 3 }

Response monitor automaton : (a b) assuming (a b) = false a b s1s1 s2s2 Buchi condition { s 2 } s0s0 true

Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking 3Symbolic algorithms for model checking 4Pushdown systems

Model-Checking Algorithms = Graph Algorithms

1Safety: -solve: finite monitors ( emptiness) -algorithm: reachability (linear) 2Liveness: -solve: Buchi monitors ( emptiness) -algorithm: strongly connected components (linear) We will talk about STL and CTL model checking later.

From specification automata to monitor automata: determinization (exponential) + complementation (easy) From LTL to monitor automata: complementation (easy) + tableau construction (exponential)

Algorithms 1Reachability 2Strongly connected components 3Tableau construction

Finite Emptiness Given: finite automaton (S, S 0,,, FA) Find: is there a path from a state in S 0 to a state in FA ?

Fix a set A of atomic observations

State-transition graph K Q set of states Q Q transition relation [ ]: Q 2 A observation function

Monitor automaton M Sfinite set of states S 0 Sset of initial states S S transition relation E Sset of final states : S PL(A) where the formulas of PL are ::= a | | for a A

(K,q) |= C M iff L(K,q) L(M) = We construct another monitor automaton M such that L(M) = L(K,q) L(M) S = {(q,s) Q S | [q] |= (s)} finite set of states ({q} S 0 ) S set of initial states (q,s) (q,s) transition relation iff q q and s s (Q E) Sset of final states : S PL(A)labeling function (q,s) = conjunction of atomic observations in [q] and negated atomic observations not in [q] languages over finite traces

Finite Emptiness Given: monitor automaton (S, S 0,,, E) Find: is there a path from a state in S 0 to a state in E ? Solution: depth-first or breadth-first search

dfs(s) { if (s E) then report error add s to dfsTable for each successor t of s if (t dfsTable) then dfs(t) }

Buchi Emptiness Given: Buchi automaton (S, S 0,,, BA) Find: is there an infinite path from a state in S 0 that visits some state in BA infinitely often ?

Monitor Buchi automaton M Sfinite set of states S 0 Sset of initial states S S transition relation BA Sacceptance condition : S PL(A) where the formulas of PL are ::= a | | for a A

(K,q) |= C M iff L(K,q) L(M) = We construct another monitor Buchi automaton M such that L(M) = L(K,q) L(M) S = {(q,s) Q S | [q] |= (s)} finite set of states ({q} S 0 ) S set of initial states (q,s) (q,s) transition relation iff q q and s s (Q BA) Sacceptance condition : S PL(A)labeling function (q,s) = conjunction of atomic observations in [q] and negated atomic observations not in [q] languages over infinite traces

Buchi Emptiness Given: Buchi automaton (S, S 0,,, BA) Find: is there an infinite path from a state in S 0 that visits some state in BA infinitely often ? Solution: 1. Compute SCC graph by depth-first search 2. Mark SCC C as fair iff C BA 3. Check if some fair SCC is reachable from S 0

Complexity n number of states m number of transitions Reachability:O(n+m) SCC:O(n+m)

Buchi emptiness Two algorithms for SCC computation –forward and backward DFS –forward HI-LO algorithm Storing SCCs requires lot of memory Nested DFS –checks Buchi emptiness without explicitly computing SCCs

dfs(s) { add s to dfsTable for each successor t of s if (t dfsTable) then dfs(t) if (s BA) then { seed := s; ndfs(s) } } ndfs(s) { add s to ndfsTable for each successor t of s if (t ndfsTable) then ndfs(t) else if (t = seed) then report error }

Multi-Buchi Emptiness Given: Multi-Buchi automaton (S, S 0,,, BA 1, …, BA n ) Find: is there an infinite path from a state in S 0 that infinitely often visits some state in BA i for all i such that 1 i n ? Solution: 1. Compute SCC graph by depth-first search 2. Mark SCC C as fair iff C BA i for all i such that 1 i n. 3. Check if some fair SCC is reachable from S 0

Tableau Construction Given:LTL formula Find: Multi-Buchi automaton M such that L(M ) = L( ) [Fischer & Ladner 1975; Manna & Wolper 1982] monitors subformulas of

, ::= a | a | | | | U | W ( ) = ( ) = ( ) ( U ) = ( W ) ( W )=( U ) Negation normal form

Fischer-Ladner Closure of a Formula Sub (a)= { a, a } Sub ( )={ } Sub ( ) Sub ( ) Sub ( )={ } Sub ( ) Sub ( U )={ U, ( U ) } Sub ( ) Sub ( ) Sub ( W )={ W, ( W ) } Sub ( ) Sub ( ) | Sub ( ) | = O(| |)

s Sub ( ) is consistent iff -for all atomic propositions a ( a) s iff a s -if ( ) Sub ( ) then ( ) s iff s and s -if ( ) Sub ( ) then ( ) s iff either s or s -if ( U ) Sub ( ) then ( U ) s iff either s or s and ( U ) s -if ( W ) Sub ( ) then ( W ) s iff either s or s and ( W ) s

Fischer-Ladner Closure of a Formula … Sub ( )={, } Sub ( )

s Sub ( ) is consistent iff … -if ( ) Sub ( ) then ( ) s iff either s or s -if ( ) Sub ( ) then ( ) s iff s and s

Tableau M = (S, S 0,,, BA 1,…,BA n ) S...set of consistent subsets of Sub ( ) s S 0 iff s s t iff for all ( ) Sub ( ), if ( ) s then t (s)... conjunction of atomic observations in s and negated atomic observations not in s There is an acceptance condition - for each ( U ) Sub ( ) given by { s | s or ( U ) s } - for each ( ) Sub ( ) given by { s | s or ( ) s }

Size of M is O(2 | | ). LTL model checking:PSPACE-complete