BU CAS CS 320
Concepts of Programming Languages
Semester: Fall 2004

Course Information

  • Instructor: Hongwei Xi
  • Instructor's Office Hours: Thursdays 11-12 and Mondays 2-4 at MCS 172
  • Teaching Assistant: Alexandra Stefan
  • TA's Office Hours: Tuesdays 1-2 and Fridays 1-2 at MCS 178
  • Graders: Rui Shi and Dengping Zhu
  • Lecture Times: TR: 9:30 -- 11AM
  • Classroom: KCB, Room 102, 565 Commonwealth Avenue
  • Lab Sessions: MCS B33, 111 Cummington Street (Monday 11-12 and Friday 12-1)
  • Midterm: a one-hour in-class exam on Thursday, 28 October, 2004
  • Final: a two-hour in-class exam officially scheduled from 12:30 -- 2:30PM on Thursday, 16 December, 2004
  • Overview

    Concepts of Programming Languages is a course that introduces students to some fundamental concepts in programming language design and implementation. The primary goal is to allow students who complete this subject to have a good feel for the elements of style and aesthetics of programming and a good command of the major techniques for controlling complexity in a large system.

    The programming language Scheme, a dialect of Lisp that we use in this course, is an attempt to bring together the power and elegance of List and Algol. From Lisp we take the metalinguistic power that derives from the simple syntax, the uniform representation of programs as data objects, and the systematic management of heap-allocated data. From Algol we take lexical scoping and block structure.

    Standard ML (SML) is a functional programming language that makes extensive use of types in capturing programming invariants. We are to explain how datatypes in SML can be employed to conveniently model data structures and how pattern matching can facilitate programming with datatypes. Also, we are to make use of the module system of SML in the construction of (relatively) large programs.

    Ultimately, we would like to make a convincing argument that programming can be a great of deal fun.

    Prerequisites

  • Familiarity with programming in general.
  • Textbook

  • Structure and Interpretation of Computer Programs (second edition), by Harold Abelson and Gerald Jay Sussman with Julie Sussman. ISBN 0-07-000484-6. McGraw-Hill. (An on-line verision is here)
  • Programming in Standard ML (draft), by Robert Harper.
  • Programming Languages

  • MIT Scheme
  • Dr. Scheme
  • Standard ML of New Jersey
  • Links

  • Syllabus (ps)(pdf)
  • Introduction (ppt)
  • Schedules
  • How to use gsubmit to submit homework?
  • Some guidelines for submitting your homework (pdf) (ps)
  • Archived Messages
  • Notes

  • Inductive Reasoning (ps)(pdf)
  • A simple type system (ps)(pdf)
  • A crash course on SML (ps)(pdf)
  • Lecture Notes (ps)(pdf)
  • Reference Books

  • The Little Schemer (4th edition) by Daniel P. Friedman and Matthias Felleisen. ISBN 0-262-56099-2 (MIT Press)
  • The Seasoned Schemer by Daniel P. Friedman and Matthias Felleisen. ISBN 0-262-56100-X (MIT Press)
  • Essentials of Programming Languages by Daniel P. Friedman, Mitchell Wand and Christopher T. Haynes. ISBN 0-262-06145-7 (MIT Press) (hb) and IBSN 0-07-022443-9 (McGraw-Hill).
  • ML for the Working Programmer by Lawrence C. Paulson. ISBN 0-521-57050-6 (hardback) and 0-521-56543-X (paperback). Cambridge University Press.
  • Elements of ML Programming by Jeffery D. Ullman. ISBN 0-13-790387-1. Prentice-Hall.
  • Introduction to Programming using SML by Michael R. Hansen and Hans Rischel. ISBN 0-201-39820-6. Addison-Wesley 1999.
  • Mailing List

  • To join the course mailing list, type csmail -a cs320 at the Unix prompt
  • To inspect who else is on the mailing list, type csmail -p cs320
  • To remove yourself from the mailing list, type csmail -r cs320
  • Class Calendar

  • Class begins on Tuesday, 7 September, 2004.
  • Class ends on Monday, December 13, 2004.
  • Midterm: a one-hour in-class exam on Thursday, 28 October, 2004
  • Final: a two-hour in-class exam officially scheduled from 12:30 -- 2:30PM on Thursday, 16 December, 2004
  • Assignments

  • Assignment 1 (ps) (pdf) (Due on the 21st of September, 2004)
    (A session of playing Game-of-24)
    (A Table for Card Game-of-24), which you may find useful for testing your implementation.
    (Grade information: total= 250, average= 190, median= 203)
  • Assignment 2 (ps) (pdf) (Due on the 28th of September, 2004)
    (Grade information: total= 100, average= 84, median= 90)
  • Assignment 3 (ps) (pdf) (Due on the 5th of October, 2004)
    (Grade information: total= 160, average= 121, median= 125)
  • Assignment 4 (ps) (pdf) (Due on the 12th of October, 2004)
    (Grade information: total= 160, average= 131, median= 152)
  • Assignment 5 (ps) (pdf) (Due on the 26th of October, 2004)
    (Grade information: total= 230, average= 174, median= 195)
  • Assignment 6 (ps) (pdf) (Due on the 9th of November 2004)
    (Scheme code for a blackjack dealer)
    (The description of your task)
    (A description of the blackjack game)
    (The basic strategy for the blackjack game)
    (Grade information: total = 210 + 100, average = 183, median = 190)
  • Assignment 7 (ps) (pdf) (Due on the 16th of November, 2004)
    (Grade information: total = 150, average = 110, median = 110)
  • Assignment 8 (ps) (pdf) (Due on the 30th of November, 2004)
    (Grade information: total = 160, average = 102, median = 115)
  • Solutions

  • Solution 1
  • Solution 2
  • Solution 3
  • Solution 4
  • Solution 5
  • Solution 6
  • Solution 7
  • Solution 8
  • Examinations

  • Midterm Solution (ps) (pdf)
    (Grade information: total= 125, average= 70, median= 74)