skip to main content
article
Free Access

On the power and limitations of strictness analysis

Published:01 May 1997Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. 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 ScholarGoogle Scholar
  4. 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 ScholarGoogle Scholar
  5. ERNOULT, C., AND MYCROFT, A. 1995. Untyped Strictness Analysis. J. Funct. Prog. 5, 1 (Jan), 38-50.Google ScholarGoogle ScholarCross RefCross Ref
  6. 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 ScholarGoogle Scholar
  7. 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 ScholarGoogle Scholar
  8. HUET, G., AND LEVY, J. 1979. Computations in nonambiguous linear term rewriting systems. Tech. Rep. 359, IRIA, Le Chesney, France.Google ScholarGoogle Scholar
  9. 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 ScholarGoogle Scholar
  10. HUNT, S., AND HANKIN, C. 1991. Fixed points and frontiers: a new perspective. In J. Funct. Prog. 1, 1, (Jan.), 91-120.Google ScholarGoogle ScholarCross RefCross Ref
  11. 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 ScholarGoogle Scholar
  12. 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 ScholarGoogle Scholar
  13. 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 ScholarGoogle Scholar
  14. 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 ScholarGoogle Scholar
  15. 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 ScholarGoogle Scholar
  16. 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 ScholarGoogle Scholar
  17. 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 ScholarGoogle Scholar
  18. SEKAR, R., AND RAMAKRISHNAN, I. 1993. Beyond strong sequentiality. Inf. Comput. 104, 1 (May), 78-109. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. SEKAR, R., AND RAMAKRISHNAN, I. 1995. Fast strictness analysis based on demand propagation. ACM Trans. Prog. Lang. Syst. 17, 6 (Nov.), 896-937. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle Scholar

Index Terms

  1. On the power and limitations of strictness analysis

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image Journal of the ACM
            Journal of the ACM  Volume 44, Issue 3
            May 1997
            163 pages
            ISSN:0004-5411
            EISSN:1557-735X
            DOI:10.1145/258128
            • Editor:
            • F. T. Leighton
            Issue’s Table of Contents

            Copyright © 1997 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 May 1997
            Published in jacm Volume 44, Issue 3

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader