Results 1 - 10
of
35
A Unified Treatment of Flow Analysis in Higher-Order Languages
- In Conf. Rec. 22nd Ann. ACM Symp. Princ. of Prog. Langs
, 1995
"... We describe a framework for flow analysis in higher-order languages. It is both a synthesis and extension of earlier work in this area, most notably [20, 22]. The framework makes explicit use of flow graphs for modeling control and data flow properties of untyped higher-order programs. The framework ..."
Abstract
-
Cited by 71 (4 self)
- Add to MetaCart
We describe a framework for flow analysis in higher-order languages. It is both a synthesis and extension of earlier work in this area, most notably [20, 22]. The framework makes explicit use of flow graphs for modeling control and data flow properties of untyped higher-order programs. The framework is parameterized, and can express a hierarchy of analyses with different cost/accuracy tradeoffs. The framework is also amenable to a direct, efficient implementation. We develop several instantiations of the framework, and prove their running-time complexity. In addition, we use the simplest instantiation to demonstrate the equivalence of a 0CFA style analysis[20] and the set-based analysis of [8]. 1 Introduction The flow analysis problem for higher-order programming languages such as Scheme[4] or ML[13] is concerned with tracking data and control flow in the presence of first-class (anonymous) procedures, rich data abstractions (e.g., lists, records, tuples, etc), and references. In th...
Representing control: a study of the CPS transformation
, 1992
"... This paper investigates the transformation of v -terms into continuation-passing style (CPS). We show that by appropriate j-expansion of Fischer and Plotkin's two-pass equational specification of the CPS transform, we can obtain a static and context-free separation of the result terms into "esse ..."
Abstract
-
Cited by 69 (6 self)
- Add to MetaCart
This paper investigates the transformation of v -terms into continuation-passing style (CPS). We show that by appropriate j-expansion of Fischer and Plotkin's two-pass equational specification of the CPS transform, we can obtain a static and context-free separation of the result terms into "essential" and "administrative" constructs. Interpreting the former as syntax builders and the latter as directly executable code, we obtain a simple and efficient one-pass transformation algorithm, easily extended to conditional expressions, recursive definitions, and similar constructs. This new transformation algorithm leads to a simpler proof of Plotkin's simulation and indifference results. Further we show how CPS-based control operators similar to but more general than Scheme's call/cc can be naturally accommodated by the new transformation algorithm. To demonstrate the expressive power of these operators, we use them to present an equivalent but even more concise formulation of t...
Infinitary Control Flow Analysis: a Collecting Semantics for Closure Analysis
, 1997
"... Defining the collecting semantics is usually the first crucial step in adapting the general methodology of abstract interpretation to the semantic framework or programming language at hand. In this paper we show how to define a collecting semantics for control flow analysis; due to the generality of ..."
Abstract
-
Cited by 59 (8 self)
- Add to MetaCart
Defining the collecting semantics is usually the first crucial step in adapting the general methodology of abstract interpretation to the semantic framework or programming language at hand. In this paper we show how to define a collecting semantics for control flow analysis; due to the generality of the formulation we need to appeal to coinduction (or greatest fixed points) in order to define the analysis. We then prove the semantic soundness of the collecting semantics and that all totally deterministic instantiations have a least solution; this incorporates k-CFA, polymorphic splitting and a new class of uniform-k-CFA analyses. 1 Introduction Control flow analysis [16, 17] is known by many names: closure analysis [13, 15], set-based analysis [9] (touching upon other constraint-based analyses [1]), and flow analysis [6]. Although the fine formulational details differ they are all variations over a theme, producing analyses of di#erent precision: 0-CFA [16], k-CFA [16, 10], poly-k-CF...
For a Better Support of Static Data Flow
- Functional Programming Languages and Computer Architecture
"... . This paper identifies and solves a class of problems that arise in binding time analysis and more generally in partial evaluation of programs: the approximation and loss of static information due to dynamic expressions with static subexpressions. Solving this class of problems yields substantial b ..."
Abstract
-
Cited by 58 (16 self)
- Add to MetaCart
. This paper identifies and solves a class of problems that arise in binding time analysis and more generally in partial evaluation of programs: the approximation and loss of static information due to dynamic expressions with static subexpressions. Solving this class of problems yields substantial binding time improvements and thus dramatically better results not only in the case of partial evaluation but also for static analyses of programs --- this last point actually is related to a theoretical result obtained by Nielson. Our work can also be interpreted as providing a solution to the problem of conditionally static data, the dual of partially static data. We point out which changes in the control flow of a source program may improve its static data flow. Unfortunately they require one to iterate earlier phases of partial evaluation. We show how these changes are subsumed by transforming the source program into continuation-passing style (CPS). The transformed programs get specializ...
Analysis and Efficient Implementation of Functional Programs
, 1991
"... machines and implementations : : : : : : : : : : : : : : : : : : : 7 1.4 Optimized implementation : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 1.5 Plan of the report : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10 2 Semantics-Based Program Analysis 12 2.1 Semantics an ..."
Abstract
-
Cited by 48 (1 self)
- Add to MetaCart
machines and implementations : : : : : : : : : : : : : : : : : : : 7 1.4 Optimized implementation : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 1.5 Plan of the report : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10 2 Semantics-Based Program Analysis 12 2.1 Semantics and program analysis : : : : : : : : : : : : : : : : : : : : : : : : 12 2.2 Abstract interpretation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 12 2.3 Semantic analysis information : : : : : : : : : : : : : : : : : : : : : : : : : 13 2.4 Instrumented semantics : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 14 2.5 Correctness of analyses : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 15 3 A Lazy Example Language 19 3.1 The lazy language L : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 19 3.2 The call by name Krivine machine : : : : : : : : : : : : : : : : : : : : : : : 21 3.3 Adding data structures : : : : : : : : : : : : : : : : : : : : : : : ...
Efficient Call Graph Analysis
- ACM Letters on Programming Languages and Systems
, 1992
"... We present an efficient algorithm for computing the procedure call graph, the program representation underlying most interprocedural optimization techniques. The algorithm computes the possible bindings of procedure variables in languages where such variables only receive their values through parame ..."
Abstract
-
Cited by 47 (3 self)
- Add to MetaCart
We present an efficient algorithm for computing the procedure call graph, the program representation underlying most interprocedural optimization techniques. The algorithm computes the possible bindings of procedure variables in languages where such variables only receive their values through parameter passing, such as Fortran. We extend the algorithm to accommodate a limited form of assignments to procedure variables. The resulting algorithm can also be used in analysis of functional programs that have been converted to Continuation Passing Style. We discuss the algorithm in relationship to other call graph analysis approaches. Many less efficient techniques produce essentially the same call graph. A few algorithms are more precise, but they may be prohibitively expensive depending on language features. Categories and Subject Descriptors: D.3.3 [Programming Languages]: Language constructs and features -- procedures, functions and subroutines, D.3.4 [Programming Languages]: Processors ...
A practical and flexible flow analysis for higher-order languages
- ACM Transactions on Programming Languages and Systems
, 1996
"... A flow analysis collects data-flow and control-flow information about programs. A compiler can use this information to enable optimizations. The analysis described in this article unifies and extends previous work on flow analyses for higher-order languages supporting assignment and control operator ..."
Abstract
-
Cited by 47 (4 self)
- Add to MetaCart
A flow analysis collects data-flow and control-flow information about programs. A compiler can use this information to enable optimizations. The analysis described in this article unifies and extends previous work on flow analyses for higher-order languages supporting assignment and control operators. The analysis is abstract interpretation based and is parameterized over two polyvariance operators and a projection operator. These operators are used to regulate the speed and accuracy of the analysis. An implementation of the analysis is incorporated into and used in a production Scheme compiler. The analysis can process any legal Scheme program without modification. Others have demonstrated that a 0CFA analysis can enable optimizations, but a 0CFA analysis is O(n3). An O(n) instantiation of our analysis successfully enables the optimization of closure representations and procedure calls. Experiments with the cheaper instantiation show that it is as effective as 0CFA for these optimizations.
Flow-directed Inlining
- In Proceedings of the ACM Conference on Programming Language Design and Implementation
, 1996
"... A flow-directed inlining strategy uses information derived from control-flow analysis to specialize and inline procedures for functional and object-oriented languages. Since it uses control-flow analysis to identify candidate call sites, flowdirected inlining can inline procedures whose relationship ..."
Abstract
-
Cited by 41 (2 self)
- Add to MetaCart
A flow-directed inlining strategy uses information derived from control-flow analysis to specialize and inline procedures for functional and object-oriented languages. Since it uses control-flow analysis to identify candidate call sites, flowdirected inlining can inline procedures whose relationships to their call sites are not apparent. For instance, procedures defined in other modules, passed as arguments, returned as values, or extracted from data structures can all be inlined. Flow-directed inlining specializes procedures for particular call sites, and can selectively inline a particular procedure at some call sites but not at others. Finally, flow-directed inlining encourages modular implementations: control-flow analysis, inlining, and post-inlining optimizations are all orthogonal components. Results from a prototype implementation indicate that this strategy effectively reduces procedure call overhead and leads to significant reduction in execution time. 1 Introduction Functio...
Analyzing Stores and References in a Parallel Symbolic Language
- IN LFP
, 1994
"... We describe an analysis of a parallel language in which processes communicate via first-class mutable shared locations. The sequential core of the language defines a higher-order strict functional language with list data structures. The parallel extensions permit processes and shared locations to be ..."
Abstract
-
Cited by 23 (4 self)
- Add to MetaCart
We describe an analysis of a parallel language in which processes communicate via first-class mutable shared locations. The sequential core of the language defines a higher-order strict functional language with list data structures. The parallel extensions permit processes and shared locations to be dynamically created; synchronization among processes occurs exclusively via shared locations. The analysis is defined by an abstract interpretation on this language. The interpretation is efficient and useful, facilitating a number of important optimizations related to synchronization, processor/thread mapping, and storage management.
Abstract interpretation based formal methods and future challenges, invited paper
- Informatics — 10 Years Back, 10 Years Ahead, volume 2000 of Lecture Notes in Computer Science
, 2001
"... Abstract. In order to contribute to the solution of the software reliability problem, tools have been designed to analyze statically the run-time behavior of programs. Because the correctness problem is undecidable, some form of approximation is needed. The purpose of abstract interpretation is to f ..."
Abstract
-
Cited by 22 (6 self)
- Add to MetaCart
Abstract. In order to contribute to the solution of the software reliability problem, tools have been designed to analyze statically the run-time behavior of programs. Because the correctness problem is undecidable, some form of approximation is needed. The purpose of abstract interpretation is to formalize this idea of approximation. We illustrate informally the application of abstraction to the semantics of programming languages as well as to static program analysis. The main point is that in order to reason or compute about a complex system, some information must be lost, that is the observation of executions must be either partial or at a high level of abstraction. In the second part of the paper, we compare static program analysis with deductive methods, model-checking and type inference. Their foundational ideas are briefly reviewed, and the shortcomings of these four methods are discussed, including when they should be combined. Alternatively, since program debugging is still the main program verification

