Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.

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

Model Checking Lecture 2. Three important decisions when choosing system properties: 1automata vs. logic 2branching vs. linear time 3safety vs. liveness.
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
Modeling issues Book: chapters 4.12, 5.4, 8.4, 10.1.
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.
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:
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.
1 Generalized Buchi automaton. 2 Reminder: Buchi automata A=  Alphabet (finite). S: States (finite).  : S x  x S ) S is the transition relation. I.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Timed Automata.
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.
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: Property checking Property checking.
Review of topics Final exam : -May 2nd to May 7 th - Projects due on May 7th.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
CSE 555 Protocol Engineering Dr. Mohammed H. Sqalli Computer Engineering Department King Fahd University of Petroleum & Minerals Credits: Dr. Abdul Waheed.
On the Use of Automata Techniques to Decide Satisfiability Mia Minnes May 3, 2005.
Beyond Vacuity: Towards the Strongest Passing Formula Hana ChocklerArie Gurfinkel Ofer Strichman Technion - Israel Institute of Technology IBM Research.
1 Carnegie Mellon UniversitySPINFlavio Lerda SPIN An explicit state model checker.
Easier and More Informative Vacuity Checks Hana ChocklerandOfer Strichman IBM ResearchTechnion Technion - Israel Institute of Technology not at the same.
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.
Review of the automata-theoretic approach to model-checking.
Chapter 11: Limitations of Algorithmic Power
1 Completeness and Complexity of Bounded Model Checking.
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 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
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)
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.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Basics of automata theory
Model Checking Lecture 3 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: LTL Model Checking Copyright , Matt Dwyer, John Hatcliff,
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Lecture 81 Optimizing CTL Model checking + Model checking TCTL CS 5270 Lecture 9.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
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.
Quality Assurance in the Presence of Variability Kim Lauenroth, Andreas Metzger, Klaus Pohl Institute for Computer Science and Business Information Systems.
Bounded Model Checking A. Biere, A. Cimatti, E. Clarke, Y. Zhu, Symbolic Model Checking without BDDs, TACAS’99 Presented by Daniel Choi Provable Software.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
6/12/20161 a.a.2015/2016 Prof. Anna Labella Formal Methods in software development.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
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.
Orna Kupferman Yoad Lustig
Instructor: Rajeev Alur
Automatic Verification
Alternating tree Automata and Parity games
CSEP590 – Model Checking and Automated Verification
Automatic Verification of Industrial Designs
Presentation transcript:

Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology

IBM HRL 2 Problem Formulation – General Query Checking What is the property? We have the design: This is not as silly as you might think!

IBM HRL 3 Problem: Model Understanding work book Is it “always(request -> eventually(grant))” or “always(request -> next(grant))” or “always((request AND not_busy)-> next(grant))” or “always(request -> next(grant AND busy))” Or maybe something else?

IBM HRL 4 Current mode of working: Try properties one after another until you find the right ones Usually, we are looking for the strongest properties that hold in the design Very time- consuming and frustrating Wouldn’t it be nice if an automated process could find the right property for us?

IBM HRL 5 A formal specification φ Query Checking was defined by W. Chan in 2000 A mathematical model of the system M (an FSM): Does M satisfy φ ? no counter example yes the system is correct! Model Checking: I only have a vague idea about the right property to check …

IBM HRL 6 Query Checking was defined by W. Chan in 2000 A mathematical model of the system M (an FSM): A skeleton of a formal specification – basically a formula with placeholders What is the right φ? A strongest φ with a given skeleton that holds in M I found the property! Query Query Checking:

IBM HRL 7 Why this particular setting?  A skeleton gives an idea about the kind of property the verification engineer has in mind  Usually, the skeleton is accompanied by the set of signals, which can be used to turn the skeleton into a property – so no uninteresting signals can appear Model learning Model exploration Strongest invariant

IBM HRL 8 Related Work  Definition of query checking for CTL; a subset of CTL for which there is a single solution [Chan]  Solving query checking with alternating automata [Bruns and Godefroid]  Solving query checking with lattices [Gurfinkel, Chechik, and Devereux] All these algorithms use some form of repeated model checking

IBM HRL 9 Linear Temporal Logic (LTL) In addition to Boolean operators, has temporal operators: always, eventually, next, and until: always(p AND q) – p AND q are true in all states p until q – on each path, p holds until q holds Preliminaries: Buchi Automata Automata on infinite computations: accept if a path visits an accepting state an infinite number of times p&q A accepts all paths on which p AND q are true in all states: Systems as labeled state-transition graphs (FSM) Each state is labeled with atomic propositions (variables) that are true in this state; all states have outgoing transitions; computations are infinite paths on the graph. A system satisfies a property if all its computations satisfy this property.

IBM HRL 10 Model Checking: Construct an automaton B for the negation of the property φ Build the product MxB Check whether it is empty: If it is empty, then M ² φ if not, accepting paths are counterexamples Preliminaries: p&q B is an automaton for the negation of “eventually(¬p OR ¬q)” p p,q q M: MxB is empty M satisfies the property

IBM HRL 11 Our contribution: LTL Query Checking  Problem formulation: Given an FSM (Kripke structure) M and an LTL query  [?], both over Σ = 2 AP, find a strongest propositional formula f such that M ²  [? Ã f ] A mathematical model of the system M (an FSM): An LTL query  [?] – an LTL formula with placeholders What is the right  ? A strongest propositional f such that M ²  [? Ã f ] I found the property! The set AP’ of atomic propositions to be used to construct f

IBM HRL 12 Why propositional f and why over AP’? Usually, the type of the property is defined by its temporal operators; then, query checking finds a propositional f that fits – for example, “always(?)” can be used to find a strongest invariant AP’ is a subset of signals over which f is constructed What is a “strongest”? Option 1: f is stronger than g if models(f) µ models(g) (that is, f  g) Option 2: f is stronger than g if |models(f)| < |models(g)| Option 3: f is stronger than g if φ[f]  φ[g]

IBM HRL 13 Our contribution: LTL Query Checking  We present solutions for all definitions of strongest  The most interesting one is to Option 2:  f is stronger than g if |models(f)| < |models(g)| The solution reduces the query checking problem to an optimization problem in Linear Integer Programming over binary variables (0-1-ILP), or, equivalently, a problem for a Pseudo-Boolean Solver (PBS)

IBM HRL 14 Intuition: compute f such that the product of M with the automaton for the negation of φ[f] is empty  Let Σ’ = Σ [ ‘?’ [ ‘ : ?’.  Construct P = M £ B :  over Σ’  In this product ‘?’ and ‘ : ?’ are the same as ‘true’, i.e. they synchronize on everything.  Let Π be the set of lasso-shaped accepting paths in P  We will find the strongest f that eliminates all elements of Π. Solution strategy: essentially, we treat ‘?’ as a wild card

IBM HRL 15 Bird’s-eye view of the solution – series of reductions Problem 1: find a strongest f such that the product MxB is empty Problem 2: find a minimum cutting set for a Buchi automaton Problem 3: find a minimum cutting set for a finite automaton for a safety query 0-1 ILP To cut all accepting paths

IBM HRL 16 From Problem 2 to Problem 3: Problem 2: find a minimum cutting set for a Buchi automaton Problem 3: find a minimum cutting set for a finite automaton Buchi automaton B with the set of accepting states F of size k B0 B1 B2 Bk k transitions from the i-th accepting state of B0 to the copy Bi accepting states are here for safety properties, the Buchi automaton is already a finite automaton

IBM HRL 17 Reducing the minimum cutting set of a finite automaton to a 0-1-ILP problem  Each edge in the automaton has its labeling  We only leave edges that exist in the automaton regardless of the value of ‘?’ and edges that can exist depending on the value of ‘?’  With each labeling with a positive occurrence of ‘?’ we associate a positive propositional variable  With each labeling with a negative occurrence of ‘?’ we associate a negated propositional variable  With each state we associate a propositional variable  Constraints:  Initial states are reachable: for each s 0 2 S in. e s 0  Accepting states are unreachable: for each f 2 F. : e f  For each transition, we have: e s Æ e l ! e v  Objective: to minimize Σ e l Solution: f = Ç l for which e l = 1

IBM HRL 18 Why is this correct?  f can be represented as DNF where each term represents a full assignment  This corresponds to the truth table of f.  For ¼ 2 ¦, let  g( ¼ - ) = { ¿ | 2 ¼ }  g( ¼ + ) = { ¿ | 2 ¼ + }// sets of assignments  f should contradict at least one edge in each path ¼ 2 ¦  For ¿ 2 g( ¼ - ), it is sufficient that f ² ¿.  For ¿ 2 g( ¼ + ), it is sufficient that f 2 ¿.

IBM HRL 19 Example  [?] = eventually(always(?)) :  [?] = always(eventually( : ?)) M: w0w0 w1w1 w2w2 p, : q : p, q p, : q B: s0s0 s1s1 :?:? :?:? ? ? s 0,w 0 s 0,w 1 s 0,w 2 s 1,w 1 s 1,w 2 product automaton

IBM HRL ILP formulation for the example Min e : pq + e p : q subject to 1.e : pq Ç e p : q 2.e : pq Ç e p : q Ç : e p : q 3.e p : q Ç e : pq 4.e p : q Ç e : pq Ç : e : pq 5.e : p q Ç : e p : q 6.e p : q Ç : e : pq Optimal solution = e : pq = e p : q = 1, hence f = : pq Ç p : q = p © q  [f] = eventually(always(p © q)) w0w0 w1w1 w2w2 p, : q : p, q p, : q M: accepting path from the previous slide

IBM HRL 21 Complexity Size of the product automaton (= of model checking): O(|B|) = O(|M| ¢ 2 |  ) Solving 0-1-ILP is bound by exponent on the number of variables, which is double-exponential in AP’ – a small subset of variables that are taken into consideration when computing f likely to be more efficient in practice size of the finite automaton

IBM HRL 22 In the paper but not in the presentation:  Option 1: f is stronger than g if models(f) µ models(g) (in other words, f  g)  Option 3: f is stronger than g if φ[f]  φ[g] solved using lattices  Multiple placeholders – solved similarly using a 0-1-ILP

IBM HRL 23 Summary:  Motivation  Definition of query checking  Introducing query checking for LTL  Automata-based algorithm for computing a strongest solution  Complexity Future work:  More efficient algorithms  Query checking with temporal placeholders  Characterization of queries for which exactly one strongest solution exists

IBM HRL 24

IBM HRL 25 Questions?

IBM HRL 26 Is the system correct? Model Checking A mathematical model of the system M (an FSM): A formal specification ψ Does M satisfy ψ? no counter example yes the system is correct!