Abstract
Strictness analysis is an important technique for optimization of lazy functional languages. It is well known that all strictness analysis methods are incomplete, i.e., fail to report some strictness properties. In this paper, we provide a precise and formal characterization of the loss of information that leads to this incompletenss. Specifically, we establish the following characterization theorem for Mycroft's strictness analysis method and a generalization of this method, called ee-analysis, that reasons about exhaustive evaluation in nonflat domains: Mycroft's method will deduce a strictness property for program P iff the property is independent of any constant appearing in any evaluation of P. To prove this, we specify a small set of equations, called E-axioms, that capture the information loss in Mycroft's method and develop a new proof technique called E-rewriting. E-rewriting extends the standard notion of rewriting to permit the use of reductions using E-axioms interspersed with standard reduction steps. E-axioms are a syntactic characterization of information loss and E-rewriting provides and algorithm-independent proof technique for characterizing the power of analysis methods. It can be used to answer questions on completeness and incompleteness of Mycroft's method on certain natural classes of programs. Finally, the techniques developed in this paper provide a general principle for establishing similar results for other analysis methods such as those based on abstract interpretation. As a demonstration of the generality of our technique, we give a characterization theorem for another variation of Mycroft's method called dd-analysis.
- AUGUSTSSON, L. 1984. A compiler for lazy ML. In Proceedings of the 1984 ACM Conference on LISP and Functional Programming. ACM, New York, pp. 218-227. Google Scholar
- BURN, G., HANKIN, C., AND ABRAMSKY, S. 1985. Theory and practice of strictness analysis for higher order functions. In Workshop on Programs as Data Objects, N. Jones and H. Ganzinger, eds. Lecture Notes in Computer Science, vol 217. Springer-Verlag, New York. Google Scholar
- CLACK, C., AND JONES, S. P. 1985. Strictness analysis--A practical approach. In Functional Programming and Computer Architecture. Lecture Notes in Computer Science, vol 20. Springer- Verlag, New York, 35-49. Google Scholar
- COUSOT, P., AND COUSOT, R. 1977. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the 4th ACM Symposium on Principles of Programming Languages (Los Angeles, Calif., Jan. 17-19). ACM, New York, pp. 238-252. Google Scholar
- ERNOULT, C., AND MYCROFT, A. 1995. Untyped Strictness Analysis. J. Funct. Prog. 5, 1 (Jan), 38-50.Google ScholarCross Ref
- HALL, C. V., AND WISE, D.S. 1987. Compiling strictness into streams. In Proceedings of the 14th Annual ACM Symposium on Principles of Programming Languages (Munich, West Germany, Jan. 21-23). ACM, New York, pp. 132-143. Google Scholar
- HUDAK, P., AND YOUNG, J. 1986. Higher-order strictness analysis for untyped lambda calculus. In Proceedings of the 13th Annual ACM Symposium on Principles of Programming Languages (St. Petersburg Beach, Fla., Jan. 13-15). ACM, New York, pp. 97-109. Google Scholar
- HUET, G., AND LEVY, J. 1979. Computations in nonambiguous linear term rewriting systems. Tech. Rep. 359, IRIA, Le Chesney, France.Google Scholar
- HUGHES, R., AND WADLER, P. 1987. Projections for strictness analysis. In Functional Programming and Computer Architecture. Lecture Notes in Computer Science, vol 27. Springer-Verlag, New York, pp. 385-407. Google Scholar
- HUNT, S., AND HANKIN, C. 1991. Fixed points and frontiers: a new perspective. In J. Funct. Prog. 1, 1, (Jan.), 91-120.Google ScholarCross Ref
- KASER, O., PAWAGI, S., RAMAKRISHNAN, C. R., RAMAKRISHNAN, I. V., AND SEKAR, R.C. 1992. Fast parallel implementation of functional languages--The EQUALS experience. In Proceedings of the 1992 ACM Conference on LISP and Functional Programming (San Francisco, Calif., June 22-24). ACM, New York, pp. 335-344. Google Scholar
- Kuo, T., AND MISHRA, P. 1989. Strictness analysis: A new perspective based on type inference. In Proceedings of the 4th International Conference on Functional Programming Languages and Computer Architecture (London, England, Sept. 11-13). ACM, New York, pp. 260-272. Google Scholar
- MYCROFT, A. 1980. The theory and practice of transforming call-by-need into call-by-value. In International Symposium on Programming. Lecture Notes in Computer Science, vol 8. Springer- Verlag, New York, pp. 269-281. Google Scholar
- MYCROFT, A. 1993. Completeness and predicate-based abstract interpretation. In Proceedings of the A CM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (Copenhagen, Denmark, June 14-16). ACM, New York, pp. 179-185. Google Scholar
- RAMAKRISHNAN, C., RAMAKRISHNAN, I., AND SEKAR, R. 1995. A symbolic constraint-solving framework for analysis of logic programs. In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation. ACM, New York, pp. 12-23. Google Scholar
- REDDY, U., AND KAMIN, S. 1992. On the power of abstract interpretation. In IEEE International Conference on Computer Languages. IEEE, New York, pp. 24-33.Google Scholar
- SEKAR, R., MISHRA, P., AND RAMAKRISHNAN, I. 1991. On the power and limitation of strictness analysis based on abstract interpretation. In Proceedings of the 18th Annual ACM Symposium on Principles of Programming Languages (Orlando, Fla., Jan. 21-23). ACM, New York, pp. 37-48. Google Scholar
- SEKAR, R., AND RAMAKRISHNAN, I. 1993. Beyond strong sequentiality. Inf. Comput. 104, 1 (May), 78-109. Google ScholarDigital Library
- SEKAR, R., AND RAMAKRISHNAN, I. 1995. Fast strictness analysis based on demand propagation. ACM Trans. Prog. Lang. Syst. 17, 6 (Nov.), 896-937. Google ScholarDigital Library
- WADLER, P. 1987. Strictness analysis on non-flat domains (by abstract interpretation over finite domains). In Abstract Interpretation of Declarative Languages, S. Abramsky and C. Hankin, eds. Ellis Horwood, Chichester, U.K., 266-275.Google Scholar
Index Terms
- On the power and limitations of strictness analysis
Recommendations
On the power of abstract interpretation
Increasingly sophisticated applications of static analysis make it important to precisely characterize the power of static analysis techniques. Sekar et al. recently studied the power of strictness analysis techniques and showed that strictness analysis ...
Derivation and inference of higher-order strictness types
We extend an existing first-order typing system for strictness analysis to the fully higher-order case, covering both the derivation system and the inference algorithm. The resulting strictness typing system has expressive capabilities far beyond that ...
Logical approximation for program analysis
The abstract interpretation of programs relates the exact semantics of a programming language to a finite approximation of those semantics. In this article, we describe an approach to abstract interpretation that is based in logic and logic programming.
...
Comments