Concepts of Programming Languages
Semester: Summer 2009

Course Information

  • Instructor: Hongwei Xi
  • Teaching Fellow: Likai Liu (TF's webpage for this course)
  • Lecture Times: MTWR: 3:00 -- 5:00PM
  • Classroom: MCS, Room B33, 111 Cummington Street
  • Midterm1: a two-hour in-class exam on Friday, 29 May, 2009
  • Midterm2: a two-hour in-class exam on Thursday, 11 June, 2009
  • Final: a two-hour in-class exam on Thursday, 25 June, 2009
  • 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.

    ATS is a functional programming language that makes extensive use of types in capturing programming invariants. We are to explain how datatypes in ATS 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 ATS in the construction of (relatively) large programs.

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


  • Familiarity with programming in general.
  • Textbook

  • ML for the working programmer (second edition), by Lawrence C. Paulson. ISBN 0-521-56543. Cambridge University Press.
  • Reference Books

  • ATS User's Guide (pdf) (ps)
  • Programming in Standard ML (draft), by Robert Harper.
  • 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.
  • Programming Languages

  • ATS (this mode may be helpful if you use emacs to edit ATS source code)
  • Links

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

  • Inductive Reasoning (pdf) (ps)
  • A crash course on SML (pdf) (ps)
  • A simple type system (pdf) (ps)
  • BUCASCS320.hats
  • code-2009-05-19.dats
  • rational.sats and rational.dats
  • code-2009-05-20.dats
  • mylook.dats
  • mylook_scrabble.dats
  • code-2009-05-21.dats
  • lecture03.dats
  • chapter3_examples.dats
  • list0_randgen.dats
  • code-2009-05-27.dats
  • code-2009-05-28.dats
  • code-2009-05-29.dats
  • chapter4_examples.dats
  • code-2009-06-01.dats
  • code-2009-06-02.dats
  • code-2009-06-03.dats
  • montecarlo.dats
  • linkedlist.dats
  • code-2009-06-09.dats
  • code-2009-06-10.dats
  • list0_shuffle.dats
  • chapter5_examples.dats
  • code-2009-06-11.dats
  • STFPL.dats
  • STFPL (tgz): typechecker and interpreter
  • code-2009-06-22.dats
  • code-2009-06-23.dats
  • code-2009-06-24.dats
  • Mailing List

  • The class mailing-list is cascs320a1-l@bu.edu. Please find information on using the mailing-list here.
  • Class Calendar

  • Class begins on Tuesday, 19 May, 2009.
  • There is no class on Monday, 25 May, 2009
  • Midterm1: a two-hour in-class exam on Thursday, 4 June, 2009
  • Midterm2: a two-hour in-class exam on Thursday, 18 June, 2009
  • Final: a two-hour in-class exam on Thursday, June 25, 2009
  • Assignments

  • Assignment 1 (sats) (Due Tuesday, May 26, 2006)
  • Assignment 2 (sats) (Due Monday, June 1, 2009)
  • Assignment 3 (sats) (Due Tuesday, June 9, 2009)
  • Assignment 4 (sats) (Due Tuesday, June 16, 2009)
  • Assignment 5 (Implementing a blackjack player) (Due Tuesday, June 23, 2009)

    In this assignment, you are required to implement a blackjack player to play the blackjack game with the dealer. The objective is to find a good strategy for the player so as to maximize the winning potential. For instance, you can first implement the basic strategy and then modify it by employing card counting.

  • Solutions

  • Solution 1
  • Solution 2
  • Solution 3
  • Solution 4
  • Examinations

  • Midterm I: sample(pdf) midterm1.sats solution
  • Midterm II sample(pdf) midterm2.sats solution
  • Final sample(pdf) final.sats solution