A Simple Model Checker for CTL. The problem n We need efficient algorithms to solve the problems [1]M,s  [2]M,s  where M should have finitely many states,

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 3. Specification Automata Syntax, given a set A of atomic observations: Sfinite set of states S 0 Sset of initial states S S transition.
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.
1 Computation Tree Logic (CTL). 2 CTL Syntax P - a set of atomic propositions, every p  P is a CTL formula. f, g, CTL formulae, then so are  f, f 
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:
François Fages MPRI Bio-info 2006 Formal Biology of the Cell Modeling, Computing and Reasoning with Constraints François Fages, Constraints Group, INRIA.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar.
UPPAAL Introduction Chien-Liang Chen.
1 Partial Order Reduction. 2 Basic idea P1P1 P2P2 P3P3 a1a1 a2a2 a3a3 a1a1 a1a1 a2a2 a2a2 a2a2 a2a2 a3a3 a3a3 a3a3 a3a3 a1a1 a1a1 3 independent processes.
SYMBOLIC MODEL CHECKING: STATES AND BEYOND J.R. Burch E.M. Clarke K.L. McMillan D. L. Dill L. J. Hwang Presented by Rehana Begam.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar D D.
Algorithms Recurrences. Definition – a recurrence is an equation or inequality that describes a function in terms of its value on smaller inputs Example.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Binary Decision Diagrams1 BINARY DECISION DIAGRAMS.
Temporal Logic and Model Checking. Reactive Systems We often classify systems into two types: Transformational: functions from inputs available at the.
Technion 1 (Yet another) decision procedure for Equality Logic Ofer Strichman and Orly Meir Technion.
CS 104 Introduction to Computer Science and Graphics Problems Data Structure & Algorithms (3) Recurrence Relation 11/11 ~ 11/14/2008 Yang Song.
Review of the automata-theoretic approach to model-checking.
Witness and Counterexample Li Tan Oct. 15, 2002.
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.
Verification technique on SA applications using Incremental Model Checking 컴퓨터학과 신영주.
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.
Binary Decision Diagrams (BDDs)
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
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.
CTL Model Checking 张文辉
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
CSE332: Data Abstractions Lecture 24.5: Interlude on Intractability Dan Grossman Spring 2012.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Lecture 81 Optimizing CTL Model checking + Model checking TCTL CS 5270 Lecture 9.
CS 267: Automated Verification Lecture 3: Fixpoints and Temporal Properties Instructor: Tevfik Bultan.
Program Design. The design process How do you go about writing a program? –It’s like many other things in life Understand the problem to be solved Develop.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Validation - Formal verification -
Verification & Validation By: Amir Masoud Gharehbaghi
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Symmetry Symmetry Chapter 14 from “Model Checking” by Edmund M. Clarke Jr., Orna Grumberg, and Doron A. Peled presented by Anastasia Braginsky March.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 9, 2003.
CSE 589 Applied Algorithms Spring 1999 Prim’s Algorithm for MST Load Balance Spanning Tree Hamiltonian Path.
Complexity of Compositional Model Checking of Computation Tree Logic on Simple Structures Krishnendu Chatterjee Pallab Dasgupta P.P. Chakrabarti IWDC 2004,
How CTL model checking works
Basic concepts of Model Checking
Homework.
Introduction to Software Verification
CTL model checking algorithms
Modeling with Recurrence Relations
Computability and Complexity
Introduction to Algorithms
CSEP590 – Model Checking and Automated Verification
Chapter 4: Model Checking of Finite State Systems
Chapter 11 Limitations of Algorithm Power
CSCI1600: Embedded and Real Time Software
Applied Discrete Mathematics Week 9: Integer Properties
Computer Security: Art and Science, 2nd Edition
Program correctness SAT and its correctness
Incremental Problem Solving for CS1100
Objective The student will be able to:
Program correctness Branching-time temporal logics
Major Design Strategies
Model Checking CS 680 Formal Methods Jeremy Johnson.
Program correctness Model-checking CTL
Presentation transcript:

A Simple Model Checker for CTL

The problem n We need efficient algorithms to solve the problems [1]M,s  [2]M,s  where M should have finitely many states, and  is a CTL formula. n We concentrate to solution of [2], as [1] can be easily derived from it. ? ?

The solution n Input: A CTL model M and CTL formula  n Output: The set of states of M which satisfy  n Basic principles: u Translate any CTL formula  in terms of the connectives AF,EU,EX, , , and . u Label the states of M with sub-formulas of  that are satisfied there, starting from the smallest sub-formulas and working outwards towards  u Output the states labeled by 

The labelling An immediate sub-formula of a formula  is any maximal-length formula  other than  itself Let  be a sub-formula of  and assume the states of M have been already labeled by all immediate sub-formulas of  Which states have to be labeled by  We proceed by case analysis

The basic labeling n  no states are labeled n p label a state s with p if p  l(s)  1   2 label a state s with  1   2 if s is already labeled with both  1 and  2  label a state s with  if s is not already labeled with 

The AF labeling AF  1. Label with AF  any state s already labeled with  2. Repeat until no change: label any state s with AF  if all successors of s are already labeled with Af  AF  repeat … until no change

The EU labeling E[   U   ]1. Label with E[   U   ] any state s already labeled with   2. Repeat until no change: label any state s with E[   U   ] if it is labeled with   and at least one of its successor is already labeled with E[   U   ] E[   U   ] repeat … until no change  E[   U   ]   E[   U   ]

The EX labeling EX  Label with EX  any state s with one of its successors already labeled with   EX  

The EG labeling (direct) EG  1. Label all the states with EG  2. Delete the label EG  from any state s not labeled with  3. Repeat until no change: delete the label Eg  from any state s if none f its successors is labeled with EG  EG   EG   EG   EG   EG  repeat … until no change

Complexity The complexity of the model checking algorithm is O(f * V * (V+E)) where f = number of connectives in  V = number of states of M E = number of transitions of M It can be easily improved to an algorithm linear both in the size of the formula and of the model

Example: Input  = AF(E[  q U p] v EXq) p p q q

Example: EU - step 1 1. Label with E[  qUp] all states which satisfy p P E[  qUp] q q P E[  qUp]

Example: EU-step label any state s with E[  qUp] if it is labeled with  q and at least one of its successor is already labeled with E[  qUp] P E[  qUp] q q P E[  qUp]

Example: EU-step label any state s with E[  qUp] if it is labeled with  q and at least one of its successor is already labeled with E[  qUp] P E[  qUp] q q P E[  qUp] No! E[  qUp]

Example: EX-step 3 3. Label with EXq any state s with one of its successors already labeled with q P E[  qUp] q EXq q P E[  qUp] EXq

Example:  -step 4 4. Label with  = E[  qUp] v EXq any state s already labeled with E[  qUp] or EXq P,  E[  qUp] ,q EXq q ,P E[  qUp]  E[  qUp]  E[  qUp]  E[  qUp]  EXq  EXq

Example: AF-step Label with  AF(E[  qUp]vEXq) any state already labeled with  E[  qUp]vEXq P, ,  E[  qUp] , ,q EXq q , ,P E[  qUp] ,  E[  qUp] ,  E[  qUp] ,  E[  qUp] ,  EXq ,  EXq

Example: AF-step label any state s with  if all successors of s are already labeled with  P, ,  E[  qUp] , ,q EXq ,q , ,P E[  qUp] ,  E[  qUp] ,  E[  qUp] ,  E[  qUp] ,  EXq ,  EXq

Example: Output All states satisfy AF(E[  q U p] v EXq) p p q q

State explosion n The algorithm is linear in the size of the model but the size of the model is exponential in the number of variables, components, etc. Can we reduce state explosion? n Abstraction (what is relevant?) n Induction (for ‘similar’ components) n Composition (divide and conquer) n Reduction (prove semantic equivalence) n Ordered binary decision diagrams