1 Verification Options & Beyond Reachability or how to make UPPAAL perform better and more Kim Guldstrand Larsen

Slides:



Advertisements
Similar presentations
UCb Kim Guldstrand Larsen Symbolic Model Checking …and Verification Options How UPPAAL really works & How to make UPPAAL really work.
Advertisements

UCb Symbolic Reachability and Beyound or how UPPAAL really works Kim Guldstrand Larsen
Bit-State Space Exploration It’s a variation on reachability analysis The reachability analysis: –Keeps track of the already explored states –Performs.
Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Game-theoretic approach to the simulation checking problem Peter Bulychev Vladimir Zakharov Lomonosov Moscow State University.
Lecture #21 Software Model Checking: predicate abstraction Thomas Ball Testing, Verification and Measurement Microsoft Research.
UPPAAL Introduction Chien-Liang Chen.
Efficient Reachability Analysis for Verification of Asynchronous Systems Nishant Sinha.
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
Compatibility between shared variable valuations in timed automaton network model- checking Zhao Jianhua, Zhou Xiuyi, Li Xuandong, Zheng Guoliang Presented.
Hybrid Approach to Model-Checking of Timed Automata DAT4 Project Proposal Supervisor: Alexandre David.
Regular Model Checking Parosh Aziz Abdulla Uppsala University Cooperation with B. Jonsson, M. Nilsson, J. d’Orso.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
TECH Computer Science Graphs and Graph Traversals  // From Tree to Graph  // Many programs can be cast as problems on graph Definitions and Representations.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
Chapter 5 Decrease and Conquer. Homework 7 hw7 (due 3/17) hw7 (due 3/17) –page 127 question 5 –page 132 questions 5 and 6 –page 137 questions 5 and 6.
State Space Search 2 Chapter 3 Three Algorithms. Backtracking Suppose We are searching depth-first No further progress is possible (i.e., we can only.
Chapter 10: Iterative Improvement The Maximum Flow Problem The Design and Analysis of Algorithms.
Reachability, Schedulability and Optimality
Abstractions. Outline Informal intuition Why do we need abstraction? What is an abstraction and what is not an abstraction A framework for abstractions.
UnInformed Search What to do when you don’t know anything.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Copyright 2001, Agrawal & BushnellVLSI Test: Lecture 11alt1 Lecture 11alt Advances in Combinational ATPG Algorithms  Branch and Bound Search  FAN – Multiple.
Verification and Controller Synthesis for Timed Automata : the tool KRONOS Stavros Trypakis.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Problem Spaces and Search Fall 2008 Jingsong.
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
Alyce Brady CS 510: Computer Algorithms Depth-First Graph Traversal Algorithm.
Using Search in Problem Solving
Transforming Infix to Postfix
Computing Over­Approximations with Bounded Model Checking Daniel Kroening ETH Zürich.
1 Completeness and Complexity of Bounded Model Checking.
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
1 Efficient Verification of Timed Automata Kim Guldstrand Larsen Paul PetterssonMogens Nielsen
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
CS261 Data Structures DFS and BFS – Edge List Representation.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: BDD BDDs applied in equivalence checking.
ULB, November 2004 As cheap as possible: Linearly Priced Timed Automata Gerd Behrmann, Ed Brinksma, Ansgar Fehnker, Thomas Hune, Kim Larsen, Paul Pettersson,
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
MA/CSSE 473 Day 12 Insertion Sort quick review DFS, BFS Topological Sort.
Chapter 2 Graph Algorithms.
1 Timed and Hybrid Systems in UPPAAL2k Kim Guldstrand Larsen Paul Pettersson &
Yang Liu, Jun Sun and Jin Song Dong School of Computing National University of Singapore.
CALTECH CS137 Spring DeHon CS137: Electronic Design Automation Day 9: May 6, 2002 FSM Equivalence Checking.
Lazy Abstraction Jinseong Jeon ARCS, KAIST CS750b, KAIST2/26 References Lazy Abstraction –Thomas A. Henzinger et al., POPL ’02 Software verification.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Lecture 13 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
Lecture 81 Optimizing CTL Model checking + Model checking TCTL CS 5270 Lecture 9.
Foundations of Data Structures Practical Session #13 Graphs Algorithms.
State Space Search. Backtracking Suppose  We are searching depth-first  No further progress is possible (i.e., we can only generate nodes we’ve already.
Parallel and Distributed Simulation Time Parallel Simulation.
1 Model Checking of of Timed Systems Rajeev Alur University of Pennsylvania.
CS 312: Algorithm Analysis Lecture #33: Branch and Bound, Job Assignment This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
1 Distributed BDD-based Model Checking Orna Grumberg Technion, Israel Joint work with Tamir Heyman, Nili Ifergan, and Assaf Schuster CAV00, FMCAD00, CAV01,
Christopher Brown and Kevin Hammond School of Computer Science, University of St. Andrews July 2010 Ever Decreasing Circles: Implementing a skeleton for.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
© 2006 Pearson Addison-Wesley. All rights reserved14 B-1 Chapter 14 (continued) Graphs.
Brute Force and Exhaustive Search Brute Force and Exhaustive Search Traveling Salesman Problem Knapsack Problem Assignment Problem Selection Sort and Bubble.
Artificial Intelligence Solving problems by searching.
The Time-abstracting Bisimulation Equivalence  on TA states: Preserve discrete state changes. Abstract exact time delays. s1s2 s3  a s4  a 11 s1s2.
Lecture 3: Uninformed Search
Abstraction and Refinement for Large Scale Model Checking
Graphs Representation, BFS, DFS
Backtracking And Branch And Bound
Instructor: Rajeev Alur
Graphs Representation, BFS, DFS
Presentation transcript:

1 Verification Options & Beyond Reachability or how to make UPPAAL perform better and more Kim Guldstrand Larsen

SV 2001 Kim G. Larsen UCb 2 Verification Options Diagnostic Trace Breadth-First Depth-First Local Reduction Early Termination Global Reduction Active-Clock Reduction Re-Use State-Space Over-Approximation Under-Approximation Distributed Impl. Diagnostic Trace Breadth-First Depth-First Local Reduction Early Termination Global Reduction Active-Clock Reduction Re-Use State-Space Over-Approximation Under-Approximation Distributed Impl.

SV 2001 Kim G. Larsen UCb 3 Forward Rechability Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT - pick (n,Z) in Waiting - if for some Z’ Z (n,Z’) in Passed then STOP - else /explore/ add { (m,U) : (n,Z) => (m,U) } to Waiting; Add (n,Z) to Passed UNTIL Waiting = Ø or Final is in Waiting n,Z’ m,U n,Z Init -> Final ? location zone

SV 2001 Kim G. Larsen UCb 4 Forward Rechability Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT - pick (n,Z) in Waiting - if for some Z’ Z (n,Z’) in Passed then STOP - else /explore/ add { (m,U) : (n,Z) => (m,U) } to Waiting; Add (n,Z) to Passed UNTIL Waiting = Ø or Final is in Waiting n,Z’ m,U n,Z Init -> Final ? location zone Questions: 1. Order for exploration Waiting ? 2. How to store symbolic state in Passed ? 3. When to store in Passed ?

SV 2001 Kim G. Larsen UCb 5 Order of Exploration Depth-First vs Breadth-First Passed Waiting Final Init n,Z’ m,U n,Z Depth-First Waiting repr. as stack Breadth-First Waiting repr as queue Depth-First Waiting repr. as stack Breadth-First Waiting repr as queue In most cases BF to be preferred. Allows for generation of “shortest” traces. DF useful in situations when reachability may be concluded without generating full state-space. Easy calculation of traces.

SV 2001 Kim G. Larsen UCb 6 Representation of symbolic states Zones x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5 x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5 x1x2 x3x x1x2 x3x Shortest Path Closure O(n^3) Z Allows for easy exploration and subset-checking

SV 2001 Kim G. Larsen UCb 7 Representation of symbolic states Local Reduction x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5 x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5 x1x2 x3x x1x2 x3x x1x2 x3x Shortest Path Closure O(n^3) Shortest Path Reduction O(n^3) 3 Canonical wrt = Space worst O(n^2) practice O(n) Z

SV 2001 Kim G. Larsen UCb 8

SV 2001 Kim G. Larsen UCb 9

SV 2001 Kim G. Larsen UCb 10 Earlier Termination Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT - pick (n,Z) in Waiting - if for some Z’ Z (n,Z’) in Passed then STOP - else /explore/ add { (m,U) : (n,Z) => (m,U) } to Waiting; Add (n,Z) to Passed UNTIL Waiting = Ø or Final is in Waiting n,Z’ m,U n,Z Init -> Final ?

SV 2001 Kim G. Larsen UCb 11 Earlier Termination Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT - pick (n,Z) in Waiting - if for some Z’ Z (n,Z’) in Passed then STOP - else /explore/ add { (m,U) : (n,Z) => (m,U) } to Waiting; Add (n,Z) to Passed UNTIL Waiting = Ø or Final is in Waiting n,Z’ m,U n,Z Init -> Final ?

SV 2001 Kim G. Larsen UCb 12 INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT - pick (n,Z) in Waiting - if for some (n,Z’) in Passed then STOP - else /explore/ add { (m,U) : (n,Z) => (m,U) } to Waiting; Add (n,Z) to Passed UNTIL Waiting = Ø or Final is in Waiting Earlier Termination Passed Waiting Final Init n,Z k m,U n,Z Init -> Final ? n,Z 1 n,Z 2

SV 2001 Kim G. Larsen UCb 13 Clock Difference Diagrams = Binary Decision Diagrams + Difference Bounded Matrices CDD-representations CAV99 zNodes labeled with differences z Maximal sharing of substructures (also across different CDDs) zMaximal intervals zLinear-time algorithms for set-theoretic operations. zNDD’s Maler et. al zDDD’s Møller, Lichtenberg

SV 2001 Kim G. Larsen UCb 14

SV 2001 Kim G. Larsen UCb 15

SV 2001 Kim G. Larsen UCb 16 Representation of symbolic states (In)Active Clock Reduction x is only active in location S1 x>3 x<5 x:=0 S x is inactive at S if on all path from S, x is always reset before being tested. Definition x<7

SV 2001 Kim G. Larsen UCb 17 Representation of symbolic states Active Clock Reduction x>3 x<5 S x is inactive at S if on all path from S, x is always reset before being tested. Definition g1 gk g2 r1 r2rk S1 S2Sk Only save constraints on active clocks

SV 2001 Kim G. Larsen UCb 18 When to store symbolic state Global Reduction No Cycles: Passed list not needed for termination However, Passed list useful for efficiency

SV 2001 Kim G. Larsen UCb 19 When to store symbolic state Global Reduction Cycles: Only symbolic states involving loop-entry points need to be saved on Passed list

SV 2001 Kim G. Larsen UCb 20 Reuse State Space Passed Waiting prop1 A[] prop1 A[] prop2 A[] prop3 A[] prop4 A[] prop5. A[] propn Search in existing Passed list before continuing search Which order to search? prop2

SV 2001 Kim G. Larsen UCb 21 Reuse State Space Passed Waiting prop1 A[] prop1 A[] prop2 A[] prop3 A[] prop4 A[] prop5. A[] propn Search in existing Passed list before continuing search Which order to search? Hashtable prop2

SV 2001 Kim G. Larsen UCb 22 Over-approximation Convex Hull x y Convex Hull

SV 2001 Kim G. Larsen UCb 23 Under-approximation Bitstate Hashing Passed Waiting Final Init n,Z’ m,U n,Z

SV 2001 Kim G. Larsen UCb 24 Under-approximation Bitstate Hashing Passed Waiting Final Init n,Z’ m,U n,Z Passed= Bitarray UPPAAL 8 Mbits Hashfunction F

SV 2001 Kim G. Larsen UCb 25 Bitstate Hashing INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT - pick (n,Z) in Waiting - if for some Z’ Z then STOP (n,Z’) in Passed then STOP - else /explore/ add { (m,U) : (n,Z) => (m,U) } to Waiting; Add (n,Z) to Passed UNTIL Waiting = Ø or Final is in Waiting INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT - pick (n,Z) in Waiting - if for some Z’ Z then STOP (n,Z’) in Passed then STOP - else /explore/ add { (m,U) : (n,Z) => (m,U) } to Waiting; Add (n,Z) to Passed UNTIL Waiting = Ø or Final is in Waiting Passed(F(n,Z)) = 1 Passed(F(n,Z)) := 1

SV 2001 Kim G. Larsen UCb 26 UPPAAL Distributing UPPAAL P W Gerd Behrmann, Thomas Hune, Frits Vandraager CAV2k

SV 2001 Kim G. Larsen UCb 27 UPPAAL Distributing UPPAAL P W Gerd Behrmann, Thomas Hune, Frits Vandraager CAV2k P1 W1 P2 W2 P4 W4 P3 W3 Passed structure distributed Passed structure distributed

SV 2001 Kim G. Larsen UCb 28 UPPAAL Distributing UPPAAL Gerd Behrmann, Thomas Hune, Frits Vandraager CAV2k P1 W1 P2 W2 P4 W4 P3 W3 Passed structure distributed Passed structure distributed Check in local Passed list. If not present save, explore and distribute... Check in local Passed list. If not present save, explore and distribute... ? MPI

SV 2001 Kim G. Larsen UCb 29 UPPAAL Distributing UPPAAL Gerd Behrmann, Thomas Hune, Frits Vandraager CAV2k P1 W1 P2 W2 P4 W4 P3 W3 Passed structure distributed Passed structure distributed ? Implemented using MPI on SUN Interprise Beowulf cluster Implemented using MPI on SUN Interprise Beowulf cluster Check in local Passed list. If not present save, explore and distribute... Check in local Passed list. If not present save, explore and distribute...

SV 2001 Kim G. Larsen UCb 30 Performance Full State Space Generation Full State Space Generation Super-linear Speed-up SUN Interprise Shared Memory 12GB Ram Mhz CPU’s

31 Beyond Reachability - (Bi)Simulation - Compositional Verification

SV 2001 Kim G. Larsen UCb 32 Timed Bisimulation Wang’91

SV 2001 Kim G. Larsen UCb 33 Timed Simulation

SV 2001 Kim G. Larsen UCb 34 Examples

SV 2001 Kim G. Larsen UCb 35 Abstraction & Compositionality dealing w stateexplosion a cb a cb a cb a cb a cb a cb a cb a cb Concrete Abstract simulation

SV 2001 Kim G. Larsen UCb 36 Abstraction Example a1a2a3a4a5 a b

SV 2001 Kim G. Larsen UCb 37 Example Continued abstracted by

SV 2001 Kim G. Larsen UCb 38 Proving abstractions using reachability A[] not TestAbstPoP1.BAD Recognizes all the BAD computations of PoP1