Results 1 - 10
of
11
On the Complexity Analysis of Static Analyses
- Journal of the ACM
, 1999
"... . This paper argues that for many algorithms, and static analysis ..."
Abstract
-
Cited by 55 (3 self)
- Add to MetaCart
. This paper argues that for many algorithms, and static analysis
Control-Flow Analysis and Type Systems
, 1995
"... . We establish a series of equivalences between type systems and control-flow analyses. Specifically, we take four type systems from the literature (involving simple types, subtypes and recursion) and conservatively extend them to reason about control-flow information. Similarly, we take four standa ..."
Abstract
-
Cited by 47 (1 self)
- Add to MetaCart
. We establish a series of equivalences between type systems and control-flow analyses. Specifically, we take four type systems from the literature (involving simple types, subtypes and recursion) and conservatively extend them to reason about control-flow information. Similarly, we take four standard control-flow systems and conservatively extend them to reason about type consistency. Our main result is that we can match up the resulting type and control-flow systems such that we obtain pairs of equivalent systems, where the equivalence is with respect to both type and control-flow information. In essence, type systems and control-flow analysis can be viewed as complementary approaches for addressing questions of type consistency and control-flow. Recent and independent work by Palsberg and O'Keefe has addressed the same general question. Our work differs from theirs in two respects. First, they only consider what happens when control-flow systems are used to reason about types. In co...
Linear-time Subtransitive Control Flow Analysis
, 1997
"... We present a linear-time algorithm for boundedtype programs that builds a directed graph whose transitive closure gives exactly the results of the standard (cubic-time) Control-Flow Analysis (CFA) algorithm. Our algorithm can be used to list all functions calls from all call sites in (optimal) quadr ..."
Abstract
-
Cited by 41 (1 self)
- Add to MetaCart
We present a linear-time algorithm for boundedtype programs that builds a directed graph whose transitive closure gives exactly the results of the standard (cubic-time) Control-Flow Analysis (CFA) algorithm. Our algorithm can be used to list all functions calls from all call sites in (optimal) quadratic time. More importantly, it can be used to give linear-time algorithms for CFAconsuming applications such as: ffl effects analysis: find the side-effecting expressions in a program. ffl k-limited CFA: for each call-site, list the functions if there are only a few of them ( k) and otherwise output "many". ffl called-once analysis: identify all functions called from only one call-site. 1 Introduction The control-flow graph of a program plays a central role in compilation -- it identifies the block and loop structure in a program, a prerequisite for many code optimizations. For first-order languages, this graph can be directly constructed from a program because information about flow of ...
On the Cubic Bottleneck in Subtyping and Flow Analysis
, 1997
"... A variety of program analysis methods have worst case time complexity that grows cubicly in the length of the program being analyzed. Cubic complexity typically arises in control flow analyses and the inference of recursive types (including object types). It is often said that such cubic performance ..."
Abstract
-
Cited by 30 (6 self)
- Add to MetaCart
A variety of program analysis methods have worst case time complexity that grows cubicly in the length of the program being analyzed. Cubic complexity typically arises in control flow analyses and the inference of recursive types (including object types). It is often said that such cubic performance can not be improved because these analyses require "dynamic transitive closure". Here we prove linear time reductions from the problem of determining membership for languages defined by 2-way nondeterministic pushdown automata (2NPDA) to problems of flow analysis and typability in the Amadio-Cardelli type system. An O(n 3 ) algorithm was given for 2NPDA acceptability in 1968 and is still the best known. The reductions are factored through the problem of "monotone closure" and we propose linear time reduction of the monotone closure as a method of establishing "monotone closure hardness" for program analysis problems. A sub-cubic procedure for a monotone closure hard problem would imply a ...
Cogen in Six Lines
- Proc. International Conference on Functional Programming
, 1996
"... We have designed and implemented a program-generator generator (PGG) for an untyped higher-order functional programming language. The program generators perform continuation-based multi-level offline specialization and thus combine the most powerful and general offline partial evaluation techniques. ..."
Abstract
-
Cited by 27 (10 self)
- Add to MetaCart
We have designed and implemented a program-generator generator (PGG) for an untyped higher-order functional programming language. The program generators perform continuation-based multi-level offline specialization and thus combine the most powerful and general offline partial evaluation techniques. The correctness of the PGG is ensured by deriving it from a multi-level specializer. Our PGG is extremely simple to implement due to the use of multi-level techniques and higher-order abstract syntax. Keywords: partial evaluation, multi-level computation, continuations. 1 Introduction An attractive feature of partial evaluation is the ability to generate generating extensions. A generating extension for a program p with two inputs inp s and inp d is a program p-gen which accepts the static input inp s of p and produces a residual program p s which accepts the dynamic input inp d and produces the same result as JpK inp s inp d , provided both p and p s terminate. Jp-genK inp ...
The Essence of LR Parsing
- In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation
, 1995
"... Partial evaluation can turn a generalparser into a parser generator. The generated parsers surpass those produced by traditional parser generators in speed and compactness. We use an inherently functional approach to implement general LR(k) parsers and specialize them using the partial evaluator Si ..."
Abstract
-
Cited by 16 (5 self)
- Add to MetaCart
Partial evaluation can turn a generalparser into a parser generator. The generated parsers surpass those produced by traditional parser generators in speed and compactness. We use an inherently functional approach to implement general LR(k) parsers and specialize them using the partial evaluator Similix. The functional implementation of LR parsing allows for concise implementation of the algorithmsthemselves and requires only straightforwardchanges to achieve good specialization results. In contrast, a traditional, stack-based implementation of a general LR parser requires significant structural changes to make it amenable to satisfactory specialization. 1 Introduction We present two inherently functional implementations of general LR(k) parsers: a direct-style first-order textbook version and one using continuation-passing style (CPS) for statetransitions. Neither requires the handling of an explicit parsing stack. These parsers, when specialized with respect to a grammar and lookah...
Termination Analysis and Specialization-Point Insertion in Off-line Partial Evaluation
- ACM Trans. Program. Lang. Syst
, 2004
"... interpretation or constraint solving analyses may be used to detect both modalities of size-change behavior, and can be found in the literature [Chin and Khoo 2002; Hughes et al. 1996]. We develop analyses for the current context in Section 5, in the style of Jones et al. [1993, Section 14.3]. ..."
Abstract
-
Cited by 14 (1 self)
- Add to MetaCart
interpretation or constraint solving analyses may be used to detect both modalities of size-change behavior, and can be found in the literature [Chin and Khoo 2002; Hughes et al. 1996]. We develop analyses for the current context in Section 5, in the style of Jones et al. [1993, Section 14.3].
Towards Partial Evaluation of Full Scheme
- Reflection 96
, 1996
"... We present a binding-time analysis for Scheme which enables an offline partial evaluator to successfully treat Scheme's reflective features eval, apply, and the control operator call/cc. Additionally, our analysis empowers the specializer to select the most efficient representation for each object. ..."
Abstract
-
Cited by 12 (4 self)
- Add to MetaCart
We present a binding-time analysis for Scheme which enables an offline partial evaluator to successfully treat Scheme's reflective features eval, apply, and the control operator call/cc. Additionally, our analysis empowers the specializer to select the most efficient representation for each object. This removes some limitations of previous specializers regarding the use of higher-order functions. The theoretical development is backed by an implementation. Keywords: partial evaluation of reflective language features, meta-computation The programming language Scheme [20] is an ideal vehicle for meta-computation, specifically for partial evaluation. Part of the appropriateness of Scheme for meta-computation tasks derives from its reflective features: eval [27], which reflects the external representation of, say, a procedure to a functional value, apply, which reflects lists to argument lists, and call/cc 1 , which makes the continuation of the current expression available as a proced...
A Unified Framework for Binding-Time Analysis
- Colloquium on Formal Approaches in Software Engineering (FASE '97), volume 1214 of Lect
, 1997
"... . Binding-time analysis is a crucial part of offline partial evaluation. It is often specified as a non-standard type system. Many typebased binding-time analyses are reminiscent of simple type systems with additional features like recursive types. We make this connection explicit by expressing bind ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
. Binding-time analysis is a crucial part of offline partial evaluation. It is often specified as a non-standard type system. Many typebased binding-time analyses are reminiscent of simple type systems with additional features like recursive types. We make this connection explicit by expressing binding-time analysis with annotated type systems that separate the concerns of type inference from those of binding-time annotation. The separation enables us to explore a design space for bindingtime analysis by varying the underlying type system and the annotation strategy independently. The result is a classification of different monovariant binding-time analyses which allows us to compare their relative power. Due to the systematic approach we uncover some novel analyses. A partial evaluator separates the computation of a source program into two or more stages [7, 20]. Using the (static) input of the first stage it transforms a source program into a specialized residual program. Application...
Bootstrapping Higher-Order Program Transformers from Interpreters
- IN PROCEEDINGS OF THE 1996 ACM SYMPOSIUM ON APPLIED COMPUTING
, 1996
"... Partial evaluation can automatically generate program transformers from interpreters. In the context of functional languages, we investigate the design space of higher-order interpreters to achieve certain transformation effects. The present work is based on the interpretive approach and exploits th ..."
Abstract
-
Cited by 6 (4 self)
- Add to MetaCart
Partial evaluation can automatically generate program transformers from interpreters. In the context of functional languages, we investigate the design space of higher-order interpreters to achieve certain transformation effects. The present work is based on the interpretive approach and exploits the language preservation property of offline partial evaluators. We have generated higher-order online partial evaluators, optimizing closure converters, and converters to first-order tail form. The latter can serve as the middle end of a compiler. The generated transformers are strictly more powerful than the partial evaluators used for their generation. A simple-minded partial evaluator for a first-order language suffices to generate the above transformers. Self-application of a partial evaluator with respect to an interpreter produces a compiler. We investigate the generatation of optimizing program transformers from interpreters. We study different types of interpreters for a strict, high...

