15-820A 1 LTL to Büchi Automata Flavio Lerda. 15-820A 2 LTL to Büchi Automata LTL Formulas Subset of CTL* –Distinct from CTL AFG p  LTL  f  CTL. f.

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.
Translating from logic to automata Book: Chapter 6.
Model Checking and Testing combined
Black Box Checking Book: Chapter 9 Model Checking Finite state description of a system B. LTL formula. Translate into an automaton P. Check whether L(B)
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
An improved on-the-fly tableau construction for a real-time temporal logic Marc Geilen 12 July 2003 /e.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
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:
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
1 Generalized Buchi automaton. 2 Reminder: Buchi automata A=  Alphabet (finite). S: States (finite).  : S x  x S ) S is the transition relation. I.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar.
CS6133 Software Specification and Verification
UPPAAL Introduction Chien-Liang Chen.
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.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Temporal Logic u Classical logic:  Good for describing static conditions u Temporal logic:  Adds temporal operators  Describe how static conditions.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture # 11.
© Katz, 2007CS Formal SpecificationsLecture - Temporal logic 1 Temporal Logic Formal Specifications CS Shmuel Katz The Technion.
Specification Formalisms Book: Chapter 5. Properties of formalisms Formal. Unique interpretation. Intuitive. Simple to understand (visual). Succinct.
1 Carnegie Mellon UniversitySPINFlavio Lerda SPIN An explicit state model checker.
On-the-fly Model Checking from Interval Logic Specifications Manuel I. Capel & Miguel J. Hornos Dept. Lenguajes y Sistemas Informáticos Universidad de.
Temporal Logic and Model Checking. Reactive Systems We often classify systems into two types: Transformational: functions from inputs available at the.
1 Translating from LTL to automata Book: Chapter 6.
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.
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 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.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Lexical Analysis — Part II: Constructing a Scanner from Regular Expressions Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved.
Basics of automata theory
Model Checking Lecture 3 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Lexical Analysis — Part II: Constructing a Scanner from Regular Expressions.
Lexical Analysis Constructing a Scanner from Regular Expressions.
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: LTL Model Checking Copyright , Matt Dwyer, John Hatcliff,
Avoiding Determinization Orna Kupferman Hebrew University Joint work with Moshe Vardi.
Copyright , Doron Peled and Cesare Tinelli. These notes are based on a set of lecture notes originally developed by Doron Peled at the University.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Constraints Assisted Modeling and Validation Presented in CS294-5 (Spring 2007) Thomas Huining Feng Based on: [1]Constraints Assisted Modeling and Validation.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Translating from logic to automata (Book: Chapter 6)
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.
Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.
About Alternating Automata Daniel Choi Provable Software Laboratory KAIST.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
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.
15-820A 1 LTL Model Checking A Flavio Lerda.
Symbolic model checking with SAT/SMT
Automatic Verification
CSEP590 – Model Checking and Automated Verification
Generating Optimal Linear Temporal Logic Monitors by Coinduction
Formal Methods in software development
CSCI1600: Embedded and Real Time Software
Formal Methods in software development
Formal Methods in software development
Presentation transcript:

15-820A 1 LTL to Büchi Automata Flavio Lerda

15-820A 2 LTL to Büchi Automata LTL Formulas Subset of CTL* –Distinct from CTL AFG p  LTL  f  CTL. f ≠ AFG p Contains a single universal quantifier –The path formula f holds for every path Commonly: – A is omitted –G is replaced by  (box or always) –F is replaced by  (diamond or eventually)

15-820A 3 LTL to Büchi Automata Examples of LTL formulas Always eventually p: –   p –AGF p or AG AF p Always after p eventually q –  ( p  q) –AG (p -> F q) or AG (p -> AF q) Fairness –(   p )   –A ((GF p)   ) Not a CTL formula

15-820A 4 LTL to Büchi Automata LTL Semantics Derived from the CTL* semantics Given an infinite execution trace  =s 0 s 1 …  ╞ p  p(s 0 )  ╞ ¬   ¬(  ╞  )  ╞  1   2   ╞  1   ╞  2  ╞  1   2   ╞  1   ╞  2  ╞   i  0  i ╞   ╞   i  0  i ╞   ╞  1 U  2  i  0  i ╞  2   0  j  < i  j ╞  1  i is the suffix of  starting at s i

15-820A 5 LTL to Büchi Automata Büchi Automata Automaton which accepts infinite traces A Büchi automaton is 4-tuple  S, I, , F  –S is a finite set of states –I  S is a set of initial states –   S  S is a transition relation –F  S is a set of accepting states An infinite sequence of states is accepted iff it contains accepting states infinitely often

15-820A 6 LTL to Büchi Automata Example S0S0 S1S1 S2S2  1 =S 0 S 1 S 2 S 2 S 2 S 2 …  2 =S 0 S 1 S 2 S 1 S 2 S 1 …  3 =S 0 S 1 S 2 S 1 S 1 S 1 … ACCEPTED REJECTED

15-820A 7 LTL to Büchi Automata LTL and Büchi Automata LTL formula –Represents a set of infinite traces which satisfy such formula Büchi Automaton –Accepts a set of infinite traces We can build an automaton which accepts all and only the infinite traces represented by an LTL formula

15-820A 8 LTL to Büchi Automata Labeled Büchi Automata Given a set of atomic proposition P –Define a labeling function : S  2 P –Each state is assigned a set of propositions that must be true Similar to the labeling for the model M

15-820A 9 LTL to Büchi Automata Generating Büchi Automata We need a procedure to generate a Büchi automaton given an LTL formula –Efficiently Formulas are usually small Büchi automaton exponential in the size of the formula The cost of model checking is proportional to the size of the automaton –Non-deterministic Büchi automata are not equivalent to deterministic Büchi automata Cannot use automata minimization algorithms –Finding the minimal automata is exponential

15-820A 10 LTL to Büchi Automata Approach Formula rewriting –Rewrite the formula in negated normal form –Apply rewriting rules Core translation –Turns an LTL formula into a generalized Büchi automaton Degeneralization –Turns a generalized Büchi automaton into a Büchi automaton

15-820A 11 LTL to Büchi Automata Rewriting Negated normal form –Negation appears only in front of literals –Use the following identities ¬¬  =  ¬G  = F ¬  ¬F  = G ¬  ¬(  U  ) = (¬  ) V (¬  ) ¬(  V  ) = (¬  ) U (¬  ) V (sometimes R) is the Release operator –Dual of Until

15-820A 12 LTL to Büchi Automata Rewriting Additional rewriting rules –They are not guaranteed to yield smaller automata –The size of the automaton is exponential in the size of the formula Examples –(X  ) U (X  )  X (  U  ) –(X  )  (X  )  X (    ) –GF   GF   GF (    )

15-820A 13 LTL to Büchi Automata Rewriting The core algorithm only handles – , , V, U Use the following: –F   T U  –G   ¬F ¬   ¬(T U ¬  ) = F V 

15-820A 14 LTL to Büchi Automata Core Translation Idea Make use of the following  U    (   X(  U  ))  V    (   X(  V  ))

15-820A 15 LTL to Büchi Automata Example F p (T U p) Old:{} New:{T U p} Next:{} Old:{T U p} New:{T} Next:{T U p} Old:{T U p} New:{p} Next:{} Old:{T U p} New:{} Next:{T U p} Old:{T U p} Next:{T U p} Old:{T U p, p} New:{} Next:{} Old:{T U p, p} Next:{} Tp p Old:{} New:{} Next:{} Old:{} Next:{}

15-820A 16 LTL to Büchi Automata Core Translation Node –Represent a sub-formula –Contain information about the past, the present and the future State –Represents a state in the final automaton –They are the nodes that have fully expanded

15-820A 17 LTL to Büchi Automata Core Translation Expansion –Select a formula from the New field –If it is a literal, add it to the Old field –Otherwise     (New{  },Next{}) and (New{  },Next{})  U   (New{  },New{  U  }) and (New{  },Next{})  V   (New{  },New{  V  }) and (New{ ,  },Next{})  U    (   X(  U  ))  V    (   X(  V  ))

15-820A 18 LTL to Büchi Automata Core Translation Nodes to states –If a node has no New formulas –Create a new node with all the Next formulas –Create an edge between the two nodes –Check if there is any equivalent state With the same Next field With the same Old field

15-820A 19 LTL to Büchi Automata Core Translation Accepting states –Generalized Büchi automaton Multiple accepting sets –One for each Until sub-formula (  U  ) –Such that The Old field doesn’t contain  U  or The Old field does contain 

15-820A 20 LTL to Büchi Automata Degeneralization Turn a generalized Büchi automaton into a Büchi automaton Consider as many copies of the automaton as the number of accepting sets Replace incoming edges from accepting states with edges to the next copy Each cycle must go through every copy Each cycle must contains accepting states from each accepting set

15-820A 21 LTL to Büchi Automata Example T ab T ab T 1 1,2 2 F a  F b

15-820A 22 LTL to Büchi Automata Example T ab T a T T ab T b T

15-820A 23 LTL to Büchi Automata Example T ab T a T T ab T b T

15-820A 24 LTL to Büchi Automata Example T ab T a T T ab T

15-820A 25 LTL to Büchi Automata Example T ab T a T T

15-820A 26 LTL to Büchi Automata Example T ab T a T T

15-820A 27 LTL to Büchi Automata Optimizations Can be done at each stage Try to minimize –The number of states and transitions –The number of accepting states Involve –Strongly connected components –Fair (bi)simulation Expensive but –The Büchi automaton is usually small –The saving during verification can be very high