Abstract
Traditional flow analysis techniques, such as the ones typically employed by optimising Fortran compilers, do not work for Scheme-like languages. This paper presents a flow analysis technique --- control flow analysis --- which is applicable to Scheme-like languages. As a demonstration application, the information gathered by control flow analysis is used to perform a traditional flow analysis problem, induction variable elimination. Extensions and limitations are discussed.The techniques presented in this paper are backed up by working code. They are applicable not only to Scheme, but also to related languages, such as Common Lisp and ML.
References
- Andrew W. Appel. Compiling with Continuations. Cambridge University Press, 1992. Google Scholar
Digital Library
- J. Michael Ashley and R. Kent Dybvig. A practical and flexible flow analysis for higher-order languages. ACM Transactions on Programming Languages and Systems 20(4), pages 845--868, July 1988. Google Scholar
Digital Library
- Patrick Cousot and Radhia Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth ACM Symposium on Principles of Programming Languages, pages 238--252, 1977. Google Scholar
Digital Library
- Patrick Cousot and Radhia Cousot. Systematic design of program analysis frameworks. In Conference Record of the Sixth Annual ACM Symposium on Principles of Programming Languages, pages 269--282, 1979. Google Scholar
Digital Library
- Alain Deutsch. On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications (extended version). Research Report LIX/RR/90/11, LIX, Ecole Polytechnique, 91128 Palaiseau Cedex, France.Google Scholar
- Cormac Flanagan, Amr Sabry, Bruce Duba, and Matthias Felleisen. The essence of compiling with continuations. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 237--247, 1993. Google Scholar
Digital Library
- Nevin Heintze and David McAllester. Linear-time subtransitive control flow analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 1997. Google Scholar
Digital Library
- Neil D. Jones. Flow analysis of lambda expressions. In Automata Languages and Programming, volume 115, pages 114--128, Lecture Notes in Computer Science, Springer-Verlag, 1981. Google Scholar
Cross Ref
- Richard A. Kelsey. Compilation by Program Transformation. Ph.D. dissertation, Yale University, May 1989. Research Report 702, Department of Computer Science. Google Scholar
Digital Library
- Richard A. Kelsey. A correspondence between continuation-passing style and static single assignment form. In Proceedings of the ACM SIGPLAN Workshop on Intermediate Representations, SIGPLAN Notices 30(3), pages 13--22, 1995. Google Scholar
Digital Library
- David Kranz. ORBIT: An Optimizing Compiler for Scheme. Ph.D. dissertation, Yale University, February 1988. Research Report 632, Department of Computer Science. Google Scholar
Digital Library
- George Necula and Peter Lee. Safe kernel extensions without run-time checking. In Proceedings of the Second Symposium on Operating Systems Design and Implementation (OSDI'96), pages 229--243, 1996. Google Scholar
Digital Library
- Flemming Nielson, Hanne Riis Nielson, and Chris Hankin. Principles of Program Analysis. Springer, 1999. Google Scholar
Digital Library
- Jens Palsberg and Patrick M. O'Keefe. A type system equivalent to flow analysis. ACM Transactions on Programming Languages and Systems, 17(4), pages 576--599, July 1995. Google Scholar
Digital Library
- Amr Sabry and Matthias Felleisen. Is continuation passing useful for data-flow analysis? In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 1--12, 1994. Google Scholar
Digital Library
- David Schmidt. Data-flow analysis is model checking of abstract interpretations. In Proceedings of the 25th ACM Symposium on Principles of Programming Languages (POPL '97), pages 38--48, 1998. Google Scholar
Digital Library
- Olin Shivers. Control-Flow Analysis of Higher-Order Languages. Ph.D. dissertation, Carnegie Mellon University, May 1991. Technical Report CMU-CS-91--145, School of Computer Science. Google Scholar
Digital Library
- Guy L. Steele Jr. RABBIT: A Compiler for SCHEME. Technical Report 474, MIT AI Lab, May 1978. Google Scholar
Digital Library
- Mitchell Wand and Igor Siveroni. Constraint systems for useless variable elimination. In Proceedings of the 26th ACM Symposium on Principles of Programming Languages, pages 291--302, 1999. Google Scholar
Digital Library
- J. B. Wells, Allyn Dimock, Robert Muller, and Franklyn Turbak. A calculus for polymorphic and polyvariant flow types. Journal of Functional Programming. (To appear.) Google Scholar
Digital Library
- Andrew K. Wright and Suresh Jagannathan. Polymorphic splitting: An effective polyvariant flow analysis. ACM Transactions on Programming Languages and Systems 20(1), pages 166--207, January 1998. Google Scholar
Digital Library
- {Dragon} Aho, Ullman. Principles of Compiler Design. Addison-Wesley (1977). Google Scholar
Digital Library
- {Hecht} Hecht, Matthew S. Data Flow Analysis of Computer Programs. American Elsevier (New York, 1977). Google Scholar
Digital Library
- {R3-Report} J. Rees & W. Clinger, Ed., "The Revised3 Report on the Algorithmic Language Scheme." SIGPLAN Notices 21(12) (Dec. 1986), pp. 37--79. Google Scholar
Digital Library
- {Declarative} Steele, Guy L. Lambda: The Ultimate Declarative. AI Memo 379. MIT AI Lab (Cambridge, November 1976). Google Scholar
Digital Library
- {Rabbit} Guy L. Steele. Rabbit: A Compiler for Scheme. AI-TR-474. MIT AI Lab (Cambridge, May 1978).Google Scholar
Digital Library
- {ORBIT} Kranz, David, et al. "Orbit: An Optimizing Compiler for Scheme." Proceedings of SIGPLAN '86 Symposium on Compiler Construction (June 1986), pp. 219--233. Google Scholar
Digital Library
- {LetS} Waters, Richard C. LETS: an Expressional Loop Notation. AI Memo 680. MIT AI Lab (Cambridge, October 1982).Google Scholar
- {YLoop} Online documentation for the T3 implementation of the Yloop package is distributed by its current maintainer: Prof. Chris Riesbeck, Yale CS Dept. ([email protected]).Google Scholar
- {Hudak1} Hudak, Paul. "A Semantic Model of Reference Counting and its Abstraction." Proceedings of the 1986 ACM Conference on Lisp and Functional Programming (August 1986). Google Scholar
Digital Library
- {Hudak2} Hudak, Paul. Collecting Interpretations of Expressions (Preliminary Version). Research Report YALEU/DCS/RR-497. Yale University (August 1986).Google Scholar
- {Cousot} P. Cousot and R. Cousot. "Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints." 4th ACM Symposium on Principles of Programming Languages (1977), pp. 238--252. Google Scholar
Digital Library
Index Terms
(auto-classified)Higher-order control-flow analysis in retrospect: lessons learned, lessons abandoned





Comments