Lecture 9: LTL and Büchi Automata

Similar documents
Formal Methods in Software Engineering

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

Software Engineering using Formal Methods

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Lecture 08: Feb. 08, 2019

Chapter 2 Finite Automata

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Minimal DFA. minimal DFA for L starting from any other

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Finite-State Automata: Recap

Regular expressions, Finite Automata, transition graphs are all the same!!

4 Deterministic Büchi Automata

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

1 Nondeterministic Finite Automata

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Convert the NFA into DFA

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Designing finite automata II

Finite Automata-cont d

CHAPTER 1 Regular Languages. Contents

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

More on automata. Michael George. March 24 April 7, 2014

Design and Analysis of Distributed Interacting Systems

Formal Languages and Automata

Introduction to ω-autamata

Non-deterministic Finite Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata

Theory of Computation Regular Languages

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

Deterministic Finite Automata

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Homework 3 Solutions

NFAs continued, Closure Properties of Regular Languages

Nondeterminism and Nodeterministic Automata

Java II Finite Automata I

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Non-deterministic Finite Automata

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Formal Language and Automata Theory (CS21004)

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

Tutorial Automata and formal Languages

Fundamentals of Computer Science

CMSC 330: Organization of Programming Languages

On Determinisation of History-Deterministic Automata.

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Good-for-Games Automata versus Deterministic Automata.

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

From LTL to Symbolically Represented Deterministic Automata

Non-Deterministic Finite Automata

NFAs continued, Closure Properties of Regular Languages

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

LTL Translation Improvements in Spot

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

Closure Properties of Regular Languages

Automata, Games, and Verification

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

State Minimization for DFAs

Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints)

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

CS 275 Automata and Formal Language Theory

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA

Bisimulation. R.J. van Glabbeek

Myhill-Nerode Theorem

CS 275 Automata and Formal Language Theory

1.4 Nonregular Languages

CDM Automata on Infinite Words

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

Lexical Analysis Finite Automate

Topological, Automata-Theoretic and Logical Characterization of Finitary Languages

Lecture 3: Equivalence Relations

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

Lecture 09: Myhill-Nerode Theorem

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:

FABER Formal Languages, Automata and Models of Computation

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem 2/16/15

The size of subsequence automaton

3 Regular expressions

STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada

CISC 4090 Theory of Computation

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

Transcription:

Lecture 9: LTL nd Büchi Automt 1

LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled the scope of property. Typicl scopes re: Glol: The property should hold on the whole pth (i.e. on ll suffixes of run). Before R: The property should hold efore the first ppernce of R (i.e. on ll suffixes efore the first suffix stisfying R). After Q: The property should hold fter the first ppernce of Q. 2

Between Q nd R: The property should hold in ll sequences in which the first suffix stisfies Q nd the lst one stisfies R. After Q until R: As efore, ut lso includes the sequences in which Q ppers, ut is never followed y n R. Note: In the following ptterns, scopes re interpreted in wy tht lwys includes the suffix t which the event triggering the scope hppens, ut excludes the suffix t which the event ending the scope hppens. 3

Scopes Glol Before R R R After Q Q Q Between Q nd R Q Q R Q R Q After Q until R Q Q R Q 4

LTL Property Ptterns: Asence Asence ptterns specify tht P is flse within the scope: Glol Before R After Q Between Q nd R After Q until R ( ( ( ( G P (F R) ( P U R) G(Q G P) G((Q R F R) ( P U R)) ( G((Q R) ( P W R)) 5

LTL Property Ptterns: Existence Existence ptterns specify tht P ecomes true within the scope: Glol Before R After Q Between Q nd R After Q until R ( ( ( ( F P R W (P R) (G Q) (F(Q F P)) G((Q R) ( R W (P R))) ( G((Q R) ( R U (P R))) 6

LTL Property Ptterns The property ptterns re useful to mke specifying esier: If desired property flls into one of those ptterns, the pttern cn e instntited for pproprite P, Q, nd R. The ptterns (nd the definition of scopes) from the previous slides were tken from: http://ptterns.projects.cis.ksu.edu/, where you cn find mny more of them (lso for other temporl logics). There re lso other ptterns ville expressing: Universlity: P is true (dul of sence) Precedence: S precedes P Response: S responds to P Etc., etc. 7

Reltions etween Temporl nd Logicl Opertors X(φ 1 φ 2 ) X φ 1 X φ 2 X(φ 1 φ 2 ) X φ 1 X φ 2 X φ X φ F(φ 1 φ 2 ) F φ 1 F φ 2 F φ G φ G(φ 1 φ 2 ) G φ 1 G φ 2 G φ F φ (φ 1 φ 2 ) U ψ (φ 1 U ψ) (φ 2 U ψ) φ U (ψ 1 ψ 2 ) (φ U ψ 1 ) (φ U ψ 2 ) 8

Idempotence nd Recursion Lws F φ F F φ G φ G G φ φ U ψ φ U (φ U ψ) F φ φ X F φ G φ φ X G φ φ U ψ ψ (φ X(φ U ψ)) φ W ψ ψ (φ X(φ W ψ)) φ R ψ (φ ψ) (ψ X(φ R ψ)) 9

LTL Model Checking We now turn to the question how to check whether given Kripke structure stisfies given formul. In the context of temporl logics, this is clled model checking (i.e. checking whether ll runs re models of the given formul). Like in the cse of sfety properties, we follow n utomt-theoretic pproch: 1. We introduce new clss of utomt tht cn express LTL properties. 2. We show how to trnslte properties into these utomt. 3. We check whether the intersection of the system nd the utomton for the negtion of the property is empty. Literture: Clrke, Grumerg, Peled: Model Checking, MIT Press, 1999 10

Büchi Automt: Definition A Büchi utomton is tuple such tht B = Σ, S, S 0,, F Σ S S 0 Q S Σ S F S is finite lphet, is finite set of sttes, re the initil sttes, is the trnsition reltion, nd re the ccepting sttes. So fr, Büchi utomt look exctly like finite utomt. However, they operte on infinite words, nd they hve different cceptnce condition (see next slide). 11

Büchi Automt: Acceptnce nd Lnguge Let B = Σ, S, S 0,, F e Büchi utomton. A run of B on n infinite word σ Σ ω is n infinite sequence of sttes ρ S ω such tht ρ(0) S 0, nd (ρ(i), σ(i), ρ(i + 1)) for ll i 0. We cll run ρ ccepting iff for infinitely mny indices i it holds tht ρ(i) F (i.e. ρ infinitely often visits ccepting sttes). A word σ Σ ω is ccepted y B iff there is n ccepting run on σ in B. The lnguge of B, denoted L(B) Σ ω is defined s the set of infinite words over Σ ccepted y B. 12

Büchi Automt: Exmples infinitely often q0 q1, infinitely often q0 q1 13

Opertions on Büchi Automt Like finite utomt, the lnguges ccepted y Büchi utomt re closed under oolen opertions. We will exmine the following opertions: Intersection of Büchi utomt B 1 nd B 2 : construct B with L(B) = L(B 1 ) L(B 2 ) Union of Büchi utomt B 1 nd B 2 : construct B with L(B) = L(B 1 ) L(B 2 ) Complementtion of Büchi utomton B 1 : construct B with L(B) = Σ \ L(B 1 ) Emptiness check: given B, check if L(B) = 14

Intersection of Büchi utomt The construction of the intersection utomton works little differently from the finite-stte cse. We need to check whether oth sets of ccepting sttes occur infinitely often. Ide: We crete two copies of the intersected stte spce. In the first copy, we check for occurrence of the first cceptnce set. In the second copy, we check for occurrence of the second cceptnce set. We jump ck nd forth etween the copies whenever we find n ccepting stte. Let B 1 = Σ, S 1, S 0 1, 1, F 1, B 2 = Σ, S 2, S 0 2, 2, F 2. We define the intersection utomton (or: product utomton) to e B = Σ, S, S 0,, F, where S = S 1 S 2 {1, 2}, S 0 = S 0 1 S0 2 {1}, F = F 1 S 2 {1} s defined on the next slide 15

( s, t, 1,, s, t, 1 ) iff (s,, s ) 1, (t,, t ) 2, s / F 1 ( s, t, 1,, s, t, 2 ) iff (s,, s ) 1, (t,, t ) 2, s F 1 ( s, t, 2,, s, t, 2 ) iff (s,, s ) 1, (t,, t ) 2, t / F 2 ( s, t, 2,, s, t, 1 ) iff (s,, s ) 1, (t,, t ) 2, t F 2 16

Intersection: Exmple s0 s1 t0 t1 B1 B2 s0,t0,1 B1 x B2 s1,t1,2 s0,t0,2 s1,t1,1 17

Union nd Complement Union: Juxtpose oth utomt (like in the finite cse) Complement: Complicted! The complement construction, when pplied to Büchi utomton with n sttes, results in n utomton with O(n!) sttes. We will skip it in this course. Detils on Complementtion: see e.g. W. Thoms, Automt on Infinite Ojects, Chpter 4 in Hndook of Theoreticl Computer Science, or I. Wlukiewicz, Lecture notes on Automt nd Logic, Chpter 3, www.lri.fr/perso/ igw/ppers/igw-eefss01.ps 18

Emptiness check Oservtion: L(B) iff there is n ccepting stte s F tht is rechle from n initil stte nd rechle from itself (the ltter with non-empty pth). s0......... s s... This condition cn e checked with n lgorithm tht tkes liner time in the size of the Büchi utomton. (We will see how lter.) 19

Note on determinism In the cse of finite utomt, we could convert ech non-deterministic utomton into lnguge-equivlent deterministic utomton. This is not the cse with Büchi utomt. In other words, non-deterministic Büchi utomt re strictly more expressive thn deterministic Büchi utomt., Eventully, only will occur. s0 s1 Not expressile y deterministic Büchi utomton! 20

Generlised Büchi Automt A vrint of the model re so-clled generlised Büchi utomt. They differ from (norml) Büchi utomt only in the cceptnce condition, which is set of cceptnce sets, i.e. F 2 S In generlised Büchi utomton, run ρ is ccepting iff, for F = {F 1,..., F n } nd ech index 1 i n, we hve tht ρ visits infinitely mny sttes from F i. Generlised Büchi utomt cn e trnslted ck into Büchi utomt. (Tke the n-fold intersection of the utomton with itself, with cceptnce sets F 1 through F n.) 21