Reachability Analysis of Pushdown Automata with an Upper Stack

Size: px
Start display at page:

Download "Reachability Analysis of Pushdown Automata with an Upper Stack"

Transcription

1 Reachability Analysis of Pushdown Automata with an Upper Stack Adrien Pommellet 1 Marcio Diaz 1 Tayssir Touili 2 1 Université Paris-Diderot and LIPN, France 2 LIPN, CNRS, and Université Paris 13, France March 8, 2017

2 Pushdown Systems Pushdown Systems (PDSs) are often used to model programs with unbounded recursion, but can fail to accurately represent the actual stack Figure 1: An assembly stack

3 The Limits of PDSs Figure 2: The stack Figure 3: A simple PDS stack

4 The Limits of PDSs Figure 4: The stack Figure 5: The stack after a push Figure 6: A simple PDS stack Figure 7: A PDS after a push We push a value on the stack.

5 The Limits of PDSs Figure 8: The stack Figure 9: The stack after a push Figure 10: The stack after a pop Figure 11: A simple PDS stack Figure 12: A PDS after a push Figure 13: A PDS after a pop We pop a value from the stack.

6 The Limits of PDSs Figure 14: The stack Figure 15: The stack after a push Figure 16: The stack after a pop Figure 17: A simple PDS stack Figure 18: A PDS after a push Figure 19: A PDS after a pop How can we handle the instruction mov eax [ 4]?

7 An idea Our intuition is to use another stack to model the memory section left of the stack pointer Figure 20: The assembly stack Figure 21: Its PDS representation Figure 22: Using two stacks

8 A New Model Figure 23: The stack Figure 24: The stack after a push Figure 25: The stack after a pop Figure 26: Lower and upper stacks Figure 27: After a push Figure 28: After a pop

9 Pushdown Systems with an Upper Stack Denition (Pushdown system with an upper stack) A pushdown system with an upper stack (UPDS) is a triplet P = (P, Γ, ) where P is a nite set of control states, Γ is a nite stack alphabet, and P Γ P ( {ε} Γ Γ 2) a nite set of transition rules. We consider congurations of the form p, w u, w l, with a write-only upper stack. Let Γ be a copy of the stack alphabet Γ. Assuming there is only a single state in P, we can represent a conguration as a single word in Γ Γ : p, abc, def ā b cdef

10 Semantics of Pop Rules For a pop rule δ = (p, b) (p, ε): a p b c d δ a b p' c d... a b c d a b c d...

11 Semantics of Push Rules For a push rule δ = (p, b) (p, ab): x y p b c δ x p' a b c... x y b c x a b c...

12 The Reachability Problem What are the sets of predecessors pre and successors post of a regular set of congurations of a UPDS? Can we compute them? Are they regular, like the lower stack congurations, as shown by Caucal (CAAP'90), Bouajjani et al. (CONCUR'97), and Earza et al. (CAV'00)?

13 Reachability Properties of UPDSs Theorem There exist a UPDS P and a regular set of congurations C for which post (C) is not regular. Theorem There exist a UPDS P and a regular set of congurations C for which pre (C) is not regular. Theorem Given a UPDS P, a regular set of congurations C, and a conguration c of P, we can decide whether c post (P, C) or not.

14 A Counter-Example of Regularity for post We consider the UPDS P : (R a ) (p, a) (p, ε) (R b ) (p, b) (p, ε) (C) (p, a) (p, ab) And the regular set C = {p} {ε} a (ba). p a b a b a Figure 29: A conguration in C

15 A Relevant Subset of post We consider the subset L = { p, a n+1, b n, n N } post (C). p a b a b a a p a b b a R ar b a b p a b a R ar b R b a a b b p a C CC a a p a b b R a a a a p b b L (R a ) (p, a) (p, ε) (R b ) (p, b) (p, ε) (C) (p, a) (p, ab)

16 A Constraint on post For any reachable conguration p, w u, w l and the word w = w u w l, the inequality w b + w b + 1 w a + w ā holds. The inequality holds on the starting conguration C = {p} {ε} a (ba). The rules (R a ) = (p, a) (p, ε) and (R b ) = (p, b) (p, ε) do not change the number of occurences of the letter a on the whole stack. The rule (C) = (p, a) (p, ab) can make it smaller.

17 Applying the Pumping Lemma If we suppose that post (C) is regular, let k be its pumping length. We consider the word w = a k+1 b k of the language L. We apply the pumping lemma to w: w = xyz, xy k, y 1, and xy i z post (C), i 1, with x ā, y ā + and z ( ā + b ). For i large enough, w i = xy i z post (C) and w i ā > w i b + 1. There is a contradiction and post (C) is not regular.

18 What About pre? We use a similar proof. We consider the UPDS P : (C 0 ) (p, c) (p, ab) (R a ) (p, a) (p, ε) (C 1 ) (p, c) (p, cb) (R b ) (p, b) (p, ε) And the regular set C = {p} (ab) {c}. We then prove that L = { p, b n, c n c, n N} is a subset of pre (C), and that the inequality w u a + w l a n holds if p, b m, c n p, w u, w l. If we suppose that pre (C) is regular, by applying the pumping lemma to a word of L, we can nd a word in pre such that the inequality does not hold. Hence, pre (C) is not regular.

19 post Is Context-Sensitive For a given UPDS P, we can dene a context-sensitive grammar G whose language is equivalent to post. A conguration p, w u, w l is represented by a word w u pw l and applied context-sensitive rules. We can simulate a pop rule δ : (p, a) (p, ε) with the following sequence grammar rules: ( ) ( ) ( ) r δ 0 pa pδ r δ 1 pδ aδ r δ f aδ ap The push and switch cases are similar. post is therefore context-sensitive, hence, decidable.

20 Runs and the Upper Stack The set of runs of a UPDS, being similar to a PDS's, is context-free. But what if this set is regular? Theorem For a UPDS P = (P, Γ, ), a regular set of congurations C, and a regular set of runs R of P from C, the set of upper stack congurations reachable using runs in R is regular and eectively computable. Using a nite automaton A of runs, we compute an upper stack automaton A sharing the same states and whose edges are dened according to saturation rules.

21 The Pop Saturation Rule δ pop (S pop ): for each edge q 0 A q 1 with δ pop = (p, a) (p, ε), add a the edge q 0 A q 1. δ pop q 0 q 1 Figure 30: The run automaton A q 0, p a q 1, p Figure 31: The upper stack automaton A

22 The Switch Saturation Rule δ (S switch ): for each edge q switch 0 A q 1 with δ switch = (p, a) (p, b), ε add the edge q 0 A E q 1. δ q switch 0 q 1 Figure 32: The run automaton A q 0, p ε q 1, p Figure 33: The upper stack automaton A

23 The Push Saturation Rule δ push (S push ): for each edge q 0 E q 1 with δ push = (p, a) (p, bc), for each state q such that either q x E q 0 with x a letter, or q is an initial state and q ε A q 0, add the edge q ε A q 1. δ push q 2 q 3 Figure 34: The run automaton A q 0, p a 0 q 1, p b 1 q 2, p q 3, p a Figure 35: The upper stack automaton A

24 An Example I push a pop a pop a start q 0 q 1 q 2 pop b switch a to b q 3

25 An Example II a a start q 0 a q 1 a q 2 b ε q 3

26 Computing a Regular Overapproximation of post 1 Compute a regular overapproximation of the set of runs of the PDS P from C; 2 Compute the set of upper stack congurations reachable using overapproximated runs of P; 3 Compute the exact set of reachable lower stack congurations; 4 Combine the upper and lower stack sets to create an overapproximation of post (P, C).

27 Using an Overapproximation An overapproximation O of post (C) can be used to prove safety properties regarding a regular set X of forbidden congurations. O X post (C)

28 Bounded-Phase Analysis A phase is a part of a run during which either pop or push rules are forbidden. We want to compute congurations reachable within a bounded limit of phases. This method was rst applied to Multi-Stack Pushdown Systems (MPDSs) by La Torre et al. (LICS '07), and it has been proven by Anil Seth (CAV'10) that the set of reachable predecessors given a bounded number of phases is regular.

29 From a UPDS to a 2-MPDS x y p a b c p y x a b c A UPDS can be simulated by a MPDS with two stacks, The second stack of the MPDS is similar to the lower stack. The rst stack is a mirrored upper stack followed by a symbol that can't be popped and is used to know when the end of the stack has been reached. We use bounded-phase analysis to underapproximate pre.

30 Using an Underapproximation An underapproximation U of pre (C) can be used to detect forbidden behaviours belonging to a regular set X of forbidden congurations. pre (X ) U C

31 Application 1 Stack Overow Detection We put a symbol on top of an upper stack of bounded height m. # m. times.. # a b... Figure 36: Using to bound the upper stack If the symbol is overwritten, a stack overow malfunction happens.

32 Application 2 Reading the Upper Stack A register is assigned a value located in the upper stack: Figure 37: The stack being read The instruction mov eax [ 8] copies in the register eax the second symbol above the stack pointer. We can approximate this value.

33 Application 3 Changing the Stack Pointer Changing the stack pointer leads to a new stack conguration: Figure 38: The original stack Figure 39: After changing We can approximate this new stack conguration.

34 Conclusion We dened a new automaton model, called UPDS, to capture advanced stack properties. We analyzed the forward and backward reachability sets of UPDSs. We can either underapproximate or overapproximate these sets. We have shown some potential applications of this model.

35 Thank you!

Computability and Complexity

Computability and Complexity Computability and Complexity Push-Down Automata CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard Janicki Computability

More information

How to Pop a Deep PDA Matters

How to Pop a Deep PDA Matters How to Pop a Deep PDA Matters Peter Leupold Department of Mathematics, Faculty of Science Kyoto Sangyo University Kyoto 603-8555, Japan email:leupold@cc.kyoto-su.ac.jp Abstract Deep PDA are push-down automata

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

Reachability analysis of multithreaded software with asynchronous communication

Reachability analysis of multithreaded software with asynchronous communication Reachability analysis of multithreaded software with asynchronous communication Ahmed Bouajjani 1, Javier Esparza 2, Stefan Schwoon 2, and Jan Strejček 2 1 LIAFA, University of Paris 7, abou@liafa.jussieu.fr

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Review of CFG, CFL, ambiguity What is the language generated by the CFG below: G 1 = ({S,T 1,T 2 }, {0,1,2}, { S

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

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

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

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

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010 University of Virginia - cs3102: Theory of Computation Spring 2010 PS2 - Comments Average: 77.4 (full credit for each question is 100 points) Distribution (of 54 submissions): 90, 12; 80 89, 11; 70-79,

More information

Part 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX

Part 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu Part 4 out of 5 ETH Zürich (D-ITET) October, 12 2017 Last week, we showed the equivalence of DFA, NFA and REX

More information

An Alternative Construction in Symbolic Reachability Analysis of Second Order Pushdown Systems

An Alternative Construction in Symbolic Reachability Analysis of Second Order Pushdown Systems An Alternative Construction in Symbolic Reachability Analysis of Second Order Pushdown Systems Anil Seth CSE Department, I.I.T. Kanpur, Kanpur 208016, INDIA. seth@cse.iitk.ac.in Abstract. Recently, it

More information

Symbolic Backwards-Reachability Analysis for Higher-Order Pushdown Systems

Symbolic Backwards-Reachability Analysis for Higher-Order Pushdown Systems Symbolic Backwards-Reachability Analysis for Higher-Order Pushdown Systems M. Hague C.-H. L. Ong Oxford University Computing Laboratory Wolfson Building, Parks Road, Oxford, UK, OX1 3QD Abstract. Higher-order

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Sipser Ch 1.4 Explain the limits of the class of regular languages Justify why the Pumping

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Decidability, Undecidability and Reducibility; Codes, Algorithms and Languages CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario,

More information

Notes on Pumping Lemma

Notes on Pumping Lemma Notes on Pumping Lemma Finite Automata Theory and Formal Languages TMV027/DIT321 Ana Bove, March 5th 2018 In the course we see two different versions of the Pumping lemmas, one for regular languages and

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

Analyzing Asynchronous Programs with Preemption

Analyzing Asynchronous Programs with Preemption Foundations of Software Technology and Theoretical Computer Science (Bangalore) 2008. Editors: R. Hariharan, M. Mukund, V. Vinay; pp 37-48 Analyzing Asynchronous Programs with Preemption Mohamed Faouzi

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

The Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc.

The Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc. The Pumping Lemma For every regular language L, there is a number l 1 satisfying the pumping lemma property: All w L with w l can be expressed as a concatenation of three strings, w = u 1 vu 2, where u

More information

MTH401A Theory of Computation. Lecture 17

MTH401A Theory of Computation. Lecture 17 MTH401A Theory of Computation Lecture 17 Chomsky Normal Form for CFG s Chomsky Normal Form for CFG s For every context free language, L, the language L {ε} has a grammar in which every production looks

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

Reachability Analysis of Multithreaded Software with Asynchronous Communication

Reachability Analysis of Multithreaded Software with Asynchronous Communication Reachability Analysis of Multithreaded Software with Asynchronous Communication Ahmed Bouajjani 1, Javier Esparza, Stefan Schwoon, and Jan Strejček 1 LIAFA, University of Paris 7, abou@liafa.jussieu.fr

More information

DM17. Beregnelighed. Jacob Aae Mikkelsen

DM17. Beregnelighed. Jacob Aae Mikkelsen DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 8 January 24, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis So far several models of computation finite automata

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

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 14 SMALL REVIEW FOR FINAL SOME Y/N QUESTIONS Q1 Given Σ =, there is L over Σ Yes: = {e} and L = {e} Σ Q2 There are uncountably

More information

Theory of Computation Turing Machine and Pushdown Automata

Theory of Computation Turing Machine and Pushdown Automata Theory of Computation Turing Machine and Pushdown Automata 1. What is a Turing Machine? A Turing Machine is an accepting device which accepts the languages (recursively enumerable set) generated by type

More information

Note: In any grammar here, the meaning and usage of P (productions) is equivalent to R (rules).

Note: In any grammar here, the meaning and usage of P (productions) is equivalent to R (rules). Note: In any grammar here, the meaning and usage of P (productions) is equivalent to R (rules). 1a) G = ({R, S, T}, {0,1}, P, S) where P is: S R0R R R0R1R R1R0R T T 0T ε (S generates the first 0. R generates

More information

On Reducing Linearizability to State Reachability 1

On Reducing Linearizability to State Reachability 1 On Reducing Linearizability to State Reachability 1 Ahmed Bouajjani a, Michael Emmi b, Constantin Enea a, Jad Hamza a a LIAFA, Université Paris Diderot b IMDEA Software Institute, Spain Abstract Ecient

More information

5 Context-Free Languages

5 Context-Free Languages CA320: COMPUTABILITY AND COMPLEXITY 1 5 Context-Free Languages 5.1 Context-Free Grammars Context-Free Grammars Context-free languages are specified with a context-free grammar (CFG). Formally, a CFG G

More information

The Parikh image of languages and linear constraints

The Parikh image of languages and linear constraints The Parikh image of languages and linear constraints Peter.Habermehl@liafa.univ-paris-diderot.fr 1 1 LIAFA, Université Paris Diderot, Sorbonne Paris Cité, CNRS CP meets CAV, Turunç June 28th, 2012 Peter

More information

Theory of Computation

Theory of Computation Fall 2002 (YEN) Theory of Computation Midterm Exam. Name:... I.D.#:... 1. (30 pts) True or false (mark O for true ; X for false ). (Score=Max{0, Right- 1 2 Wrong}.) (1) X... If L 1 is regular and L 2 L

More information

C6.2 Push-Down Automata

C6.2 Push-Down Automata Theory of Computer Science April 5, 2017 C6. Context-free Languages: Push-down Automata Theory of Computer Science C6. Context-free Languages: Push-down Automata Malte Helmert University of Basel April

More information

automaton model of self-assembling systems is presented. The model operates on one-dimensional strings that are assembled from a given multiset of sma

automaton model of self-assembling systems is presented. The model operates on one-dimensional strings that are assembled from a given multiset of sma Self-Assembling Finite Automata Andreas Klein Institut fur Mathematik, Universitat Kassel Heinrich Plett Strae 40, D-34132 Kassel, Germany klein@mathematik.uni-kassel.de Martin Kutrib Institut fur Informatik,

More information

Regularity Problems for Visibly Pushdown Languages

Regularity Problems for Visibly Pushdown Languages Regularity Problems for Visibly Pushdown Languages Vince Bárány 1, Christof Löding 1, and Olivier Serre 2 1 RWTH Aachen, Germany 2 LIAFA, Université Paris VII & CNRS, France Abstract. Visibly pushdown

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

PARALLEL COMMUNICATING FLIP PUSHDOWN AUTOMATA SYSTEMS COMMUNICATING BY STACKS

PARALLEL COMMUNICATING FLIP PUSHDOWN AUTOMATA SYSTEMS COMMUNICATING BY STACKS International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print) ISSN 0976 6375(Online) Volume 1 Number 1, May - June (2010), pp. 34-45 IAEME, http://www.iaeme.com/ijcet.html

More information

Pushdown timed automata:a binary reachability characterization and safety verication

Pushdown timed automata:a binary reachability characterization and safety verication Theoretical Computer Science 302 (2003) 93 121 www.elsevier.com/locate/tcs Pushdown timed automata:a binary reachability characterization and safety verication Zhe Dang School of Electrical Engineering

More information

Definition: A grammar G = (V, T, P,S) is a context free grammar (cfg) if all productions in P have the form A x where

Definition: A grammar G = (V, T, P,S) is a context free grammar (cfg) if all productions in P have the form A x where Recitation 11 Notes Context Free Grammars Definition: A grammar G = (V, T, P,S) is a context free grammar (cfg) if all productions in P have the form A x A V, and x (V T)*. Examples Problem 1. Given the

More information

Theory of Computation - Module 3

Theory of Computation - Module 3 Theory of Computation - Module 3 Syllabus Context Free Grammar Simplification of CFG- Normal forms-chomsky Normal form and Greibach Normal formpumping lemma for Context free languages- Applications of

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

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

Part I: Definitions and Properties

Part I: Definitions and Properties Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States

More information

SAMPLED SEMANTICS OF TIMED AUTOMATA

SAMPLED SEMANTICS OF TIMED AUTOMATA SAMPLED SEMANTICS OF TIMED AUTOMATA PAROSH AZIZ ABDULLA, PAVEL KRCAL, AND WANG YI Department of Information Technology, Uppsala University, Sweden e-mail address: parosh@it.uu.se Department of Information

More information

On Model Checking for Visibly Pushdown Automata

On Model Checking for Visibly Pushdown Automata Japan Institute of Advanced Industrial Science and Technology Research Center for Specification and Verification LATA 2012 On Model Checking for Visibly Pushdown Automata Nguyen Van Tang and Hitoshi Ohsaki

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 Design a PDA and a CFG for a given language Give informal description for a PDA,

More information

Semantic Equivalences and the. Verification of Infinite-State Systems 1 c 2004 Richard Mayr

Semantic Equivalences and the. Verification of Infinite-State Systems 1 c 2004 Richard Mayr Semantic Equivalences and the Verification of Infinite-State Systems Richard Mayr Department of Computer Science Albert-Ludwigs-University Freiburg Germany Verification of Infinite-State Systems 1 c 2004

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

HW6 Solutions. Micha l Dereziński. March 20, 2015

HW6 Solutions. Micha l Dereziński. March 20, 2015 HW6 Solutions Micha l Dereziński March 20, 2015 1 Exercise 5.5 (a) The PDA accepts odd-length strings whose middle symbol is a and whose other letters are as and bs. Its diagram is below. b, Z 0 /XZ 0

More information

Model Checking Procedural Programs

Model Checking Procedural Programs Model Checking Procedural Programs Rajeev Alur, Ahmed Bouajjani, and Javier Esparza Abstract We consider the model-checking problem for sequential programs with procedure calls. We first present basic

More information

starting from the initial states. In this paper, we therefore consider how forward verication can be carried out for lossy channel systems. For that w

starting from the initial states. In this paper, we therefore consider how forward verication can be carried out for lossy channel systems. For that w On-the-Fly Analysis of Systems with Unbounded, Lossy FIFO Channels Parosh Aziz Abdulla 1, Ahmed Bouajjani 2, and Bengt Jonsson 1 1 Dept. of Computer Systems, P.O. Box 325, S-751 05 Uppsala, Sweden, fparosh,bengtg@docs.uu.se

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Rewriting Systems and Chomsky Grammars CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard

More information

Reachability Analysis of Conditional Pushdown Systems with Patterns

Reachability Analysis of Conditional Pushdown Systems with Patterns . RESEARCH PAPER. SCIENCE CHINA Information Sciences Reachability Analysis of Conditional Pushdown Systems with Patterns Xin Li 1 1 East China Normal University, Shanghai, 200062, China Received XXX; accepted

More information

Pushdown Automata. We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata.

Pushdown Automata. We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata. Pushdown Automata We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata. Next we consider a more powerful computation model, called a

More information

Sampled Semantics of Timed Automata

Sampled Semantics of Timed Automata Sampled Semantics of Timed Automata Parosh Abdulla, Pavel Krcal, and Wang Yi Department of Information Technology, Uppsala University, Sweden Email: {parosh,pavelk,yi}@it.uu.se Abstract. Sampled semantics

More information

input tape head moves current state a a

input tape head moves current state a a CPS 140 - Mathematical Foundations of CS Dr. S. Rodger Section: Pushdown Automata (Ch. 3.3-3.4) (handout) Pushdown Automata ADFA=(K,,,q 0,F) input tape a a b b a b tape head head moves current state 0

More information

Fall 1999 Formal Language Theory Dr. R. Boyer. 1. There are other methods of nding a regular expression equivalent to a nite automaton in

Fall 1999 Formal Language Theory Dr. R. Boyer. 1. There are other methods of nding a regular expression equivalent to a nite automaton in Fall 1999 Formal Language Theory Dr. R. Boyer Week Four: Regular Languages; Pumping Lemma 1. There are other methods of nding a regular expression equivalent to a nite automaton in addition to the ones

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

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

Regular Strategies In Pushdown Reachability Games

Regular Strategies In Pushdown Reachability Games Regular Strategies In Pushdown Reachability Games A. Carayol and M. Hague LIGM, Université Paris-Est & CNRS and Royal Holloway University of London Abstract. We show that positional winning strategies

More information

Blackhole Pushdown Automata

Blackhole Pushdown Automata Fundamenta Informaticae XXI (2001) 1001 1020 1001 IOS Press Blackhole Pushdown Automata Erzsébet Csuhaj-Varjú Computer and Automation Research Institute, Hungarian Academy of Sciences Kende u. 13 17, 1111

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Sequences and Automata CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard Janicki Computability

More information

Advanced Querying for Property Checking

Advanced Querying for Property Checking Advanced Querying for Property Checking Nicholas Kidd 1, Akash Lal 1, and Thomas Reps 1,2 1 University of Wisconsin; Madison, WI; USA. {kidd, akash, reps}@cs.wisc.edu 2 GrammaTech, Inc.; Ithaca, NY; USA.

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

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

Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. The stack

Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. The stack A pushdown automata (PDA) is essentially: An NFA with a stack A move of a PDA will depend upon Current state of the machine Current symbol being read in Current symbol popped off the top of the stack With

More information

The Minimal Cost Reachability Problem in Priced Timed Pushdown Systems

The Minimal Cost Reachability Problem in Priced Timed Pushdown Systems The Minimal Cost Reachability Problem in Priced Timed Pushdown Systems Parosh Aziz Abdulla, Mohamed Faouzi Atig, and Jari Stenman Uppsala University, Sweden Abstract. This paper introduces the model of

More information

Harvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata

Harvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata Harvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata Salil Vadhan October 4, 2012 Reading: Sipser, 2.2. Another example of a CFG (with proof) L = {x {a, b} : x has the same # of a s and

More information

Probabilistic Aspects of Computer Science: Probabilistic Automata

Probabilistic Aspects of Computer Science: Probabilistic Automata Probabilistic Aspects of Computer Science: Probabilistic Automata Serge Haddad LSV, ENS Paris-Saclay & CNRS & Inria M Jacques Herbrand Presentation 2 Properties of Stochastic Languages 3 Decidability Results

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

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 11 CHAPTER 3 CONTEXT-FREE LANGUAGES 1. Context Free Grammars 2. Pushdown Automata 3. Pushdown automata and context -free

More information

LTL Model-Checking for Dynamic Pushdown Networks Communicating via Locks

LTL Model-Checking for Dynamic Pushdown Networks Communicating via Locks LTL Model-Checking for Dynamic Pushdown Networks Communicating via Locks Fu Song, Tayssir Touili To cite this version: Fu Song, Tayssir Touili. LTL Model-Checking for Dynamic Pushdown Networks Communicating

More information

Section 1 (closed-book) Total points 30

Section 1 (closed-book) Total points 30 CS 454 Theory of Computation Fall 2011 Section 1 (closed-book) Total points 30 1. Which of the following are true? (a) a PDA can always be converted to an equivalent PDA that at each step pops or pushes

More information

2.1 Solution. E T F a. E E + T T + T F + T a + T a + F a + a

2.1 Solution. E T F a. E E + T T + T F + T a + T a + F a + a . Solution E T F a E E + T T + T F + T a + T a + F a + a E E + T E + T + T T + T + T F + T + T a + T + T a + F + T a + a + T a + a + F a + a + a E T F ( E) ( T ) ( F) (( E)) (( T )) (( F)) (( a)) . Solution

More information

On the Average Complexity of Brzozowski s Algorithm for Deterministic Automata with a Small Number of Final States

On the Average Complexity of Brzozowski s Algorithm for Deterministic Automata with a Small Number of Final States On the Average Complexity of Brzozowski s Algorithm for Deterministic Automata with a Small Number of Final States Sven De Felice 1 and Cyril Nicaud 2 1 LIAFA, Université Paris Diderot - Paris 7 & CNRS

More information

Counter Automata and Classical Logics for Data Words

Counter Automata and Classical Logics for Data Words Counter Automata and Classical Logics for Data Words Amal Dev Manuel amal@imsc.res.in Institute of Mathematical Sciences, Taramani, Chennai, India. January 31, 2012 Data Words Definition (Data Words) A

More information

Context-Free Languages

Context-Free Languages CS:4330 Theory of Computation Spring 2018 Context-Free Languages Pushdown Automata Haniel Barbosa Readings for this lecture Chapter 2 of [Sipser 1996], 3rd edition. Section 2.2. Finite automaton 1 / 13

More information

Outline. CS21 Decidability and Tractability. Machine view of FA. Machine view of FA. Machine view of FA. Machine view of FA.

Outline. CS21 Decidability and Tractability. Machine view of FA. Machine view of FA. Machine view of FA. Machine view of FA. Outline CS21 Decidability and Tractability Lecture 5 January 16, 219 and Languages equivalence of NPDAs and CFGs non context-free languages January 16, 219 CS21 Lecture 5 1 January 16, 219 CS21 Lecture

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

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties Recall a closure property is a statement

More information

The L Machines are very high-level, in two senses:

The L Machines are very high-level, in two senses: What is a Computer? State of the machine. CMPSCI 630: Programming Languages An Abstract Machine for Control Spring 2009 (with thanks to Robert Harper) Internal registers, memory, etc. Initial and final

More information

Synchronized Recursive Timed Automata

Synchronized Recursive Timed Automata Synchronized Recursive Timed Automata Yuya Uezato 1 and Yasuhiko Minamide 2 1 University of Tsukuba uezato@score.cs.tsukuba.ac.jp 2 Tokyo Institute of Technology minamide@is.titech.ac.jp Abstract. We present

More information

A shrinking lemma for random forbidding context languages

A shrinking lemma for random forbidding context languages Theoretical Computer Science 237 (2000) 149 158 www.elsevier.com/locate/tcs A shrinking lemma for random forbidding context languages Andries van der Walt a, Sigrid Ewert b; a Department of Mathematics,

More information

The Post Correspondence Problem

The Post Correspondence Problem The Post Correspondence Problem - Given a set, P of pairs of strings: where t i, b i Σ P = {[ t 1 b 1 ], t 2 b 2 ],, t k b k ]} - Question: Does there exist a sequence i 1, i 2, i n such that: t i1 t i2

More information

Formal Languages and Automata

Formal Languages and Automata Formal Languages and Automata Lecture 6 2017-18 LFAC (2017-18) Lecture 6 1 / 31 Lecture 6 1 The recognition problem: the Cocke Younger Kasami algorithm 2 Pushdown Automata 3 Pushdown Automata and Context-free

More information

Pushdown Automata. Chapter 12

Pushdown Automata. Chapter 12 Pushdown Automata Chapter 12 Recognizing Context-Free Languages We need a device similar to an FSM except that it needs more power. The insight: Precisely what it needs is a stack, which gives it an unlimited

More information

Models of Computation. by Costas Busch, LSU

Models of Computation. by Costas Busch, LSU Models of Computation by Costas Busch, LSU 1 Computation CPU memory 2 temporary memory input memory CPU output memory Program memory 3 Example: f ( x) x 3 temporary memory input memory Program memory compute

More information

Reasoning about Threads with Bounded Lock Chains

Reasoning about Threads with Bounded Lock Chains Reasoning about Threads with Bounded Lock Chains Vineet Kahlon, NEC Laboratories America, USA Abstract. The problem of model checking threads interacting purely via the standard synchronization primitives

More information

Theory Bridge Exam Example Questions

Theory Bridge Exam Example Questions Theory Bridge Exam Example Questions Annotated version with some (sometimes rather sketchy) answers and notes. This is a collection of sample theory bridge exam questions. This is just to get some idea

More information

Covering of ordinals

Covering of ordinals Covering of ordinals Laurent Braud IGM, Univ. Paris-Est Liafa, 8 January 2010 Laurent Braud (IGM, Univ. Paris-Est) Covering of ordinals Liafa, 8 January 2010 1 / 27 1 Covering graphs Ordinals MSO logic

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

Automata-based Verification - III

Automata-based Verification - III COMP30172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20: email: howard.barringer@manchester.ac.uk March 2009 Third Topic Infinite Word Automata Motivation Büchi Automata

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

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

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

Hierarchy among Automata on Linear Orderings

Hierarchy among Automata on Linear Orderings Hierarchy among Automata on Linear Orderings Véronique Bruyère Institut d Informatique Université de Mons-Hainaut Olivier Carton LIAFA Université Paris 7 Abstract In a preceding paper, automata and rational

More information

Automata Theory for Presburger Arithmetic Logic

Automata Theory for Presburger Arithmetic Logic Automata Theory for Presburger Arithmetic Logic References from Introduction to Automata Theory, Languages & Computation and Constraints in Computational Logic Theory & Application Presented by Masood

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information