Finite state automata

Similar documents
Finite State Model Checking

Computation Tree Logic

Is the system correct? Introduction to Formal Verification. Measuring SW Complexity. Design Complexity. Aniello Murano. Source Lines of Code (SLOC)

1 Nondeterministic Finite Automata

Minimal DFA. minimal DFA for L starting from any other

Convert the NFA into DFA

CHAPTER 1 Regular Languages. Contents

Coalgebra, Lecture 15: Equations for Deterministic Automata

I. Theory of Automata II. Theory of Formal Languages III. Theory of Turing Machines

Lecture 9: LTL and Büchi Automata

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

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

Software Engineering using Formal Methods

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

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.

Automata and Languages

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

Exercises with (Some) Solutions

CS 275 Automata and Formal Language Theory

Formal Methods in Software Engineering

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

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

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

Nondeterminism and Nodeterministic Automata

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

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

Language Processors F29LP2, Lecture 5

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Deterministic Finite Automata

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

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

CMSC 330: Organization of Programming Languages

Lecture 08: Feb. 08, 2019

Watson-Crick local languages and Watson-Crick two dimensional local languages

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

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

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

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

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

Good-for-Games Automata versus Deterministic Automata.

Let's start with an example:

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

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

Lecture 09: Myhill-Nerode Theorem

QUADRATIC RESIDUES MATH 372. FALL INSTRUCTOR: PROFESSOR AITKEN

Tries and suffixes trees

Introduction to ω-autamata

FABER Formal Languages, Automata and Models of Computation

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

Duke Math Meet

CISC 4090 Theory of Computation

Designing finite automata II

LECTURE 10: JACOBI SYMBOL

On Determinisation of History-Deterministic Automata.

McGill University Math 354: Honors Analysis 3 Fall 2012 Solutions to selected Exercises. g(x) 2 dx 1 2 a

4 Deterministic Büchi Automata

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

Summer School Verification Technology, Systems & Applications

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

Design and Analysis of Distributed Interacting Systems

Java II Finite Automata I

Free groups, Lecture 2, part 1

Some Theory of Computation Exercises Week 1

First Midterm Examination

CS 275 Automata and Formal Language Theory

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

More general families of infinite graphs

Languages & Automata

Harvard University Computer Science 121 Midterm October 23, 2012

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

Finite Automata-cont d

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

1.4 Nonregular Languages

Chapter 2 Finite Automata

k and v = v 1 j + u 3 i + v 2

Computation Tree Logic with Deadlock Detection

Finite-State Automata: Recap

1.3 Regular Expressions

Non-Deterministic Finite Automata

Hennessy-Milner Logic 1.

3 Regular expressions

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Theory of Computation Regular Languages

State Minimization for DFAs

GNFA GNFA GNFA GNFA GNFA

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.

Lexical Analysis Finite Automate

Temporal logic CTL : syntax. Communication and Concurrency Lecture 6. Φ ::= tt ff Φ 1 Φ 2 Φ 1 Φ 2 [K]Φ K Φ AG Φ EF Φ AF Φ EG Φ A formula can be

Quadratic reciprocity

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

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

PRIMES AND QUADRATIC RECIPROCITY

From LTL to Symbolically Represented Deterministic Automata

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

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

Review of Gaussian Quadrature method

Hybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system

(e) if x = y + z and a divides any two of the integers x, y, or z, then a divides the remaining integer

Formal Languages and Automata

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

Transcription:

Finite stte utomt Lecture 2 Model-Checking Finite-Stte Systems (untimed systems) Finite grhs with lels on edges/nodes set of nodes (sttes) set of edges (trnsitions) set of lels (lhet) Finite Automt, CTL, LTL nd Model Checking 1 2 Comlete Systems nd Krike Structure CTL Models = Krike Structures From now on, we shll consider only Comlete systems, tht is, utomt with lels on nodes. There is no essentil difference etween models with lels on nodes or trnsitions This is the so clled Krike Structure, tht is, utomt with roositions leled on sttes Exmle, CTL: Comuttion Tree Logics defined on Comuttion Trees of Krike structures 5 6

Comuttion Tree Logic, CTL Clrke & Emerson 1980 Pth Syntx The set of th strting in s s s 1 s 2 s... 7 8 Forml Semntics ( ) CTL, Derived Oertors ossile inevitle EF AF E<> in UPPAAL! A<> in UPPAAL 9 10 CTL, Derived Oertors There re too mny oertors! But otentilly lwys lwys We need to rememer only the following: AG EG X (next time) E F (Future, some time) A G (Glol) U (Until) The most useful re EF, AG, EG nd AF: A[] in UPPAAL E[] in UPPAAL 11 12

Theorem Exmle A All oertors re derivle from EX EX f f EG f f E[ E[ f f U g ] nd oolen connectives [ f U g] E[ gu( f g) ] EG g, 1 1 Exmle EX Exmle EX,, 15 16 Exmle AX Exmle AX,, Note: stte 1 doesn t stisfy AX 17 18

Exmle EG Exmle EG,, 19 20 Exmle AG Exmle AG,, 21 22 Exmle A[ U ] Exmle A[ U ],, 2 2

Proerties of MUTEX exmle? AG (C1 C2) AG[ T1 AF(C1)] EG[ C1] AG[ C A[ C U ( C A[ C U C ]) ] T1 I2 I1 I2 I1 T2 1 1 1 1 T1 I2 2 HOW to DECIDE IN GENERAL I1 I2 I1 T2 CTL Model Checking Algorithms T1 T2 I1 C2 C1 I2 T1 T2 T1 C2 C1 T2 25 26 Leling Methods [Clrke et l 81] Check ll su-formuls of F For ech su-formul f of F, lel ll nodes where f is true Check the comosed formuls 27 28 Algorithm ides for checking E(f U g) Mrk ll nodes where f is true nd ll nodes where g is true Strt from ll nodes where g is true nd Perform ckwrds rechility nlysis Ech ste ckwrds, store ll nodes in Q where f is true Reet the ove ste, until it converges Q contins ll nodes stisfying E(f U g) Q + f Q Q=g 29 0

Algorithm ides for checking A(f U g) Similr to the cse for A(f U g) But ech ste ckwrds, store ll nodes in Q where (f or g) is true, nd the stored nodes do not led to node where (f or g) is flse Reet the ove ste, until it converges Q contins ll nodes stisfying A(f U g) ({ s s'.( s, s') R s' Q} St( φ)) Q+ f Q Not (f) Q=g 1 2 Fixoint Chrcteriztions Fixed oints of monotonic functions EF EXEF or let A e the set of sttes stisfying EF then A EX A in fct A is the smllest one of sets stisfying the eutions (the lest fixoint) Let τ e function S S Sy τ is monotonic when x y imlies Fixed oint of τ is y such tht τ ( y ) = y If τ monotonic, then it hs lest fixed oint µy. τ(y) gretest fixed oint νy. τ(y) τ ( x) τ ( y) Itertively comuting fixed oints Suose S is finite The lest fixed oint µy. τ(y) is the limit of flse τ (flse) τ ( τ (flse)) Λ The gretest fixed oint νy. τ(y) is the limit of Exmle: EF EF is chrcterized y EF = µ y. ( EX y) Thus, it is the limit of the incresing series... true τ (true) τ ( τ (true)) Λ EX( EX ) EX Note, since S is finite, convergence is finite 5 6

Exmle: EG EG is chrcterized y EG = ν y. ( EX y) Thus, it is the limit of the decresing series... Exmle, continued, EF EF = µ y. ( EX y)... EX( EX ) EX A0 = Ø A1 = {2,} A2 = {1,2,} A = {1,2,} 7 8 Remining oertors Comlexity AF AG E( U ) A( U ) = = = = µ y.( AX y) νy.( AX y) µ y.( ( EX y)) µ y.( ( AX y)) However SS sys my sys e e EXPONENTIAL in in numer of of rllel comonents! -- -- FIXPOINT COMPUTATIONS my e e crried out out using ROBDD s (Reduced Ordered Binry Decision Digrms) Brynt, 86 86 9 0 Brnching time semntics Something more out Finite Stte Automt nd Temorl Logics Comuttion tree of n utomton is the unfolding of the utomton (Continution of Lecture 2) 1 2

Exmle (Brnching Time) Liner Time Semntics Seuences of trnsitions (or sttes) set of ossile excecutions of system Suite est for closed systems Exmle (Liner Time) Euivlences nd Preorders A euivlent to B if the tree of A is identicl to the tree of B (Too strong!) A is simulted y B if every trnsition of A is simulted y trnsition of B (simultion [Milner78]) A nd B re isimulr if there is symmetricl simultion etween A s nd B s sttes (isimultion [Milner80]) A nd B re testing euivlent if they cn ss the sme set of tests (my nd must testing [Nicol nd Hennessy 8]) A nd B trce-euivlent if they rovide the sme set of seuences of trnsitions (trce euivlence [Hore76]) 5 6 Models: Infinite Seuences (ω-lnguge cceted y utomt) LTL: Liner Time Logics defined on infinite trces of Krike structures with cceting conditions Automt with cceting conditions Buchi, Muller utomt Infininte cceted seuences of trnsitions s semntics of utomt 7 8

LTL: Syntx LTL: semntics P not F F1 nd F2 O F (next time) F1 U F2 (Until) ssume n utomton M seuence of M: t=s(0) s(1) s(2)... s(i)...... The set of seuences of M is Com(M) s(i) st if is lel of s(i) s(i) st not F if not (s(i) st F) s(i) st F1 nd F2 if s(i) st F1 nd s(i) st F2 s(i) st O F if s(i+1) st F s(i) st F1 U F2 if s(k) st F2 for some k=>i nd s(j) st F1 for ll j such tht i<=j<k 9 50 LTL: semntics (contn.) Derived Oertors ssume n utomton M seuence of M: t=s(0) s(1) s(2)... s(i)...... The set of seuences of M is Com(M) t st F iff s(0) st F M st F iff t st F for ll seuences t of Com(M) <>F denotes (true U F) [ ]F denotes not (<> not F) F1 W F2 denotes (F1 U F2) or [ ]F1 (wek Until-oertor) 51 52 Model Checking LTL [Woler et l 1986] Comring CTL nd LTL Given n utomt M nd formul F, to check M st F Construct the formul utomton: A( F) Construct the roduct utomton M A( F) (on-the-fly) If M A( F) is emty then M st F otherwise NO Time-Comlexity = M *2 O( F ) The sme ide cn e used for CTL model checking using Tree-utomt <> P (LTL) similr AF (CTL) [] (LTL) similr AG (CTL) However, LTL cnnot exress ossiilities roerties: EF P CTL cnnot exress <>[] CTL* = LTL + CTL 5 5

Comring CTL nd LTL (contn.) Why? No sutree where is true everywhere P P P Stisfies <>[] ut it does not stisfy AF AG 55 56 END (Finite Stte Untimed Systems) 57