Newtonian Program Analysis
|
|
- Rodney Burke
- 6 years ago
- Views:
Transcription
1 Newtonian Program Analysis Javier Esparza Technische Universität München Joint work with Stefan Kiefer and Michael Luttenberger
2
3
4
5
6 From programs to flowgraphs proc X 1 proc X 2 proc X 3 a c d f X 1 b X 2 X 2 e X 1 g X 2 X 3 X 1 X 3
7 From flowgraphs to equations Again a syntactic transformation. X 1 = a X 1 X 2 + b X 2 = c X 2 X 3 + d X 2 X 1 + e X 3 = f X 1 X 3 + g But how should the equations be interpreted mathematically? What kind of objects are a,..., g? What kind of operations are sum and product? It depends. Different interpretations lead to different semantics
8 From flowgraphs to equations Again a syntactic transformation. X 1 = a X 1 X 2 + b X 2 = c X 2 X 3 + d X 2 X 1 + e X 3 = f X 1 X 3 + g But how should the equations be interpreted mathematically? What kind of objects are a,..., g? What kind of operations are sum and product? It depends. Different interpretations lead to different semantics.
9 Input/output relational semantics Interpret a,..., g as assignments or guards over a set of program variables V with set of valuations Val. R(X i ) = (v, v ) Val Val such that X i started at v, may terminate at v.
10 Input/output relational semantics Interpret a,..., g as assignments or guards over a set of program variables V with set of valuations Val. R(X i ) = (v, v ) Val Val such that X i started at v, may terminate at v. ( R(X 1 ), R(X 2 ), R(X 3 ) ) is the least solution of the equations under the following interpretation: Universe: 2 V V (input/output relations) a,..., g are relations for assignment/guards sum is union of relations, product is join of relations: R 1 R 2 = {(a, b) c (a, c) R 1 (c, b) R 2 }
11 Language semantics Interpret the atomic actions as letters of an alphabet A. L(X i ) = words w A such that X i can execute w and terminate.
12 Language semantics Interpret the atomic actions as letters of an alphabet A. L(X i ) = words w A such that X i can execute w and terminate. ( L(X 1 ), L(X 2 ), L(X 3 ) ) is the least solution of the equations under the following interpretation: Universe: 2 A (languages over A). a,..., g are the singleton languages {a},..., {g}. sum is union of languages, product is concatenation:. L 1 L 2 = {w 1 w 2 w 1 L 1 w 2 l 2 }
13 Counting semantics Given a word w, denote by #(w) the vector saying how many times each of a,..., g occurs in w. Define Co(X i ) = {#(w) w L(X i )}.
14 Counting semantics Given a word w, denote by #(w) the vector saying how many times each of a,..., g occurs in w. Define Co(X i ) = {#(w) w L(X i )}. ( Co(X 1 ), Co(X 2 ), Co(X 3 )) is the least solution of the equations under the following interpretation: Universe: sets of vectors of naturals a,..., g are the singleton sets {(1, 0,..., 0)},..., {(0, 0,..., 1)} sum is union of sets, product is given by S 1 S 2 = {v 1 + R v 2 v 1 S 1, v 2 S 2 }
15 Probabilistic termination semantics Interpret a,..., g as probabilities. T (X i ) = probability that X i terminates.
16 Probabilistic termination semantics Interpret a,..., g as probabilities. T (X i ) = probability that X i terminates. ( T (X 1 ), T (X 2 ), T (X 3 ) ) is the least solution of the equations under the following interpretation: Universe: R + a,..., g are the probabilities of taking the transitions sum and product are addition and multiplication of reals
17 Abstract interpretation [Cousot, Cousot 77] determines an interpretation given its universe, and its relation to a reference semantics (the concrete semantics).
18 ω-continuous semirings Underlying mathematical structure: ω-continuous semirings Algebra (C, +,, 0, 1) (C, +, 0) is a commutative monoid distributes over + (C,, 1) is a monoid 0 a = a 0 = 0 a a + b is a partial order -chains have limits System of equations X = f (X) where X = (X 1,..., X n ) vector of variables, f (X) = (f 1 (X),..., f n (X)) vector of terms over C {X 1,..., X n }. Notice: the f i are polynomials!!
19 Static program analysis Static program analysis = computing the least solution of a system of polynomial equations over a suitable ω-continuous semiring Program = system of equations Analysis problem = concrete semiring Algorithmic solution = equation solver Theory of static analysis = generic solution techniques In this talk: generic solution techniques and some consequences.
20 Kleenean program analysis Theorem [Kleene]: The least solution µf is the supremum of {k i } i 0, where k 0 = f (0) k i+1 = f (k i ) Basic algorithm: compute k 0, k 1, k 2,... until either k i = k i+1 or the approximation is considered adequate. Current state-of-the-art: sufficient condition for termination: finite ascending chains if condition does not hold: widening and narrowing.
21 Kleenean program analysis is slow Set interpretations: Kleene iteration never terminates if µf is an infinite set. X = a X + b µf = a b Kleene approximants are finite sets: k i = (ɛ + a a i )b Probabilistic interpretation: convergence can be very slow [EY STACS05]. X = 1 2 X µf = 1 = Logarithmic convergence : k iterations to get log k bits of accuracy. k n 1 1 n + 1 k 2000 =
22 Kleene Iteration for X = f (X) (univariate case) µf f (X)
23 Kleene Iteration for X = f (X) (univariate case) µf f (X)
24 Kleene Iteration for X = f (X) (univariate case) µf f (X)
25 Kleene Iteration for X = f (X) (univariate case) µf f (X)
26 Kleene Iteration for X = f (X) (univariate case) µf f (X)
27 Kleene Iteration for X = f (X) (univariate case) µf f (X)
28 Kleene Iteration for X = f (X) (univariate case) µf f (X)
29 Kleene Iteration for X = f (X) (univariate case) µf f (X)
30 Newton s Method for X = f (X) (univariate case) µf f (X)
31 Newton s Method for X = f (X) (univariate case) µf f (X)
32 Newton s Method for X = f (X) (univariate case) µf f (X)
33 Newton s Method for X = f (X) (univariate case) µf f (X)
34 Newton s Method for X = f (X) (univariate case) µf f (X)
35 Newton s Method for X = f (X) (univariate case) µf f (X)
36 Evaluation of Newton s method Newton s Method is usually very efficient often exponential convergence... but not robust: may not converge, or may converge only locally (in some neighborhood of the least fixed-point), or may converge very slowly.
37 A puzzling mismatch Program analysis: General domain: arbitrary ω-continuous semirings Kleene Iteration is robust and generally applicable... but converges slowly. Numerical mathematics: Particular domain: the real field Newton s Method converges fast... but is not robust
38 Two questions Can Newton s Method be generalized to arbitrary ω-continuous semirings? Is Newton s method robust when restricted to the real semiring?
39 Mathematical formulation of Newton s Method Let ν be some approximation of µf. (We start with ν = f (0).) Compute the function T ν (X) describing the tangent to f (X) at ν Solve X = T ν (X) new approximation (instead of X = f (X)), and take the solution as the Elementary analysis: T ν (X) = Df ν (X) + f (ν) ν where Df x0 (X) is the differential of f at x 0 So: ν 0 = 0 ν i+1 = ν i + i i solution of X = Df νi (X) + f (ν i ) ν i
40 Generalizing Newton s method Key point: generalize X = Df ν (X) + f (ν) ν In an arbitrary ω-continuous semiring neither the differential Df ν (X), nor the difference f (ν) ν are defined.
41 Differentials in semirings Standard solution: take the algebraic definition Df (X) = 0 if f (X) = c X if f (X) = X Dg(X) + Dh(X) if f (X) = g(x) + h(x) Dg(X) h(x) + g(x) Dh(X) if f (X) = g(x) h(x) Df (X) if f (X) = f i (X). i I i I
42 The difference f (ν i ) ν i Solution: Replace f (ν i ) ν i by any δ i such that f (ν i ) = ν i + δ i ν i+1 = ν i + i where i solution of X = Df νi (X) + δ i But does δ i always exist? Proposition: Yes But ν i+i depends on your choice of δ i! Theorem: No, it doesn t Can t you give a closed form for ν i+1? Proposition: Yes The least solution of X = Df νi (X) + δ i is Df ν i (δ i ):= and so: ν i+1 = ν i + Df ν i (δ i ) j=0 Df j ν i (δ i )
43 The difference f (ν i ) ν i Solution: Replace f (ν i ) ν i by any δ i such that f (ν i ) = ν i + δ i ν i+1 = ν i + i where i solution of X = Df νi (X) + δ i But does δ i always exist? Proposition: Yes But ν i+i depends on your choice of δ i! Theorem: No, it doesn t Can t you give a closed form for ν i+1? Proposition: Yes The least solution of X = Df νi (X) + δ i is Df ν i (δ i ):= and so: ν i+1 = ν i + Df ν i (δ i ) j=0 Df j ν i (δ i )
44 The difference f (ν i ) ν i Solution: Replace f (ν i ) ν i by any δ i such that f (ν i ) = ν i + δ i ν i+1 = ν i + i where i solution of X = Df νi (X) + δ i But does δ i always exist? Proposition: Yes But ν i+i depends on your choice of δ i! Theorem: No, it doesn t Can t you give a closed form for ν i+1? Proposition: Yes The least solution of X = Df νi (X) + δ i is Df ν i (δ i ):= and so: ν i+1 = ν i + Df ν i (δ i ) j=0 Df j ν i (δ i )
45 The difference f (ν i ) ν i Solution: Replace f (ν i ) ν i by any δ i such that f (ν i ) = ν i + δ i ν i+1 = ν i + i where i solution of X = Df νi (X) + δ i But does δ i always exist? Proposition: Yes But ν i+i depends on your choice of δ i! Theorem: No, it doesn t Can t you give a closed form for ν i+1? Proposition: Yes The least solution of X = Df νi (X) + δ i is Df ν i (δ i ):= and so: ν i+1 = ν i + Df ν i (δ i ) j=0 Df j ν i (δ i )
46 The difference f (ν i ) ν i Solution: Replace f (ν i ) ν i by any δ i such that f (ν i ) = ν i + δ i ν i+1 = ν i + i where i solution of X = Df νi (X) + δ i But does δ i always exist? Proposition: Yes But ν i+i depends on your choice of δ i! Theorem: No, it doesn t Can t you give a closed form for ν i+1? Proposition: Yes The least solution of X = Df νi (X) + δ i is Df ν i (δ i ):= and so: ν i+1 = ν i + Df ν i (δ i ) j=0 Df j ν i (δ i )
47 The difference f (ν i ) ν i Solution: Replace f (ν i ) ν i by any δ i such that f (ν i ) = ν i + δ i ν i+1 = ν i + i where i solution of X = Df νi (X) + δ i But does δ i always exist? Proposition: Yes But ν i+i depends on your choice of δ i! Theorem: No, it doesn t Can t you give a closed form for ν i+1? Proposition: Yes The least solution of X = Df νi (X) + δ i is Df ν i (δ i ):= and so: ν i+1 = ν i + Df ν i (δ i ) j=0 Df j ν i (δ i )
48 The difference f (ν i ) ν i Solution: Replace f (ν i ) ν i by any δ i such that f (ν i ) = ν i + δ i ν i+1 = ν i + i where i solution of X = Df νi (X) + δ i But does δ i always exist? Proposition: Yes But ν i+i depends on your choice of δ i! Theorem: No, it doesn t Can t you give a closed form for ν i+1? Proposition: Yes The least solution of X = Df νi (X) + δ i is Df ν i (δ i ):= and so: ν i+1 = ν i + Df ν i (δ i ) j=0 Df j ν i (δ i )
49 The difference f (ν i ) ν i Solution: Replace f (ν i ) ν i by any δ i such that f (ν i ) = ν i + δ i ν i+1 = ν i + i where i solution of X = Df νi (X) + δ i But does δ i always exist? Proposition: Yes But ν i+i depends on your choice of δ i! Theorem: No, it doesn t Can t you give a closed form for ν i+1? Proposition: Yes The least solution of X = Df νi (X) + δ i is Df ν i (δ i ):= and so: ν i+1 = ν i + Df ν i (δ i ) j=0 Df j ν i (δ i )
50 Theorem [EKL DLT07]: Let X = f (X) be an equation over an arbitrary ω-continuous semiring. The sequence ν 0 = f (0) ν i+1 = ν i + Df ν i (δ i ) where δ i satisfies f (ν i ) = ν i + δ i exists, is unique and satisfies for every i 0. k i ν i µf
51 Extensions and simplifications Systems of equations: ν i, i, δ i become vectors (elements of S n ) The differential becomes a function S n S n Geometric intuition: Df νi (X 1,..., X n ) is the hyperplane tangent to f at the (n-dimensional) point ν i Commutative semirings (and left-linear equations): One variable: Df ν (X) = f (ν) X, and so ν i+1 = ν i + f (νi ) δ i Many variables: Df ν (X) = J(ν) X, where J(ν) is the Jacobi matrix of partial derivatives evaluated at ν, and so ν i+1 = ν i + J (ν i ) δ i
52 Newton s method for language equations Language semiring: Universe is 2 A, + is union, is concatenation. For left-linear systems of equations, Newton s method terminates after 1 iteration: X 1 = a X 1 + b X 2 X 2 = a X 1 + b X ν 0 = ν 1 = = ( ( ( ) 0 1 ) ( 0 a b + 1 a b (a + bba ) b (b + aa b) ) ( ) 0 1 ) = ( (a + bb a) (a + bba ) b (b + aa b) a (b + aa b) )
53 A nonlinear equation X = a X X + b f (X) = a X X + b Df ν (X) = a ν X + a X ν ν 0 = b ν 0 + δ 0 = f (ν 0 ) = δ 0 := abb ν 1 = ν 0 + Df b (δ 0) = b + Df b (abb) = b + (X + abx + axb + abaxb +...)(abb) = b + abb + ababb + aabbb + abaabbb +... ν 2 = The method does not terminate. Can we characterize the approximants?
54 Finite-index approximations System X = f (X) induces context-free grammar G def = X f (X). [Ginsburg, Spanier, Salomaa, Gruska, Yntema 67-71]: A word w L(G) has index k if there is a derivation S w 1 w 2... w n w such that each of S, w 1,..., w n contains at most k occurrences of non-terminals (and one of them contains k non-terminals). Example: X = a X X + b b has index 1 (ab) i b has index 2 aabbabb has index 3 X b X axx abx (ab) i X (ab) i b X aaxxx aabbabb
55 Theorem [EKL DLT 07]: Let X = f (X) be a system of language equations, and let G be the derived context-free grammar. For every i 0: ν i = L i+1 (G) We can easily construct grammars G i such that L(G i+1 ) = ν i X = a X X + b G = {X axx b} G 0 = {X 0 b} G 1 = G 0 {X 1 ax 1 X 0 ax 0 X 1 ax 0 X 0 + b} G i+1 = G i {X i+1 ax i+1 X i ax i X i+1 ax i X i + b} Newton s method approximates a context-free grammar by context-free grammars of finite index.
56 Visualizing finite index: Secondary structure of RNA (image by Bassi, Costa, Michel;
57 An stochastic context-free grammar [ ]: Model the distribution of secondary structures as the derivation trees of the following stochastic context-free grammar: L CL L C S psp S CL C s C psp Graphical interpretation: sssppsssspsssssspssppsssspssssspss s s s s s s s s s s s p p s s p p p p s s sss s s s s s s p p ss
58 Visualizing the index of a derivation Index = maximal number of branching points from root to leaf + 1
59 Visualizing the index of a derivation Index = maximal number of branching points from root to leaf + 1
60 Visualizing the index of a derivation Index = maximal number of branching points from root to leaf + 1
61 Grammar leads to two equation systems: L = C L + C S = p S p + C L C = s + p S p ˆL = Ĉ ˆL Ĉ Ŝ = Ŝ Ĉ ˆL Ĉ = Ŝ ν 0 (L) = der. of index 1 ν 1 (L) = der. of index 2 ν 2 (L) = der. of index 3 ν 3 (L) = der. of index 4 ν 4 (L) = der. of index 5 ν 5 (L) = der. of index 6 ˆν 0 (L) = ˆν 1 (L) = ˆν 2 (L) = ˆν 3 (L) = ˆν 4 (L) = ˆν 5 (L) =
62 Idempotent and commutative semirings Theorem [Hopkins-Kozen LICS 99]: The least fixed point of a system X = f (X) of n equations over an ω-continuous idempotent and commutative semiring is reached by the sequence ν 0 = f (0) ν i+1 = J(ν i ) f (ν i ) after at most O(3 n ) iterations. Theorem [EKL STACS 07]: This is exactly Newton s sequence. Moreover, the fixed point is reached after at most n iterations.
63 Idempotent and commutative semirings Theorem [Hopkins-Kozen LICS 99]: The least fixed point of a system X = f (X) of n equations over an ω-continuous idempotent and commutative semiring is reached by the sequence ν 0 = f (0) ν i+1 = J(ν i ) f (ν i ) after at most O(3 n ) iterations. Theorem [EKL STACS 07]: This is exactly Newton s sequence. Moreover, the fixed point is reached after at most n iterations.
64 Idempotent and commutative semirings Theorem [Hopkins-Kozen LICS 99]: The least fixed point of a system X = f (X) of n equations over an ω-continuous idempotent and commutative semiring is reached by the sequence ν 0 = f (0) ν i+1 = J(ν i ) f (ν i ) after at most O(3 n ) iterations. Theorem [EKL STACS 07]: This is exactly Newton s sequence. Moreover, the fixed point is reached after at most n iterations.
65 Idempotent and commutative semirings Theorem [Hopkins-Kozen LICS 99]: The least fixed point of a system X = f (X) of n equations over an ω-continuous idempotent and commutative semiring is reached by the sequence ν 0 = f (0) ν i+1 = J(ν i ) f (ν i ) after at most O(3 n ) iterations. Theorem [EKL STACS 07]: This is exactly Newton s sequence. Moreover, the fixed point is reached after at most n iterations.
66 Idempotent and commutative semirings Theorem [Hopkins-Kozen LICS 99]: The least fixed point of a system X = f (X) of n equations over an ω-continuous idempotent and commutative semiring is reached by the sequence ν 0 = f (0) ν i+1 = J(ν i ) f (ν i ) after at most O(3 n ) iterations. Theorem [EKL STACS 07]: This is exactly Newton s sequence. Moreover, the fixed point is reached after at most n iterations.
67 An example The Newton sequence terminates for all idempotent and commutative analyses, the Kleene sequence does not. X = a X X + b f (X) = a X + a X = a X For one equation: µf = ν 1 = f (ν 0 ) ν 0 We obtain: ν 0 = b ν 1 = (ab) b
68 This result provides a computational version of Parikh s theorem: [Hopkins, Kozen LICS 99], [Aceto, Esik, Ingólfsdottir ITA 02] The regular language (a b) b has the same Parikh image ( counting semantics ) as the context-free language generated by the grammar X axx b
69 Our two questions Can Newton s Method be generalized to arbitrary ω-continuous semirings? Is Newton s method robust when restricted to the real semiring?
70 Newton s method on the real semiring On the real field Newton s method may not converge, or converge only locally On the real semiring these problems disappear [EKL TCS 08]: Newton s method always converges [EY STACS 05] It always exhibits linear or exponential convergence [EKL STOC 07] For strongly connected systems there is a threshold k such that after k iterations each subsequent iteration gains at least one bit of accuracy [EKL STACS 08] For important classes the threshold is linear in the size of the system [EKL STACS 08].
71 Conclusions Newton did it all but never saw Iceland... and I did!
72 Conclusions Newton did it all but never saw Iceland... and I did!
73 Conclusions Newton did it all but never saw Iceland... and I did!
Newtonian Program Analysis: Solving Sharir and Pnueli s Equations
Newtonian Program Analysis: Solving Sharir and Pnueli s Equations Javier Esparza Technische Universität München Joint work with Stefan Kiefer and Michael Luttenberger From programs to equations: Intraprocedural
More informationAn Extension of Newton s Method to ω-continuous Semirings
An Extension of Newton s Method to ω-continuous Semirings Javier Esparza, Stefan Kiefer, and Michael Luttenberger Institute for Formal Methods in Computer Science Universität Stuttgart, Germany {esparza,kiefersn,luttenml}@informatik.uni-stuttgart.de
More informationOn Fixed Point Equations over Commutative Semirings
On Fixed Point Equations over Commutative Semirings Javier Esparza, Stefan Kiefer, and Michael Luttenberger Universität Stuttgart Institute for Formal Methods in Computer Science Stuttgart, Germany {esparza,kiefersn,luttenml}@informatik.uni-stuttgart.de
More informationSolving fixed-point equations over semirings
Solving fixed-point equations over semirings Javier Esparza Technische Universität München Joint work with Michael Luttenberger and Maximilian Schlund Fixed-point equations We study systems of equations
More informationNewtonian Program Analysis
Newtonian Program Analysis Javier Esparza, Stefan Kiefer, and Michael Luttenberger Institut für Informatik, Technische Universität München, 85748 Garching, Germany {esparza,kiefer,luttenbe}@model.in.tum.de
More informationA CS look at stochastic branching processes
A computer science look at stochastic branching processes T. Brázdil J. Esparza S. Kiefer M. Luttenberger Technische Universität München For Thiagu, December 2008 Back in victorian Britain... There was
More informationProgram Analyses using Newton s Method
Program Analyses using Newton s Method (Invited Paper) 1,2 Thomas Reps 1 University of Wisconsin; Madison, WI, USA 2 GrammaTech, Inc.; Ithaca, NY, USA Abstract. Esparza et al. generalized Newton s method
More informationAxioms of Kleene Algebra
Introduction to Kleene Algebra Lecture 2 CS786 Spring 2004 January 28, 2004 Axioms of Kleene Algebra In this lecture we give the formal definition of a Kleene algebra and derive some basic consequences.
More informationCharacterizing the Equational Theory
Introduction to Kleene Algebra Lecture 4 CS786 Spring 2004 February 2, 2004 Characterizing the Equational Theory Most of the early work on Kleene algebra was directed toward characterizing the equational
More informationKleene Algebra and Arden s Theorem. Anshul Kumar Inzemamul Haque
Kleene Algebra and Arden s Theorem Anshul Kumar Inzemamul Haque Motivation Regular Expression is a Kleene Algebra. We can use the properties and theorems of Kleene Algebra to simplify regular expressions
More informationKleene modules and linear languages
The Journal of Logic and Algebraic Programming 66 (2006) 185 194 THE JOURNAL OF LOGIC AND ALGEBRAIC PROGRAMMING wwwelseviercom/locate/jlap Kleene modules and linear languages Hans Leiß Centrum für Informations-
More informationKleene Algebras and Algebraic Path Problems
Kleene Algebras and Algebraic Path Problems Davis Foote May 8, 015 1 Regular Languages 1.1 Deterministic Finite Automata A deterministic finite automaton (DFA) is a model of computation that can simulate
More informationRecitation 4: Converting Grammars to Chomsky Normal Form, Simulation of Context Free Languages with Push-Down Automata, Semirings
Recitation 4: Converting Grammars to Chomsky Normal Form, Simulation of Context Free Languages with Push-Down Automata, Semirings 11-711: Algorithms for NLP October 10, 2014 Conversion to CNF Example grammar
More informationInterprocedural Dataflow Analysis, Part III: Newtonian Program Analysis Via Tensor Product CS701
Interprocedural Dataflow Analysis, Part III: Newtonian Program Analysis Via Tensor Product CS701 Thomas Reps Abstract In this lecture, we summarize the interprocedural-dataflow-analysis method of Esparza
More informationarxiv: v1 [cs.fl] 2 Oct 2018
The Parikh Property for Weighted Context-Free Grammars Pierre Ganty IMDEA Software Institute, Madrid, Spain pierre.ganty@imdea.org Elena Gutiérrez IMDEA Software Institute, Madrid, Spain Universidad Politécnica
More information1 Alphabets and Languages
1 Alphabets and Languages Look at handout 1 (inference rules for sets) and use the rules on some examples like {a} {{a}} {a} {a, b}, {a} {{a}}, {a} {{a}}, {a} {a, b}, a {{a}}, a {a, b}, a {{a}}, a {a,
More informationGeneration of. Polynomial Equality Invariants. by Abstract Interpretation
Generation of Polynomial Equality Invariants by Abstract Interpretation Enric Rodríguez-Carbonell Universitat Politècnica de Catalunya (UPC) Barcelona Joint work with Deepak Kapur (UNM) 1 Introduction
More informationIntroduction to Kleene Algebras
Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)
More informationCS 373: Theory of Computation. Fall 2010
CS 373: Theory of Computation Gul Agha Mahesh Viswanathan Fall 2010 1 1 Normal Forms for CFG Normal Forms for Grammars It is typically easier to work with a context free language if given a CFG in a normal
More informationFLAC Context-Free Grammars
FLAC Context-Free Grammars Klaus Sutner Carnegie Mellon Universality Fall 2017 1 Generating Languages Properties of CFLs Generation vs. Recognition 3 Turing machines can be used to check membership in
More informationThe commutation with ternary sets of words
The commutation with ternary sets of words Juhani Karhumäki Michel Latteux Ion Petre Turku Centre for Computer Science TUCS Technical Reports No 589, March 2004 The commutation with ternary sets of words
More informationConvergence Thresholds of Newton s Method for Monotone Polynomial Equations
Convergence Thresholds of Newton s Method for Monotone Polynomial Equations Javier Esparza, Stefan Kiefer, Michael Luttenberger To cite this version: Javier Esparza, Stefan Kiefer, Michael Luttenberger.
More informationProvenance Semirings. Todd Green Grigoris Karvounarakis Val Tannen. presented by Clemens Ley
Provenance Semirings Todd Green Grigoris Karvounarakis Val Tannen presented by Clemens Ley place of origin Provenance Semirings Todd Green Grigoris Karvounarakis Val Tannen presented by Clemens Ley place
More informationPropagation of Roundoff Errors in Finite Precision Computations: a Semantics Approach 1
Propagation of Roundoff Errors in Finite Precision Computations: a Semantics Approach 1 Matthieu Martel CEA - Recherche Technologique LIST-DTSI-SLA CEA F91191 Gif-Sur-Yvette Cedex, France e-mail : mmartel@cea.fr
More informationAn Overview of Residuated Kleene Algebras and Lattices Peter Jipsen Chapman University, California. 2. Background: Semirings and Kleene algebras
An Overview of Residuated Kleene Algebras and Lattices Peter Jipsen Chapman University, California 1. Residuated Lattices with iteration 2. Background: Semirings and Kleene algebras 3. A Gentzen system
More informationLanguages. Languages. An Example Grammar. Grammars. Suppose we have an alphabet V. Then we can write:
Languages A language is a set (usually infinite) of strings, also known as sentences Each string consists of a sequence of symbols taken from some alphabet An alphabet, V, is a finite set of symbols, e.g.
More informationMonoidal Categories, Bialgebras, and Automata
Monoidal Categories, Bialgebras, and Automata James Worthington Mathematics Department Cornell University Binghamton University Geometry/Topology Seminar October 29, 2009 Background: Automata Finite automata
More informationComputational Models - Lecture 4 1
Computational Models - Lecture 4 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 3/8, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationFPsolve: A Generic Solver for Fixpoint Equations over Semirings
FPsolve: A Generic Solver for Fixpoint Equations over Semirings Javier Esparza, Michael Luttenberger, and Maximilian Schlund Technische Universität München, {esparza,luttenbe,schlund}@in.tum.de Abstract.
More informationDuality and Automata Theory
Duality and Automata Theory Mai Gehrke Université Paris VII and CNRS Joint work with Serge Grigorieff and Jean-Éric Pin Elements of automata theory A finite automaton a 1 2 b b a 3 a, b The states are
More informationLecture Notes: Selected Topics in Discrete Structures. Ulf Nilsson
Lecture Notes: Selected Topics in Discrete Structures Ulf Nilsson Dept of Computer and Information Science Linköping University 581 83 Linköping, Sweden ulfni@ida.liu.se 2004-03-09 Contents Chapter 1.
More informationFundamenta Informaticae 30 (1997) 23{41 1. Petri Nets, Commutative Context-Free Grammars,
Fundamenta Informaticae 30 (1997) 23{41 1 IOS Press Petri Nets, Commutative Context-Free Grammars, and Basic Parallel Processes Javier Esparza Institut fur Informatik Technische Universitat Munchen Munchen,
More informationThe Implicit Function Theorem 1
John Nachbar Washington University September 6, 2016 1 Introduction The Implicit Function Theorem 1 The Implicit Function Theorem is a non-linear version of the following observation from linear algebra.
More informationCS500 Homework #2 Solutions
CS500 Homework #2 Solutions 1. Consider the two languages Show that L 1 is context-free but L 2 is not. L 1 = {a i b j c k d l i = j k = l} L 2 = {a i b j c k d l i = k j = l} Answer. L 1 is the concatenation
More informationLogic in Automatic Verification
Logic in Automatic Verification Javier Esparza Sofware Reliability and Security Group Institute for Formal Methods in Computer Science University of Stuttgart Many thanks to Abdelwaheb Ayari, David Basin,
More informationLecture Notes Math 371: Algebra (Fall 2006) by Nathanael Leedom Ackerman
Lecture Notes Math 371: Algebra (Fall 2006) by Nathanael Leedom Ackerman October 17, 2006 TALK SLOWLY AND WRITE NEATLY!! 1 0.1 Factorization 0.1.1 Factorization of Integers and Polynomials Now we are going
More informationA Weak Bisimulation for Weighted Automata
Weak Bisimulation for Weighted utomata Peter Kemper College of William and Mary Weighted utomata and Semirings here focus on commutative & idempotent semirings Weak Bisimulation Composition operators Congruence
More informationRegular Expressions Kleene s Theorem Equation-based alternate construction. Regular Expressions. Deepak D Souza
Regular Expressions Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 16 August 2012 Outline 1 Regular Expressions 2 Kleene s Theorem 3 Equation-based
More informationSection 3.1. Best Affine Approximations. Difference Equations to Differential Equations
Difference Equations to Differential Equations Section 3.1 Best Affine Approximations We are now in a position to discuss the two central problems of calculus as mentioned in Section 1.1. In this chapter
More informationThe Equational Theory of Kleene Lattices
The Equational Theory of Kleene Lattices Hajnal Andréka 1, Szabolcs Mikulás 2, István Németi 1 TACL 2011, 29/07/2011 1 Alfréd Rényi Institute of Mathematics Hungarian Academy of Sciences 2 Department of
More informationThis lecture covers Chapter 7 of HMU: Properties of CFLs
This lecture covers Chapter 7 of HMU: Properties of CFLs Chomsky Normal Form Pumping Lemma for CFs Closure Properties of CFLs Decision Properties of CFLs Additional Reading: Chapter 7 of HMU. Chomsky Normal
More informationA Note on Decidable Separability by Piecewise Testable Languages
A Note on Decidable Separability by Piecewise Testable Languages Wojciech Czerwiński 1, Wim Martens 2, Lorijn van Rooijen 3, and Marc Zeitoun 3 1 University of Warsaw 2 University of Bayreuth 3 Bordeaux
More informationSolving Monotone Polynomial Equations
Solving Monotone Polynomial Equations Javier Esparza, Stean Kieer, and Michael Luttenberger Institut ür Inormatik, Technische Universität München, 85748 Garching, Germany {esparza,kieer,luttenbe}@in.tum.de
More informationInsertion operations: closure properties
Insertion operations: closure properties Lila Kari Academy of Finland and Mathematics Department 1 Turku University 20 500 Turku, Finland 1 Introduction The basic notions used for specifying languages
More informationCompositional Recurrence Analysis Revisited
Compositional Recurrence Analysis Revisited Zachary Kincaid Princeton Univ., USA zkincaid@cs.princeton.edu Jason Breck Ashkan Forouhi Boroujeni Univ. of Wisconsin, USA {jbreck,ashkanfb@cs.wisc.edu Thomas
More informationParikh s Theorem in Commutative Kleene Algebra
Parikh s Theorem in Commutative Kleene Algebra Mark W. Hopkins Adaptive Micro Systems, Inc. 7840 North 86th St. Milwaukee, Wisconsin 53224, USA mwhams-i.com Dexter C. Kozen Department of Computer Science
More informationIntelligent Agents. Formal Characteristics of Planning. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University
Intelligent Agents Formal Characteristics of Planning Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University Extensions to the slides for chapter 3 of Dana Nau with contributions by
More informationNotes on Abstract Interpretation
Notes on Abstract Interpretation Alexandru Sălcianu salcianu@mit.edu November 2001 1 Introduction This paper summarizes our view of the abstract interpretation field. It is based on the original abstract
More informationIITM-CS6845: Theory Toolkit February 3, 2012
IITM-CS6845: Theory Toolkit February 3, 2012 Lecture 4 : Derandomizing the logspace algorithm for s-t connectivity Lecturer: N S Narayanaswamy Scribe: Mrinal Kumar Lecture Plan:In this lecture, we will
More informationRestricted ambiguity of erasing morphisms
Loughborough University Institutional Repository Restricted ambiguity of erasing morphisms This item was submitted to Loughborough University's Institutional Repository by the/an author. Citation: REIDENBACH,
More informationProve proposition 68. It states: Let R be a ring. We have the following
Theorem HW7.1. properties: Prove proposition 68. It states: Let R be a ring. We have the following 1. The ring R only has one additive identity. That is, if 0 R with 0 +b = b+0 = b for every b R, then
More informationMIDLAND ISD ADVANCED PLACEMENT CURRICULUM STANDARDS. ALGEBRA l
(1) Foundations for functions. The student understands that a function represents a dependence of one quantity on another and can be described in a variety of ways. The (A) describe independent and dependent
More information1 Computational Problems
Stanford University CS254: Computational Complexity Handout 2 Luca Trevisan March 31, 2010 Last revised 4/29/2010 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation
More informationEquational Logic. Chapter Syntax Terms and Term Algebras
Chapter 2 Equational Logic 2.1 Syntax 2.1.1 Terms and Term Algebras The natural logic of algebra is equational logic, whose propositions are universally quantified identities between terms built up from
More informationMotivation for introducing probabilities
for introducing probabilities Reaching the goals is often not sufficient: it is important that the expected costs do not outweigh the benefit of reaching the goals. 1 Objective: maximize benefits - costs.
More information11.10a Taylor and Maclaurin Series
11.10a 1 11.10a Taylor and Maclaurin Series Let y = f(x) be a differentiable function at x = a. In first semester calculus we saw that (1) f(x) f(a)+f (a)(x a), for all x near a The right-hand side of
More informationNotes for Lecture Notes 2
Stanford University CS254: Computational Complexity Notes 2 Luca Trevisan January 11, 2012 Notes for Lecture Notes 2 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation
More informationALGEBRAIC GEOMETRY COURSE NOTES, LECTURE 2: HILBERT S NULLSTELLENSATZ.
ALGEBRAIC GEOMETRY COURSE NOTES, LECTURE 2: HILBERT S NULLSTELLENSATZ. ANDREW SALCH 1. Hilbert s Nullstellensatz. The last lecture left off with the claim that, if J k[x 1,..., x n ] is an ideal, then
More informationIntroduction 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 informationHierarchy 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 informationComputational 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 informationCompositional Recurrence Analysis Revisited
4/7/2017 aec badge pldi.svg file:///c:/users/reps/documents/papers/submissions/newtoncra/aec badge pldi.svg 1/1 Compositional Recurrence Analysis Revisited * PLDI * Artifact Consistent * Complete * Well
More informationSpace-efficient scheduling of stochastically generated tasks
Space-efficient scheduling of stochastically generated tasks Tomáš Brázdil 1, Javier Esparza 2, Stefan Kiefer 3, and Michael Luttenberger 2 1 Faculty of Informatics, Masaryk University, Brno, Czech Republic
More informationNon-context-Free Languages. CS215, Lecture 5 c
Non-context-Free Languages CS215, Lecture 5 c 2007 1 The Pumping Lemma Theorem. (Pumping Lemma) Let be context-free. There exists a positive integer divided into five pieces, Proof for for each, and..
More informationUndecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65
Undecidable Problems Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, 2018 1/ 65 Algorithmically Solvable Problems Let us assume we have a problem P. If there is an algorithm solving
More informationComputational Models - Lecture 5 1
Computational Models - Lecture 5 1 Handout Mode Iftach Haitner. Tel Aviv University. November 28, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice Herlihy, Brown University.
More informationContext-Free Languages, Coalgebraically
Context-Free Languages, Coalgebraically Joost Winter 1, Marcello M. Bonsangue 2,1, and Jan Rutten 1,3 1 Centrum Wiskunde & Informatica (CWI) 2 LIACS Leiden University 3 Radboud University Nijmegen Abstract.
More informationAdaptive Star Grammars and Their Languages
Adaptive Star Grammars and Their Languages Frank Drewes 1, Berthold Hoffmann 2, Dirk Janssens 3, and Mark Minas 4 1 Umeå universitet, Sweden drewes@cs.umu.se 2 Universität Bremen, Germany hof@informatik.uni-bremen.de
More informationProperties of context-free Languages
Properties of context-free Languages We simplify CFL s. Greibach Normal Form Chomsky Normal Form We prove pumping lemma for CFL s. We study closure properties and decision properties. Some of them remain,
More informationCONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA
1 CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA GUO-QIANG ZHANG, XIANGNAN ZHOU, ROBERT FRASER, LICONG CUI Department of Electrical Engineering and Computer Science, Case Western Reserve
More informationIsomorphism of Finitary Inductive Types
Isomorphism of Finitary Inductive Types Christian Sattler joint work (in progress) with Nicolai Kraus University of Nottingham May 2014 Motivating Example Generic data may be represented in a multitude
More informationRegular Expressions Kleene s Theorem Equation-based alternate construction. Regular Expressions. Deepak D Souza
Regular Expressions Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 11 August 2011 Outline 1 Regular Expressions 2 Kleene s Theorem 3 Equation-based
More informationSolution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017
Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017 1. Find a Greibach normal form for the following given grammar. (10 points) S bab A BAa a B bb Ʌ Solution: (1) Since S does not
More informationOn the Regularity of Binoid Languages:
On the Regularity of Binoid Languages: A Comparative Approach Zoltán L. Németh University of Szeged, Inst. of Informatics P.O.B. 652, 6701 Szeged, Hungary zlnemeth@inf.u-szeged.hu Abstract. A binoid is
More informationNotes on generating functions in automata theory
Notes on generating functions in automata theory Benjamin Steinberg December 5, 2009 Contents Introduction: Calculus can count 2 Formal power series 5 3 Rational power series 9 3. Rational power series
More informationEquivalence of Regular Expressions and FSMs
Equivalence of Regular Expressions and FSMs Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Regular Language Recall that a language
More informationCoalgebra, lecture 10: Algebra and Coalgebra for Regular Expressions
Coalgebra, lecture 10: Algebra and Coalgebra for Regular Expressions Jurriaan Rot November 19, 2018 By now we ve been talking a lot about coalgebras and coinduction, as well as algebras and induction.
More informationWeighted Logics for Nested Words and Algebraic Formal Power Series
Weighted Logics for Nested Words and Algebraic Formal Power Series Christian Mathissen Institut für Informatik, Universität Leipzig D-04009 Leipzig, Germany mathissen@informatik.uni-leipzig.de Abstract.
More informationPrimitive recursive functions: decidability problems
Primitive recursive functions: decidability problems Armando B. Matos October 24, 2014 Abstract Although every primitive recursive (PR) function is total, many problems related to PR functions are undecidable.
More informationNeighborhood Semantics for Modal Logic Lecture 5
Neighborhood Semantics for Modal Logic Lecture 5 Eric Pacuit ILLC, Universiteit van Amsterdam staff.science.uva.nl/ epacuit August 17, 2007 Eric Pacuit: Neighborhood Semantics, Lecture 5 1 Plan for the
More informationParikh s theorem. Håkan Lindqvist
Parikh s theorem Håkan Lindqvist Abstract This chapter will discuss Parikh s theorem and provide a proof for it. The proof is done by induction over a set of derivation trees, and using the Parikh mappings
More informationUniversität Augsburg
Universität Augsburg Properties of Overwriting for Updates in Typed Kleene Algebras Thorsten Ehm Report 2000-7 Dezember 2000 Institut für Informatik D-86135 Augsburg Copyright c Thorsten Ehm Institut für
More informationApplications of Regular Algebra to Language Theory Problems. Roland Backhouse February 2001
1 Applications of Regular Algebra to Language Theory Problems Roland Backhouse February 2001 Introduction 2 Examples: Path-finding problems. Membership problem for context-free languages. Error repair.
More informationFoundations 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 informationAdvanced Automata Theory 9 Automatic Structures in General
Advanced Automata Theory 9 Automatic Structures in General Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Advanced Automata
More informationComputational Models - Lecture 4 1
Computational Models - Lecture 4 1 Handout Mode Iftach Haitner. Tel Aviv University. November 21, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice Herlihy, Brown University.
More informationNon-elementary Lower Bound for Propositional Duration. Calculus. A. Rabinovich. Department of Computer Science. Tel Aviv University
Non-elementary Lower Bound for Propositional Duration Calculus A. Rabinovich Department of Computer Science Tel Aviv University Tel Aviv 69978, Israel 1 Introduction The Duration Calculus (DC) [5] is a
More informationA categorical model for a quantum circuit description language
A categorical model for a quantum circuit description language Francisco Rios (joint work with Peter Selinger) Department of Mathematics and Statistics Dalhousie University CT July 16th 22th, 2017 What
More informationProperties of Context-Free Languages
Properties of Context-Free Languages Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr
More informationProbabilistic 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 informationEquational Theory of Kleene Algebra
Introduction to Kleene Algebra Lecture 7 CS786 Spring 2004 February 16, 2004 Equational Theory of Kleene Algebra We now turn to the equational theory of Kleene algebra. This and the next lecture will be
More informationComment: The induction is always on some parameter, and the basis case is always an integer or set of integers.
1. For each of the following statements indicate whether it is true or false. For the false ones (if any), provide a counter example. For the true ones (if any) give a proof outline. (a) Union of two non-regular
More informationSymposium on Theoretical Aspects of Computer Science 2008 (Bordeaux), pp
Symposium on Theoretical Aspects of Computer Science 2008 (Bordeaux), pp. 373-384 www.stacs-conf.org COMPLEXITY OF SOLUTIONS OF EQUATIONS OVER SETS OF NATURAL NUMBERS ARTUR JEŻ 1 AND ALEXANDER OKHOTIN
More informationContext Free Grammars
Automata and Formal Languages Context Free Grammars Sipser pages 101-111 Lecture 11 Tim Sheard 1 Formal Languages 1. Context free languages provide a convenient notation for recursive description of languages.
More informationGoal. Partially-ordered set. Game plan 2/2/2013. Solving fixpoint equations
Goal Solving fixpoint equations Many problems in programming languages can be formulated as the solution of a set of mutually recursive equations: D: set, f,g:dxd D x = f(x,y) y = g(x,y) Examples Parsing:
More informationAlgebra I Assessment. Eligible Texas Essential Knowledge and Skills
Algebra I Assessment Eligible Texas Essential Knowledge and Skills STAAR Algebra I Assessment Reporting Category 1: Functional Relationships The student will describe functional relationships in a variety
More informationCMPSCI 250: Introduction to Computation. Lecture #29: Proving Regular Language Identities David Mix Barrington 6 April 2012
CMPSCI 250: Introduction to Computation Lecture #29: Proving Regular Language Identities David Mix Barrington 6 April 2012 Proving Regular Language Identities Regular Language Identities The Semiring Axioms
More informationTheory of Computation 7 Normalforms and Algorithms
Theory of Computation 7 Normalforms and Algorithms Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Theory of Computation
More informationCommunication in Petri nets
Communication in Petri nets Kamal Lodaya work in progress with Ramchandra Phawade The Institute of Mathematical Sciences, Chennai February 2010 Petri nets - introduction Mathematical model. Widely used
More information