skip to main content
article
Free Access

CPS-transformation after strictness analysis

Published:01 September 1992Publication History
First page image

References

  1. 1 ACM. Proceedings of the 1992 ACM Conference on Lisp and Functional Programming. LISP Pointers V, 1 (June 1992).Google ScholarGoogle Scholar
  2. 2 A2PEL, A.W. Compiling with Continuations. Cambridge University Press, New York, 1992. Google ScholarGoogle Scholar
  3. 3 BURN, G., AND LE M}~TAYER, D.L. Proving the correctness of compiler optimisations based on a global program analysis. Tech. Rep. Doc 92/20, Dept. of Computing, Imperial College of Science, Technology and Medicine, London, 1992.Google ScholarGoogle Scholar
  4. 4 DANVY, O. Back to direct style. In Proceedings of the 4th European Symposium on Programming, B. Krieg-Briickner, Ed. Lecture Notes in Computer Science, vol. 582. Springer-Verlag, New York, 1992, pp. 130-150. (Extended version to appear in Sci. Comput. Program.) Google ScholarGoogle Scholar
  5. 5 DANVY, O., AND FILINSKt, A. Representing control, a study of the CPS transformation. Math. Structures Comput. Sci. 2, 4, 361-391.Google ScholarGoogle Scholar
  6. 6 DANVY, O., AND HATCLIFF, J. Thunks (continued). In Proceedings of the Workshop on Static Analysis WSA'92. Bigre J. 81-82 (Sept. 1992), 3-11. (Extended version available as Tech. Rep. CIS-92-28, Kansas State Univ., Manhattan, 1992.)Google ScholarGoogle Scholar
  7. 7 DANVY, O., AND LAWALL, J.L. Back to direct style II: First-class continuations. In Proceed- ~ngs of the 1992 ACM Conference on Lisp and Functional Programming. LISP Pointers V, 1 (June 1992), 299-310. Google ScholarGoogle Scholar
  8. 8 DANVY, O., AND TALCOTT, C. L., EDS. Proceedings of the ACM SIGPLAN Workshop on Continuations. Tech. Rep. STAN-CS-92-1426, Stanford Univ., Calif., June 1992. Google ScholarGoogle Scholar
  9. 9 FILINSKI, A. Recursion from iteration. In Proceedings of the ACM SIGPLAN Workshop on Continuations, 0. Danvy and C. L. Talcott, Eds. Tech. Rep. STAN-CS-92-1426, Stanford Univ., Calif., June 1992, pp. 3-11.Google ScholarGoogle Scholar
  10. 10 FRADET, P., AND LE MI~TAYER, D. Compilation of functional languages by program transformation. A~CM Trans. Program. Lang. Syst. 13 (1991), 21-51. Google ScholarGoogle Scholar
  11. 11 INGERMAN, P.Z. Thunks, a way of compiling procedure statements with some comments on procedure declarations. Commun. ACM 4, 1 (Jan. 1961), 55-58. Google ScholarGoogle Scholar
  12. 12 KELSEY, R., AND HUDAK, P. Realistic compilation by program transformation. In Proceedings of the 16th Annual ACM Sympostum on Principles of Programming Languages (Austin, Tex., Jan.). ACM, New York, 1989, pp. 281-292. Google ScholarGoogle Scholar
  13. 13 MEYER, A. R., AND WAND, M. Continuation semantics in typed lambda-calculi (summary). In Logics of Programs--Proceedings, R. Parikh, Ed. Lecture Notes in Computer Science, vol. 193, Springer-Verlag, New York, 1985, pp. 219-224. Google ScholarGoogle Scholar
  14. 14 NIELSON, F., AND NIELSON, H.R. Two-Level Functional Languages. Cambridge Tracts in Theoretical Computer Science, vol. 34. Cambridge University Press, New York, 1992. Google ScholarGoogle Scholar
  15. 15 NIELSON, H. R., AND NIELSON, F. Semantics with Applications, a Formal Introduction. Wiley, New York, 1992. Google ScholarGoogle Scholar
  16. 16 OKASAKI, C., LEE, P., AND TARDITI, D. Graph reduction and lazy continuation-passing style. In Proceedings of the ACM SIGPLAN Workshop on Continuations, O. Danvy and C. L. Talcott, Eds. Tech. Rep. STAN-CS-92-1426, Stanford Univ., Calif., June 1992, pp. 91-101.Google ScholarGoogle Scholar
  17. 17 PEYTON JONES, S.L. The Implementation of Functional Programming Languages. Prentice- Hall International Series in Computer Science. Prentice-Hall, Englewood Cliffs, N.J., 1987. Google ScholarGoogle Scholar
  18. 18 PLOTKIN, G.D. Call-by-name, call-by-value and the A-calculus. Theor. Comput. Sci. 1 (1975), 125-159.Google ScholarGoogle Scholar
  19. 19 REYNOLDS, j. C. Definitional interpreters for higher-order programming languages, in Proceedings of 25th ACM National Conference (Boston, Ma~.). ACM, New York, 1972, pp. 717-740. Google ScholarGoogle Scholar
  20. 20 SABRY, A., AND FELLEISEN, M. Reasoning about programs in continuation-passing style. In Proceedings of the 1992 ACM Conference on Lisp and Functional Programming. LISP Pointers V, 1 (June 1992), 288-298. Google ScholarGoogle Scholar
  21. 21 SCHMtDT, D.A. Denotational Semantics: A Methodology for Language Development. Allyn and Bacon, Boston, Mass., 1986. Google ScholarGoogle Scholar
  22. 22 STEELE, G. L., JR. Rabbit: A compiler for Scheme. Tech. Rep. AI-TR-474, Aiiificial Intelligence Lab., Massachusetts Institute of Technology, Cambridge, Mass., May 1978. Google ScholarGoogle Scholar

Index Terms

  1. CPS-transformation after strictness analysis

                Recommendations

                Reviews

                Frank George Pagan

                As the authors of this narrowly focused research paper state in their abstract, “strictness analysis is a common component of compilers for call-by-name functional languages; the continuation-passing-style (CPS-) transformation is a common component of compilers for call-by-value functional languages.” The paper aims to extend the CPS technique to apply to the implementation of functional languages with call-by-name semantics. The authors accomplish this extension in two steps. First, they specify a transformation from call-by-name programs with strictness annotations into call-by-value programs with the explicit suspension primitives delay and force . Second, they define a transformation from call-by-value programs with delay and force into CPS. The composition of these two transformations amounts to a new kind of CPS transformation whose advantages include tail-recursive code, evaluation-order independence, and elimination of unnecessary suspensions. It is implicitly assumed that the reader is already an expert in functional language implementation (an area whose literature is amply represented by the paper's 22 references). Familiarity with such technical concepts as CPS and strictness is taken for granted. Heavy use is made of mathematical specifications. The paper does contain a modicum of discussion of potential practical benefits of the new CPS transformation; its overall style, however, is that of a theoretical contribution.

                Access critical reviews of Computing literature here

                Become a reviewer for Computing Reviews.

                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!