Kleene Algebra with Tests: A Tutorial
|
|
- Lorin Ray
- 7 years ago
- Views:
Transcription
1 Kleene Algebra with Tests: A Tutorial Part II Dexter Kozen Cornell University RAMiCS, September 17 18, 212
2 Today automata on guarded strings (AGS) schematic KAT (SKAT) strictly deterministic automata and flowchart programs Kleene coalgebra (KC) and Kleene coalgebra with tests (KCT) automata theory and program schematology the Brzozowski derivative minimization as finality automatic extraction of equivalence proofs and relation to proof-carrying code
3 Automata on Guarded Strings (AGS) A generalization of classical automata theory to include Booleans An ε-transition is really a 1-transition (i.e., an ordinary automaton with ε-transitions is an AGS over the two-element Boolean algebra) Classical constructions of ordinary finite-state automata generalize readily determinization state minimization Kleene s theorem
4 Automata on Guarded Strings (AGS) Labeled transition system with states Q, start states S Q, accept states F Q atomic action symbols Σ, atomic test symbols T, B = the free Boolean algebra generated by T, At = {atoms of B} action transitions s test transitions s p t, p Σ b t, b B inputs are guarded strings α p α 1 p 1 α n 1 p n 1 α n traces s q s 1 q 1 s n 1 q n 1 s n where s i q i si+1, q i Σ B x accepted if trace s q s 1 q 1 s n 1 q n 1 s n such that s S, s n F, x G(q,..., q n 1 )
5 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab trace: bpqbaqpb
6 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab trace: bpqbaqpb
7 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab trace: bpqbaqpb
8 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab trace: bpqbaqpb
9 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab trace: bpqbaqpb
10 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab trace: bpqbaqpb
11 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab trace: bpqbaqpb
12 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab trace: bpqbaqpb
13 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab trace: bpqbaqpb
14 Automata on Guarded Strings (AGS) b a p q b a a + b b ab p ab q ab q ab p ab Accept! trace: bpqbaqpb
15 Deterministic Automata 1 exactly one start state 2 each state is an action state or a test state, not both 3 action states: exactly one transition for each element of Σ 4 test states: exiting tests are propositionally pairwise exclusive and exhaustive 5 every cycle contains at least one action state 6 all final states are action states
16 Some Facts Kleene s theorem (nondeterministic automaton constructed is linear in the size of the KAT expression) PSPACE-completeness can determinize with a subset construction can minimize via a variant of Myhill Nerode minimal OBDDs are a special case of this construction
17 Schematic KAT (SKAT) x := s ; y := t = y := t[x/s] ; x := s (y FV(s)) x := s ; y := t = x := s ; y := t[x/s] (x FV(s)) x := s ; x := t = x := t[x/s] ϕ[x/t] ; x := t = x := t ; ϕ In particular, x := s ; y := t = y := t ; x := s (x FV(t), y FV(s)) ϕ ; x := t = x := t ; ϕ (x FV(ϕ))
18 Scheme Equivalence Example of Paterson from [Manna 74] start y 1 := x y 4 := f (y 1) start y 1 := f (y 1) y 2 := g(y 1, y 4) y 3 := g(y 1, y 1) F P(y 1) T y 1 := f (y 3) P(y 4) F F T F T y 2 := f (y 2) P(y 2) P(y 3) T y 2 := f (f (y)) y := f (x) F P(y) T y := g(y, y) P(y) F T z := y halt loop z := y 2 halt
19 Scheme Equivalence Example of Paterson from [Manna 74] a 3 x 1 p 41 p 11 q 214 q 311 a 1 p 13 a 4 a 2 a 3 z 2 a 1 a4 p 22 a 2 s a q a z r a x 1 p 41 p 11 q 214 q 311 (a 1 p 11 q 214 q 311 ) a 1 p 13 ooo((a 4 + a 4 (a 2 p 22 ) a 2 a 3 p 41 p 11 )q 214 q 311 (a 1 p 11 q 214 q 311 ) a 1 p 13 ) ooooooa 4 (a 2 p 22 ) a 2 a 3 z 2 z = saq(araq) az
20 Strictly Deterministic Automata Flowchart programs correspond to a limited class of AGS called strictly deterministic. Intuitively: An input is an infinite sequence of atoms provided by an external agent The automaton responds to each atom in sequence deterministically according to its transition function either emits an action symbol and moves to a new state, halts, or fails
21 Strictly Deterministic Automata Formally, a strictly deterministic automaton over Σ, T is a structure M = (Q, δ, start) where Q is a set of states, start Q is a start state, and (Note: halt, fail are not states) δ : (Q At) (Σ Q) + {halt, fail},
22 Strictly Deterministic Automata Given a state s and an infinite sequence of atoms σ At ω, there is at most one finite or infinite guarded string gs(s, σ) obtained by running the automaton starting in state s. Formally, define a partial map gs : (Q At ω ) (At Σ) At + (At Σ) ω coinductively: gs(s, α σ) def = α p gs(t, σ), if δ(s, α) = (p, t) α, if δ(s, α) = halt undefined, if δ(s, α) = fail The set of (finite) guarded strings represented by M is gs(m) def = {gs(start, σ) σ At ω } (At Σ) At.
23 Bisimulation Between Strictly Deterministic Automata A bisimulation between M and N is a binary relation between Q M and Q N such that start M start N, and if s t then δ M (s, α) = halt δ N (t, α) = halt; δ M (s, α) = fail δ N (t, α) = fail; δ M (s, α) = (p, s ) δ N (t, α) = (q, t ) p = q s t.
24 Bisimulation Between Strictly Deterministic Automata Theorem If M and N are bisimilar, then gs(m) = gs(n). Moreover, the converse is true if M never fails, every reachable state in M can reach halt. Proof. def ( ) Define s t σ At ω gs M (s, σ) = gs N (t, σ). Property 2 is easy to check. For property 1, want gs M (start M, σ) = gs N (start N, σ) for all σ. Since gs(m) = gs(n), if gs M (start M, σ) is finite, then so is gs N (start N, σ) and they are equal. Thus gs M (start M, ) : At ω (At Σ) At + (At Σ) ω gs N (start N, ) : At ω (At Σ) At + (At Σ) ω agree on the set {σ gs M (start M, σ) is finite}. This set is dense in At ω. Moreover, the two functions are continuous, and continuous functions that agree on a dense set must agree everywhere.
25 Strictly Deterministic Automata Every while program is equivalent to a strictly deterministic automaton: while b do { while c do q; p; } p b halt 2 b q c 1 3 c bc bc bcp halt bcq bcp bcp 1 bcq bcq The converse is false (Ashcroft & Manna 1972)
26 The Böhm Jacopini Theorem Theorem (Böhm Jacopini 1966) Every deterministic flowchart program is equivalent to a while program. Formulated and proved in a first-order setting Their construction introduced extra auxiliary variables Are the auxiliary variables necessary?
27 A Negative Result Theorem (Ashcroft & Manna 1972) There is a deterministic flowchart program that cannot be converted to a while program without auxiliary variables. Formulated and proved in a first-order setting Counterexample has 13 states
28 from (Ashcroft & Manna 1972)
29 Kosaraju s Counterexample a p 2 p 1 p 1 p 2 from (Kosaraju 1973) halt... is not a counterexample: while p 1 p 2 do a
30 Kosaraju s Counterexample a p 2 p 1 p 1 p 2 from (Kosaraju 1973) halt... is not a counterexample: while p 1 p 2 do a
31 The Loop Hierarchy Theorem (Kosaraju 1973) Every deterministic flowchart is equivalent to a loop program with multilevel breaks. Moreover, there is a strict hierarchy depending on the level of breaks allowed. loop { }. loop {. break 1;. } break 1 comes here. loop {. loop {. break 2;. }. } break 2 comes here
32 from (Kosaraju 1973)
33 A 3-State SDA not Equivalent to Any While Program α p 1 α 2p 2 α 1p 1 α α p 2 α 1 halt α 2 1 α 2 2p 12 α 1p 21
34 A 3-State SDA not Equivalent to Any While Program α 1 α p 1 α 2p 2 α 1p 1 α α p 2 α 1 halt α An innermost accessible loop α 1p 21
35 A 3-State SDA not Equivalent to Any While Program α 1 α p 1 α 2p 2 α 1p 1 α α p 2 α 1 halt α 2 α 1p α 1p 21
36 A 3-State SDA not Equivalent to Any While Program α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21
37 A 3-State SDA not Equivalent to Any While Program α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21 2
38 A 3-State SDA not Equivalent to Any While Program α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p α 1p 21
39 A 3-State SDA not Equivalent to Any While Program α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21 2 α 1p 21
40 A 3-State SDA not Equivalent to Any While Program α p 1 α 2p 2 α 1p 1 α α p 2 α 1 α 1p 1 α 1 halt α 2 2 Error! α 1p 21 2 α 1p 21
41 A 3-State SDA not Equivalent to Any While Program α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p α 1p 21
42 A 3-State SDA not Equivalent to Any While Program 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α 2 α α 1p 21 2 α 1p 21
43 A 3-State SDA not Equivalent to Any While Program 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21
44 A 3-State SDA not Equivalent to Any While Program 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21
45 A 3-State SDA not Equivalent to Any While Program 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 2p 2 α 1p 21
46 A 3-State SDA not Equivalent to Any While Program 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α p 2 2 α 2p 2 α 1p 21
47 A 3-State SDA not Equivalent to Any While Program Error! 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 2 α 1p 1 α 1 halt α α p 2 2 α 2p 2 α 1p 21
48 A 3-State SDA not Equivalent to Any While Program 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 2p 2 α 1p 21
49 A 3-State SDA not Equivalent to Any While Program α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α 2 α α 2p 2 α 1p 21
50 A 3-State SDA not Equivalent to Any While Program α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21
51 A 3-State SDA not Equivalent to Any While Program α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21
52 A 3-State SDA not Equivalent to Any While Program α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21 α p 1
53 A 3-State SDA not Equivalent to Any While Program α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 2p 2 α p 1 α 1p 21
54 A 3-State SDA not Equivalent to Any While Program α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21 2 α 2p 2 α p 1 α 1p 21
55 A 3-State SDA not Equivalent to Any While Program Error! α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α α 1p 1 α 1 halt α α 1p 21 2 α 2p 2 α p 1 α 1p 21
56 A 3-State SDA not Equivalent to Any While Program α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 2p 2 α p 1 α 1p 21
57 A 3-State SDA not Equivalent to Any While Program α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α 2 α 1 1 Error! α 2p 2 α p 1 α 1p 21
58 A 3-State SDA not Equivalent to Any While Program α p 2 2 α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α α 1p 21 α p 1
59 A 3-State SDA not Equivalent to Any While Program α p 2 2 Error! α p 1 α 2p 2 α 1p 1 α α p 2 α 1p 1 α 1 halt α 2 α α 1p 21 α p 1
60 A 3-State SDA not Equivalent to Any While Program If there is no state bisimilar to or 2 inside the loop, the loop is equivalent to while α 1 { p 1 ; if α 1 then halt; }... which is equivalent to α p 1 2 α 1p 1 α + α 2 1 if α 1 then { p 1 ; if α 1 then halt; }
61 A 3-State SDA not Equivalent to Any While Program If there is no state bisimilar to or 2 inside the loop, the loop is equivalent to while α 1 { p 1 ; if α 1 then halt; }... which is equivalent to α p 1 2 α 1p 1 α + α 2 1 if α 1 then { p 1 ; if α 1 then halt; }
62 Loops Programs are Sufficient Theorem (Kosaraju 73) Every program is equivalent to a program with loops and multilevel breaks but without gotos.
63 Example α p 1 α 2p 2 α 1p 1 α α p 2 α 1 halt α 2 1 α 2 2p 12 α 1p 21
64 Example α p 2 α p 1 α 1 p 1 α 2 p 2 α p 2 α p 1 α 1 p α α 2 p 12 α 2 p 12 α 1 p 21 α 1 α α 2 α 1 halt
65 Example α p 2 α p 1 α 1 p 1 α 2 p 2 α p 2 α p 1 α 1 p α α 2 p 12 α 2 p 12 α 1 p 21 α 1 α α 2 α 1 halt
66 Example loop { if α then break 1; if α 1 then { p 1 ; loop { if α 1 then break 2; if α then { p 1 ; break 1; } else { p 12 ; if α 2 then break 2; if α then { p 2 ; break 1; } else p 21 ; } } } } else { p 2 ; loop { if α 2 then break 2; if α then { p 2 ; break 1; } else { p 21 ; if α 1 then break 2; if α then { p 1 ; break 1; } else p 12 ; } } }
67 Equational Treatment of Nonlocal Control Flow A rigorous equational treatment of control constructs involving nonlocal transfer of control using KAT and AGS goto l loop/break n continue, exception handlers, try-catch-finally Compositional semantics Complete equational axiomatization
68 The Coalgebraic Theory Kleene coalgebra (KC) and Kleene coalgebra with tests (KCT) the Brzozowski derivative minimization as finality automatic extraction of equivalence proofs and relation to proof-carrying code
69 Automata as Coalgebras algebra constructors initial algebras least fixpoints coalgebra destructors final coalgebras greatest fixpoints Example: Σ ω = infinite streams over Σ with operations head(a a 1 a 2 a 3 ) = a tail(a a 1 a 2 a 3 ) = a 1 a 2 a 3 A coalgebra of this signature is (S, obs, cont), where obs : S Σ and cont : S S. Every state s S generates a unique stream h(s) = obs(s), obs(cont(s)), obs(cont 2 (s)),.... The streams (Σ ω, head, tail) form the final coalgebra, and the map h is the unique homomorphism (S, obs, cont) (Σ ω, head, tail).
70 Automata as Coalgebras Rutten 1998, Bonsangue 28, Silva 21 Automata coalgebras Myhill-Nerode state minimization quotient by maximal bisimulation minimal automaton final coalgebra Brzozowski derivative a coalgebra of expressions
71 Kleene Coalgebra (KC) A deterministic automaton without a start state A Kleene coalgebra (KC) over Σ is a structure (S, δ, F ), where S is a set of states δ p : S S, p Σ is the transition function F : S 2 are the accept states. Define L : S Σ 2 (i.e., L : S 2 Σ ) coinductively: L(s)(ε) = F (s) L(s)(px) = L(δ p (s))(x) Then L(s)(x) = 1 iff x is accepted starting from state s L is the unique KC-homomorphism to the final coalgebra its kernel is the unique maximal autobisimulation
72 Brzozowski Derivative (Brzozowski 1964) A certain Kleene coalgebra (2 Σ, D, E): D p : 2 Σ 2 Σ defined by D p (A) = {x px A} { E : 2 Σ 1 if ε A 2 defined by E(A) = if ε A This is the final KC over Σ
73 Brzozowski Derivative, Syntactic Form Another Kleene coalgebra (RExp Σ, D, E): D p : RExp Σ RExp Σ E : RExp Σ 2 D p (e + e ) = D p (e) + D p (e ) E(e + e ) = E(e) + E(e ) D p (ee ) = D p (e) e + E(e) D p (e ) E(ee ) = E(e) E(e ) D p (e ) = D p (e) e E(e ) = 1 D p (p) = 1 E(p) =, p Σ D p (q) =, q p E(1) = 1 D p (1) = D p () = E() = L(e) = the regular subset of Σ represented by e Kernel of L is KA equivalence = maximal autobisimulation
74 Coinductive Equivalence Proofs To prove e = e, suffices to establish a bisimulation between {D x (e) x Σ } and {D x (e ) x Σ } with e e Bisimulation: e e D p (e) D p (e ), p Σ e e E(e) = E(e ) The set {D x (e) x Σ } is finite modulo the axioms of idempotent semirings Can generate the maximal automatically (if one exists)
75 Extension to KAT (Chen & Pucella 23) Automatic proof generation for proof-carrying code (Necula & Lee 1997) There is a PSPACE decision procedure for KAT, but it only gives a one-bit answer Equational proofs require "cleverness", whereas coalgebraic proofs can be produced purely mechanically (Chen & Pucella 23) Not true, actually (Worthington 28) can produce equational proofs in PSPACE exponential length in the worst case (but probably unavoidable, since PSPACE-complete)
76 Kleene Coalgebra with Tests (KCT) Deterministic AGS without a start state A KCT over Σ, T is a structure (S, δ, ε), where δ : At Σ S S ε : At S 2 δ αp : S S ε α : S 2 Define L : S G 2 coinductively: L(s)(α) = ε α (s) L(s)(αpx) = L(δ αp (s))(x) Then L(s)(x) = 1 iff x is accepted starting from state s L is the unique KCT-homomorphism to the final coalgebra
77 The Brzozowski Derivative A KCT (2 G, D, E) where D : At Σ 2 G 2 G E : At 2 G 2 D αp : 2 G 2 G E α : 2 G 2 D αp (A) = {x αpx A} E α (A) = 1 if α A, if α A L : 2 G G 2 L(A)(α) = E α (A) L(A)(x) = 1 iff x A L(A)(αpx) = L(D αp (A))(x)
78 Syntactic Form Another KCT (RExp Σ,T, D, E) D αp : RExp Σ,T RExp Σ,T E α : RExp Σ,T 2 D αp (e + e ) = D αp (e) + D αp (e ) E α (e + e ) = E α (e) + E α (e ) D αp (ee ) = D αp (e) e + E α (e) D αp (e ) E α (ee ) = E α (e) E α (e ) D αp (e ) = D αp (e) e E α (e ) = 1 D αp (p) = 1 E α (p) =, p Σ { 1 if α b, b B D αp (q) =, q p E α (b) = if not D αp (1) = D αp () = L(e) = the regular set of guarded strings represented by e
79 Complexity Lemma Any KAT expression e has at most 2 e derivatives modulo the semiring axioms. Theorem Can generate coinductive equivalence proofs (bisimulations) and inequivalence proofs (witnesses to the nonexistence of a bisimulation) automatically in PSPACE (matches (Worthington 28) for equational proofs in KAT) Proof. Construct two nondeterministic finite automata by Kleene s theorem for KAT expressions, determinize by the subset construction, nondeterministically guess a counterexample to bisimiliarity in PSPACE. Make deterministic by Savitch s theorem.
80 What I Haven t Talked About... alternative and weaker axiomatizations (left-handed, non-strict, non-idempotent... ) total correctness, concurrency domain KA, Kleene modules ω-ka applications (compiler optimization, static analysis, pointer analysis,... ) complexity issues implementations
81 Thanks!
Left-Handed Completeness
Left-Handed Completeness Dexter Kozen Computer Science Department Cornell University RAMiCS, September 19, 2012 Joint work with Alexandra Silva Radboud University Nijmegen and CWI Amsterdam Result A new
More informationFormal Verification of Software
Formal Verification of Software Sabine Broda Department of Computer Science/FCUP 12 de Novembro de 2014 Sabine Broda (DCC-FCUP) Formal Verification of Software 12 de Novembro de 2014 1 / 26 Formal Verification
More informationAlgorithmic Software Verification
Algorithmic Software Verification (LTL Model Checking) Azadeh Farzan What is Verification Anyway? Proving (in a formal way) that program satisfies a specification written in a logical language. Formal
More informationThe Halting Problem is Undecidable
185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine
More informationA Propositional Dynamic Logic for CCS Programs
A Propositional Dynamic Logic for CCS Programs Mario R. F. Benevides and L. Menasché Schechter {mario,luis}@cos.ufrj.br Abstract This work presents a Propositional Dynamic Logic in which the programs are
More informationSemantics and Verification of Software
Semantics and Verification of Software Lecture 21: Nondeterminism and Parallelism IV (Equivalence of CCS Processes & Wrap-Up) Thomas Noll Lehrstuhl für Informatik 2 (Software Modeling and Verification)
More informationFormal Verification by Model Checking
Formal Verification by Model Checking Natasha Sharygina Carnegie Mellon University Guest Lectures at the Analysis of Software Artifacts Class, Spring 2005 1 Outline Lecture 1: Overview of Model Checking
More informationCHAPTER 7 GENERAL PROOF SYSTEMS
CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes
More informationNetKAT: Semantic Foundations for Networks
NetKAT: Semantic Foundations for Networks Carolyn Jane Anderson Swarthmore College Nate Foster Cornell University Arjun Guha University of Massachusetts Amherst Jean-Baptiste Jeannin Carnegie Mellon University
More informationAutomata on Infinite Words and Trees
Automata on Infinite Words and Trees Course notes for the course Automata on Infinite Words and Trees given by Dr. Meghyn Bienvenu at Universität Bremen in the 2009-2010 winter semester Last modified:
More information6.080/6.089 GITCS Feb 12, 2008. Lecture 3
6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my
More informationTesting LTL Formula Translation into Büchi Automata
Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland
More informationNotes on Complexity Theory Last updated: August, 2011. Lecture 1
Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look
More informationT-79.186 Reactive Systems: Introduction and Finite State Automata
T-79.186 Reactive Systems: Introduction and Finite State Automata Timo Latvala 14.1.2004 Reactive Systems: Introduction and Finite State Automata 1-1 Reactive Systems Reactive systems are a class of software
More informationAlgebraic Recognizability of Languages
of Languages LaBRI, Université Bordeaux-1 and CNRS MFCS Conference, Prague, August 2004 The general problem Problem: to specify and analyse infinite sets by finite means The general problem Problem: to
More informationVerification of hybrid dynamical systems
Verification of hybrid dynamical systems Jüri Vain Tallinn Technical University/Institute of Cybernetics vain@ioc.ee Outline What are Hybrid Systems? Hybrid automata Verification of hybrid systems Verification
More information6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)
More informationOmega Automata: Minimization and Learning 1
Omega Automata: Minimization and Learning 1 Oded Maler CNRS - VERIMAG Grenoble, France 2007 1 Joint work with A. Pnueli, late 80s Summary Machine learning in general and of formal languages in particular
More informationNon-deterministic Semantics and the Undecidability of Boolean BI
1 Non-deterministic Semantics and the Undecidability of Boolean BI DOMINIQUE LARCHEY-WENDLING, LORIA CNRS, Nancy, France DIDIER GALMICHE, LORIA Université Henri Poincaré, Nancy, France We solve the open
More informationCompiler Construction
Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation
More informationScanner. tokens scanner parser IR. source code. errors
Scanner source code tokens scanner parser IR errors maps characters into tokens the basic unit of syntax x = x + y; becomes = + ; character string value for a token is a lexeme
More informationRegular Expressions and Automata using Haskell
Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions
More informationInformatique Fondamentale IMA S8
Informatique Fondamentale IMA S8 Cours 1 - Intro + schedule + finite state machines Laure Gonnord http://laure.gonnord.org/pro/teaching/ Laure.Gonnord@polytech-lille.fr Université Lille 1 - Polytech Lille
More informationSoftware Modeling and Verification
Software Modeling and Verification Alessandro Aldini DiSBeF - Sezione STI University of Urbino Carlo Bo Italy 3-4 February 2015 Algorithmic verification Correctness problem Is the software/hardware system
More informationThis asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.
3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but
More informationNetKAT A Formal System for the Verification of Networks
NetKAT A Formal System for the Verification of Networks Dexter Kozen Cornell University, Ithaca, NY 14853-7501, USA kozen@cs.cornell.edu http://www.cs.cornell.edu/ kozen Abstract. This paper presents a
More informationUniversality in the theory of algorithms and computer science
Universality in the theory of algorithms and computer science Alexander Shen Computational models The notion of computable function was introduced in 1930ies. Simplifying (a rather interesting and puzzling)
More information24 Uses of Turing Machines
Formal Language and Automata Theory: CS2004 24 Uses of Turing Machines 24 Introduction We have previously covered the application of Turing Machine as a recognizer and decider In this lecture we will discuss
More informationRegular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
More informationModel Checking: An Introduction
Announcements Model Checking: An Introduction Meeting 2 Office hours M 1:30pm-2:30pm W 5:30pm-6:30pm (after class) and by appointment ECOT 621 Moodle problems? Fundamentals of Programming Languages CSCI
More informationOn Streams and Coinduction
On Streams and Coinduction Preface The natural numbers are the most famous instance of an initial algebra and constitute the typical example for the explanation of induction. Similarly and dually, streams
More informationFormal Languages and Automata Theory - Regular Expressions and Finite Automata -
Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
More informationOHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012
276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a $ 1,000,000 prize for the
More informationElementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.
Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole
More information4.6 The Primitive Recursive Functions
4.6. THE PRIMITIVE RECURSIVE FUNCTIONS 309 4.6 The Primitive Recursive Functions The class of primitive recursive functions is defined in terms of base functions and closure operations. Definition 4.6.1
More informationAndrew Pitts chapter for D. Sangorgi and J. Rutten (eds), Advanced Topics in Bisimulation and Coinduction, Cambridge Tracts in Theoretical Computer
Andrew Pitts chapter for D. Sangorgi and J. Rutten (eds), Advanced Topics in Bisimulation and Coinduction, Cambridge Tracts in Theoretical Computer Science No. 52, chapter 5, pages 197 232 ( c 2011 CUP)
More informationDiagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.
Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity
More informationReducing Clocks in Timed Automata while Preserving Bisimulation
Reducing Clocks in Timed Automata while Preserving Bisimulation Shibashis Guha Chinmay Narayan S. Arun-Kumar Indian Institute of Technology Delhi {shibashis, chinmay, sak}@cse.iitd.ac.in arxiv:1404.6613v2
More informationω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear:
ω-automata ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear: in verification, as encodings of non-terminating executions of a program. in arithmetic,
More informationLights and Darks of the Star-Free Star
Lights and Darks of the Star-Free Star Edward Ochmański & Krystyna Stawikowska Nicolaus Copernicus University, Toruń, Poland Introduction: star may destroy recognizability In (finitely generated) trace
More informationDeterministic Finite Automata
1 Deterministic Finite Automata Definition: A deterministic finite automaton (DFA) consists of 1. a finite set of states (often denoted Q) 2. a finite set Σ of symbols (alphabet) 3. a transition function
More informationLecture 2: Universality
CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal
More informationC H A P T E R Regular Expressions regular expression
7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun
More informationContinued Fractions and the Euclidean Algorithm
Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction
More informationHow To Compare A Markov Algorithm To A Turing Machine
Markov Algorithm CHEN Yuanmi December 18, 2007 1 Abstract Markov Algorithm can be understood as a priority string rewriting system. In this short paper we give the definition of Markov algorithm and also
More informationNP-Completeness and Cook s Theorem
NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:
More information6.3 Conditional Probability and Independence
222 CHAPTER 6. PROBABILITY 6.3 Conditional Probability and Independence Conditional Probability Two cubical dice each have a triangle painted on one side, a circle painted on two sides and a square painted
More informationScalable Automated Symbolic Analysis of Administrative Role-Based Access Control Policies by SMT solving
Scalable Automated Symbolic Analysis of Administrative Role-Based Access Control Policies by SMT solving Alessandro Armando 1,2 and Silvio Ranise 2, 1 DIST, Università degli Studi di Genova, Italia 2 Security
More informationFactoring & Primality
Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount
More informationtutorial: hardware and software model checking
tutorial: hardware and software model checking gerard holzmann and anuj puri { gerard anuj } @research.bell-labs.com Bell Labs, USA outline introduction (15 mins) theory and algorithms system modeling
More informationWinter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov alexanderrem@gmail.com
Polynomials Alexander Remorov alexanderrem@gmail.com Warm-up Problem 1: Let f(x) be a quadratic polynomial. Prove that there exist quadratic polynomials g(x) and h(x) such that f(x)f(x + 1) = g(h(x)).
More informationMonitoring Metric First-order Temporal Properties
Monitoring Metric First-order Temporal Properties DAVID BASIN, FELIX KLAEDTKE, SAMUEL MÜLLER, and EUGEN ZĂLINESCU, ETH Zurich Runtime monitoring is a general approach to verifying system properties at
More informationComputability Theory
CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.
More informationCS 3719 (Theory of Computation and Algorithms) Lecture 4
CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a
More informationOn String Languages Generated by Spiking Neural P Systems
On String Languages Generated by Spiking Neural P Systems Haiming Chen 1, Rudolf Freund 2, Mihai Ionescu 3, Gheorghe Păun 4,5, Mario J. Pérez-Jiménez 5 1 Computer Science Laboratory, Institute of Software
More informationAutomated Theorem Proving - summary of lecture 1
Automated Theorem Proving - summary of lecture 1 1 Introduction Automated Theorem Proving (ATP) deals with the development of computer programs that show that some statement is a logical consequence of
More informationWelcome to... Problem Analysis and Complexity Theory 716.054, 3 VU
Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU Birgit Vogtenhuber Institute for Software Technology email: bvogt@ist.tugraz.at office hour: Tuesday 10:30 11:30 slides: http://www.ist.tugraz.at/pact.html
More informationFormal Verification Coverage: Computing the Coverage Gap between Temporal Specifications
Formal Verification Coverage: Computing the Coverage Gap between Temporal Specifications Sayantan Das Prasenjit Basu Ansuman Banerjee Pallab Dasgupta P.P. Chakrabarti Department of Computer Science & Engineering
More informationEnforcing Security Policies. Rahul Gera
Enforcing Security Policies Rahul Gera Brief overview Security policies and Execution Monitoring. Policies that can be enforced using EM. An automata based formalism for specifying those security policies.
More informationGenerating Models of Infinite-State Communication Protocols using Regular Inference with Abstraction
Noname manuscript No. (will be inserted by the editor) Generating Models of Infinite-State Communication Protocols using Regular Inference with Abstraction Fides Aarts Bengt Jonsson Johan Uijen Frits Vaandrager
More informationFinite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automaton (FA) Informally, a state diagram that comprehensively captures all possible states and transitions that a machine can take while responding to a stream
More informationApplications of Fermat s Little Theorem and Congruences
Applications of Fermat s Little Theorem and Congruences Definition: Let m be a positive integer. Then integers a and b are congruent modulo m, denoted by a b mod m, if m (a b). Example: 3 1 mod 2, 6 4
More informationFinite Automata and Regular Languages
CHAPTER 3 Finite Automata and Regular Languages 3. Introduction 3.. States and Automata A finite-state machine or finite automaton (the noun comes from the Greek; the singular is automaton, the Greek-derived
More informationFabio Patrizi DIS Sapienza - University of Rome
Fabio Patrizi DIS Sapienza - University of Rome Overview Introduction to Services The Composition Problem Two frameworks for composition: Non data-aware services Data-aware services Conclusion & Research
More informationPushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile
Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along
More informationComplexity Theory. Jörg Kreiker. Summer term 2010. Chair for Theoretical Computer Science Prof. Esparza TU München
Complexity Theory Jörg Kreiker Chair for Theoretical Computer Science Prof. Esparza TU München Summer term 2010 Lecture 8 PSPACE 3 Intro Agenda Wrap-up Ladner proof and time vs. space succinctness QBF
More information1 Operational Semantics for While
Models of Computation, 2010 1 1 Operational Semantics for While The language While of simple while programs has a grammar consisting of three syntactic categories: numeric expressions, which represent
More informationTuring Machines: An Introduction
CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛ-transitions,
More informationFixed-Point Logics and Computation
1 Fixed-Point Logics and Computation Symposium on the Unusual Effectiveness of Logic in Computer Science University of Cambridge 2 Mathematical Logic Mathematical logic seeks to formalise the process of
More informationConstructing Automata from Temporal Logic Formulas : A Tutorial
Constructing Automata from Temporal Logic Formulas : A Tutorial Pierre Wolper Université de Liège, Institut Montefiore, B28, 4000 Liège, Belgium pw@montefiore.ulg.ac.be, http://www.montefiore.ulg.ac.be/~pw/
More informationRigorous Software Development CSCI-GA 3033-009
Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 11 Semantics of Programming Languages Denotational Semantics Meaning of a program is defined as the mathematical
More information1 = (a 0 + b 0 α) 2 + + (a m 1 + b m 1 α) 2. for certain elements a 0,..., a m 1, b 0,..., b m 1 of F. Multiplying out, we obtain
Notes on real-closed fields These notes develop the algebraic background needed to understand the model theory of real-closed fields. To understand these notes, a standard graduate course in algebra is
More informationThe Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.
The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,
More informationBisimulation and Logical Preservation for Continuous-Time Markov Decision Processes
Bisimulation and Logical Preservation for Continuous-Time Markov Decision Processes Martin R. Neuhäußer 1,2 Joost-Pieter Katoen 1,2 1 RWTH Aachen University, Germany 2 University of Twente, The Netherlands
More information(a) Write each of p and q as a polynomial in x with coefficients in Z[y, z]. deg(p) = 7 deg(q) = 9
Homework #01, due 1/20/10 = 9.1.2, 9.1.4, 9.1.6, 9.1.8, 9.2.3 Additional problems for study: 9.1.1, 9.1.3, 9.1.5, 9.1.13, 9.2.1, 9.2.2, 9.2.4, 9.2.5, 9.2.6, 9.3.2, 9.3.3 9.1.1 (This problem was not assigned
More informationReading 13 : Finite State Automata and Regular Expressions
CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model
More informationINF5140: Specification and Verification of Parallel Systems
INF5140: Specification and Verification of Parallel Systems Lecture 7 LTL into Automata and Introduction to Promela Gerardo Schneider Department of Informatics University of Oslo INF5140, Spring 2007 Gerardo
More informationSOLUTIONS TO ASSIGNMENT 1 MATH 576
SOLUTIONS TO ASSIGNMENT 1 MATH 576 SOLUTIONS BY OLIVIER MARTIN 13 #5. Let T be the topology generated by A on X. We want to show T = J B J where B is the set of all topologies J on X with A J. This amounts
More informationAutomata and Formal Languages
Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,
More informationAUTOMATA, REPRESENTATIONS, AND PROOFS
AUTOMATA, REPRESENTATIONS, AND PROOFS A Dissertation Presented to the Faculty of the Graduate School of Cornell University in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy
More informationAutomated Program Behavior Analysis
Automated Program Behavior Analysis Stacy Prowell sprowell@cs.utk.edu March 2005 SQRL / SEI Motivation: Semantics Development: Most engineering designs are subjected to extensive analysis; software is
More informationIntroduction to Theory of Computation
Introduction to Theory of Computation Prof. (Dr.) K.R. Chowdhary Email: kr.chowdhary@iitj.ac.in Formerly at department of Computer Science and Engineering MBM Engineering College, Jodhpur Tuesday 28 th
More informationBindings, mobility of bindings, and the -quantifier
ICMS, 26 May 2007 1/17 Bindings, mobility of bindings, and the -quantifier Dale Miller, INRIA-Saclay and LIX, École Polytechnique This talk is based on papers with Tiu in LICS2003 & ACM ToCL, and experience
More informationIntroduction to Logic in Computer Science: Autumn 2006
Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding
More informationChapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.
Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize
More informationPushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.
Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free
More informationToday s Agenda. Automata and Logic. Quiz 4 Temporal Logic. Introduction Buchi Automata Linear Time Logic Summary
Today s Agenda Quiz 4 Temporal Logic Formal Methods in Software Engineering 1 Automata and Logic Introduction Buchi Automata Linear Time Logic Summary Formal Methods in Software Engineering 2 1 Buchi Automata
More informationPretty-big-step semantics
Pretty-big-step semantics Arthur Charguéraud INRIA October 2012 1 / 34 Motivation Formalization of JavaScript with Sergio Maeis, Daniele Filaretti, Alan Schmitt, Martin Bodin. Previous work: Semi-formal
More information(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.
(LMCS, p. 317) V.1 First Order Logic This is the most powerful, most expressive logic that we will examine. Our version of first-order logic will use the following symbols: variables connectives (,,,,
More informationParametric Domain-theoretic models of Linear Abadi & Plotkin Logic
Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic Lars Birkedal Rasmus Ejlers Møgelberg Rasmus Lerchedahl Petersen IT University Technical Report Series TR-00-7 ISSN 600 600 February 00
More informationLecture summary for Theory of Computation
Lecture summary for Theory of Computation Sandeep Sen 1 January 8, 2015 1 Department of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India. E- mail:ssen@cse.iitd.ernet.in Contents 1 The
More informationRow Ideals and Fibers of Morphisms
Michigan Math. J. 57 (2008) Row Ideals and Fibers of Morphisms David Eisenbud & Bernd Ulrich Affectionately dedicated to Mel Hochster, who has been an inspiration to us for many years, on the occasion
More informationTemporal Logics. Computation Tree Logic
Temporal Logics CTL: definition, relationship between operators, adequate sets, specifying properties, safety/liveness/fairness Modeling: sequential, concurrent systems; maximum parallelism/interleaving
More informationMATH 304 Linear Algebra Lecture 9: Subspaces of vector spaces (continued). Span. Spanning set.
MATH 304 Linear Algebra Lecture 9: Subspaces of vector spaces (continued). Span. Spanning set. Vector space A vector space is a set V equipped with two operations, addition V V (x,y) x + y V and scalar
More informationCHAPTER 5. Number Theory. 1. Integers and Division. Discussion
CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a
More informationSo let us begin our quest to find the holy grail of real analysis.
1 Section 5.2 The Complete Ordered Field: Purpose of Section We present an axiomatic description of the real numbers as a complete ordered field. The axioms which describe the arithmetic of the real numbers
More informationProperties of Stabilizing Computations
Theory and Applications of Mathematics & Computer Science 5 (1) (2015) 71 93 Properties of Stabilizing Computations Mark Burgin a a University of California, Los Angeles 405 Hilgard Ave. Los Angeles, CA
More informationFoundational Proof Certificates
An application of proof theory to computer science INRIA-Saclay & LIX, École Polytechnique CUSO Winter School, Proof and Computation 30 January 2013 Can we standardize, communicate, and trust formal proofs?
More informationIntroduction to Automata Theory. Reading: Chapter 1
Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a
More informationlogic language, static/dynamic models SAT solvers Verified Software Systems 1 How can we model check of a program or system?
5. LTL, CTL Last part: Alloy logic language, static/dynamic models SAT solvers Today: Temporal Logic (LTL, CTL) Verified Software Systems 1 Overview How can we model check of a program or system? Modeling
More information