Type-based flow analysis and context-free language reachability

2008 ◽  
Vol 18 (5) ◽  
pp. 823-894 ◽  
Author(s):  
MANUEL FÄHNDRICH ◽  
JAKOB REHOF

We present a novel approach to computing the context-sensitive flow of values through procedures and data structures. Our approach combines and extends techniques from two seemingly disparate areas: polymorphic subtyping and interprocedural dataflow analysis based on context-free language reachability. The resulting technique offers several advantages over previous approaches: it works directly on higher-order programs; provides demand-driven interprocedural queries; and improves the asymptotic complexity of a known algorithm based on polymorphic subtyping fromO(n8) toO(n3) for computing all queries. For intra-procedural flow restricted to equivalence classes, our algorithm yields linear inter-procedural flow queries.

2011 ◽  
Vol 14 ◽  
pp. 34-71 ◽  
Author(s):  
Eric M. Freden ◽  
Teresa Knudson ◽  
Jennifer Schofield

AbstractThe computation of growth series for the higher Baumslag–Solitar groups is an open problem first posed by de la Harpe and Grigorchuk. We study the growth of the horocyclic subgroup as the key to the overall growth of these Baumslag–Solitar groups BS(p,q), where 1<p<q. In fact, the overall growth series can be represented as a modified convolution product with one of the factors being based on the series for the horocyclic subgroup. We exhibit two distinct algorithms that compute the growth of the horocyclic subgroup and discuss the time and space complexity of these algorithms. We show that when p divides q, the horocyclic subgroup has a geodesic combing whose words form a context-free (in fact, one-counter) language. A theorem of Chomsky–Schützenberger allows us to compute the growth series for this subgroup, which is rational. When p does not divide q, we show that no geodesic combing for the horocyclic subgroup forms a context-free language, although there is a context-sensitive geodesic combing. We exhibit a specific linearly bounded Turing machine that accepts this language (with quadratic time complexity) in the case of BS(2,3) and outline the Turing machine construction in the general case.


2013 ◽  
Vol 23 (08) ◽  
pp. 1789-1803 ◽  
Author(s):  
EMANUELE RODARO ◽  
PEDRO V. SILVA

It is proved that the periodic point submonoid of a free inverse monoid endomorphism is always finitely generated. Using Chomsky's hierarchy of languages, we prove that the fixed point submonoid of an endomorphism of a free inverse monoid can be represented by a context-sensitive language but, in general, it cannot be represented by a context-free language.


1999 ◽  
Vol 10 (03) ◽  
pp. 349-372 ◽  
Author(s):  
SERGIO GRECO ◽  
DOMENICO SACCÀ ◽  
CARLO ZANIOLO

The critical problem of finding efficient implementations for recursive queries with bound arguments offers many open challenges of practical and theoretical import. In particular, there is a need to find methods that are effective for the general case, such as non-linear programs, as well as for specialized cases, such as left-recursive linear programs. In this paper, we propose a novel approach that solves this problem for chain queries, i.e., for queries where bindings are propagated from arguments in the head to arguments in the tail of the rules, in a chain-like fashion. The method, called pushdown method, is based on the fact that a chain query can have associated a context-free language and a pushdown automaton recognizing this language can be emulated by rewriting the query as a particular factorized left-linear program. The proposed method generalizes and unifies previous techniques such as the 'counting' and 'right-, left-, mixed-linear' methods. It also succeeds in reducing many non-linear programs to query-equivalent linear ones.


2021 ◽  
Vol 55 ◽  
pp. 9
Author(s):  
František Mráz ◽  
Friedrich Otto

Here we show that for monotone RWW- (and RRWW-) automata, window size two is sufficient, both in the nondeterministic as well as in the deterministic case. For the former case, this is done by proving that each context-free language is already accepted by a monotone RWW-automaton of window size two. In the deterministic case, we first prove that each deterministic pushdown automaton can be simulated by a deterministic monotone RWW-automaton of window size three, and then we present a construction that transforms a deterministic monotone RWW-automaton of window size three into an equivalent automaton of the same type that has window size two. Furthermore, we study the expressive power of shrinking RWW- and RRWW-automata the window size of which is just one or two. We show that for shrinking RRWW-automata that are nondeterministic, window size one suffices, while for nondeterministic shrinking RWW-automata, we already need window size two to accept all growing context-sensitive languages. In the deterministic case, shrinking RWW- and RRWW-automata of window size one accept only regular languages, while those of window size two characterize the Church-Rosser languages.


2007 ◽  
Vol 18 (06) ◽  
pp. 1293-1302 ◽  
Author(s):  
MARTIN KUTRIB ◽  
ANDREAS MALCHER

We investigate the intersection of Church-Rosser languages and (strongly) context-free languages. The intersection is still a proper superset of the deterministic context-free languages as well as of their reversals, while its membership problem is solvable in linear time. For the problem whether a given Church-Rosser or context-free language belongs to the intersection we show completeness for the second level of the arithmetic hierarchy. The equivalence of Church-Rosser and context-free languages is Π1-complete. It is proved that all considered intersections are pairwise incomparable. Finally, closure properties under several operations are investigated.


2014 ◽  
Vol 577 ◽  
pp. 917-920
Author(s):  
Long Pang ◽  
Xiao Hong Su ◽  
Pei Jun Ma ◽  
Ling Ling Zhao

The pointer alias is indispensable for program analysis. Comparing to point-to set, it’s more efficient to formulate the alias as the context free language (CFL) reachability problem. However, the precision is limited to flow-insensitivity. To solve this problem, we propose a flow sensitive, demand-driven analysis algorithm for answering may-alias queries. First the partial single static assignment is used to discriminate the address-taken pointers. Then the order of control flow is encoded in the level linearization code to ease comparison. Finally, the query of alias in demand driven is converted into the search of CFL reachability with feasible flows. The experiments demonstrate the effectiveness of the proposed approach.


Sign in / Sign up

Export Citation Format

Share Document