Revised^5 Report on the Algorithmic Language Scheme

How to Design Programs: An Introduction to Programming and Computing

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Revised 5 Report on the Algorithmic Language Scheme R ICHARD K ELSEY , W ILLIAM C LINGER, AND J ONATHAN R EES ( Editors ) H. A BELSON R. K. D YBVIG C. T. H AYNES G. J. R OZAS N. I. A DAMS IV D. P. F RIEDMAN E. K OHLBECKER G. L. S TEELE J R . D. H. B ARTLEY R. H ALSTEAD D. O XLEY G. J. S USSMAN G. B ROOKS C. H ANSON K. M. P ITMAN M. W AND Dedicated to the Memory of Robert Hieb 20 February 1998 SUMMARY The report gives a defining description of the program- ming language Scheme. Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language invented by Guy Lewis Steele Jr. and Gerald Jay Sussman. It was designed to have an exceptionally clear and simple semantics and few different ways to form expressions. A wide variety of programming paradigms, in- cluding imperative, functional, and message passing styles, find convenient expression in Scheme. The introduction offers a brief history of the language and of the report. The first three chapters present the fundamental ideas of the language and describe the notational conventions used for describing the language and for writing programs in the language. Chapters 4 and 5 describe the syntax and semantics of expressions, programs, and definitions. Chapter 6 describes Scheme’s built-in procedures, which include all of the language’s data manipulation and in- put/output primitives. Chapter 7 provides a formal syntax for Scheme written in extended BNF, along with a formal denotational semantics. An example of the use of the language follows the formal syntax and semantics. The report concludes with a list of references and an al- phabetic index. CONTENTS Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 Overview of Scheme . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Notation and terminology . . . . . . . . . . . . . . . . 3 2 Lexical conventions . . . . . . . . . . . . . . . . . . . . . . . 5 2.1 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Whitespace and comments . . . . . . . . . . . . . . . . 5 2.3 Other notations . . . . . . . . . . . . . . . . . . . . . . 5 3 Basic concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1 Variables, syntactic keywords, and regions . . . . . . . 6 3.2 Disjointness of types . . . . . . . . . . . . . . . . . . . 6 3.3 External representations . . . . . . . . . . . . . . . . . 6 3.4 Storage model . . . . . . . . . . . . . . . . . . . . . . . 7 3.5 Proper tail recursion . . . . . . . . . . . . . . . . . . . 7 4 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.1 Primitive expression types . . . . . . . . . . . . . . . . 8 4.2 Derived expression types . . . . . . . . . . . . . . . . . 10 4.3 Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5 Program structure . . . . . . . . . . . . . . . . . . . . . . . . 16...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern