Review of the automata-theoretic approach to model-checking.

Slides:



Advertisements
Similar presentations
Model Checking Lecture 1.
Advertisements

Introduction to Model Checking
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.
Model Checking Lecture 2. Three important decisions when choosing system properties: 1automata vs. logic 2branching vs. linear time 3safety vs. liveness.
Tutorial I – An Introduction to Model Checking Peng WU INRIA Futurs LIX, École Polytechnique.
Metodi formali dello sviluppo software a.a.2013/2014 Prof.Anna Labella.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
M ODEL CHECKING -Vasvi Kakkad University of Sydney.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
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:
An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010.
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
Temporal Logic and the NuSMV Model Checker CS 680 Formal Methods Jeremy Johnson.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar.
CS6133 Software Specification and Verification
UPPAAL Introduction Chien-Liang Chen.
Model Checking Inputs: A design (in some HDL) and a property (in some temporal logic) Outputs: Decision about whether or not the property always holds.
CS 267: Automated Verification Lecture 7: SMV Symbolic Model Checker, Partitioned Transition Systems, Counter-example Generation in Symbolic Model Checking.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar D D.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: Property checking Property checking.
1 Temporal Logic u Classical logic:  Good for describing static conditions u Temporal logic:  Adds temporal operators  Describe how static conditions.
© Katz, 2007CS Formal SpecificationsLecture - Temporal logic 1 Temporal Logic Formal Specifications CS Shmuel Katz The Technion.
CSE 555 Protocol Engineering Dr. Mohammed H. Sqalli Computer Engineering Department King Fahd University of Petroleum & Minerals Credits: Dr. Abdul Waheed.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
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.
Specification Formalisms Book: Chapter 5. Properties of formalisms Formal. Unique interpretation. Intuitive. Simple to understand (visual). Succinct.
1 Model Checking Orna Grumberg Technion Haifa, Israel Taiwan, October 8, 2009.
ESE601: Hybrid Systems Introduction to verification Spring 2006.
Witness and Counterexample Li Tan Oct. 15, 2002.
Automata and Formal Lanugages Büchi Automata and Model Checking Ralf Möller based on slides by Chang-Beom Choi Provable Software Lab, KAIST.
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)
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.
1 Introduction to SMV and Model Checking Mostly by: Ken McMillan Cadence Berkeley Labs Small parts by: Brandon Eames ISIS/Vanderbilt.
Institute for Applied Information Processing and Communications 1 Karin Greimel Semmering, Open Implication.
Model Checking Lecture 3 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.
CSE 522 Model-based Development (2)
10/19/2015COSC , Lecture 171 Real-Time Systems, COSC , Lecture 17 Stefan Andrei.
Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications 1.
Orna Kupferman Hebrew University Formal Verification -- Deciding the Undecidable.
A brief history of model checking Ken McMillan Cadence Berkeley Labs
Introduction to Model Checking
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Validation - Formal verification -
VIS Technology Transfer Course Session 7 Fairness Constraints and Monitors Serdar Tasiran.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 9, 2003.
1 Temporal logic. 2 Prop. logic: model and reason about static situations. Example: Are there truth values that can be assigned to x,y simultaneously.
Model Checking Lecture 1. Model checking, narrowly interpreted: Decision procedures for checking if a given Kripke structure is a model for a given formula.
About Alternating Automata Daniel Choi Provable Software Laboratory KAIST.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
Model Checking Lecture 1: Specification Tom Henzinger.
6/12/20161 a.a.2015/2016 Prof. Anna Labella Formal Methods in software development.
Model Checking Lecture 2. Model-Checking Problem I |= S System modelSystem property.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
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,
Basic concepts of Model Checking
CIS 842: Specification and Verification of Reactive Systems
Formal Methods in software development
Translating Linear Temporal Logic into Büchi Automata
Introduction to verification
Formal Methods in software development
Presentation transcript:

Review of the automata-theoretic approach to model-checking

Overview* Kripke structures Temporal logics: LTL, CTL, CTL* From LTL to Buchi automata Model checking *Thanks for borrowed slides: Orna Grumberg, Ken McMillan

Program verification Given a program and a specification, does the program satisfy the specification? Not decidable! We restrict the problem to a decidable one: Finite-state abstractions Propositional temporal logics

Model Checking MC G(p -> F q) yes no p q p q temporal formula finite-state model algorithm counterexample Model must now represent all behaviors

Finite state systems Hardware designs Communication protocols High level description of non finite state systems Web service abstractions

Properties in temporal logic mutual exclusion: always  ( cs 1  cs 2 ) non starvation: always (request  eventually grant) communication protocols: (  get-message) until send-message

Kripke structures A Kripke structure (S,AP,R,L) consists of –set of states S, atomic propositions AP –set of transitions R  S  S –labeling L  S  AP Example: Kripke model of a program pp p repeat p := true; p := false; end

Kripke structure / transition system a,ba a b,c c a,c a,b b

 =s 0 s 1 s 2... is a run in M from s iff s = s 0 and for every i  0: (s i,s i+1 )  R How to specify properties of runs: temporal logics!

Linear temporal logic: LTL AP – a set of atomic propositions LTL: propositional logic + temporal operators Gp Fp Xp pUq

Examples of LTL properties x=a  y=b  XXXX z=a+b pay B deliver B: “before” liveness: “if input, then eventually output” G (input  F output) strong fairness: “infinitely sent implies infinitely received” GF send  GF receive

Branching time logics: CTL, CTL* Model of time is a tree, not a sequence Path quantifiers A: “for every path” E: “there exists a path” AF p p p p

Computation Tree Logic: CTL Every operator F, G, X, U preceded by A or E Universal modalities: pp p... AG p pppp p pp AF p

CTL, cont... Existential modalities: p p... EG p p p EF p

CTL, cont Other modalities AX p, EX p, A(p U q), E(p U q) Examples: mutual exclusion specs... AG  (C 1  C 2 ) mutual exclusion AG (request  AF grant) non-starvation AG (N 1  EX T 1 ) non-blocking

CTL* Contains both CTL and LTL –path formulas p U q, G p, Fp, Xp,  p, p  q –state formulas A p, E p Note: p in LTL  A p in CTL* CTL* is more powerful than CTL Example: Fairness assumptions A (GF p  GF q)

Model checking complexities CTL LTL O(2 f (V+E)) CTL O(f (V+E)) * = Note: all are linear in model size PSPACE COMPLETE

LTL vs. Buchi automata Buchi automaton: finite-state automaton accepting infinite words by going forever through some accepting state a 1 a 2 a 3 ……………………………… s 0 s 1 s 2 s 3 ………. f ….. f ….. f ….. f….. Languages accepted by Buchi automata: ω-regular

Let φ be an LTL formula with propositions AP. There exists a Buchi automaton B(φ) over alphabet 2 AP accepting exactly the infinite words satisfying φ. Naïve construction: simple recursion on the structure of φ Examples: if φ = X p then B(φ) is if φ = p U q then B(φ) is but: each negation leads to exponential blowup! p q accept p

Smarter way: one-step construction exponential number of states given a state of B(φ) and an input, a next state of B(φ) can be computed in PSPACE with respect to φ

Example: p U q States: consistent sets of subformulas (or their negations) (  ) subformulas p U q,  (p U q), p,  p, q,  q p, q p U q p,  q, p U q p,  q,  (p U q)  p, q, p U q  p  q,  (p U q) States (consistent sets): Intuition: a state contains the formulas satisfied by all accepted infinite runs starting in that state

p,  q, p U q p, q, p U q  p,  q,  (p U q)  p, q, p U q p,  q,  (p U q) all Initial states: all containing p U q Transitions: on assignment in source state

Model checking Input: Kripke structure K LTL formula φ 1.Construct B(  φ) 2.Search for runs of K accepted by B(  φ) 3.If none found, output “yes” otherwise, output counter-example run

Can be done in NPSPACE, so in PSPACE: Non-deterministically generate runs of K  B(  φ) Accept when looping in where S is a state in K and f is an accepting state of B(  φ) Run of K States of B(  φ) s 0 s 1 s 2 … f …. f … Deterministic algorithm: depth-first search + some efficient bookkeeping O(2 |φ| |K|) S

Some other complexities Model checking for CTL: O( | φ| |K|) Satisfiability for CTL: EXPTIME-complete Model checking for CTL*: PSPACE-complete Satisfiability for CTL*: 2-EXPTIME-complete