Advertisement

Compiler construction using scheme

  • Erik Hilsdale
  • J. Michael Ashley
  • R. Kent Dybvig
  • Daniel P. Friedman
From Transistors to Computer Architecture
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1022)

Abstract

This paper describes a course in compiler design that focuses on the Scheme implementation of a Scheme compiler that generates native assembly code for a real architecture. The course is suitable for advanced undergraduate and beginning graduate students. It is intended both to provide a general knowledge about compiler design and implementation and to serve as a springboard to more advanced courses. Although this paper concentrates on the implementation of a compiler, an outline for an advanced topics course that builds upon the compiler is also presented.

Keywords

Scheme Program Source Language Register Allocation Assembly Code Deterministic Finite Automaton 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    Alfred D. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers Principles, Techniques and Tools. Addison-Wesley, 1986.Google Scholar
  2. [2]
    Andrew W. Appel. Compiling with Continuations. Cambridge University Press, 1992.Google Scholar
  3. [3]
    Andrew W. Appell and Zhong Shao. An empirical and analytic study of stack vs. heap cost for languages with closures. To appear in Journal of Functional Programming.Google Scholar
  4. [4]
    J. Michael Ashley. A practical and flexible flow analysis for higher-order languages. To appear in Proceedings of the ACM Symposium on Principles of Programming Languages, 1996.Google Scholar
  5. [5]
    Henk P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. Number 103 in Studies in Logic and the Foundations of Mathematics. North-Holland, 1984.Google Scholar
  6. [6]
    Robert G. Burger, Oscar Waddell, and R. Kent Dybvig. Register allocation using lazy saves, eager restores, and greedy shuffling. In Proceedings of the ACM SIGPLAN '95 Conference on Programming Language Design and Implementation, pages 130–138, 1995.Google Scholar
  7. [7]
    William Clinger and Jonathan Rees (editors). Revised4 report on the algorithmic language Scheme. Lisp Pointers, 5(3):1–55, July–September 1991.Google Scholar
  8. [8]
    William D. Clinger and Lars Thomas Hansen. Lambda, the ultimate label, or a simple optimizing compiler for scheme. In Proceedings of the 1994 ACM Conference on LISP and Functional Programming, pages 128–139, 1994.Google Scholar
  9. [9]
    R. Kent Dybvig, Daniel P. Friedman, and Christopher T. Haynes. Expansion-passing style: A general macro mechanism. Lisp and Symbolic Computation, 1(1):53–75, 1988.Google Scholar
  10. [10]
    R. Kent Dybvig, Robert Hieb, and Tom Butler. Destination-driven code generation. Technical Report 302, Indiana University, February 1990.Google Scholar
  11. [11]
    Cormac Flanagan and Matthias Felleisen. The semantics of future and its use in program optimization. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 209–220, 1995.Google Scholar
  12. [12]
    Cormac Flanagan, Amr Sabry, Bruce F. Duba, and Matthias Felleisen. The essence of compiling with continuations. In Proceedings of the ACM SIGPLAN '93 Conference on Programming Language Design and Implementation, pages 237–247, 1993.Google Scholar
  13. [13]
    Joshua D. Guttman and Mitchell Wand, editors. VLISP: A Verified Implementation of Scheme. Kluwer, Boston, 1995. Originally published as a special double issue of the journal Lisp and Symbolic Computation (Volume 8, Issue 1/2).Google Scholar
  14. [14]
    Robert Hieb, R. Kent Dybvig, and Carl Bruggeman. Representing control in the presence of first-class continuations. In Proceedings of the ACM SIGPLAN '90 Conference on Programming Language Design and Implementation, pages 66–77, 1990.Google Scholar
  15. [15]
    Erik Hilsdale and Daniel P. Friedman. A Scheme-based course on compiler construction. In Preparation.Google Scholar
  16. [16]
    Suresh Jagannathan and Andrew Wright. Effective flow analysis for avoiding runtime checks. In Proceedings of the 1995 International Static Analysis Symposium, 1995.Google Scholar
  17. [17]
    Richard A. Kelsey and Jonathan A. Rees. A tractable Scheme implementation. Lisp and Symbolic Computation, 7(4):315–335, 1994.Google Scholar
  18. [18]
    David A. Kranz, Richard Kelsey, Jonathan A. Rees, Paul Hudak, J. Philbin, and Norman I. Adams. Orbit: an optimizing compiler for Scheme. SIGPLAN Notices, ACM Symposium on Compiler Construction, 21(7):219–233, 1986.Google Scholar
  19. [19]
    Zhong Shao and Andrew W. Appel. Space-efficient closure representations. In Proceedings of the 1994 ACM Conference on LISP and Functional Programming, pages 130–161, 1994.Google Scholar
  20. [20]
    Richard L. Sites, editor. Alpha Architecture Reference Manual. Digital Press, 1992.Google Scholar
  21. [21]
    Michael Sperber and Peter Thiemann. The essence of LR parsing. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, PEPM '95, pages 146–155, 1995.Google Scholar
  22. [22]
    Guy L. Steele Jr. Rabbit: A compiler for Scheme. Master's thesis, M.I.T (A.I. LAB.), Massachusetts, U.S.A, 1978. Also available as MIT AI Memo 474.Google Scholar
  23. [23]
    Peter A. Steenkiste. The implementation of tags and run-time type checking. In Peter Lee, editor, Topics in Advanced Language Implementation, pages 3–24. MIT Press, 1991.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • Erik Hilsdale
    • 1
  • J. Michael Ashley
    • 1
  • R. Kent Dybvig
    • 1
  • Daniel P. Friedman
    • 1
  1. 1.Computer Science DepartmentIndiana UniversityBloomington

Personalised recommendations