Hierarchical and Recursive State Machines with Context- Dependent Properties Salvatore La Torre, Margherita Napoli, Mimmo Parente and Gennaro Parlato Dipartimento.

Slides:



Advertisements
Similar presentations
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.
Advertisements

1 Verification of Parameterized Systems Reducing Model Checking of the Few to the One. E. Allen Emerson, Richard J. Trefler and Thomas Wahl Junaid Surve.
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.
Partial Order Reduction: Main Idea
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.
Planning based on Model Checking Dept. of Information Systems and Applied CS Bamberg University Seminar Paper Svetlana Balinova.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
A Fixpoint Calculus for Local and Global Program Flows Swarat Chaudhuri, U.Penn (with Rajeev Alur and P. Madhusudan)
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.
 Dr. Vered Gafni 1 LTL Decidability Enables consistency check, but also base for verification.
Review of topics Final exam : -May 2nd to May 7 th - Projects due on May 7th.
Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Strichman Carnegie Mellon University.
The Language Theory of Bounded Context-Switching Gennaro Parlato (U. of Illinois, U.S.A.) Joint work with: Salvatore La Torre (U. of Salerno, Italy) P.
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture # 11.
Discrete Abstractions of Hybrid Systems Rajeev Alur, Thomas A. Henzinger, Gerardo Lafferriere and George J. Pappas.
1/25 Context-Bounded Analysis of Concurrent Queue Systems Gennaro Parlato University of Illinois at Urbana-Champaign Università degli Studi di Salerno.
A temporal logic for calls and returns P. Madhusudan University of Pennsylvania Joint work with Rajeev Alur and Kousha Etessami Talk at HCES 2004, Philadelphia.
Review of the automata-theoretic approach to model-checking.
Parallel LTL-X Model Checking of High- Level Petri Nets Based on Unfoldings Claus Schröter* and Victor Khomenko** *University of Stuttgart, Germany **University.
Ref: Pfleeger96, Ch.31 NP-Complete Problems Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
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)
Advanced Constraint Processing, Fall 2009 An Efficient Consistency Algorithm for the Temporal Constraint Satisfaction Problem Berthe Y. Choueiry & Lin.
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.
Scope-Bounded Pushdown Languages Salvatore La Torre Università degli Studi di Salerno joint work with Margherita Napoli Università degli Studi di Salerno.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
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)
Scope-bounded Multistack Pushdown Systems: - fixed-point - sequentialization - tree-width 1 Salvatore La Torre Gennaro Parlato (U. Salerno, Italy) (U.
Algorithmic Software Verification III. Finite state games and pushdown automata.
Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications 1.
A Logic of Belief and a Model Checking Algorithm for Security Protocols joint work with Massimo Benerecetti Fausto Giunchiglia University of Trento
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: LTL Model Checking Copyright , Matt Dwyer, John Hatcliff,
Complexity Non-determinism. NP complete problems. Does P=NP? Origami. Homework: continue on postings.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-Complete Problems Algorithm : Design & Analysis [23]
Algorithmic Software Verification Rajeev Alur University of Pennsylvania ARO Review, May 2005.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
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.
NPC.
Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
About Alternating Automata Daniel Choi Provable Software Laboratory KAIST.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
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.
Basic concepts of Model Checking
Automatic Verification
NP-Completeness Yin Tat Lee
Timed Automata Formal Systems Pallab Dasgupta Professor,
NP-Completeness Yin Tat Lee
Translating Linear Temporal Logic into Büchi Automata
Presentation transcript:

Hierarchical and Recursive State Machines with Context- Dependent Properties Salvatore La Torre, Margherita Napoli, Mimmo Parente and Gennaro Parlato Dipartimento di Informatica ed Applicazioni Università degli Studi di Salerno

Given : –A system model M (Kripke structure) –A high-level specification  (logic formula) Is M a model of  ? System Verification (Model Checking) Complexity of model checking O ( ·2 |  | ) |M||M| State-Space Explosion O (| M |·2 |  | )

Our Target Propose a “new model” to represent models succintly And solve model cheching problems efficiently on it –Reachability –Cycle detection –L TL -ModelChecking

Recursive State Machine A RSM M =(M 1,…, M k ) is composed by –k machines modelling k procedures –machines can call each other recursively –Machines are represented through graphs

Vertices Machines has two kind of vertices: Nodes (internal state) Boxes (procedure-call)

Entry and Exit Nodes parameters e3e3 e2e2 e1e1 ex 3 ex 4 ex 2 ex 1 Entry nodes Exit nodes return values

Edges Node-to-Node Box-to-NodeNode-to-Box Box-to-Box

Labelling Given a set of Atomic Proposition We associates to both nodes and boxes set of AP p,q,r t,r,p

M1M1 M2M2 M3M3 second 0 second 59 minute 0 minute 59 hour 0 hour 23 Seconds Minutes Hours Example: Digital Clock modelled by Hierarchical State Machine min 59 min 0 out 3 start 3 h 23 h0h0 start 2 out 2 sec 0 out 1 sec 59 start 1

sec 0 sec 60 Flat Model M1FM1F out 2 start 2 M2FM2F min 59 min 0 minute 0 minute 59 sec 0 sec 60 sec 0 sec 60 The flat model has 24·60·60=86,400 states Our model has =150 vertices. sec 0 sec 60 M1FM1F

HSMs in [AY98] Only nodes are labeled with atomic propositions: a model and its flat have the same number of different labels To check properties with a precise time (i.e., check for time 10:20: 45 ) the model must have at least a node for each possible hh.mm.ss. Our model can be exponentially more succinct

Related Work Model checking of hierarchical state machines. [Alur, Yannakakis 1998] Analysis of recursive state machines. [Alur, Etessami, Yannakakis 2001] Model checking of unrestricted hierarchical state machines. [Benedikt, Godefroid, Reps 2001] Visibly pushdown languages [Alur, Madhusudan 2004] A temporal logic of nested calls and returns[Alur,Etessami,Madhusudan 2004]

Outline Overview  Reachability problem LTL-Model Checking Conclusion

MFMF [in k ] Reachability Problem Given a HSM M and a propositional boolean formula , the Reachability Problem is: Is there a reachable state (in the flat of M ) on which  holds ? X  (label(X))=TRUE

Computational Complexity The reachability problem is NP-complete –NP-hardness 3-CNF-SAT  Reachability (with AND of literals) –NP-membership 1.guess a state X of M F 2.check if X is reachable in M F 3.verify  on X We can solve Reachability in O (| M |·|  |·2 |AP| ) time

A Solution in O (λ·|M|·|  |) MiFMiF Start i q  (L(q)UP)=TRUE Reach  (i,P)=TRUE   a reachable state of M i F satisfying  (assume propositions P hold TRUE on all states of M i F ) Reach  (k,Ø) P

Reach  (expand(b), )=TRUE Start i q  (L(q)UP)=TRUE How to compute Reach  (i,P) MiMi b L(b) PP U

Our Algorithm Reach  (i,P) = = V  (P U label (u)) V u is a reachable node of M i V Reach  (expand (b),P U label (b)) b is reachable box of M i Reach  (i,P) takes O(|M i |·|φ|) time + time for calls Reach  (expand (b),P U label (b)) Total time is O(λ·|M|·|  |) (λ is the max # of different sets P for machine)

Good cases Reach  (k,Ø) takes O(λ·|M|·|  |) with λ≤2 |AP| If λ is bounded by a costant, then Reach  (k,Ø) takes O(|M|·|  |) In particular, if M is a Alur and Yannakakis machine, every M i inherits only the empty set (λ =1)

u p Restricted HSM p

Efficient Solution on Restricted HSM Reachability on Restricted HSM and formulas in DNF is decidable in O(|M|·|  |) time Reachability is NP-hard if either: –M is a nonrestricted HSM or –  is a (general) boolean formula Reachability is decidable in O(|M|·2 |  | ) time on Restricted HSM

Outline Overview Reachability problem  L TL -Model Checking Conclusion

L TL Model Checking We use the automata-theoretic approach Given a HSM M and an L TL -formula , the problem is: Does every trace of the flat model of M satisfy  ?

Automata-Theoretic Approach 1. Given an L TL -formula , we build a Büchi automaton A ¬ . 3.  is satisfied on M  L ( M ‘)=Ø. O (2 |  | ) [Vardi and Wolper] O (| M |·16 |  | ) O ( M‘ ) [Alur at al.] 2. We build a new HSM M ‘ as a product of M and A ¬ . Main Result LTL Model-Checking can be solved in O (| M |·16 |  | ) time

Structures of M ’ M ‘ consists of graphs M (i,j,P) M (i,j,P) is contained in the Cartesian product of M i and A ¬  : –start i is coupled with j (A ¬  state) –the set of atomic propositions P is inherited from its ancestors

Nodes of M (i,j,P) PUP u =P q Node of M (i,j,P) [u,q,j,P] PuPu State of A ¬  q PqPq Node of M i u PuPu

Boxes of M (i,j,P) State of A ¬  q PqPq PUP b U P start h =P q Box of M i b start h P start h PbPb Box of M (i,j,P) [b,q,j,P] PbPb M (h,q,PUP b )

Edges from node of M (i,j,P) Edge from node of M i u v Node of M (i,j,P) [u,q’,j,P] [v,q’’,j,P] Edge of A ¬  q’ q’’

Edges from box of M (i,j,P) A edge of A ¬  q’’q’ A edge from box of M i b v o A edge from box of M (i,j,P) [b,q,j,P] [v,q’’,j,P] [o,q’,h,P’]

Outline Overview Reachability problem L TL -Model Checking  Conclusion

Cycle Detection Cycle detection problem: Is there a cycle in M F containing a reachable state on which  holds? Computational complexity: –NP-complete –solution in time O(| M |·|  |·2 |  | ) (same as reachability)

Conclusion Decision problems: –Reachability –Cycle detection –LTL model-checking Restricted HSMs Recursive Finite State Machines (Expansions model recursive calls)

Recursive Finite State Machines RSM = HSM with recursive expansions b MiMi MiMi b

Main results Reachability Cycle detection L TL Model Cheching RSM NP-complete O(| M |·|  |·2 |  | ) Pspace-complete O(|M|·16 |  | ) restricted HSM  in DNF O(|M|·|  |) Pspace-complete O(|M|·8 |  | )