|
ABSTRACT
Reasoning about program variables as sets of “values” leads to a simple, accurate and intuitively appealing notion of program approximation. This paper presents approach for the compile-time analysis of ML programs. To develop the core ideas of the analysis, we consider a simple untyped call-by-value functional language. Starting with an operational semantics for the language, we develop an approximate “set-based” operational semantics, which formalizes the intuition of treating program variables as sets. The key result of the paper is an O(n3) algorithm for computing the set based approximation of a program. We then extend this analysis in a natural way to deal with arrays, arithmetic, exceptions and continuations. We briefly describe our experience with an implementation of this analysis for ML programs.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
A. Aiken and E. Wimmers, "Solving Systems of Set Constraints", Proc. 7tn IEEE Syrup. on Logic in Com. purer Science, Santa Cruz, pp. 329-340, June 1992.
|
 |
2
|
|
 |
3
|
Alexander Aiken , Edward L. Wimmers , T. K. Lakshman, Soft typing with conditional types, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.163-173, January 16-19, 1994, Portland, Oregon, United States
[doi> 10.1145/174675.177847]
|
| |
4
|
|
| |
5
|
L. Bachmair, H. Ganzinger and U. Waldmann, "Set Constraints are the Monadic Class", Technical Report MPI-I-92-240, Max-Planck-institute for Computer Science, December 1992.
|
 |
6
|
Edoardo Biagioni , Robert Harper , Peter Lee , Brian G. Milnes, Signatures for a network protocol stack: a systems application of Standard ML, Proceedings of the 1994 ACM conference on LISP and functional programming, p.55-64, June 27-29, 1994, Orlando, Florida, United States
|
 |
7
|
|
 |
8
|
|
 |
9
|
|
| |
10
|
|
| |
11
|
|
 |
12
|
|
| |
13
|
N. Heintze and J. Jaffar, "A Decision Procedure for a Class of Herbrand Set Constraints", Proc. 5th IEEE Syrup. on Logsc ,n Computer Science, Philadelphia, pp. 42-51, June 1990. (A full version of this paper appears as Carnegie Mellon University Technical Report CMU-CS-91-110, 42 pp., February 1991.)
|
| |
14
|
N. Heintze and J. Jaffar, "An Engine for Logic Program Analysis", Proc. 7th IEEE Syrup. on Logic in Computer Science, Santa Cruz, pp. 318-328, June 1992.
|
| |
15
|
|
| |
16
|
|
| |
17
|
N. Jones, "Flow Analysis of Lazy Higher-Order Functional Programs", in Abstract Interpretation of Declarative Languages, S. Abramsky and C. Hankln (Eds.), Ellis Horwood, 1987.
|
| |
18
|
|
 |
19
|
|
| |
20
|
|
| |
21
|
K. Malmkjeer, N. Heintze and O. Danvy, "ML Partial Evaluation using Set-Based Analysis", submitted for publication.
|
| |
22
|
|
 |
23
|
|
| |
24
|
|
 |
25
|
|
| |
26
|
J. Palsberg, Private Communication, November 1993.
|
| |
27
|
|
| |
28
|
|
| |
29
|
J. Reynolds, "Automatic Computation of Data Set Definitions", In/ormation Processing 68, pp. 456-461, North-Holland, 1969.
|
 |
30
|
|
CITED BY 66
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Patrick Cousot , Radhia Cousot, Formal language, grammar and set-constraint-based program analysis by abstract interpretation, Proceedings of the seventh international conference on Functional programming languages and computer architecture, p.170-181, June 26-28, 1995, La Jolla, California, United States
|
|
|
Patrick Cousot , Radhia Cousot, Formal language, grammar and set-constraint-based program analysis by abstract interpretation, Proceedings of the seventh international conference on Functional programming languages and computer architecture, p.170-181, June 26-28, 1995, La Jolla, California, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Zhendong Su , Manuel Fähndrich , Alexander Aiken, Projection merging: reducing redundancies in inclusion constraint graphs, Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.81-95, January 19-21, 2000, Boston, MA, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Karoline Malmkjær , Peter Ørbæk, Polyvariant specialisation for higher-order, block-structured languages, Proceedings of the 1995 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, p.66-76, June 21-23, 1995, La Jolla, California, United States
|
|
|
|
|
|
|
|
|
|
|
|
Suresh Jagannathan , Peter Thiemann , Stephen Weeks , Andrew Wright, Single and loving it: must-alias analysis for higher-order languages, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.329-341, January 19-21, 1998, San Diego, California, United States
|
|
|
Greg DeFouw , David Grove , Craig Chambers, Fast interprocedural class analysis, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.222-236, January 19-21, 1998, San Diego, California, United States
|
|
|
|
|
|
|
|
|
|
|
|
Hanne Riis Nielson , Flemming Nielson, Flow logic: a multi-paradigmatic approach to static analysis, The essence of computation: complexity, analysis, transformation, Springer-Verlag New York, Inc., New York, NY, 2002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Robert Bruce Findler , John Clements , Cormac Flanagan , Matthew Flatt , Shriram Krishnamurthi , Paul Steckler , Matthias Felleisen, DrScheme: a programming environment for Scheme, Journal of Functional Programming, v.12 n.2, p.159-182, March 2002
|
|
|
|
|
|
|
|
|
|
|