Software Engineering using Formal Methods
|
|
- Sibyl Nichols
- 6 years ago
- Views:
Transcription
1 Softwre Engineering using Forml Methods Propositionl nd (Liner) Temporl Logic Wolfgng Ahrendt 13th Septemer 2016 SEFM: Liner Temporl Logic /GU / 60
2 Recpitultion: FormlistionFormlistion: Syntx, SemnticsFormlistion: Syntx, Semntics, ProvingForml Verifiction: Model Checking Syntx TL Promel Syntx Trnsltion of NegtionTemporl Propositionl Promel Forml BüchiLogic + Temporl Lnguge Automton Promel Logic Logic Rel World Formlistion Syntx Syntx Trnsition Sem. Semntics System Semntics All Trnsition Forml Runs σ = hs model Trnsition Artifcts System System Intersection All How Forml Runs to σ do+ ccepts Vlution Semntics proving? no run? in σ SEFM: Liner Temporl Logic /GU / 60
3 The Big Picture: Syntx, Semntics, Clculus Syntx Formul x Completeness Semntics Vlid Soundness Clculus Derivle SEFM: Liner Temporl Logic /GU / 60
4 Simplest Cse: Propositionl Logic Syntx PropositionlProposi FormulsFormuls x = InterprettionInterpr Vr {T, F } Sequent Clculus, SAT Solver,... SEFM: Liner Temporl Logic /GU / 60
5 Syntx of Propositionl Logic Signture A set of Propositionl Vriles P (with typicl elements p, q, r,...) Propositionl Connectives true, flse,,,,, Set of Propositionl Formuls For 0 Truth constnts true, flse nd vriles P re formuls If φ nd ψ re formuls then φ, φ ψ, φ ψ, φ ψ, φ ψ re lso formuls There re no other formuls (inductive definition) SEFM: Liner Temporl Logic /GU / 60
6 Remrk on Concrete Syntx Text ook Spin Negtion! Conjunction && Disjunction Impliction, > Equivlence < > We use mostly the textook nottion, except for tool-specific slides, input files. SEFM: Liner Temporl Logic /GU / 60
7 Propositionl Logic Syntx: Exmples Let P = {p, q, r} e the set of propositionl vriles Are the following chrcter sequences lso propositionl formuls? true p (p(q r)) p p (q ) flse (p (q r)) SEFM: Liner Temporl Logic /GU / 60
8 Simplest Cse: Propositionl Logic Syntx PropositionlProposi FormulsFormuls x = InterprettionInterpr Vr {T, F } Sequent Clculus, SAT Solver,... SEFM: Liner Temporl Logic /GU / 60
9 Semntics of Propositionl Logic Interprettion I Assigns truth vlue to ech propositionl vrile I : P {T, F } Exmple Let P = {p, q} p (q p) p q I 1 F F I 2 T F... SEFM: Liner Temporl Logic /GU / 60
10 Semntics of Propositionl Logic Interprettion I Assigns truth vlue to ech propositionl vrile I : P {T, F } Vlution Function vl I : Continution of I on For 0 vl I : For 0 {T, F } vl I (true) = T vl I (flse) = F vl I (p i ) = I(p i ) (cont d next pge) SEFM: Liner Temporl Logic /GU / 60
11 Semntics of Propositionl Logic (Cont d) Vlution function (Cont d) { T if vli (φ) = F vl I ( φ) = F otherwise { T if vli (φ) = T nd vl vl I (φ ψ) = I (ψ) = T F otherwise { T if vli (φ) = T or vl vl I (φ ψ) = I (ψ) = T F otherwise { T if vli (φ) = F or vl vl I (φ ψ) = I (ψ) = T F otherwise { T if vli (φ) = vl vl I (φ ψ) = I (ψ) F otherwise SEFM: Liner Temporl Logic /GU / 60
12 Vlution Exmples Exmple Let P = {p, q} p (q p) p q I 1 F F I 2 T F... How to evlute p (q p) in I 2? vl I2 ( p (q p) ) = T iff vl I2 (p) = F or vl I2 (q p) = T vl I2 (p) = I 2 (p) = T vl I2 ( q p ) = T iff vl I2 (q) = F or vl I2 (p) = T vl I2 (q) = I 2 (q) = F SEFM: Liner Temporl Logic /GU / 60
13 Semntic Notions of Propositionl Logic Let φ For 0, Γ For 0 Definition (Stisfying Interprettion, Consequence Reltion) I stisfies φ (write: I = φ) iff vl I (φ) = T φ follows from Γ (write: Γ = φ) iff for ll interprettions I: If I = ψ for ll ψ Γ, then lso I = φ Definition (Stisfiility, Vlidity) A formul is stisfile if it is stisfied y some interprettion. If every interprettion stisfies φ (write: = φ) then φ is clled vlid. SEFM: Liner Temporl Logic /GU / 60
14 Semntics of Propositionl Logic: Exmples Formul (sme s efore) p (q p) Is this formul vlid? = p (q p)? SEFM: Liner Temporl Logic /GU / 60
15 Semntics of Propositionl Logic: Exmples p (( p) q) Stisfile? Stisfying Interprettion? Other Stisfying Interprettions? Therefore, not vlid! I(p) = T, I(q) = T p (( p) q) = q r Does it hold? Yes. Why? SEFM: Liner Temporl Logic /GU / 60
16 An Exercise in Formlistion 1 yte n; 2 ctive proctype [2] P() { 3 n = 0; 4 n = n } Cn we chrcterise the sttes of P propositionlly? Find propositionl formul φ P which is true if nd only if it descries possile stte of P. ( ) ((PC03 PC0 φ P := 4 PC0 5 ) ) (( PC0 5 PC1 5 ) = ( N 0 N 7 )) SEFM: Liner Temporl Logic /GU / 60
17 An Exercise in Formlistion 1 yte n; 2 ctive proctype [2] P() { 3 n = 0; 4 n = n } P : N 0, N 1, N 2,..., N 7 8-it representtion of yte PC0 3, PC0 4, PC0 5, PC1 3, PC1 4, PC1 5 next instruction pointer Which interprettions do we need to exclude? The vrile n is represented y eight its, ll vlues possile A process cnnot e t two positions t the sme time If neither process 0 nor process 1 re t position 5, then n is zero... ( ) ((PC03 PC0 φ P := 4 PC0 5 ) ) (( PC0 5 PC1 5 ) = ( N 0 N 7 )) SEFM: Liner Temporl Logic /GU / 60
18 Is Propositionl Logic Enough? Cn design for progrm P formul Φ P descriing ll rechle sttes For given property Ψ the consequence reltion Φ p = Ψ holds when Ψ is true in ny possile stte rechle in ny run of P But How to Express Properties Involving Stte Chnges? In ny run of progrm P n will ecome greter thn 0 eventully? n chnges its vlue infinitely often etc. Need more expressive logic: (Liner) Temporl Logic SEFM: Liner Temporl Logic /GU / 60
19 Trnsition systems (k Kripke Structures) p=t ; x s 0 F F p=t ; s 1 T F q=p; q=f ; s 2 T T p=f ; s 3 F T Nottion nme interp. updte x SEFM: Liner Temporl Logic /GU / 60
20 Trnsition systems (k Kripke Structures) p=t ; x s 0 F F p=t ; s 1 T F q=p; q=f ; s 2 T T p=f ; s 3 F T Ech stte s i hs its own propositionl interprettion I i Convention: list interprettion of vriles in lexicogrphic order Computtions, or runs, re infinite pths through sttes Intuitively finite runs modelled y looping on lst stte How to express (for exmple) tht p chnges its vlue infinitely often in ech run? SEFM: Liner Temporl Logic /GU / 60
21 Recpitultion: FormlistionFormlistion: Syntx, SemnticsFormlistion: Syntx, Semntics, ProvingForml Verifiction: Model Checking Syntx TL Promel Syntx Trnsltion of NegtionTemporl Propositionl Promel Forml BüchiLogic + Temporl Lnguge Automton Promel Logic Logic Rel World Formlistion Syntx Syntx Trnsition Sem. Semntics System Semntics All Trnsition Forml Runs σ = hs model Trnsition Artifcts System System Intersection All How Forml Runs to σ do+ ccepts Vlution Semntics proving? no run? in σ SEFM: Liner Temporl Logic /GU / 60
22 Liner Temporl Logic Syntx Syntx An extension of propositionl logic tht llows to specify properties of ll runs Bsed on propositionl signture nd syntx Extension with three connectives: Alwys If φ is formul, then so is φ Eventully If φ is formul, then so is φ Until If φ nd ψ re formuls, then so is φ Uψ Concrete Syntx text ook Spin Alwys [ ] Eventully <> Until U U SEFM: Liner Temporl Logic /GU / 60
23 Liner Temporl Logic Syntx: Exmples Let P = {p, q} e the set of propositionl vriles. p flse p q p q (p q) ( p) (( p) q) p U( q) SEFM: Liner Temporl Logic /GU / 60
24 Temporl Logic Semntics A run σ is n infinite chin of sttes s 0 I 0 s 1 I 1 s 2 I 2 s 3 I 3 s 4 I 4 I j propositionl interprettion of vriles in stte s j Write more compctly s 0 s 1 s 2 s 3... If σ = s 0 s 1, then σ i denotes the suffix s i s i+1 of σ. SEFM: Liner Temporl Logic /GU / 60
25 Temporl Logic Semntics (Cont d) Vlution of temporl formul reltive to run (infinite sequence of sttes) Definition (Vlidity Reltion) Vlidity of temporl formul depends on runs σ = s 0 s 1... σ = p iff I 0 (p) = T, for p P. σ = φ iff not σ = φ (write σ = φ) σ = φ ψ iff σ = φ nd σ = ψ σ = φ ψ iff σ = φ or σ = ψ σ = φ ψ iff σ = φ or σ = ψ Temporl connectives? SEFM: Liner Temporl Logic /GU / 60
26 Temporl Logic Semntics (Cont d) Run σ s 0 s 1 s k 1 s k φ φ φ ψ φ Definition (Vlidity Reltion for Temporl Connectives) Given run σ = s 0 s 1 σ = φ iff σ k = φ for ll k 0 σ = φ iff σ k = φ for some k 0 σ = φ Uψ iff σ k = ψ for some k 0, nd σ j = φ for ll 0 j<k (if k = 0 then φ needs never hold) SEFM: Liner Temporl Logic /GU / 60
27 Sfety nd Liveness Properties Sfety Properties Alwys-formuls clled sfety properties: something d never hppens Let mutex ( mutul exclusion ) e vrile tht is true when two processes do not ccess criticl resource t the sme time mutex expresses tht simultneous ccess never hppens Liveness Properties Eventully-formuls clled liveness properties: something good hppens eventully Let s e vrile tht is true when process delivers service s expresses tht service is eventully provided SEFM: Liner Temporl Logic /GU / 60
28 Complex Properties Wht does this men?infinitely Often σ = φ During run σ the formul φ ecomes true infinitely often SEFM: Liner Temporl Logic /GU / 60
29 Vlidity of Temporl Logic Definition (Vlidity) φ is vlid, write = φ, iff σ = φ for ll runs σ = s 0 s 1. Recll tht ech run s 0 s 1 essentilly is n infinite sequence of interprettions I 0 I 1 Representtion of Runs Cn represent set of runs s sequence of propositionl formuls: φ 0 φ 1, represents ll runs s 0 s 1 such tht s i = φ i for i 0 SEFM: Liner Temporl Logic /GU / 60
30 Semntics of Temporl Logic: Exmples φ Vlid? No, there is run where it is not vlid: ( φ φ φ...) Vlid in some run? Yes, for exmple: ( φ φ φ...) φ φ ( φ) ( φ) φ (true Uφ) All re vlid! (proof is exercise) is reflexive nd re dul connectives nd cn e expressed with only using U SEFM: Liner Temporl Logic /GU / 60
31 Trnsition Systems: Forml Definition Definition (Trnsition System) A trnsition system T = (S, Ini, δ, I) is composed of set of sttes S, set Ini S of initil sttes, trnsition reltion δ S S, nd leling I of ech stte s S with propositionl interprettion I s. Definition (Run of Trnsition System) A run of T is sequence of sttes σ = s 0 s 1 such tht s 0 Ini nd for ll i is s i S s well s (s i, s i+1 ) δ. SEFM: Liner Temporl Logic /GU / 60
32 Temporl Logic Semntics (Cont d) Extension of vlidity of temporl formuls to trnsition systems: Definition (Vlidity Reltion) Given trnsition system T = (S, Ini, δ, I), temporl formul φ is vlid in T (write T = φ) iff σ = φ for ll runs σ of T. SEFM: Liner Temporl Logic /GU / 60
33 Recpitultion: FormlistionFormlistion: Syntx, SemnticsFormlistion: Syntx, Semntics, ProvingForml Verifiction: Model Checking Syntx TL Promel Syntx Trnsltion of NegtionTemporl Propositionl Promel Forml BüchiLogic + Temporl Lnguge Automton Promel Logic Logic Rel World Formlistion Syntx Syntx Trnsition Sem. Semntics System Semntics All Trnsition Forml Runs σ = hs model Trnsition Artifcts System System Intersection All How Forml Runs to σ do+ ccepts Vlution Semntics proving? no run? in σ SEFM: Liner Temporl Logic /GU / 60
34 ω-lnguges Given finite lphet (voculry) Σ An ω-word w Σ ω is n infinite sequence w = o nk with i Σ, i {0,..., n}n L ω Σ ω is clled n ω-lnguge SEFM: Liner Temporl Logic /GU / 60
35 Büchi Automton Definition (Büchi Automton) A (non-deterministic) Büchi utomton over n lphet Σ consists of finite, non-empty set of loctions Q non-empty set of initil/strt loctions I Q set of ccepting loctions F = {F 1,..., F n } Q trnsition reltion δ Q Σ Q Exmple Σ = {, }, Q = {q 1, q 2, q 3 }, I = {q 1 }, F = {q 2 }, strt q 1 q 2 q 3 SEFM: Liner Temporl Logic /GU / 60
36 Büchi Automton Executions nd Accepted Words Definition (Execution) Let B = (Q, I, F, δ) e Büchi utomton over lphet Σ. An execution of B is pir (w, v), with w = o k Σ ω v = q o q k Q ω where q 0 I, nd (q i, i, q i+1 ) δ, for ll i N Definition (Accepted Word) A Büchi utomton B ccepts word w Σ ω, if there exists n execution (w, v) of B where some ccepting loction f F ppers infinitely often in v. SEFM: Liner Temporl Logic /GU / 60
37 Büchi Automton Lnguge Let B = (Q, I, F, δ) e Büchi utomton, then L ω (B) = {w Σ ω w Σ ω is n ccepted word of B} denotes the ω-lnguge recognised y B. An ω-lnguge for which n ccepting Büchi utomton exists is clled ω-regulr lnguge. SEFM: Liner Temporl Logic /GU / 60
38 Exmple, ω-regulr Expression Which lnguge is ccepted y the following Büchi utomton?, strt q 1 q 2 q 3 Solution: ( + ) () ω [NB: () ω = () ω ] ω-regulr expressions similr to stndrd regulr expression followed y + or ritrrily, ut finitely often new: ω infinitely often SEFM: Liner Temporl Logic /GU / 60
39 Decidility, Closure Properties Mny properties for regulr finite utomt hold lso for Büchi utomt Theorem (Decidility) It is decidle whether the ccepted lnguge L ω (B) of Büchi utomton B is empty. Theorem (Closure properties) The set of ω-regulr lnguges is closed with respect to intersection, union nd complement: if L 1, L 2 re ω-regulr then L 1 L 2 nd L 1 L 2 re ω-regulr L is ω-regulr then Σ ω \L is ω-regulr But in contrst to regulr finite utomt: Non-deterministic Büchi utomt re strictly more expressive thn deterministic ones. SEFM: Liner Temporl Logic /GU / 60
40 Büchi Automt More Exmples Lnguge: ( + ) ω q 0 q 1 Lnguge: ( ) ω q 0 q 1 SEFM: Liner Temporl Logic /GU / 60
41 Recpitultion: FormlistionFormlistion: Syntx, SemnticsFormlistion: Syntx, Semntics, ProvingForml Verifiction: Model Checking Syntx TL Promel Syntx Trnsltion of NegtionTemporl Propositionl Promel Forml BüchiLogic + Temporl Lnguge Automton Promel Logic Logic Rel World Formlistion Syntx Syntx Trnsition Sem. Semntics System Semntics All Trnsition Forml Runs σ = hs model Trnsition Artifcts System System Intersection All How Forml Runs to σ do+ ccepts Vlution Semntics proving? no run? in σ SEFM: Liner Temporl Logic /GU / 60
42 Liner Temporl Logic nd Büchi Automt Recll Definition (Vlidity Reltion) LTL nd Büchi Automt re connected Given trnsition system T = (S, Ini, δ, I), temporl formul φ is vlid in T (write T = φ) iff σ = φ for ll runs σ of T. A run of the trnsition system is n infinite sequence of interprettions I. Intended Connection Given n LTL formul φ: Construct Büchi utomton ccepting exctly those runs (infinite sequences of interprettions) tht stisfy φ. SEFM: Liner Temporl Logic /GU / 60
43 Encoding n LTL Formul s Büchi Automton P set of propositionl vriles, e.g., P = {r, s} Suitle lphet Σ for Büchi utomton? A stte trnsition of Büchi utomton must represent n interprettion Choose Σ to e the set of ll interprettions over P, encoded s 2 P Exmple Σ = {, {r}, {s}, {r, s} } I (r) = F, I (s) = F, I {r} (r) = T, I {r} (s) = F,... SEFM: Liner Temporl Logic /GU / 60
44 Büchi Automton for LTL Formul By Exmple Exmple (Büchi utomton for formul r over P = {r, s}) A Büchi utomton B ccepting exctly those runs σ stisfying r strt {r},{r, s} Σ In the first stte s 0 (of σ) t lest r must hold, the rest is ritrry Exmple (Büchi utomton for formul r over P = {r, s}) strt {r},{r, s}σ r Σ r := {I I Σ, r I } In ll sttes s (of σ) t lest r must hold SEFM: Liner Temporl Logic /GU / 60
45 Büchi Automton for LTL Formul By Exmple Exmple (Büchi utomton for formul r over P = {r, s}) strt {r},{r, s}σ r {r},{r, s}σ r Σ SEFM: Liner Temporl Logic /GU / 60
46 Recpitultion: FormlistionFormlistion: Syntx, SemnticsFormlistion: Syntx, Semntics, ProvingForml Verifiction: Model Checking Syntx TL Promel Syntx Trnsltion of NegtionTemporl Propositionl Promel Forml BüchiLogic + Temporl Lnguge Automton Promel Logic Logic Rel World Formlistion Syntx Syntx Trnsition Sem. Semntics System Semntics All Trnsition Forml Runs σ = hs model Trnsition Artifcts System System Intersection All How Forml Runs to σ do+ ccepts Vlution Semntics proving? no run? in σ SEFM: Liner Temporl Logic /GU / 60
47 Model Checking Check whether formul is vlid in ll runs of trnsition system. Given trnsition system T (e.g., derived from Promel progrm). Verifiction tsk: is the LTL formul φ stisfied in ll runs of T, i.e., T = φ? Temporl model checking with Spin: Topic of next lecture Tody: Bsic principle ehind Spin model checking SEFM: Liner Temporl Logic /GU / 60
48 Spin Model Checking Overview T = φ? 1. Represent trnsition system T s Büchi utomton B T such tht B T ccepts exctly those words corresponding to runs through T 2. Construct Büchi utomton B φ for negtion of formul φ 3. If then T = φ holds. L ω (B T ) L ω (B φ ) = If L ω (B T ) L ω (B φ ) then ech element of the set is counterexmple for φ. To check L ω (B T ) L ω (B φ ) construct intersection utomton nd serch for cycle through ccepting stte. SEFM: Liner Temporl Logic /GU / 60
49 Representing Model s Büchi Automton First Step: Represent trnsition system T s Büchi utomton B T ccepting exctly those words representing run of T Exmple ctive proctype P () { do :: tomic {!wq; wp = true }; Pcs = true; tomic { Pcs = flse; wp = flse } od } strt 0 1 {wp, Pcs} {wp} {wq} Similr code for process Q. Second tomic lock just to keep utomton smll. {wq, Qcs} SEFM: Liner Temporl Logic /GU / 60
50 Büchi Automton B φ for φ Second Step: Construct Büchi utomton corresponding to negted LTL formul T = φ holds iff there is no ccepting run σ of T s.t. σ = φ Simplify φ = Pcs = Pcs Büchi Automton B φ P = {wp, wq, Pcs, Qcs}, Σ = 2 P Σ Pcs strt 0 1 Σ Σ c Pcs Σ Pcs = {I I Σ, Pcs I }, Σ c Pcs = Σ Σ Pcs SEFM: Liner Temporl Logic /GU / 60
51 Checking for Emptiness of Intersection Automton Third Step: L ω (B T ) L ω (B φ ) =? Counterexmple Construction of intersection utomton: Appendix Intersection Automton (skipping first step of T for simplicity) {wp} {wp, Pcs} strt {wp} {wp, Pcs} {wq} {wp} {wq} {wp} {wq, Qcs} {wp, Pcs} SEFM: Liner Temporl Logic /GU / 60
52 Literture for this Lecture Ben-Ari Section (only syntx of LTL) Bier nd Ktoen Principles of Model Checking, My 2008, The MIT Press, ISBN: X SEFM: Liner Temporl Logic /GU / 60
53 Appendix I: Intersection Automton Construction SEFM: Liner Temporl Logic /GU / 60
54 Construction of Intersection Automton Given: two Büchi utomt B i = (Q i, δ i, I i, F i ), i = 1, 2 Wnted: Büchi utomton B 1 2 = (Q 1 2, δ 1 2, I 1 2, F 1 2 ) ccepting word w iff w is ccepted y B 1 nd B 2 Mye just the product utomton s for regulr utomt? SEFM: Liner Temporl Logic /GU / 60
55 First Attempt: Product Automt for Intersection Σ = {, }, ( + ) ω ( ) ω =? No, e.g., () ω ( + ) ω : 0 1 ( ) ω : 0 1 Product Automton: ccepting loction 11 never reched SEFM: Liner Temporl Logic /GU / 60
56 Explicit Construction of Intersection Automton ( + ) ω : 0 1 ( ) ω : 0 1 (i) Product Automton(ii) Rechle Loctions(iii) Clone(iv) Initil Loctions Restricted to First Copy(v) Finl Loctions Restricted to First Atomton of First Copy(vi) Ensure Acceptnce in Both Copies 1 2(vii) Ensure Acceptnce in Both Copies 2 1(viii) Trnsitions of Product Automton SEFM: Liner Temporl Logic /GU / 60
57 Explicit Construction of Intersection Automton ( + ) ω : 0 1 ( ) ω : 0 1 (i) Product Automton(ii) Rechle Loctions(iii) Clone(iv) Initil Loctions Restricted to First Copy(v) Finl Loctions Restricted to First Atomton of First Copy(vi) Ensure Acceptnce in Both Copies 1 2(vii) Ensure Acceptnce in Both Copies 2 1(viii) Trnsitions of Product Automton SEFM: Liner Temporl Logic /GU / 60
58 Explicit Construction of Intersection Automton ( + ) ω : 0 1 ( ) ω : 0 1 (i) Product Automton(ii) Rechle Loctions(iii) Clone(iv) Initil Loctions Restricted to First Copy(v) Finl Loctions Restricted to First Atomton of First Copy(vi) Ensure Acceptnce in Both Copies 1 2(vii) Ensure Acceptnce in Both Copies 2 1(viii) Trnsitions of Product Automton SEFM: Liner Temporl Logic /GU / 60
59 Explicit Construction of Intersection Automton ( + ) ω : 0 1 ( ) ω : 0 1 (i) Product Automton(ii) Rechle Loctions(iii) Clone(iv) Initil Loctions Restricted to First Copy(v) Finl Loctions Restricted to First Atomton of First Copy(vi) Ensure Acceptnce in Both Copies 1 2(vii) Ensure Acceptnce in Both Copies 2 1(viii) Trnsitions of Product Automton SEFM: Liner Temporl Logic /GU / 60
60 Explicit Construction of Intersection Automton ( + ) ω : 0 1 ( ) ω : 0 1 (i) Product Automton(ii) Rechle Loctions(iii) Clone(iv) Initil Loctions Restricted to First Copy(v) Finl Loctions Restricted to First Atomton of First Copy(vi) Ensure Acceptnce in Both Copies 1 2(vii) Ensure Acceptnce in Both Copies 2 1(viii) Trnsitions of Product Automton SEFM: Liner Temporl Logic /GU / 60
61 Explicit Construction of Intersection Automton ( + ) ω : 0 1 ( ) ω : 0 1 (i) Product Automton(ii) Rechle Loctions(iii) Clone(iv) Initil Loctions Restricted to First Copy(v) Finl Loctions Restricted to First Atomton of First Copy(vi) Ensure Acceptnce in Both Copies 1 2(vii) Ensure Acceptnce in Both Copies 2 1(viii) Trnsitions of Product Automton SEFM: Liner Temporl Logic /GU / 60
62 Explicit Construction of Intersection Automton ( + ) ω : 0 1 ( ) ω : 0 1 (i) Product Automton(ii) Rechle Loctions(iii) Clone(iv) Initil Loctions Restricted to First Copy(v) Finl Loctions Restricted to First Atomton of First Copy(vi) Ensure Acceptnce in Both Copies 1 2(vii) Ensure Acceptnce in Both Copies 2 1(viii) Trnsitions of Product Automton SEFM: Liner Temporl Logic /GU / 60
63 Appendix II: Construction of Büchi Automton B φ for n LTL-Formul φ SEFM: Liner Temporl Logic /GU / 60
64 The Generl Cse: Generlised Büchi Automt A generlised Büchi utomton is defined s: B g = (Q, δ, I, F) Q, δ, I s for stndrd Büchi utomt F = {F 1,..., F n }, where F i = {q i1,..., q imi } Q Definition (Acceptnce for generlised Büchi utomt) A generlised Büchi utomton ccepts n ω-word w Σ ω iff for every i {1,..., n} t lest one q ik F i is visited infinitely often. SEFM: Liner Temporl Logic /GU / 60
65 Norml vs. Generlised Büchi Automt: Exmple 1 strt 0 2 {}}{{}}{ B norml with F = {1, 2}, B generl with F = { {1}, {2} } Which ω-word is ccepted y which utomton? ω-word B norml B generl () ω () ω F 1 F 2 SEFM: Liner Temporl Logic /GU / 60
66 Fischer-Ldner Closure Fischer-Ldner closure of n LTL-formul φ FL(φ) = {ϕ ϕ is suformul or negted suformul of φ} ( ϕ is identified with ϕ) Exmple FL(r Us) = {r, r, s, s, r Us, (r Us)} SEFM: Liner Temporl Logic /GU / 60
67 B φ -Construction: Loctions Assumption: U only temporl logic opertor in LTL-formul (cn express, with U) Loctions of B φ re Q 2 FL(φ) where ech q Q stisfies: Consistent, Totl Downwrd Closed ψ FL(φ): exctly one of ψ nd ψ in q ψ 1 Uψ 2 (FL(φ)\q) then ψ 2 q ψ 1 ψ 2 q: ψ 1 q nd ψ 2 q... other propositionl connectives similr ψ 1 Uψ 2 q then ψ 1 q or ψ 2 q FL(r Us) = {r, r, s, s, r Us, (r Us)} Q {r Us, r, s} {r Us, r, s} { (r Us), r, s} { (r Us), r, s} SEFM: Liner Temporl Logic /GU / 60
68 B φ -Construction: Trnsitions {r Us, r, s}, {r Us, r, s}, {r Us, r, s}, { (r Us), r, s}, { (r Us), r, s} }{{}}{{}}{{}}{{}}{{} q 1 q 2 q 3 q 4 q 5 Trnsitions (q, α, q ) δ φ : q 4 {s} {s} {s} {s} q 1 {s} q 2 {r} q 3 {r} {r} α = q P P set of propositionl vriles outgoing edges of q 1 leled {s}, of q 2 leled {r}, etc. 1. If ψ 1 Uψ 2 q nd ψ 2 q then ψ 1 Uψ 2 q 2. If ψ 1 Uψ 2 (FL(φ)\q) nd ψ 1 q then ψ 1 Uψ 2 q Initil loctions q I φ iff φ q Accepting loctions SEFM: Liner Temporl Logic /GU / 60
69 Remrks on Generlized Büchi Automt Construction lwys gives exponentil numer of sttes in φ Stisfiility checking of LTL is PSPACE-complete There exist (more complex) constructions tht minimize numer of required sttes One of these is used in Spin, which moreover computes the sttes lzily SEFM: Liner Temporl Logic /GU / 60
Lecture 9: LTL and Büchi Automata
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
More informationCS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan
CS 267: Automted Verifiction Lecture 8: Automt Theoretic Model Checking Instructor: Tevfik Bultn LTL Properties Büchi utomt [Vrdi nd Wolper LICS 86] Büchi utomt: Finite stte utomt tht ccept infinite strings
More informationAutomata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.
Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent
More informationChapter 2 Finite Automata
Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht
More informationConvert the NFA into DFA
Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:
More informationDeterministic Finite Automata
Finite Automt Deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion Sciences Version: fll 2016 J. Rot Version: fll 2016 Tlen en Automten 1 / 21 Outline Finite Automt Finite
More informationNon-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1
Non-Deterministic Finite Automt Fll 2018 Costs Busch - RPI 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q q2 1 q 0 q 3 Fll 2018 Costs Busch - RPI 2 Nondeterministic Finite Automton (NFA) Alphbet
More informationMinimal DFA. minimal DFA for L starting from any other
Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA
More informationProbabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford
Probbilistic Model Checking Michelms Term 2011 Dr. Dve Prker Deprtment of Computer Science University of Oxford Long-run properties Lst lecture: regulr sfety properties e.g. messge filure never occurs
More informationChapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1
Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more
More informationNon-deterministic Finite Automata
Non-deterministic Finite Automt Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd T. vn Lrhoven Institute for Computing nd Informtion Sciences Intelligent
More informationFormal Methods in Software Engineering
Forml Methods in Softwre Engineering Lecture 09 orgniztionl issues Prof. Dr. Joel Greenyer Decemer 9, 2014 Written Exm The written exm will tke plce on Mrch 4 th, 2015 The exm will tke 60 minutes nd strt
More informationFinite-State Automata: Recap
Finite-Stte Automt: Recp Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 09 August 2016 Outline 1 Introduction 2 Forml Definitions nd Nottion 3 Closure under
More informationHomework 3 Solutions
CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.
More informationSpeech Recognition Lecture 2: Finite Automata and Finite-State Transducers
Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.
More informationAUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton
25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q
More informationFormal Languages and Automata
Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University
More informationNon-deterministic Finite Automata
Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion
More informationDesigning finite automata II
Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of
More informationCMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014
CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA
More informationCS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University
CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted
More informationJava II Finite Automata I
Jv II Finite Automt I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz Finite Automt I p.1/13 Processing Regulr Expressions We lredy lerned out Jv s regulr expression
More informationTheory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38
Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control
More informationConverting Regular Expressions to Discrete Finite Automata: A Tutorial
Converting Regulr Expressions to Discrete Finite Automt: A Tutoril Dvid Christinsen 2013-01-03 This is tutoril on how to convert regulr expressions to nondeterministic finite utomt (NFA) nd how to convert
More informationCSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science
CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny
More informationRegular expressions, Finite Automata, transition graphs are all the same!!
CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1
More informationCISC 4090 Theory of Computation
9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions
More informationRegular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*
Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion
More informationFinite Automata-cont d
Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww
More informationTheory of Computation Regular Languages
Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of
More informationGrammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages
5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive
More informationTypes of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2
CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt
More informationSpeech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research
Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Mehryr Mohri Cournt Institute nd Google Reserch mohri@cims.nyu.com Preliminries Finite lphet Σ, empty string. Set of ll strings over
More informationSome Theory of Computation Exercises Week 1
Some Theory of Computtion Exercises Week 1 Section 1 Deterministic Finite Automt Question 1.3 d d d d u q 1 q 2 q 3 q 4 q 5 d u u u u Question 1.4 Prt c - {w w hs even s nd one or two s} First we sk whether
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic
More informationBoolean algebra.
http://en.wikipedi.org/wiki/elementry_boolen_lger Boolen lger www.tudorgir.com Computer science is not out computers, it is out computtion nd informtion. computtion informtion computer informtion Turing
More informationLecture 08: Feb. 08, 2019
4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny
More informationCS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)
CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts
More informationCHAPTER 1 Regular Languages. Contents
Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr
More informationCS 330 Formal Methods and Models
CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q
More informationTypes of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.
CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt
More informationDesign and Analysis of Distributed Interacting Systems
Design nd Anlysis of Distriuted Intercting Systems Lecture 6 LTL Model Checking Prof. Dr. Joel Greenyer My 16, 2013 Some Book References (1) C. Bier, J.-P. Ktoen: Principles of Model Checking. The MIT
More informationAnatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute
Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn
More informationCS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata
CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or
More informationKNOWLEDGE-BASED AGENTS INFERENCE
AGENTS THAT REASON LOGICALLY KNOWLEDGE-BASED AGENTS Two components: knowledge bse, nd n inference engine. Declrtive pproch to building n gent. We tell it wht it needs to know, nd It cn sk itself wht to
More informationCS 275 Automata and Formal Language Theory
CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)
More informationNFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:
CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More
More informationNondeterminism and Nodeterministic Automata
Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely
More informationFrom LTL to Symbolically Represented Deterministic Automata
Motivtion nd Prolem Setting Determinizing Non-Confluent Automt Det. vi Automt Hierrchy From LTL to Symoliclly Represented Deterministic Automt Andres Morgenstern Klus Schneider Sven Lmerti Mnuel Gesell
More informationNFAs continued, Closure Properties of Regular Languages
Algorithms & Models of Computtion CS/ECE 374, Fll 2017 NFAs continued, Closure Properties of Regulr Lnguges Lecture 5 Tuesdy, Septemer 12, 2017 Sriel Hr-Peled (UIUC) CS374 1 Fll 2017 1 / 31 Regulr Lnguges,
More informationNon Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51
Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices
More informationFormal Language and Automata Theory (CS21004)
Forml Lnguge nd Automt Forml Lnguge nd Automt Theory (CS21004) Khrgpur Khrgpur Khrgpur Forml Lnguge nd Automt Tle of Contents Forml Lnguge nd Automt Khrgpur 1 2 3 Khrgpur Forml Lnguge nd Automt Forml Lnguge
More informationNon-Deterministic Finite Automata
Non-Deterministic Finite Automt http://users.comlb.ox.c.uk/luke. ong/teching/moc/nf2up.pdf 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q1 q2 2 Alphbet ={} Two choices q1 q2 3 Alphbet ={} Two choices
More informationa,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
CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother
More informationCS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018
CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA
More informationNondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA
Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn
More informationLexical Analysis Finite Automate
Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition
More informationAssignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages
Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd
More informationLet's start with an example:
Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte
More informationComplexity in Modal Team Logic
ThI Theoretische Informtik Complexity in Modl Tem Logic Julin-Steffen Müller Theoretische Informtik 18. Jnur 2012 Theorietg 2012 Theoretische Informtik Inhlt 1 Preliminries 2 Closure properties 3 Model
More informationCHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)
Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr
More informationContext-Free Grammars and Languages
Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;
More informationFoundations of XML Types: Tree Automata
1 / 43 Foundtions of XML Types: Tree Automt Pierre Genevès CNRS (slides mostly sed on slides y W. Mrtens nd T. Schwentick) University of Grenole Alpes, 2017 2018 2 / 43 Why Tree Automt? Foundtions of XML
More informationState Minimization for DFAs
Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid
More informationMore on automata. Michael George. March 24 April 7, 2014
More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose
More informationSTRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada
STRUCTURE OF CONCURRENCY Ryszrd Jnicki Deprtment of Computing nd Softwre McMster University Hmilton, ON, L8S 4K1 Cnd jnicki@mcmster.c 1 Introduction Wht is concurrency? How it cn e modelled? Wht re the
More informationCoalgebra, Lecture 15: Equations for Deterministic Automata
Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined
More informationFinite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh
Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is
More information5. (±±) Λ = 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.
Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.
More informationScanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:
Scnner Specifying ptterns source code tokens scnner prser IR A scnner must recognize the units of syntx Some prts re esy: errors mps chrcters into tokens the sic unit of syntx x = x + y; ecomes
More informationThe University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS
The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook
More informationCSCI 340: Computational Models. Transition Graphs. Department of Computer Science
CSCI 340: Computtionl Models Trnsition Grphs Chpter 6 Deprtment of Computer Science Relxing Restrints on Inputs We cn uild n FA tht ccepts only the word! 5 sttes ecuse n FA cn only process one letter t
More information4 Deterministic Büchi Automata
Bernd Finkeiner Dte: April 26, 2011 Automt, Gmes nd Verifiction: Lecture 3 4 Deterministic Büchi Automt Theorem 1 The lnguge ( + ) ω is not recognizle y deterministic Büchi utomton. Assume tht L is recognized
More informationCS375: Logic and Theory of Computing
CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tble of Contents: Week 1: Preliminries (set lgebr, reltions, functions) (red Chpters 1-4) Weeks
More informationDeciding Hyperproperties
ne.jpeg Deciding Hyperproperties Bernd Finkeiner nd Christopher Hhn Rective Systems Group Srlnd University, Germny Highlights of Logic, Gmes nd Automt Brussels, 06.-09. Septemer 2016 0 Informti Lekge Hertleed
More information1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.
York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech
More informationReasoning and programming. Lecture 5: Invariants and Logic. Boolean expressions. Reasoning. Examples
Chir of Softwre Engineering Resoning nd progrmming Einführung in die Progrmmierung Introduction to Progrmming Prof. Dr. Bertrnd Meyer Octoer 2006 Ferury 2007 Lecture 5: Invrints nd Logic Logic is the sis
More informationNFAs continued, Closure Properties of Regular Languages
lgorithms & Models of omputtion S/EE 374, Spring 209 NFs continued, losure Properties of Regulr Lnguges Lecture 5 Tuesdy, Jnury 29, 209 Regulr Lnguges, DFs, NFs Lnguges ccepted y DFs, NFs, nd regulr expressions
More informationTutorial Automata and formal Languages
Tutoril Automt nd forml Lnguges Notes for to the tutoril in the summer term 2017 Sestin Küpper, Christine Mik 8. August 2017 1 Introduction: Nottions nd sic Definitions At the eginning of the tutoril we
More informationCMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)
CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All
More informationCS 275 Automata and Formal Language Theory
CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)
More informationHybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system
Hyrid Control nd Switched Systems Lecture #2 How to descrie hyrid system? Forml models for hyrid system João P. Hespnh University of Cliforni t Snt Brr Summry. Forml models for hyrid systems: Finite utomt
More informationIn-depth introduction to main models, concepts of theory of computation:
CMPSCI601: Introduction Lecture 1 In-depth introduction to min models, concepts of theory of computtion: Computility: wht cn e computed in principle Logic: how cn we express our requirements Complexity:
More informationThe size of subsequence automaton
Theoreticl Computer Science 4 (005) 79 84 www.elsevier.com/locte/tcs Note The size of susequence utomton Zdeněk Troníček,, Ayumi Shinohr,c Deprtment of Computer Science nd Engineering, FEE CTU in Prgue,
More informationSupervisory Control (4CM30)
Supervisory Control (4CM30) Verifiction in mcrl2 Michel Reniers M.A.Reniers@tue.nl 2016-2017 Verifiction in mcrl2 M CIF = φ CIF iff M mcrl2 = φ mcrl2 1. Adpt CIF model 2. Formulte property in modl µ-clculus
More information12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016
CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple
More informationIntermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4
Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one
More informationIntroduction to ω-autamata
Fridy 25 th Jnury, 2013 Outline From finite word utomt ω-regulr lnguge ω-utomt Nondeterministic Models Deterministic Models Two Lower Bounds Conclusion Discussion Synthesis Preliminry From finite word
More informationCS 275 Automata and Formal Language Theory
CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed
More informationCS 330 Formal Methods and Models
CS 0 Forml Methods nd Models Dn Richrds, George Mson University, Fll 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 8 1. Prove q (q p) p q p () (4pts) with truth tle. p q p q p (q p) p q
More informationFABER Formal Languages, Automata and Models of Computation
DVA337 FABER Forml Lnguges, Automt nd Models of Computtion Lecture 5 chool of Innovtion, Design nd Engineering Mälrdlen University 2015 1 Recp of lecture 4 y definition suset construction DFA NFA stte
More informationFinite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh
Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions
More informationNFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.
NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD
More information3 Regular expressions
3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll
More informationFormal languages, automata, and theory of computation
Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm
More information80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers
80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES 2.6 Finite Stte Automt With Output: Trnsducers So fr, we hve only considered utomt tht recognize lnguges, i.e., utomt tht do not produce ny output on ny input
More informationTable of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...
Tle of contents: Lecture N0.... 3 ummry... 3 Wht does utomt men?... 3 Introduction to lnguges... 3 Alphets... 3 trings... 3 Defining Lnguges... 4 Lecture N0. 2... 7 ummry... 7 Kleene tr Closure... 7 Recursive
More informationAutomata, Games, and Verification
Automt, Gmes, nd Verifiction Prof. Bernd Finkbeiner, Ph.D. Srlnd University Summer Term 2015 Lecture Notes by Bernd Finkbeiner, Felix Klein, Tobis Slzmnn These lecture notes re working document nd my contin
More informationCS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions
CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 9 1. (4pts) ((p q) (q r)) (p r), prove tutology using truth tles. p
More information