Deep Random Search for Efficient Model Checking of Timed Automata Stony Brook University Radu Grosu Joint work with: X. Huang, S.A. Smolka, W. Tan and.

Slides:



Advertisements
Similar presentations
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Advertisements

Model Checking and Testing combined
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
Review: Search problem formulation
Uninformed search strategies
Monte Carlo Model Checking Radu Grosu SUNY at Stony Brook Joint work with Scott A. Smolka.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Knowledge Based Synthesis of Control for Distributed Systems Doron Peled.
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
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.
Distributed Markov Chains P S Thiagarajan School of Computing, National University of Singapore Joint work with Madhavan Mukund, Sumit K Jha and Ratul.
Program correctness The State-transition model A global state S  s 0 x s 1 x … x s m {s k = local state of process k} S0  S1  S2  … Each state transition.
Timed Automata.
Model Checker In-The-Loop Flavio Lerda, Edmund M. Clarke Computer Science Department Jim Kapinski, Bruce H. Krogh Electrical & Computer Engineering MURI.
CSE 522 UPPAAL – A Model Checking Tool Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
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.
Randomized Algorithms Kyomin Jung KAIST Applied Algorithm Lab Jan 12, WSAC
Statistical Probabilistic Model Checking Håkan L. S. Younes Carnegie Mellon University.
Model Checking for Probabilistic Timed Systems Jeremy Sproston Università di Torino VOSS Dagstuhl seminar 9th December 2002.
Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Strichman Carnegie Mellon University.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture # 11.
. PGM: Tirgul 8 Markov Chains. Stochastic Sampling  In previous class, we examined methods that use independent samples to estimate P(X = x |e ) Problem:
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
1 Carnegie Mellon UniversitySPINFlavio Lerda SPIN An explicit state model checker.
Verification and Controller Synthesis for Timed Automata : the tool KRONOS Stavros Trypakis.
Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes.
CS 188: Artificial Intelligence Spring 2006 Lecture 2: Queue-Based Search 8/31/2006 Dan Klein – UC Berkeley Many slides over the course adapted from either.
1 Completeness and Complexity of Bounded Model Checking.
VESTA: A Statistical Model- checker and Analyzer for Probabilistic Systems Authors: Koushik Sen Mahesh Viswanathan Gul Agha University of Illinois at Urbana-Champaign.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Monte Carlo Analysis of Security Protocols: Needham-Schroeder Revisited Radu Grosu SUNY at Stony Brook Joint work with Xiaowan Huang, Scott Smolka, & Ping.
Monte Carlo Model Checking Scott Smolka SUNY at Stony Brook Joint work with Radu Grosu Main source of support: ARO – David Hislop.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Randomized Algorithms Morteza ZadiMoghaddam Amin Sayedi.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Planning and Verification for Stochastic Processes with Asynchronous Events Håkan L. S. Younes Carnegie Mellon University.
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
Compiler Assisted Software Verification Using Plug-Ins Radu Grosu SUNY at Stony Brook Joint work with S. Callanan, X. Huang, S. A. Smolka and E. Zadok.
Scientific Computing By: Fatima Hallak To: Dr. Guy Tel-Zur.
1 Probabilistic Model Checking of Systems with a Large State Space: A Stratified Approach Shou-pon Lin Advisor: Nicholas F. Maxemchuk Department of Electrical.
Computation Model and Complexity Class. 2 An algorithmic process that uses the result of a random draw to make an approximated decision has the ability.
Static and Runtime Verification A Monte Carlo Approach State University of New York at Stony Brook Radu Grosu.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Monte Carlo Model Checking Radu Grosu SUNY at Stony Brook Joint work with Scott A. Smolka.
Quantitative Model Checking Radu Grosu SUNY at Stony Brook Joint work with Scott A. Smolka.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Memory-Efficient Algorithms for the Verification of Temporal Properties C. Courcoubetis Inst. Of Comp. Sci. FORTH, Crete, Greece M. Verdi IBM Almaden P.
Program correctness The State-transition model A global states S  s 0 x s 1 x … x s m {s k = set of local states of process k} S0  S1  S2  Each state.
Learning Symbolic Interfaces of Software Components Zvonimir Rakamarić.
Verification & Validation By: Amir Masoud Gharehbaghi
The Markov Chain Monte Carlo Method Isabelle Stanton May 8, 2008 Theory Lunch.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Bernd Fischer RW714: SAT/SMT-Based Bounded Model Checking of Software.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Hybrid BDD and All-SAT Method for Model Checking
TIOA-to-UPPAAL Translator & Front-End Integration
Instructor: Rajeev Alur
CSE 473 Artificial Intelligence Oren Etzioni
Automatic Verification
On Statistical Model Checking of Stochastic Systems
Abstraction, Verification & Refinement
Presentation transcript:

Deep Random Search for Efficient Model Checking of Timed Automata Stony Brook University Radu Grosu Joint work with: X. Huang, S.A. Smolka, W. Tan and S. Tripakis

Embedded Software Systems Difficult to develop & maintain: –Concurrent and distributed (OS, ES, middleware), –Complicated by DS improving performance (locks, RC,...), –Mostly written in C programming language. Have to be high-confidence: –Provide the critical infrastructure for all applications, –Failures are very costly (business, reputation), –Have to protect against cyber-attacks.

What is High-Confidence? ? system-software S satisfies temporal property φ Ability to guarantee that

Temporal Properties Safety (something bad never happens): -Airborne planes are at least 1 mile apart -Nuclear reactor core never overheats -Gamma knife never exceeds prescribed dose Liveness (something good eventually happens): –Core eventually reaches nominal temperature –Dishwasher tank is eventually full –Airbag inflates within 5ms of collision

Automata-Theoretic Approach to SP Every safety formula  can be translated to a finite automaton A ¬  such that L(¬  ) = L(A ¬  ). State transition graph of S can also be viewed as a finite automaton A S (with all states accepting). Satisfaction is reduced to language emptiness: S ⊨  ≅ L(A S )  L(A  ) ≅ L(A S  A  ) =  Language emptiness is reduced to reachability: is an accepting state reachable from an initial state?

recurrence diameter Computation Tree (CT) of B Explore and all reachable states in the CT Checking Non-Emptiness: DFS Save all states time efficient Save current path memory efficient State explosion

recurrence diameter Computation Tree (CT) of B Explore and all reachable states in the CT Checking Non-Emptiness: BFS Save all states: time efficient State explosion

Randomized Algorithms Huge impact on CS: (distributed) algorithms, complexity theory, cryptography, etc. Takes of next step algorithm may depend on random choice (coin flip). Benefits of randomization include simplicity, efficiency, and symmetry breaking.

Randomized Algorithms Monte Carlo: may produce incorrect result but with bounded error probability. –Example: Election’s result prediction Las Vegas: always gives correct result but running time is a random variable. –Example: Randomized Quick Sort

recurrence diameter Explore N( ,  ) independent lassos in the CT Error margin  and confidence ratio  Monte Carlo Approach [TACAS’05] … flip a k-sided coin Computation tree (CT) of B deep error states???

DRS Las Vegas Approach 1.take one (several) DRP from the root 2.while (open nodes o are in the fringe) 1.take a DRP from o 2.if (accepting) return path 3.return null A deep random path (DRP) is finished at node o if: the maximum depth is reached at o no unvisited node is a successor of o

q1q1 q0q0 a: x = 7 / y := 0 x ≤ 7 b: x ≤ 3 / x := 0 Timed Automata Finite set of clocks Finite set of discrete states (modes) Finite set of accepting states (accepting modes) Finite set of edges Guard: convex clock polyhedron Reset: set of clocks to be reset State invariant (convex clock polyhedron)

q1q1 TA and Clock Regions Reduction q0q0 a: x≤1; x:=0 x≤2x≤2 b: y≤1 y≤1y≤1 q2q2 c: x≤2 x y 12 1 r1r1 r 28 r 16 The number of clock regions is exponential in: the number of clocks the largest clock-upper-bound constant

q1q1 TA and their Simulation Graph q0q0 a: x = 7 / y := 0 x ≤ 7 (q 0, x ≤ 7  x = y) (q 0, x ≤ 7  x ≤ y ≤ x + 3) (q 1, x ≥ 7  x = y + 7) b: x ≤ 3 / x := 0 a a b

Experiments DRS implementation: –Extension to Open-Kronos MC for TA Open-Kronos: –Input: a system of TA and a bool exp (accepting states) –Translation: to a C-program compiled & linked to Profounder –Profounder: on-the-fly gen. of SG and DFS reachability anal. Testbed: –PC equipped with Athlon 2.6GHz –1Gbyte RAM –Linux (Fedora Core)

MutExcl: Buggy Fischer Protocol

MutExcl: Correct Fischer Protocol

Philips Audio Protocol

B&O Audio/Video Protocol

Related Work Random walk testing: –Heimdahl et al: Lurch debugger. –P. Haslum: Monte Carlo MC by random walk. Random walks to sample system state space: –Mihail & Papadimitriou (and others) Monte Carlo Model Checking of Markov Chains: –Herault et al: LTL-RP, bonded MC, zero/one ET –Younes et al: Time-Bounded CSL, sequential analysis –Sen et al: Time-Bounded CSL, zero/one ET Probabilistic Model Checking of Markov Chains: – ETMCC, PRISM, PIOAtool, and others. Sat Solvers: randomization is not the main concern

Conclusions DRS is a complete randomized, MC algorithm for the classical problem of model checking safety properties. DRS allows to fine tune the initial number of random paths from the root and the maximum search depth. DRS is able to find extremely deep counterexamples while consistently outperforming Kronos and UPPAAL in the process. DRS is best suited to find counterexamples and not to prove their absence.