skip to main content
article

Improving flow analyses via ΓCFA: abstract garbage collection and counting

Published:16 September 2006Publication History
Skip Abstract Section

Abstract

We present two independent and complementary improvements for flow-based analysis of higher-order languages: (1) abstract garbage collection and (2) abstract counting, collectively titled ΓCFA.Abstract garbage collection is an analog to its concrete counterpart: we determine when an abstract resource has become unreachable, and then reallocate it as fresh. This prevents flow sets from merging in the abstract, which has two immediate effects: (1) the precision of the analysis is increased, and (2) the running time of the analysis is frequently reduced. In some nontrivial cases, we achieve an order of magnitude improvement in precision and time simultaneously.In abstract counting, we track how many times an abstract resource has been allocated. A count of one implies that the abstract resource momentarily represents only one concrete resource. This, in turn, allows us to perform environment analysis and to expand the kinds (rather than just the degree) of optimizations available to the compiler.

References

  1. AGESEN, O. The cartesian product algorithm: Simple and precise type inference of parametric polymorphism. In Proceedings of ECOOP 1995 (1995), pp. 2--26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. CHASE, D. R., WEGMAN, M., AND ZADECK, F. K. Analysis of Pointers and Structures. In ACM SIGPLAN Conference on Programming Language Design and Implementation (White Plains, New York, June 1990), pp. 296--310. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. COUSOT, P., AND COUSOT, R. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In ACM SIGPLAN Symposium on Principles of Programming Languages (Los Angeles, California, Jan. 1977), vol. 4, pp. 238--252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. HANNAN, J. Type Systems for Closure Conversion. In Workshop on Types for Program Analysis (1995), pp. 48--62.Google ScholarGoogle Scholar
  5. HUDAK, P. A semantic model of reference counting and its abstraction (detailed summary). In Proceedings of the 1986 ACMConference on LISP and Functional Programming (Cambridge, Massachusetts, Aug. 1986), pp. 351--363. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. JAGANNATHAN, S., THIEMANN, P., WEEKS, S., AND WRIGHT, A. K. Single and loving it: Must-alias analysis for higher-order languages. In ACM SIGPLAN Symposium on Principles of Programming Languages (San Diego, California, January 1998), pp. 329--341. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. MIGHT, M., AND SHIVERS, O. Environment Analysis via ΔCFA. In ACM SIGPLAN Symposium on Principles of Programming Languages (Charleston, South Carolina, January 2006), pp. 127--140. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. SHIVERS, O. Control-Flow Analysis of Higher-Order Languages. PhD thesis, School of Computer Science, Carnegie-Mellon University, Pittsburgh, Pennsylvania, May 1991. Technical Report CMUCS-91--145. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. SHIVERS, O., AND MIGHT, M. Continuations and transducer composition. In ACM SIGPLAN Conference on Programming Language Design and Implementation (Ottawa, Canada, June 2006). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. STEELE JR., G.L. RABBIT: a compiler for SCHEME. Master's thesis, Artificial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, Massachusetts, May 1978. Technical report AI-TR-474. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. WAND, M., AND STECKLER, P. Selective and lightweight closure conversion. In ACM SIGPLAN Symposium on Principles of Programming Languages (Portland, Oregon, January 1994), vol. 21, pp. 435--445. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. WRIGHT, A.K., AND JAGANNATHAN, S. Polymorphic splitting: An effective polyvariant flow analysis. ACM Transactions on Programming Languages and Systems 20, 1 (January 1998), 166--207. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Improving flow analyses via ΓCFA: abstract garbage collection and counting

    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

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!