arxiv: v2 [cs.fl] 21 Mar 2014

Size: px
Start display at page:

Download "arxiv: v2 [cs.fl] 21 Mar 2014"

Transcription

1 arxiv: v [cs.fl] 1 Mar 14 Enforcing Operational Properties including Blockfreeness for Deterministic Pushdown Automata S. Schneider and U. Nestmann Technische Universität Berlin Astract: We present an algorithm which modifies a deterministic pushdown automaton (DPDA) such that (i) the marked language is preserved, (ii) lifelocks are removed, (iii) deadlocks are removed, (iv) all states and edges are accessile, and (v) operational lockfreeness is estalished (i.e., coaccessiility in the sense that every initial derivation can e continued to a marking configuration). This prolem can e trivially solved for deterministic finite automata (DFA) ut is not solvale for standard petri net classes. The algorithm is required for an operational extension of the supervisory control prolem (SCP) to the situation where the specification in modeled y a DPDA. Keywords: Deterministic Pushdown Automata, DPDA, Blockingness, Deadlocks, Lifelocks, Accessiility, Coaccessiility, Supervisory Control We are introducing an algorithm to transform a DPDA such that its oservale operational ehavior is restricted to its desired fragment. The algorithm decomposes the prolem into three steps: transformation of the DPDA into a Context Free Grammar (CFG) while preserving the operational ehavior, restricting the CFG to enforce operational lockfreeness, and the transformation of the resulting CFG via Parsers to DPDA while preserving and estalishing the relevant criteria on the operational ehavior. The algorithm presented here is an essential part for the effective solution of the supervisory control prolem for DFA plants and DPDA specifications which is reduced (in the companion paper y Schneider, Schmuck, Raisch, and Nestmann (14)) to the effective implementaility of ensuring lockfreeness (solved in this paper) and ensuring controllaility (solved in the companion paper y Schmuck, Schneider, Raisch, and Nestmann (14)). In Section 1 we define astract transition systems (ATS) as a asis for the systems involved in the algorithm and give a formal prolem statement to e solved for DPDA. In Section we define the concrete transition systems appearing in the algorithm as instantiations of ATS. In Section 3 we present the extensive algorithm due to space restrictions mostly informally using a running example efore we discuss the formal verification and possile improvements of the approach. The formal constructions of the algorithm are contained in Schneider and Schmuck (13). We summarize our results in Section 4 and outline our next steps in Section ABSTRACT TRANSITION SYSTEMS The concrete systems used in this paper (including DPDA, CFG, and Parsers) are instantiations of the susequently defined class of Astract Transition Systems (ATS). Thus, they will inherit the uniform definitions of derivations, languages, and the prolem to e solved from the ATS definitions. Throughout the paper we use the following notations. Notation 1. Let A e an alphaet and let B e a set. Then (i) A denotes the set of all finite words over A, (ii) A 1 = A {λ}, (iii) A ω denotes the set of all finite and infinite words over A, (iv) is the (sometimes omitted) concatenation operation on words (and languages), (v) is the prefix relation, (vi) A is the prefix-closure of A, (vii) is the suffix relation, and (viii) k:w denotes the k-prefix of w A defined y (if w = α w k > then α ((k 1):w ) else λ), and (ix) (A, B) denotes (A { }) B where represents undefinedness. Definition 1. (Astract Transition System). S = (E, C, S, π S, R, c, A, O, o m, o um ) ATS iff (i) E is a set of step-edges, (ii) C is a set of configurations, (iii) S is a set of states, (iv) π S maps each configuration to at most one state, (v) R is a inary step-relation on (E, C), (vi) c C is the initial configuration, (vii) A is the marking suset of C, (viii) O is the set of outputs, and (ix) o um : C O and o m : A O define the unmarked and marked outputs for configurations. For these ATS we define their derivations, generated languages, and susequently the properties to e enforced. Definition. (Semantics of ATS). (i) the set of derivations D(S) contains all elements from (E, C) ω starting in a configuration of the form (, c) where all adjacent (c 1, e 1 ), (c, e ) (E, C) satisfy (c 1, e 1 ) R (c, e ), (ii) the set of initial derivations D I (S) contains all elements of D(S) starting with (, c ), (iii) the reachale configurations C reach (S) are defined y {c C d D I (S). d(n) = (e, c)}, (iv) the marked language L m (S) is defined y o m (F C reach (S)), and (v) the unmarked language L um (S) is defined y o um (C reach (S)). The concatenation of derivations d 1, d D(S) is given y (d 1 nd )(i) = (if i n then d 1 (i) else d (i n)).

2 Definition 3. (Properties of ATS). (i) S has a deadlock iff for some finite d D I (S) of length n N which is not marking (i.e., for all k, d(k) = (e, c) implies c / A) there is no c such that d(n) R c, (ii) S has a lifelock iff for some infinite d D I (S) there is an N N such that the unmarked language of d is constant after N (i.e., for all k N, o um (d(n)) = o um (d(k))), (iii) S is accessile iff for each p S there is c C reach (S) such that π S (c) = p and for each e E there is d D I (S) such that d(n) = (e, c), and (iv) S is operational lockfree iff for any finite d i D I (S) of length n N ending in d i (n) = (e, c) there is a continuation d c D(S) such that d i nd c is a marking derivation and d i and d c match at the gluing point n (i.e., d c () = (, c)). By definition, for operational lockfree ATS the asence of deadlocks is guaranteed. Finally, we present the prolem of enforcing the desired properties on an ATS, which will e solved for DPDA y the algorithm presented in Section 3. Definition 4. (Prolem Statement for ATS). Let S ATS. How to find S ATS such that (i) L m (S) = L m (S ), (ii) S is accessile, (iii) S has no deadlocks, (iv) S has no lifelocks, and (v) S is operational lockfree? In the DFA-setting: lifelocks can not occur and the other aspects of the prolem are solved y simple and efficient graph-traversal algorithms pruning out states which are either not reachale from the initial state or from which no marking state can e reached 1.. CONCRETE TRANSITION SYSTEMS Every deterministic context free language can e properly represented y at least three different types of finite models: a deterministic EPDA, a context free grammar (CFG) satisfying the LR(1) determinism property, and a deterministic Parser. These three types occur at intermediate steps of our algorithm which solves the prolem stated in Definition 4. Therefore, the following susections contain their definitions as instantiations of the ATS. In each of the three cases we proceed in three steps: (1) definition of EPDA, CFG, and Parser as tuples, () instantiation of the ATS-scheme y defining each of the ten components, and (3) characterization of the determinism conditions. Remark 1. We provide the slightly nonstandard ranching semantics for EPDA and Parsers which utilize a history variale in the configurations to greatly simplify the definition of the operational-lockfreeness from Definition 3. Furthermore, this ranching semantics corresponds to the intuition that the finite state realizations are generators rather than acceptors of languages, as it is customary in the context of supervisory control theory..1 EPDA and DPDA We introduce EPDA, which are NFA enriched with a variale on which the stack-operations top, pop, and, push can e executed. 1 The trivial handling of an ATS with empty marked language otained at some point of the calculation is kept implicit in this paper (in this case, no solution exists and the calculation can e aorted). The ranching interpretation is already the standard for CFG. EPDA PDA DPDA NFA DFA 1-popping deterministic λ-step-free stack-free Tale 1. Suclasses of EPDA. Definition 5. (Extended Pushdown Automata (EPDA)). M = (Q, Σ, Γ, δ, p,, F ) EPDA iff (i) the states Q, the output alphaet Σ, the stack alphaet Γ, and the set of edges δ are finite (Q, Q, Σ, Σ, Γ, Γ range over p, p, α, w, γ, s, respectively), (ii) δ : Q Σ 1 Γ Γ Q, (iii) the end-of-stack marker is contained in Γ, (iv) the marking states F and the initial state p are contained in Q, and (v) is never removed from the stack (i.e., (p, σ, s, s, p ) δ and s imply s ). We proceed with the ATS instantiation for EPDA. Definition 6. (EPDA ATS Instantiation). An EPDA M = (Q, Σ, Γ, δ, p,, F ) instantiates the ATS scheme (E, C, S, π S, R, c, A, O, o m, o um ) via: (i) E δ (ii) C C(M ) Q Σ Γ where (p, w, s) C(M ) consists of a state p, a history variale w (storing the symols generated), and the stack-variale s (iii) S Q (iv) π S (p, w, s) p (v) R M : (δ, C(M )) defined y (e, (p, w, s s)) M ((p, σ, s, s, p ), p, w σ, s s) (vi) c (p, λ, ) (vii) A {(p, w, s) C(M ) p F } (viii) O Σ (ix) o m (p, w, s), o um (p, w, s) {w} The well known su-classes of EPDA having one or more of the properties elow are defined in Tale 1. Definition 7. (Su-classes of EPDA). An EPDA is 1-popping iff every edge pops precisely one element from Γ from the stack. An EPDA is deterministic iff for every reachale configuration all two distinct steps append distinct elements of Σ to the history variale 3. An EPDA is λ- step-free iff no edge is of the form (p, λ, s, s, p ). An EPDA is stack-free iff every edge is of the form (p, α,,, p ).. CFG and LR(1) A CFG (e.g., defined y Ginsurg and Greiach (1966)) is a term-replacement system replacing a nonterminal with a word over output symols 4 and nonterminals. Definition 8. (Context-Free Grammars (CFG)). G = (N, Σ, P, S) CFG iff (i) the nonterminals N (ranging over A, B), the output alphaet Σ, and the productions P are finite (ii) P : N (N Σ), and (iii) the initial nonterminal S is contained in N. N Σ and (N Σ) range over κ and v, respectively. Productions (A, v) are written A v. Definition 9. (CFG ATS Instantiation). A CFG G = (N, Σ, P, S) instantiates the ATS scheme (E, C, S, π S, R, c, A, O, o m, o um ) via: (i) E P (ii) C C(G) = (N Σ) (iii) S N (iv) π S take the first nonterminal (if present) of the configuration (v) R G : (P, C(G)) given y (e, (v 1 A v )) G ((A, v), v 1 v v ) (vi) c S (vii) A Σ (viii) O Σ (ix) o m (v) {v} (x) o um (v) {v} 3 Thus, λ-steps may not e enaled simultaneously with other steps. 4 The output symols of a CFG are usually called terminals.

3 The LR(1)-condition elow, which corresponds to the determinism property of EPDA, depends on the restriction of the step-relation to the replacement of the right-most nonterminal which will e denoted y the index rm. Definition 1. (LR(1)-Condition). According to Sippu and Soisalon-Soininen (199) (page 5) 5, LR(1) is the set of all CFG for which (assuming x Σ ) (i) (, S) rm* G (e 1, v 1 A 1 w 1 ) rm G ((A 1, v 1 ), v 1 v 1 w 1 ), (ii) (, S) rm* G (e, v A w ) rm G ((A, v ), v v w ), (iii) v v = v 1 v 1 x, and (iv) 1:w 1 = 1:(x w ), imply (v) v 1 = v, A 1 = A, and v 1 = v. Intuitively, if a parser for a CFG has generated the shorter prefix v 1 v 1 it must e ale to decide y fixing the next symol (1:w 1 and 1:(x w ), respectively) whether (A 1, v 1 ) is to e applied ackwards or whether for x λ another symol of x should e generated or for x = λ the production (A, v ) is to applied ackwards 6..3 Parser Intuitively, a Parser is an EPDA with mild modifications 7 : (1) the parser may fix the next output-symol (without generating it) and () the parser may terminate the generation of symols (y fixing the end-of-output marker ). Definition 11. (Parser). M = (N, Σ, S, F, P, ) Parser iff (i) the stack alphaet N, the output alphaet Σ, the marking stack-tops F, and the rules P are finite, (N, N, Σ, Σ, range over p, p, α, w, respectively) (ii) P : N + Σ 1 N + Σ 1, (iii) the initial stack symol S and the marking stack-tops F are contained in N, (iv) the end-of-output marker is contained in Σ, (v) the parser may not modify the output (i.e., (s p, w, s p, w ) P implies w w (i.e., w ends with w )), and (vi) the end-of-output marker may not e generated (i.e., (s p, w w, s p, w ) P and w imply w ). Rules (s p, w w, s p, w ) are written s p w w s p w. Intuitively, a rule s p w w s p w is changing the state from p to p, pops s from the stack, pushes s to the stack, fixes the output w, and generates w to the output. Definition 1. (Parser ATS Instantiation). A Parser M = (N, Σ, S, F, P, ) instantiates the ATS scheme (E, C, S, π S, R, c, A, O, o m, o um ) via: (i) E P (ii) C C(M) N + Σ Σ where (s p, w, f) C(M) contains the stack fragment s, the current state p, a history variale w, and the fixed part f Σ 1 which the parser fixed without generating it. (iii) S {p N (s p, w w, s p, w ) P p {p, p }} (iv) π S (s p, w, f) {p} (v) R M : (P, C(M)) given y (e, (s s 1 p, w, f)) M ((s 1 p, w 1, s p, w ), s s p, w, f ) where (a) w 1 f f w 1, () w = w drop( f, del (w 1 )), 8 and finally (c) f = w drop( w 1, f). (vi) c (S, λ, λ) (vii) A {(s p, w, f) 5 The here relevant section 6.6 of the monograph Sippu and Soisalon- Soininen (199) is ased primarily on the work of Knuth (1965) which was later extended y Aho and Ullman (197). 6 E.g., ({S, A, B}, {a}, {(S, A), (S, B), (A, a), (B, a)}, S) / LR(1). 7 An equivalent linear/scheduled definition of Parser is given y Sippu and Soisalon-Soininen (199). 8 Here del (w) removes a potential from the end of w and drop(n, w) drops the first n symols from w.,, ;,,,,λ G p p 1 p d,,λ a,, ; a,, λ,, λ,, p 4 p a,, 3 GInt a,, p p,, ;,, a,, ; a,,,,λ p 1 p d,,λ λ,, p 3 Figure 1. DPDA G and G Int generating {a n (d) n n N}. Step (Input): Step 1: Step : Step 3: Step 4: Step 5: Step 6: Step 7: Step 8: Step 9: Step 1: Step 11: Step 1 (Output): G 6 DFA G DPDA G 1 SDPDA G SDPDA+no doule acceptance G 3 CFG G 4 LR(1) G 5 LR(1)+ -augmented G 7 Parser+deterministic G 8 Parser+deterministic+ -free G 9 Parser+essentially EDPDA G 1 EDPDA G 11 DPDA Figure. Visualization of the algorithm. G 1 DPDA+accessile f {λ, } p F } (viii) O Σ (ix) o m (s p, w, f) {w} (x) o um (s p, w, f) {w}. A Parser is deterministic iff for all reachale configuration all two distinct steps (i) append distinct symols to the history variale, or (ii) one step adds a symol to the history variale and the other step completes the outputgeneration y fixing the end-of-output marker APPROACH Motivation: For example, the DPDA G in Figure 1 exhiits a lifelock generating the output reaching p 1, p 3 aritrarily often, a lifelock (and locking situations) generating the output a reaching p aritrarily often, a non accessile state p 4 (along with the edge leading to it), ut no deadlock. Oserve that the cause (G does not properly distinguish etween an even or odd numer of generated as) is structurally separated from the lifelock at p. Thus, the intuitive solution G Int (see Figure 1) is otained y splitting the state p and y removing junk. Any formal construction must detect the states with a deadlock, a lifelock, or a locking situation, determine the cause of that prolem, and make a decision on how to fix the prolem. Solution: In Figure we have depicted our approach in the susequently explained 1 steps. The asic idea is to (Steps 1 3) transform the DPDA G into a CFG G 3, (Step 4) 9 A parser may (depending on the other rules) e deterministic if (p 1, w α, λ) and (p, w, ) are successors of the same reachale configuration (p, w, λ). Blockfree and Lifelockfree

4 otain an LR(1) grammar G 4 y restricting G 3 to estalish operational lockfreeness and asence of lifelocks, (Steps 5 11) transform the LR(1) grammar into a DPDA G 11 preserving the desired properties, and finally (Step 1) remove all inaccessile states and edges. Steps 1 4 and 7 1 preserve the marked language. Steps 1 3 and 7 1 preserve the unmarked language while step 4 restricts the unmarked language to the prefix closure of the marked language. Steps 5 and 6 are not meant to preserve the (un)marked language as they are only intermediate results of the translation in Step 7. Approximating Accessiility: Throughout the following presentation we omit states and edges which are oviously inaccessile: such states and edges are detected y overapproximating the possile k-length prefixes of stacks in reachale configurations. The k-overapproximation R : Q Q Γ k is the least function satisfying the following rules: (i) initial configuration: k: R(p, p ), (ii) closure under steps: if γs R(p, p) and (p, σ, γ, s, p ) δ then k:(s s) R(p, p ) and k:(s s) R(p, p ), and (iii) transitivity: if s R(p, p ) and s R(p, p ) then s R(p, p ). 1 For example, in G the state p 4 is oviously inaccessile ecause the set of all 1-length prefixes of stacks of reachale configurations with state p 4 is empty. However, we would otain λ to e a -length prefix of a reachale configuration with state p 4 ; i.e., y increasing the parameter for the length of the calculated prefixes a etter result may e otained. For DFA and k = the standard DFAaccessiility-operation is otained. For aritrary DPDA step 1 alone enforces accessiility. Applying this approximation implicitly in the running example, we now descrie the steps of the algorithm solving the prolem stated in Definition 4. Step 1: We transform the DPDA into a simple DPDA (called SDPDA susequently) such that every edge is of one of three forms: a generating edge (p, α, γ, γ, p ), a pop edge (p, λ, γ, λ, p ), or a push edge (p, λ, γ, γ γ, p ). The operation consists of four steps: (i) split every edge of the form (p, α, γ, s, p ) into (p, α, γ, γ, p ) and (p, λ, γ, s, p ), (ii) split every neutral edge of the form (p, λ, γ, γ, p ) into (p, λ, γ, γ, p ) and (p, λ,, λ, p ) for a unique fresh stack symol Γ, (iii) split every rule of the form (p, λ, γ, sγ, p ) with γ γ into (p, λ, γ, λ, p ) and (p, λ, γ, sγ γ, p ) for every γ Γ, and (iv) split every rule of the form (p, λ, γ, sγ, p ) into s steps which push a single symol of s in each step. Note that the fresh states to e used in each of the four steps contain the edge for which they have een constructed (i.e., p in the first step is (p, σ, γ, s, p )). The operation has een adapted from Knuth (1965) y (1) correcting the handling of neutral edges involving the symol (for example, the self loop at p in G would have een handled incorrectly), 1 Without using the transitivity rule we otain the - and 1- overapproximations R and R 1 of G (where we omit empty sets): R = {p {p 1 {λ}, p {λ}}, p 1 {p {λ}, p 1 {λ}, p 3 {λ}}, p {p {λ}, p 1 {λ}}, p 3 {p 1 {λ}, p 4 {λ}, p 3 {λ}}, p 4 {p 4 {λ}}} R 1 = {p {p 1 {, }, p {, }}, p 1 {p {λ}, p 1 {λ,, }, p 3 { }}, p {p {λ, }, p 1 {λ}}, p 3 {p 1 {λ}, p 3 { }}} p a,, λ,, G1 p,, ;,, λ,, p p p a,, a,, p 4 a,, λ,, G p,, ;,, λ,, p 4 a,, a,, a,, λ,, p p p d,, λ,,λ,, p 1 p 1 p 3 G 4 with initial symol L p, p 3 λ,, λ,, p p p d,, λ,,λ,, p 1 p 1 p 3 λ,, λ,, p 1,, 1:L p, a L p, 8 :L p, L p1, :L p, L p,,p 1 L p1, 9 :L p,,p 1 a L p,,p 1 3:L p1, L p3, 1:L p3, λ 4:L p,,p 1 Lp,,p L p,,p 1 11:L p,,p a L p,,p 5:L p,,p L p1,,p 1:L p1,,p L p 1,,p 6:L p 1,,p λ 13:L p,,p Lp,,p 1 L p1,,p 7:L p,,p 1 d L p,,p 1 14:L p,,p 1 λ renamed G 4 with initial symol S 1 :S aa :A BC 3 :C D 4 :E F J 5 :F G 6 :H λ 7 :J dk 8 :S C 9 :B ae 1:D λ 11:F ai 1:G H 13:I BG 14:K λ Figure 3. The simple DPDA G 1, the simple DPDA G not exhiiting doule marking, and the LR(1)-grammar G 4. and y () logging the involved edges in the fresh states as explained efore. For the DPDA G from Figure 1 the SDPDA G 1 in Figure 3 results (up to renaming of the states). Step : We transform the SDPDA G 1 into an SDPDA G such that once the SDPDA G has generated an output, it has to generate another symol efore entering a marking state again. For the example automaton G 1 this means that the lifelock at p, p 3 is prolematic. We are reusing the construction from Knuth (1965): Every state is duplicated (the duplicated states are neither initial nor marking). Then, the edges are defined such that the automaton G operates on the original states until it reaches a marking state. Once this happens, the automaton either remains in the original states y using a generating edge or it switches to the duplicated states. The automaton remains in the duplicated states until switching to the original states using any generating edge. For the SDPDA G 1 from Figure 3 the SDPDA G in the same figure results. Note, the lifelock in p 1, p 3 has een removed y the cost of another lifelock in p 1, p 3 generating the same output. Step 3 & Step 4: We transform the SDPDA G in step 3 into the CFG G 3 using a construction from Knuth (1965). We restrict the CFG G 3 in step 4 to the LR(1) grammar G 4 (see Figure 3) y removing all productions from G 3 which do not appear in any marking derivation of G 3. That is, the accessile and coaccessile part is constructed using

5 SDPDA G LR(1) G 4 (p, λ, ) L p, G (p, a, ) G 4 a L p, G (p, a, ) G4 a L p,,p 1 L p1, G (p, aa, ) G 4 aa L p,,p1 Lp 1, G (p, aa, ) G4 aa L p,,p L p,,p 1 L p1, G (p 1, aa, ) G4 aa L p1,,p L p,,p 1 L p1, G (p 1, aa, ) G 4 aa L p 1,,p L p,,p 1 L p1, G (p, aa, ) G4 aa L p,,p 1 L p1, G (p, aad, ) G 4 aad L p,,p 1 L p1, G (p 1, aad, ) G4 aad L p1, G (p 3, aad, ) G4 aad L p3, G4 aad Figure 4. Corresponding initial derivations of the SDPDA G and the LR(1) grammar G 4. a fixed-point algorithm in each case. For the accessile part: the accessile nonterminals are the least set of nonterminals A such that the initial nonterminal is contained in A and for any production A v: if A A, then the nonterminals of v are contained in A. For the coaccessile part: the coaccessile nonterminals are the least set of nonterminals A such that for any production A v: if the nonterminals of v are contained in A then A A. The equivalence of G and G 4 w.r.t. the marked language can est e understood y comparing the derivations in Figure 4. The following three properties explain the correctness of the construction: (i) The nonterminals of the form L p,a (for example L p1,) guarantee a marking derivation of the SDPDA starting in p not modifying the stack starting with A. (ii) The nonterminals of the form L p,a,p (for example L p,,p ) guarantee a derivation of the SDPDA starting in p not modifying the stack starting with A and reaching a configuration in which the A is removed and the state p is reached. (iii) For any configuration (p 1, w, γ 1... γ n ) there are p... p n such that (p, w, γ 1... γ n ) is reachale y G iff w L p1,γ 1,p... L pn 1,γ n 1,p n L pn,γ n is reachale y G 4. Once step 4 has een completed, for the given DPDA a marked language equivalent CFG has een constructed which is lifelockfree, accessile, and operational lockfree (and y that deadlockfree). Step 5 & Step 6 & Step 7: In these steps we are following, with some modifications, the constructions in Sippu and Soisalon-Soininen (199). In step 5 we are constructing the -augmented version G 5 of G 4 : A new initial nonterminal S and the production S S are added where S is the old nonterminal. This modification allows for a simpler construction procedure of the LR(1)-machine and the LR(1)-parser in steps 6 and 7. In step 6 we are constructing the LR(1)-machine G 6 (depicted in Figure 5) for the LR(1)-grammar G 5. The output alphaet of the DFA G 6 is the union of the output alphaet and the nonterminals of G 5. The steps of the parser (etween two states p, p of G 6 ) will depend on the elements of p: these elements are called items which are formally four-tuples containing a production with a marker splitting the right hand side of the production and a lookahead symol. The DFA G 6 has two kinds of edges: the edges laeled with an output symol α represent the action where the parser generates α, the edges laeled Reduce Rules d 9 13 d 9 15 d 9 13 d d d d 15 d d 3 5 d d 4 9 d d 4 9 d 6 d 6 7 d Shift Rules 1 a a 9 9 a d a a d 9 31 Figure 6. The rules of the LR(1)-parser G 7 with initial state 1 and marking set {6}. with nonterminals are required for the actions where the parser concludes (ased on its stack and the lookahead of the items) that it has generated a word derivale y a nonterminal. Every edge (p, κ, p ) in G 6 satisfies that p is the least set satisfying the following conditions: p contains all items of p where the marker has een shifted over κ. Furthermore, if an item of the form [A v B v, σ] is otained, then the so-called first -symols σ are determined 11 for which there is a w satisfying v σ * G 5 w with σ = 1:w and for all such (possily empty) σ and all productions of the form B v, the item [B v, σ ] is contained in p 1. For example (in Figure 5), the a-successor of state 9 is state 15: [F a I, d] 15 is the result of the shifting of the over the a in the item [F ai, d] 9; [I BG, d] 15 ecause [F a I, d] 15 and d is (trivially) derivale to d; [B ae, ] 15 ecause [I BG, d] 15 and Gd is derivale to d. In step 7 we are constructing the LR(1)-parser G 7 (depicted in Figure 6) for G 5 and G 6. The parser consists of shift rules (generating a symol and changing the stack and state) and reduce rules (which only modify the stack and state). The shift rules are otained from the LR(1)- machine y selecting the edges in G 6 which are laeled with an output symol: an edge (p, α, p ) would result in the shift rule p α p p λ (e.g., the edge (1, a, ) results in the rule 1 a 1 λ). The reduce rules are constructed for every item of the form [A v, α] p (i.e., the marker is at the eginning of the right hand side): let p (y construction p is also a word over the stack alphaet of G 7 ) e the sequence of states visited y generating v starting in p in G 6 and let p e the state reached y generating A in p in G 6. Then the reduce rule p p λ p p λ is added to the parser (e.g., the item [J dk, ] 9 results in the rule ). Remark. According to Sippu and Soisalon-Soininen (199), the parser G 7 is a correct prefix parser. However, that is a too weak assertion: their definition of the unmarked language considers a symol the parser has fixed ut not generated not to e part of the generated 11 While in Sippu and Soisalon-Soininen (199) no effective algorithm is presented for this operation we have een ale to verify such a construction. 1 The state with no items has een removed from the visualization in Figure 5.

6 11 [S S, λ] [S S, λ] G [S 6 λ S, λ] 1 [S C, ] [S aa, ] [S C, ] 3 [C D, ] [D, ] C 5 [S C, ] D 6 [S S, λ] S 4 [C D, ] D [A B C, ] 8 [C D, ] [D, ] C 1 [A BC, ] B a 18 [J dk, ] [S a A, ] [A BC, ] [B ae, ] A 7 [S aa, ] 19 [F G, d] [G H, d] 6 [H, d] H 7 [G H, d] K G [J d K, ] 17 [K, ] [B a E, ] a [E F J, ] a 9 [F G, d] [F ai, d] B [F G, d] 14 [G H, d] [I B G, d] 3 [G H, d] G 5 [I BG, d] d F [E F J, ] 13 [J dk, ] E [F a I, d] I 15 [I BG, d] [B ae, ] a a [B a E, ] [E F J, ] F 4 [F ai, d] [F G, d] E 8 [B ae, ] J 16 [E F J, ] 1 [B ae, ] [F ai, d] 3 [E F J, ] J [E F J, ] 9 [J dk, ] d [J d K, ] 31 [K, ] K 3 [J dk, ] Figure 5. The LR(1)-machine G 6. Edges generating terminals (relevant for shift-rules) and items with marker at the eginning of the right hand side (relevant for reduce rules) are printed in red. Reduce Rules Shift Rules Reduce Rules d 9 13 d 9 15 d 9 13 d d 15 d d d d 4 9 d 4 15 d 4 9 d 6 d 6 7 d d 3 5 d a a 9 9 a d a a d (19, λ) d 9 (13, d) λ 9 14 (19, d) λ 9 (13, d) λ 4 14 (19, λ) d 4 (9, d) λ 4 14 (19, d) λ 4 (9, d) λ 9 15 (, λ) d 9 (13, d) λ 9 15 (, d) λ 9 (13, d) λ 4 15 (, λ) d 4 (9, d) λ 4 15 (, d) λ 4 (9, d) λ 15 3 (5, λ) d 15 (, d) λ 15 3 (5, d) λ 15 (, d) λ (6, λ) d 6 (7, d) λ (6, d) λ 6 (7, d) λ 14 6 (7, λ) d 14 (19, d) λ 14 6 (7, d) λ 14 (19, d) λ 3 6 (7, λ) d 3 (5, d) λ 3 6 (7, d) λ 3 (5, d) λ 15 4 (8, λ) 15 (3, ) λ 15 4 (8, ) λ 15 (3, ) λ 4 9 (3, λ) 4 (8, ) λ 4 9 (3, ) λ 4 (8, ) λ (31, λ) 31 (3, ) λ (31, ) λ 31 (3, ) λ 9 31 (3, λ) 9 (3, ) λ 9 31 (3, ) λ 9 (3, ) λ Figure 7. The rules of the LR(1)-parser G 8 with initial state 1 and marking set {3, 17} (the nonterminals {4, 5, 7, 8, 1, 1, 16, 18} are no longer reachale) unmarked word. Since the mode of operation we are interested (control of (emedded) discrete event systems), we had to find new proofs to verify that our stronger condition is also satisfied y the generated parser G 7. Step 8: Since DPDA are not capale of terminating the generation y fixing an end-of-output marker, we are modifying the parser G 7 y removing all rules involving the end-of-output marker and y changing the set of marking states such that G 8 (depicted in Figure 7) marks in (s p, w, f) iff some edge s p s has een removed. While it is not mentioned in Sippu and Soisalon-Soininen (199), we discovered that this drastic removal of rules preserves the (un)marked language ecause the parser reaches a configuration in which such an edge is enaled if and only if the stack can e entirely reduced y susequently executed reduce rules. This optimization also speeds up the parsing process using the presented construction in any other context (e.g., parsing of programming languages for which it has originally een designed). Step 9: Since DPDA are not capale of fixing output symols without generating them, we add the fixed output component of a configuration into the state of the configuration. For every shift rule of the form p α p p λ the rules (p, λ) α p (p, λ) λ and (p, α) λ p (p, λ) λ are used. For every reduce rule of the form s p α s p α the Shift Rules (1, λ) a 1 (, λ) λ (1, a) λ 1 (, λ) λ (1, λ) 1 (3, λ) λ (1, ) λ 1 (3, λ) λ (, λ) a (9, λ) λ (, a) λ (9, λ) λ (9, λ) a 9 (15, λ) λ (9, a) λ 9 (15, λ) λ (9, λ) 9 (14, λ) λ (9, ) λ 9 (14, λ) λ (13, λ) d 13 (17, λ) λ (13, d) λ 13 (17, λ) λ (14, λ) 14 (6, λ) λ (14, ) λ 14 (6, λ) λ (15, λ) a 15 (4, λ) λ (15, a) λ 15 (4, λ) λ (3, λ) 3 (6, λ) λ (3, ) λ 3 (6, λ) λ (4, λ) a 4 (15, λ) λ (4, a) λ 4 (15, λ) λ (4, λ) 4 (14, λ) λ (4, ) λ 4 (14, λ) λ (9, λ) d 9 (31, λ) λ (9, d) λ 9 (31, λ) λ Figure 8. The rules of the LR(1)-parser G 9 with initial state 1 and marking set {(3, λ), (17, λ)}. rules s (p, λ) α s (p, α) λ and s (p, α) λ s (p, α) λ are used. The resulting parser G 9 is depicted in Figure 8. It is then possile to verify, that all reachale configurations of the resulting parser G 9 have an empty fixed output component. We call the parser G 9 essentially EDPDA ecause it uses none of the extra capailities of the parser formalism. Step 1: The essentially EDPDA parser G 9 can e translated into the EDPDA G 1 (depicted in Figure 9) y using for every rule of the form s p σ s p λ the edge (p, σ, s 1, s 1, p ). Marking and initial states of G 1 are taken from G 9.

7 a,λ,15 G 1 1λ a,λ,1 λ a,λ, 9λ a,λ,9 15λ 4λ a,λ,4,λ,1,λ,9,λ,4 G 1 a,1,3 1 a,3,6 3 a,6,7 6,1,3 1 λ,,λ,6,7 6 d,,λ a,7, 7; a,5, 5 a,,5,,5 3λ 13d 17λ λ,14 9,9 λ,15 9,9 λ,λ,13 λ,15 4,4 5d 7d λ,6 3,3 d 9d λ,3 15,15 λ,λ,9 19d λ,14 4,4 31λ d,λ,6 λ,6 14,14,λ,31 6λ λ,λ,3,λ,14 14λ 3 8 λ,4 15,15 λ,9 4,4 λ,31 9,9 3 3 Figure 9. The resulting EDPDA G 1 where oviously unreachale states have een removed. Step 11: Since DPDA are not capale of popping strictly more than one symol from the stack, we split such edges into multiple edges to otain the DPDA G 11. To preserve determinism, the splitting of edges with the same source entails the merging of partially identical edges until the recursive split identifies their distinctness. For example, the edges (p, σ, s s, s 1, p 1 ) and (p, σ, s s, s, p ) share a common prefix s on the popping component. Since DPDA are not capale of popping strictly less than one symol from the stack, we modify the automaton y replacing any edge (p, σ, λ, s, p ) with (p, σ, γ, s γ, p) for any γ of the stack alphaet of G 1. For soundness, recall that the stack-ottom-marker can never e removed from the stack. Step 1: Finally, accessiility of states and edges can e enforced y reusing the presented steps 1 4. For a DPDA we are executing steps 1 4. From the productions otained y step 4 we can determine y executing the steps 1 3 ackwards (which are y our construction injective in the sense that for each constructed production/edge x a unique edge e can e determined for which x has een constructed). Using this ackwards computation, we are ale to determine the accessile edges of a DPDA. The accessile states are the sources and edges of any of the accessile edges. The inaccessile states and edges are then removed to otain the DPDA G 1 from Figure 1. We are not aware of comparale constructions ensuring accessiility of DPDA, however, using the decidaility of emptiness from Hopcroft and Ullman (1979) it is possile to test a single (and y that every) edge for accessiility; this approach has een used in Griffin (6). Our approach is superior as we are executing a single test on all edges simultaneously. Verification: The soundness of the presented algorithm (w.r.t. the prolem Definition 4) has een verified in the interactive theorem prover Isaelle/HOL (Paulson et al., 11) apart from the following steps for which only penand-paper proofs exist yet and which are to e completed λ,7,8 7 λ,7,7 λ,7,7 λ,5,5 Figure 1. The resulting DPDA G 1. d,4,λ λ,5,5,5,4 5;,7,4 7,5,λ λ,, in Isaelle/HOL in the near future: (i) the CFG otained in step 4 is an LR(1) grammar (satisfied according to Knuth (1965)), (ii) the Parser otained in step 7 is deterministic if G 5 is an LR(1) grammar (satisfied according to Sippu and Soisalon-Soininen (199)), (iii) step 11, and (iv) step 1. From these tasks however, only the first appears to e complicated. Testing: The presented algorithm has een implemented in Java for rapid prototyping and in C++ as a plugin to the lifaudes (6-13) tool. The implementations have een used successfully for many examples including the running example of this paper. Optimizations: The algorithm can e optimized in different ways. (i) The runtime of the algorithm depends primarily on the steps 3 and 4 ecause G 3 would have an enormous amount of productions. We can greatly restrict the set of productions to e generated y exploiting the structure of the input DPDA using the reachaility overapproximation presented on page 4. (ii) Furthermore, steps 3 and 4 can e merged such that only productions are generated which are coaccessile. This alternative trades runtime for space-requirements (the size of G 4 is usually not much greater than G 1 ut the runtime is increased y the length of the longest derivation necessary in G to reach all states). (iii) Another optimization merges adjacent edges in EDPDA which are intermediate results. This optimization decreases the runtime of the susequently executed operations. The formal definition and verification in Isaelle/HOL of such intermediate operations is left for future work. 4. CONCLUSION The algorithm presented in this paper optimizes the ehavior of a DPDA whilst preserving its marked language y first translating the DPDA into another model (LR(1) grammars) in which the desired properties can e enforced using simple constructions and y translating the otained solution ack into DPDA while preserving the desired properties. The algorithm guarantees accessiility (every state and every edge is required for some marking derivation), lifelockfreeness (there is no initial derivation executing infinitely many steps without generating an output symol), deadlockfreeness (non-extendale initial derivations are ending in marking states), and finally the operational lockfreeness (every initial derivation can e extended into a marking derivation).

8 The operational lockfreeness is sufficient to conclude that the unmarked language is the prefix closure of the marked language of the resulting DPDA. The algorithm does not minimize the size of the automaton, in fact, the size of the resulting DPDA is usually increased and is growing according to Geller et al. (1975) in some cases exponentially. The algorithm presented here is a crucial part of the presented solution of the supervisory control prolem for DFA plants and DPDA specifications which is reduced (in the companion paper y Schneider, Schmuck, Raisch, and Nestmann (14)) to the effective implementaility of ensuring lockfreeness (solved in this paper) and ensuring controllaility (solved in the companion paper y Schmuck, Schneider, Raisch, and Nestmann (14)). 5. FUTURE WORK Petri nets: Since the prolem of estalishing lockfreeness is unsolvale for standard Petri net classes (Giua and DiCesare, 1994, 1995), we intend to determine Petri net classes P that can e translated (preserving the marked language) into a DPDA G such that the DPDA generated y our algorithm G can e translated ack into a Petri net from P to solve the prolem for such a Petri net class. Visily Pushdown Tree Automata (VPTA): VPTA introduced y Chain and Réty (7) are the greatest known suclass of DPDA which are closed under intersection. For the context of the Supervisory Control Theory we intend to determine an algorithm which solves the prolem from Definition 4 for VPTA ecause (i) plant and controller can then e generated y VPTA, while this decreases the expressiveness for the controller language it also increases the expressiveness for the plant language, and (ii) the closed loop is again a VPTA, which allows for the iterative restriction of a plant language y horizontal composition of controllers. The algorithm presented here may e reusale: the output of the algorithm, when executed on a VPTA, may e (convertile) into a VPTA. Therefore, when using VPTA for plants, specifications, and controllers, the supervisory controller synthesis can e extended to yet another domain. Nondeterminism: For the context of the Supervisory Control Theory there is no reason to restrict oneself to deterministic controllers. However, for these systems the desired property of operational lockfreeness is not guaranteed for language lockfree controllers. Therefore, when extending the domain of the algorithm to PDA the proofs will ecome more complex as the preservation of marked and unmarked language is no longer sufficient for the preservation of the operational lockfreeness as discussed in Schneider et al. (14). Geller, M.M., III, H.B.H., Szymanski, T.G., and Ullman, J.D. (1975). Economy of descriptions y parsers, dpda s, and pda s. In FOCS, IEEE Computer Society. Ginsurg, S. and Greiach, S.A. (1966). Deterministic context free languages. Information and Control, 9(6), Giua, A. and DiCesare, F. (1994). Blocking and controllaility of petri nets in supervisory control. IEEE Transactions on Automatic Control, 39(4), doi: 1.119/ Giua, A. and DiCesare, F. (1995). Decidaility and closure properties of weak petri net languages in supervisory control. IEEE Transactions on Automatic Control, 4(5), doi:1.119/ Griffin, C. (6). A note on deciding controllaility in pushdown systems. IEEE Transactions on Automatic Control, 51(), Hopcroft, J.E. and Ullman, J.D. (1979). Introduction to Automata Theory, languages and computation. Addison-Wesley Pulishing company. Knuth, D.E. (1965). On the translation of languages from left to rigth. Information and Control, 8(6), lifaudes (6-13). Software lirary for discrete event systems. URL uni-erlangen.de/fgdes/faudes. Paulson, L., Nipkow, T., and Wenzel, M. (11). Isaelle/HOL. URL Schmuck, A.-K., Schneider, S., Raisch, J., and Nestmann, U. (14). Extending supervisory controller synthesis to deterministic pushdown automata enforcing controllaility least restrictively. WODES 14. Schneider, S. and Schmuck, A.-K. (13). Supervisory controller synthesis for deterministic pushdown automata specifications. Technical report, Technical University of Berlin, URL Schneider, S., Schmuck, A.-K., Raisch, J., and Nestmann, U. (14). Reducing an operational supervisory control prolem y decomposition for deterministic pushdown automata. WODES 14. Sippu, S. and Soisalon-Soininen, E. (199). Parsing Theory, volume II: LR(k) and LL(k) Parsing of EATCS Monographs on Theoretical Computer Science. Springer- Verlag. REFERENCES Aho, A.V. and Ullman, J.D. (197). The theory of parsing, translation, and compiling. Prentice-Hall, Inc., Upper Saddle River, NJ, USA. Chain, J. and Réty, P. (7). Visily pushdown languages and term rewriting. In B. Konev and F. Wolter (eds.), FroCoS, volume 47 of Lecture Notes in Computer Science, Springer.

CS 4120 Lecture 3 Automating lexical analysis 29 August 2011 Lecturer: Andrew Myers. 1 DFAs

CS 4120 Lecture 3 Automating lexical analysis 29 August 2011 Lecturer: Andrew Myers. 1 DFAs CS 42 Lecture 3 Automating lexical analysis 29 August 2 Lecturer: Andrew Myers A lexer generator converts a lexical specification consisting of a list of regular expressions and corresponding actions into

More information

Extending Supervisory Controller Synthesis to Deterministic Pushdown Automata Enforcing Controllability Least Restrictively

Extending Supervisory Controller Synthesis to Deterministic Pushdown Automata Enforcing Controllability Least Restrictively 12th IFAC/IEEE Workshop on Discrete Event Systems Extending Supervisory Controller Synthesis to Deterministic Pushdown Automata Enforcing Controllability Least Restrictively A.-K. Schmuck S. Schneider

More information

Plan for Today and Beginning Next week (Lexical Analysis)

Plan for Today and Beginning Next week (Lexical Analysis) Plan for Today and Beginning Next week (Lexical Analysis) Regular Expressions Finite State Machines DFAs: Deterministic Finite Automata Complications NFAs: Non Deterministic Finite State Automata From

More information

Computational Models - Lecture 4

Computational Models - Lecture 4 Computational Models - Lecture 4 Regular languages: The Myhill-Nerode Theorem Context-free Grammars Chomsky Normal Form Pumping Lemma for context free languages Non context-free languages: Examples Push

More information

Pushdown Automata (2015/11/23)

Pushdown Automata (2015/11/23) Chapter 6 Pushdown Automata (2015/11/23) Sagrada Familia, Barcelona, Spain Outline 6.0 Introduction 6.1 Definition of PDA 6.2 The Language of a PDA 6.3 Euivalence of PDA s and CFG s 6.4 Deterministic PDA

More information

Foundations of Informatics: a Bridging Course

Foundations of Informatics: a Bridging Course Foundations of Informatics: a Bridging Course Week 3: Formal Languages and Semantics Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen University noll@cs.rwth-aachen.de http://www.b-it-center.de/wob/en/view/class211_id948.html

More information

CMSC 330: Organization of Programming Languages. Pushdown Automata Parsing

CMSC 330: Organization of Programming Languages. Pushdown Automata Parsing CMSC 330: Organization of Programming Languages Pushdown Automata Parsing Chomsky Hierarchy Categorization of various languages and grammars Each is strictly more restrictive than the previous First described

More information

Pushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen

Pushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen Pushdown Automata Notes on Automata and Theory of Computation Chia-Ping Chen Department of Computer Science and Engineering National Sun Yat-Sen University Kaohsiung, Taiwan ROC Pushdown Automata p. 1

More information

Optimal Routing in Chord

Optimal Routing in Chord Optimal Routing in Chord Prasanna Ganesan Gurmeet Singh Manku Astract We propose optimal routing algorithms for Chord [1], a popular topology for routing in peer-to-peer networks. Chord is an undirected

More information

Prof. Mohamed Hamada Software Engineering Lab. The University of Aizu Japan

Prof. Mohamed Hamada Software Engineering Lab. The University of Aizu Japan Language Processing Systems Prof. Mohamed Hamada Software Engineering La. The University of izu Japan Syntax nalysis (Parsing) 1. Uses Regular Expressions to define tokens 2. Uses Finite utomata to recognize

More information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 2 Parity Games, Tree Automata, and S2S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong S2S 14-19 June

More information

The WHILE Hierarchy of Program Schemes is Infinite

The WHILE Hierarchy of Program Schemes is Infinite The WHILE Hierarchy of Program Schemes is Infinite Can Adam Alayrak and Thomas Noll RWTH Aachen Ahornstr. 55, 52056 Aachen, Germany alayrak@informatik.rwth-aachen.de and noll@informatik.rwth-aachen.de

More information

Π( ) Π( ) Π( ) A ε. b b. (d) (c) (a) (b)

Π( ) Π( ) Π( ) A ε. b b. (d) (c) (a) (b) Top-Down Parsing of Conjunctive Languages Alexander Okhotin (okhotin@aha.ru) Faculty of Computational Mathematics and Cyernetics, Moscow State University Astract. This paper generalizes the notion of a

More information

1.3 Regular Expressions

1.3 Regular Expressions 51 1.3 Regular Expressions These have an important role in descriing patterns in searching for strings in many applications (e.g. awk, grep, Perl,...) All regular expressions of alphaet are 1.Øand are

More information

MA/CSSE 474 Theory of Computation

MA/CSSE 474 Theory of Computation MA/CSSE 474 Theory of Computation CFL Hierarchy CFL Decision Problems Your Questions? Previous class days' material Reading Assignments HW 12 or 13 problems Anything else I have included some slides online

More information

Administrivia. Test I during class on 10 March. Bottom-Up Parsing. Lecture An Introductory Example

Administrivia. Test I during class on 10 March. Bottom-Up Parsing. Lecture An Introductory Example Administrivia Test I during class on 10 March. Bottom-Up Parsing Lecture 11-12 From slides by G. Necula & R. Bodik) 2/20/08 Prof. Hilfinger CS14 Lecture 11 1 2/20/08 Prof. Hilfinger CS14 Lecture 11 2 Bottom-Up

More information

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages and and Department of Computer Science and Information Systems Birkbeck, University of London ptw@dcs.bbk.ac.uk Outline and Doing and analysing problems/languages computability/solvability/decidability

More information

Pseudo-automata for generalized regular expressions

Pseudo-automata for generalized regular expressions Pseudo-automata for generalized regular expressions B. F. Melnikov A. A. Melnikova Astract In this paper we introduce a new formalism which is intended for representing a special extensions of finite automata.

More information

Computational Models - Lecture 5 1

Computational Models - Lecture 5 1 Computational Models - Lecture 5 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 10/22, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet: Languages 1 Languages A language is a set of strings String: A sequence of letters Examples: cat, dog, house, Defined over an alphaet: a,, c,, z 2 Alphaets and Strings We will use small alphaets: Strings

More information

CPS 220 Theory of Computation Pushdown Automata (PDA)

CPS 220 Theory of Computation Pushdown Automata (PDA) CPS 220 Theory of Computation Pushdown Automata (PDA) Nondeterministic Finite Automaton with some extra memory Memory is called the stack, accessed in a very restricted way: in a First-In First-Out fashion

More information

Program Analysis. Lecture 5. Rayna Dimitrova WS 2016/2017

Program Analysis. Lecture 5. Rayna Dimitrova WS 2016/2017 Program Analysis Lecture 5 Rayna Dimitrova WS 2016/2017 2/21 Recap: Constant propagation analysis Goal: For each program point, determine whether a variale has a constant value whenever an execution reaches

More information

LR2: LR(0) Parsing. LR Parsing. CMPT 379: Compilers Instructor: Anoop Sarkar. anoopsarkar.github.io/compilers-class

LR2: LR(0) Parsing. LR Parsing. CMPT 379: Compilers Instructor: Anoop Sarkar. anoopsarkar.github.io/compilers-class LR2: LR(0) Parsing LR Parsing CMPT 379: Compilers Instructor: Anoop Sarkar anoopsarkar.github.io/compilers-class Parsing - Roadmap Parser: decision procedure: builds a parse tree Top-down vs. bottom-up

More information

Pushdown Automata: Introduction (2)

Pushdown Automata: Introduction (2) Pushdown Automata: Introduction Pushdown automaton (PDA) M = (K, Σ, Γ,, s, A) where K is a set of states Σ is an input alphabet Γ is a set of stack symbols s K is the start state A K is a set of accepting

More information

Reversal of regular languages and state complexity

Reversal of regular languages and state complexity Reversal of regular languages and state complexity Juraj Šeej Institute of Computer Science, Faculty of Science, P. J. Šafárik University Jesenná 5, 04001 Košice, Slovakia juraj.seej@gmail.com Astract.

More information

Pushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen

Pushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen Pushdown automata Twan van Laarhoven Institute for Computing and Information Sciences Intelligent Systems Version: fall 2014 T. van Laarhoven Version: fall 2014 Formal Languages, Grammars and Automata

More information

UNIT-VIII COMPUTABILITY THEORY

UNIT-VIII COMPUTABILITY THEORY CONTEXT SENSITIVE LANGUAGE UNIT-VIII COMPUTABILITY THEORY A Context Sensitive Grammar is a 4-tuple, G = (N, Σ P, S) where: N Set of non terminal symbols Σ Set of terminal symbols S Start symbol of the

More information

Theory of Computation (IV) Yijia Chen Fudan University

Theory of Computation (IV) Yijia Chen Fudan University Theory of Computation (IV) Yijia Chen Fudan University Review language regular context-free machine DFA/ NFA PDA syntax regular expression context-free grammar Pushdown automata Definition A pushdown automaton

More information

October 6, Equivalence of Pushdown Automata with Context-Free Gramm

October 6, Equivalence of Pushdown Automata with Context-Free Gramm Equivalence of Pushdown Automata with Context-Free Grammar October 6, 2013 Motivation Motivation CFG and PDA are equivalent in power: a CFG generates a context-free language and a PDA recognizes a context-free

More information

Lecture VII Part 2: Syntactic Analysis Bottom-up Parsing: LR Parsing. Prof. Bodik CS Berkley University 1

Lecture VII Part 2: Syntactic Analysis Bottom-up Parsing: LR Parsing. Prof. Bodik CS Berkley University 1 Lecture VII Part 2: Syntactic Analysis Bottom-up Parsing: LR Parsing. Prof. Bodik CS 164 -- Berkley University 1 Bottom-Up Parsing Bottom-up parsing is more general than topdown parsing And just as efficient

More information

CS Pushdown Automata

CS Pushdown Automata Chap. 6 Pushdown Automata 6.1 Definition of Pushdown Automata Example 6.2 L ww R = {ww R w (0+1) * } Palindromes over {0, 1}. A cfg P 0 1 0P0 1P1. Consider a FA with a stack(= a Pushdown automaton; PDA).

More information

Finite Automata and Regular Languages (part II)

Finite Automata and Regular Languages (part II) Finite Automata and Regular Languages (part II) Prof. Dan A. Simovici UMB 1 / 25 Outline 1 Nondeterministic Automata 2 / 25 Definition A nondeterministic finite automaton (ndfa) is a quintuple M = (A,

More information

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor 60-354, Theory of Computation Fall 2013 Asish Mukhopadhyay School of Computer Science University of Windsor Pushdown Automata (PDA) PDA = ε-nfa + stack Acceptance ε-nfa enters a final state or Stack is

More information

3515ICT: Theory of Computation. Regular languages

3515ICT: Theory of Computation. Regular languages 3515ICT: Theory of Computation Regular languages Notation and concepts concerning alphabets, strings and languages, and identification of languages with problems (H, 1.5). Regular expressions (H, 3.1,

More information

CPS 220 Theory of Computation

CPS 220 Theory of Computation CPS 22 Theory of Computation Review - Regular Languages RL - a simple class of languages that can be represented in two ways: 1 Machine description: Finite Automata are machines with a finite number of

More information

Everything You Always Wanted to Know About Parsing

Everything You Always Wanted to Know About Parsing Everything You Always Wanted to Know About Parsing Part V : LR Parsing University of Padua, Italy ESSLLI, August 2013 Introduction Parsing strategies classified by the time the associated PDA commits to

More information

Pushdown Automata (Pre Lecture)

Pushdown Automata (Pre Lecture) Pushdown Automata (Pre Lecture) Dr. Neil T. Dantam CSCI-561, Colorado School of Mines Fall 2017 Dantam (Mines CSCI-561) Pushdown Automata (Pre Lecture) Fall 2017 1 / 41 Outline Pushdown Automata Pushdown

More information

arxiv: v1 [cs.ds] 9 Apr 2018

arxiv: v1 [cs.ds] 9 Apr 2018 From Regular Expression Matching to Parsing Philip Bille Technical University of Denmark phbi@dtu.dk Inge Li Gørtz Technical University of Denmark inge@dtu.dk arxiv:1804.02906v1 [cs.ds] 9 Apr 2018 Abstract

More information

Fundamentele Informatica II

Fundamentele Informatica II Fundamentele Informatica II Answer to selected exercises 5 John C Martin: Introduction to Languages and the Theory of Computation M.M. Bonsangue (and J. Kleijn) Fall 2011 5.1.a (q 0, ab, Z 0 ) (q 1, b,

More information

Ahmed Nazeem and Spyros Reveliotis

Ahmed Nazeem and Spyros Reveliotis Designing compact and maximally permissive deadlock avoidance policies for complex resource allocation systems through classification theory: the non-linear case Ahmed Nazeem and Spyros Reveliotis Astract

More information

Automata Theory (2A) Young Won Lim 5/31/18

Automata Theory (2A) Young Won Lim 5/31/18 Automata Theory (2A) Copyright (c) 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

Chapter 4: Bottom-up Analysis 106 / 338

Chapter 4: Bottom-up Analysis 106 / 338 Syntactic Analysis Chapter 4: Bottom-up Analysis 106 / 338 Bottom-up Analysis Attention: Many grammars are not LL(k)! A reason for that is: Definition Grammar G is called left-recursive, if A + A β for

More information

UNIT-VI PUSHDOWN AUTOMATA

UNIT-VI PUSHDOWN AUTOMATA Syllabus R09 Regulation UNIT-VI PUSHDOWN AUTOMATA The context free languages have a type of automaton that defined them. This automaton, called a pushdown automaton, is an extension of the nondeterministic

More information

Context-Free Languages (Pre Lecture)

Context-Free Languages (Pre Lecture) Context-Free Languages (Pre Lecture) Dr. Neil T. Dantam CSCI-561, Colorado School of Mines Fall 2017 Dantam (Mines CSCI-561) Context-Free Languages (Pre Lecture) Fall 2017 1 / 34 Outline Pumping Lemma

More information

#A50 INTEGERS 14 (2014) ON RATS SEQUENCES IN GENERAL BASES

#A50 INTEGERS 14 (2014) ON RATS SEQUENCES IN GENERAL BASES #A50 INTEGERS 14 (014) ON RATS SEQUENCES IN GENERAL BASES Johann Thiel Dept. of Mathematics, New York City College of Technology, Brooklyn, New York jthiel@citytech.cuny.edu Received: 6/11/13, Revised:

More information

Parsing -3. A View During TD Parsing

Parsing -3. A View During TD Parsing Parsing -3 Deterministic table-driven parsing techniques Pictorial view of TD and BU parsing BU (shift-reduce) Parsing Handle, viable prefix, items, closures, goto s LR(k): SLR(1), LR(1) Problems with

More information

THEORY OF COMPILATION

THEORY OF COMPILATION Lecture 04 Syntax analysis: top-down and bottom-up parsing THEORY OF COMPILATION EranYahav 1 You are here Compiler txt Source Lexical Analysis Syntax Analysis Parsing Semantic Analysis Inter. Rep. (IR)

More information

Computational Models - Lecture 3

Computational Models - Lecture 3 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models - Lecture 3 Equivalence of regular expressions and regular languages (lukewarm leftover

More information

EXAM. CS331 Compiler Design Spring Please read all instructions, including these, carefully

EXAM. CS331 Compiler Design Spring Please read all instructions, including these, carefully EXAM Please read all instructions, including these, carefully There are 7 questions on the exam, with multiple parts. You have 3 hours to work on the exam. The exam is open book, open notes. Please write

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 15 Ana Bove May 17th 2018 Recap: Context-free Languages Chomsky hierarchy: Regular languages are also context-free; Pumping lemma

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automata and Formal Language Theory Course Notes Part II: The Recognition Problem (II) Chapter II.4.: Properties of Regular Languages (13) Anton Setzer (Based on a book draft by J. V. Tucker and

More information

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed HKN CS/ECE 374 Midterm 1 Review Nathan Bleier and Mahir Morshed For the most part, all about strings! String induction (to some extent) Regular languages Regular expressions (regexps) Deterministic finite

More information

SUFFIX TREE. SYNONYMS Compact suffix trie

SUFFIX TREE. SYNONYMS Compact suffix trie SUFFIX TREE Maxime Crochemore King s College London and Université Paris-Est, http://www.dcs.kcl.ac.uk/staff/mac/ Thierry Lecroq Université de Rouen, http://monge.univ-mlv.fr/~lecroq SYNONYMS Compact suffix

More information

Chapter 1. Formal Definition and View. Lecture Formal Pushdown Automata on the 28th April 2009

Chapter 1. Formal Definition and View. Lecture Formal Pushdown Automata on the 28th April 2009 Chapter 1 Formal and View Lecture on the 28th April 2009 Formal of PA Faculty of Information Technology Brno University of Technology 1.1 Aim of the Lecture 1 Define pushdown automaton in a formal way

More information

Compiler Construction Lent Term 2015 Lectures (of 16)

Compiler Construction Lent Term 2015 Lectures (of 16) Compiler Construction Lent Term 2015 Lectures 13 --- 16 (of 16) 1. Return to lexical analysis : application of Theory of Regular Languages and Finite Automata 2. Generating Recursive descent parsers 3.

More information

CISC4090: Theory of Computation

CISC4090: Theory of Computation CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter

More information

Compiler Construction Lent Term 2015 Lectures (of 16)

Compiler Construction Lent Term 2015 Lectures (of 16) Compiler Construction Lent Term 2015 Lectures 13 --- 16 (of 16) 1. Return to lexical analysis : application of Theory of Regular Languages and Finite Automata 2. Generating Recursive descent parsers 3.

More information

Ludwig Staiger Martin-Luther-Universität Halle-Wittenberg Hideki Yamasaki Hitotsubashi University

Ludwig Staiger Martin-Luther-Universität Halle-Wittenberg Hideki Yamasaki Hitotsubashi University CDMTCS Research Report Series A Simple Example of an ω-language Topologically Inequivalent to a Regular One Ludwig Staiger Martin-Luther-Universität Halle-Wittenerg Hideki Yamasaki Hitotsuashi University

More information

Computational Models: Class 5

Computational Models: Class 5 Computational Models: Class 5 Benny Chor School of Computer Science Tel Aviv University March 27, 2019 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay

More information

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova. Introduction to the Theory of Computation Automata 1VO + 1PS Lecturer: Dr. Ana Sokolova http://cs.uni-salzburg.at/~anas/ Setup and Dates Lectures and Instructions 23.10. 3.11. 17.11. 24.11. 1.12. 11.12.

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic and Theory of Computing Fuhua (Frank) Cheng Department of Computer Science University of Kentucky 1 Tale of Contents: Week 1: Preliminaries (set alger relations, functions) (read Chapters

More information

Introduction to Theory of Computing

Introduction to Theory of Computing CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 28, 2003 These supplementary notes review the notion of an inductive definition and give

More information

Branching Bisimilarity with Explicit Divergence

Branching Bisimilarity with Explicit Divergence Branching Bisimilarity with Explicit Divergence Ro van Glaeek National ICT Australia, Sydney, Australia School of Computer Science and Engineering, University of New South Wales, Sydney, Australia Bas

More information

This is a repository copy of Attributed Graph Transformation via Rule Schemata : Church-Rosser Theorem.

This is a repository copy of Attributed Graph Transformation via Rule Schemata : Church-Rosser Theorem. This is a repository copy of Attriuted Graph Transformation via Rule Schemata : Church-Rosser Theorem. White Rose Research Online URL for this paper: http://eprints.whiterose.ac.uk/9/ Version: Accepted

More information

Einführung in die Computerlinguistik

Einführung in die Computerlinguistik Einführung in die Computerlinguistik Context-Free Grammars (CFG) Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Summer 2016 1 / 22 CFG (1) Example: Grammar G telescope : Productions: S NP VP NP

More information

Alan Bundy. Automated Reasoning LTL Model Checking

Alan Bundy. Automated Reasoning LTL Model Checking Automated Reasoning LTL Model Checking Alan Bundy Lecture 9, page 1 Introduction So far we have looked at theorem proving Powerful, especially where good sets of rewrite rules or decision procedures have

More information

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova. Introduction to the Theory of Computation Automata 1VO + 1PS Lecturer: Dr. Ana Sokolova http://cs.uni-salzburg.at/~anas/ Setup and Dates Lectures Tuesday 10:45 pm - 12:15 pm Instructions Tuesday 12:30

More information

What we have done so far

What we have done so far What we have done so far DFAs and regular languages NFAs and their equivalence to DFAs Regular expressions. Regular expressions capture exactly regular languages: Construct a NFA from a regular expression.

More information

Distributed Timed Automata with Independently Evolving Clocks

Distributed Timed Automata with Independently Evolving Clocks Distriuted Timed Automata with Independently Evolving Clocks S. Akshay,3, Benedikt Bollig, Paul Gastin, Madhavan Mukund 2, and K. Narayan Kumar 2 LSV, ENS Cachan, CNRS, France {akshay,ollig,gastin}@lsv.ens-cachan.fr

More information

Simplification of finite automata

Simplification of finite automata Simplification of finite automata Lorenzo Clemente (University of Warsaw) based on joint work with Richard Mayr (University of Edinburgh) Warsaw, November 2016 Nondeterministic finite automata We consider

More information

M = (Q,Σ,δ,q 0,F) Σ is the alphabet over which the transitions are defined.

M = (Q,Σ,δ,q 0,F) Σ is the alphabet over which the transitions are defined. LECTURE 23 10.1 Formal Definition of a DFA Definition 10.1 A Deterministic Finite Automaton (DFA) M, is a five-tuple: where M = (Q,Σ,δ, 0,F) Q is a finite set of states. It is important that the set of

More information

SCHEME FOR INTERNAL ASSESSMENT TEST 3

SCHEME FOR INTERNAL ASSESSMENT TEST 3 SCHEME FOR INTERNAL ASSESSMENT TEST 3 Max Marks: 40 Subject& Code: Automata Theory & Computability (15CS54) Sem: V ISE (A & B) Note: Answer any FIVE full questions, choosing one full question from each

More information

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u,

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, 1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, v, x, y, z as per the pumping theorem. 3. Prove that

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 2 Define push down automata Trace the computation of a push down automaton Design

More information

Lecture 17: Language Recognition

Lecture 17: Language Recognition Lecture 17: Language Recognition Finite State Automata Deterministic and Non-Deterministic Finite Automata Regular Expressions Push-Down Automata Turing Machines Modeling Computation When attempting to

More information

Final exam study sheet for CS3719 Turing machines and decidability.

Final exam study sheet for CS3719 Turing machines and decidability. Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,

More information

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs Harry Lewis October 8, 2013 Reading: Sipser, pp. 119-128. Pushdown Automata (review) Pushdown Automata = Finite automaton

More information

Languages, regular languages, finite automata

Languages, regular languages, finite automata Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,

More information

Automata Theory and Formal Grammars: Lecture 1

Automata Theory and Formal Grammars: Lecture 1 Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)

More information

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY No part of this publication may be reproduced or distributed in any form or any means, electronic, mechanical, photocopying, or otherwise without the prior permission of the author. GATE SOLVED PAPER Computer

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 September 2, 2004 These supplementary notes review the notion of an inductive definition and

More information

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages

More information

Deterministic PDA s. Deepak D Souza. 21 October Department of Computer Science and Automation Indian Institute of Science, Bangalore.

Deterministic PDA s. Deepak D Souza. 21 October Department of Computer Science and Automation Indian Institute of Science, Bangalore. Deterministic PDA s Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 21 October 2011 Outline 1 Deterministic PDA s 2 Closure properties of DCFL s 3 Complementing

More information

What You Must Remember When Processing Data Words

What You Must Remember When Processing Data Words What You Must Remember When Processing Data Words Michael Benedikt, Clemens Ley, and Gabriele Puppis Oxford University Computing Laboratory, Park Rd, Oxford OX13QD UK Abstract. We provide a Myhill-Nerode-like

More information

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège Temporal logics and explicit-state model checking Pierre Wolper Université de Liège 1 Topics to be covered Introducing explicit-state model checking Finite automata on infinite words Temporal Logics and

More information

Computational Models: Class 3

Computational Models: Class 3 Computational Models: Class 3 Benny Chor School of Computer Science Tel Aviv University November 2, 2015 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Stavros Tripakis Abstract We introduce problems of decentralized control with communication, where we explicitly

More information

Chapter 4: Computation tree logic

Chapter 4: Computation tree logic INFOF412 Formal verification of computer systems Chapter 4: Computation tree logic Mickael Randour Formal Methods and Verification group Computer Science Department, ULB March 2017 1 CTL: a specification

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation LECTURE 7 Last time: Proving a language is not regular Pushdown automata (PDAs) Today: Context-free grammars (CFG) Equivalence of CFGs and PDAs Sofya Raskhodnikova 1/31/2016

More information

arxiv: v1 [cs.fl] 4 Feb 2013

arxiv: v1 [cs.fl] 4 Feb 2013 Incomplete Transition Complexity of Basic Operations on Finite Languages Eva Maia, Nelma Moreira, Rogério Reis arxiv:1302.0750v1 [cs.fl] 4 Fe 2013 CMUP & DCC, Faculdade de Ciências da Universidade do Porto

More information

Online Timed Pattern Matching using Automata

Online Timed Pattern Matching using Automata Online Timed Pattern Matching using Automata Alexey Bakhirkin, Thomas Ferrère, Dejan Nickovic 3, Oded Maler, and Eugene Asarin 4 Univ. Grenole Alpes, CNRS, Grenole INP, VERIMAG, 38000 Grenole, France IST

More information

The Idea of a Pushdown Automaton

The Idea of a Pushdown Automaton Pushdown Automata 5DV037 Fundamentals of Computer Science Umeå University Department of Computing Science Stephen J. Hegner hegner@cs.umu.se http://www.cs.umu.se/~hegner The Idea of a Pushdown Automaton

More information

Push-down Automata = FA + Stack

Push-down Automata = FA + Stack Push-down Automata = FA + Stack PDA Definition A push-down automaton M is a tuple M = (Q,, Γ, δ, q0, F) where Q is a finite set of states is the input alphabet (of terminal symbols, terminals) Γ is the

More information

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,

More information

Turing machines and linear bounded automata

Turing machines and linear bounded automata and linear bounded automata Informatics 2A: Lecture 29 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 25 November, 2011 1 / 13 1 The Chomsky hierarchy: summary 2 3 4 2 / 13

More information

On Stateless Multicounter Machines

On Stateless Multicounter Machines On Stateless Multicounter Machines Ömer Eğecioğlu and Oscar H. Ibarra Department of Computer Science University of California, Santa Barbara, CA 93106, USA Email: {omer, ibarra}@cs.ucsb.edu Abstract. We

More information

Dense-Timed Pushdown Automata

Dense-Timed Pushdown Automata Dense-Timed Pushdown Automata Parosh Aziz Abdulla Uppsala University Sweden Mohamed Faouzi Atig Uppsala University Sweden Jari Stenman Uppsala University Sweden Abstract We propose a model that captures

More information

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013 Q.2 a. Prove by mathematical induction n 4 4n 2 is divisible by 3 for n 0. Basic step: For n = 0, n 3 n = 0 which is divisible by 3. Induction hypothesis: Let p(n) = n 3 n is divisible by 3. Induction

More information

CS481F01 Prelim 2 Solutions

CS481F01 Prelim 2 Solutions CS481F01 Prelim 2 Solutions A. Demers 7 Nov 2001 1 (30 pts = 4 pts each part + 2 free points). For this question we use the following notation: x y means x is a prefix of y m k n means m n k For each of

More information