1 Translating from LTL to automata Book: Chapter 6.

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

Translating from logic to automata Book: Chapter 6.
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.
Chapter 5 Pushdown Automata
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:
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
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.
UPPAAL Introduction Chien-Liang Chen.
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.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture # 11.
Beyond Vacuity: Towards the Strongest Passing Formula Hana ChocklerArie Gurfinkel Ofer Strichman Technion - Israel Institute of Technology IBM Research.
Specification Formalisms Book: Chapter 5. Properties of formalisms Formal. Unique interpretation. Intuitive. Simple to understand (visual). Succinct.
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.
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.
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.
Normal forms for Context-Free Grammars
1 Completeness and Complexity of Bounded Model Checking.
Witness and Counterexample Li Tan Oct. 15, 2002.
Finite Automata Chapter 5. Formal Language Definitions Why need formal definitions of language –Define a precise, unambiguous and uniform interpretation.
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.
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
1 Completeness and Complexity of Bounded Model Checking.
Basics of automata theory
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CSCI 2670 Introduction to Theory of Computing September 20, 2005.
Automating Construction of Lexers. Example in javacc TOKEN: { ( | | "_")* > | ( )* > | } SKIP: { " " | "\n" | "\t" } --> get automatically generated code.
XML Data Management 10. Deterministic DTDs and Schemas Werner Nutt.
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: LTL Model Checking Copyright , Matt Dwyer, John Hatcliff,
Copyright , Doron Peled and Cesare Tinelli. These notes are based on a set of lecture notes originally developed by Doron Peled at the University.
Formal methods: Model Checking and Testing Prof. Doron A. Peled University of Warwick, UK and Bar Ilan University, Israel.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Regular Expressions CIS 361. Need finite descriptions of infinite sets of strings. Discover and specify “regularity”. The set of languages over a finite.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
LTL Model Checking 张文辉
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
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CS 203: Introduction to Formal Languages and Automata
Introduction Finite Automata accept all regular languages and only regular languages Even very simple languages are non regular (  = {a,b}): - {a n b.
Translating from logic to automata (Book: Chapter 6)
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.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2007.
Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
About Alternating Automata Daniel Choi Provable Software Laboratory KAIST.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
LECTURE 5 Scanning. SYNTAX ANALYSIS We know from our previous lectures that the process of verifying the syntax of the program is performed in two stages:
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2006.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Lecture 09: Theory of Automata:2014 Asif NawazUIIT, PMAS-Arid Agriclture University Rawalpindi. Kleene’s Theorem and NFA.
15-820A 1 LTL Model Checking A Flavio Lerda.
Kleene’s Theorem and NFA
Automatic Verification
Alternating tree Automata and Parity games
Lecture 5 Scanning.
Presentation transcript:

1 Translating from LTL to automata Book: Chapter 6

2 Why translating? Want to write the specification in some logic. Want model-checking tools to be able to check the specification automatically.

3 Preprocessing Convert into normal form, where negation only applies to propositional variables. ¬ ð  becomes } ¬ . ¬ }  becomes ð ¬ . What about ¬ (  U  )? Define operator R (Release) such that ¬ (  U  ) = (¬  ) R (¬  ), ¬ (  R  ) = (¬  ) U (¬  ).

4 Semantics of p R q p qqqqq ¬p¬p ¬p¬p ¬p¬p ¬p¬pp qqqq ¬p¬p ¬p¬p ¬p¬p ¬p¬p Almost like q W p, but not exactly: p R q:

5 Replace ¬ T by F, and ¬ F by T. Replace ¬ (  Ç  ) by ( ¬  ) Æ ( ¬  ) and ¬ (  Æ  ) by ( ¬  ) Ç ( ¬  ) 1.Convert to Negation Normal Form

6 2. Eliminate !, }, ð Replace  !  by ( ¬  ) Ç . Replace }  by (T U  ). Replace ð  by (F R  ).

7 Example Translate ( ð} P ) ! ( ð} Q ) Eliminate implication ¬ ( ð} P ) Ç ( ð} Q ) Eliminate ð, } : ¬ ( F R ( T U P ) ) Ç ( F R ( T U Q ) ) Push negation inwards: (T U (F R ¬ P ) ) Ç ( F R ( T U Q ) )

8 The data structure Incoming NewOld Next Name Incoming = Set of nodes with an edge to this node

9 The main idea  U  =  Ç (  Æ O (  U  ) )  R  =  Æ (  Ç O (  R  ) ) This separates the formulas to two parts: One holds in the current state, and The other in the next state.

10 How to translate? Take one formula from “New” and add it to “Old”. According to the formula, either Split the current node into two, or Evolve the node into a new version.

11 Splitting Incoming New Old Next Incoming New Old Next Incoming New Old Next Copy incoming edges, update other field.

12 Evolving Incoming New Old Next Incoming New Old Next Copy incoming edges, update other field.

13 Possible cases:  U , split: 1. Add  to New, add  U  to Next. 2. Add  to New. Because  U  =  Ç (  Æ O (  U  )).  R , split: 1. Add  to New. 2. Add  to New,  R  to Next. Because  R  =  Æ (  Ç O (  R  )).

14 More cases:  Ç , split: 1. Add  to New. 2. Add  to New.  Æ , evolve: 1. Add  to New. O , evolve: 1. Add  to Next.

15 Example } 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:{}

16 How to start? Incoming NewOld Next init aU(bUc)

17 Incoming init aU(bUc) Incoming aU(bUc) bUc aU(bUc) a init Old Next New Old Next New Keep track of nodes evolving from original formula (init)

18 Incoming aU(bUc)bUc init Incoming aU(bUc), bUc c (bUc) b Old Next New init

19 When to stop splitting? When “New” is empty. Then compare against a list of existing nodes “Nodes”: If a node with the same “Old”, “Next” exists, just add the incoming edges of the new version to the old one. Otherwise, add the node to “Nodes”. Generate a successor with “New” set to “Next” of father.

20 a,aU(bUc) aU(bUc) Incoming init Incoming aU(bUc) Creating a successor node. Old Next New

21 How to obtain the automaton? There is an edge from node X to Y if X is in the incoming list of Y Initial node is init. Incoming NewOld Next Node X Node Y a, b, ¬c

22 Old: New: aU(bUc) Next: Old: aU(bUc) New:a Next: aU(bUc) Old: aU(bUc),(bUc) New:b Next:(bUc) Old: aU(bUc) New:(bUc) Next: Old: aU(bUc),(bUc) New:c Next: Old: aU(bUc),a New: Next: aU(bUc) 1 Old: aU(bUc),(bUc),b New: Next:(bUc) 2 Old: aU(bUc),(bUc),c New: Next: 3

23 Old: New: aU(bUc) Next: Old: aU(bUc),a New: Next: aU(bUc) 1 Old: aU(bUc),(bUc),b New: Next:(bUc) 2 Old: aU(bUc),(bUc),c New: Next: 3 If we continue here, we re-create nodes 1,2,3. So ‘1’ will be added to the ‘incoming’ list of 1,2,3. Old: New: bUc Next: 5 4 Old: bUc New: b Next: bUc Old: bUc New: c Next: Old: bUc,b New: Next: bUc Old: bUc,c New: Next: If we continue here, we re-create nodes 4,5. So ‘4’ will be added to the ‘incoming’ list of 4,5. 6 Old: New: Next:

24 The resulting nodes. Initial states: All nodes with incoming edge from “init”. a, aU(bUc) b, bUc, aU(bUc)c, bUc, aU(bUc) b, bUcc, bUc

25 Reminder: Buchi automata A=  Alphabet (finite). S: States (finite).  : S x  x S ) S is the transition relation. I µ S are the Initial states. F µ S is a set of accepting states. An infinite word is accepted in A if it passes an infinite no. of times in at least one of the F states A A B B S0 S1

26 Generalized Buchi automata A=  Alphabet (finite). S: States (finite).  : S x  x S ) S is the transition relation. I µ S are the Initial states. F µ 2 S is a set of sets of accepting states. An infinite word is accepted in A if it passes an infinite no. of times in at least one state in element of F A A B B S0 S1 F 1 = {S0} F 2 = {S0,S1}

27 Generalized Büchi automaton Multiple accepting sets, one for each Until sub-formula (  U  ) such that The Old field contains  or The Old field doesn’t contain  U  Accepting states

28 Accepting w.r.t. bUc All nodes with c in their past (Old), or without (commitment for) bUc in their past. a, aU(bUc) b, bUc, aU(bUc)c, bUc, aU(bUc) b, bUcc, bUc

29 Acceptance w.r.t. aU(bUc) All nodes with bUc in their past, or without aU(bUc) in their past. a, aU(bUc) b, bUc, aU(bUc)c, bUc, aU(bUc) b, bUcc, bUc

30 Acceptance w.r.t. aU(bUc) bUc aU(bUc) a bc bc Accepting sets:

31 De-generalization of GBA 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 contain accepting states from each accepting set

32 Example T ab T ab T 1 1,2 2 F a  F b 1,2 correspond to F 1 and F 2, the accepting sets

33 Example T ab T a T T ab T b T

34 Example T ab T a T T ab T b T

35 Example T ab T a T T ab T

36 Example T ab T a T T

37 Example T ab T a T T