CS 15-312: Foundations of Programming Languages
(Spring 2009)

About this course

 [  Description  |  Prerequisites  |  Readings  |  Software  |  Grading  |  Assessment  ]

Description

This course has the purpose of exposing students who have mastered advanced programming techniques and concepts to some of the foundational principles that underly the very programming languages they have been using. These same principles pervade many disciplines in and beyond Computer Science and can be found any time one needs to give and work with a representation of some domain. More specifically,

See also Why Study Programming Languages?

This course will be coordinated with the edition currently offered on the main campus, taught by Professor Robert Harper. The material presented and the homeworks will be roughly the same.

Prerequisites

You must have completed CS 15-212 (Principles of Programming)

Readings

The course will closely follow Harper's book. Note that it is work in progress and is being continuously updated. Therefore, you are advised to print chapters before the relevant lecture (see schedule) rather than all at once on the first day of class.

Further References

Software

The course has a programming component, mainly in the form of 4 programming assignments. Students are allowed to use any programming language they want to develop their solution to these assignments. The only requirements are that the solution work as per the text of the assignment, be understandable to the instructors, and that the student be able to explain it. Said this, some programming languages will make the task simpler than others. In particular, using Standard ML (SML) and similar languages, or Twelf and similar languages, is likely to get you a working solution in a much shorter time than, say, Java or C.

SML

A reference build of Standard ML of New Jersey (SML/NJ), version 110.67, and Concurrent ML (CML) have been made available on the Unix clusters. To run it, you need to login into your Unix account. In Windows, you do this by firing PuTTy and specifying unix.qatar.cmu.edu as the machine name. When the PuTTy window comes up, type sml, do your work, and then hit CTRL-D when you are done.

You can edit your files directly under Unix (the easiest way is to run the X-Win32 utility from Windows and then run the Emacs editor from the PuTTy window by typing emacs - see also this tutorial). If you want to do all this from your own laptop, you first need to install X-Win32 from here. PuTTy is pre-installed in Windows.

If you want, you can install a personal copy of SML/NJ on your laptop. To do this, download this file and follow these instructions. Personal copies are for your convenience: all ML programs will be evaluated on the reference environment on unix.qatar.cmu.edu. You need to make sure that your homework assignments work there before submitting them. To do so, you need to transfer your files onto unix.qatar.cmu.edu and test them there. You can do so by using the PSFTP utility which comes with PuTTy (or any of the many more user-friendly FTP front-ends).

Documentation

Useful documentation can be found on the SML/NJ web site. The following files will be particularly useful:

Twelf

A reference build of the Twelf specification environment has also been made available on the Unix clusters and is accessed similarly to SML/NJ. The easiest way to use it is within the Emacs editor. Alternatively, you can install a personal copy on your laptop. Downloads, documentation and examples can be found on the Twelf wiki (it supercedes the Twelf web page).

Trying out Twelf or any other language is likely to get you bonus points

Grading

Tasks and Percentages

Evaluation Criteria

Your assignments and exams are evaluated on the basis of: Because this course is coordinated with the edition offered in Pittsburgh, the grades of individual homeworks and exams, as well as the final grade, will be uniformed to the performance of that class.

Late Policy

Every student has up to 3 late days that may be used for any assignment throughout the semester, but no homework may be more than two days late (this is so that we can discuss assignments in lecture the Wednesday after they are due). No fractional late days: if you submit 1 minute late, you have used up a full late day.

Academic Integrity

You are expected to comply with the University Policy on Academic Integrity and Plagiarism.

Collaboration is regulated by the whiteboard policy: you can bounce ideas about an assignment, but when it comes to typing it down for submission, you are on your own - no notes, snapshots, etc., you can at most reconstruct the reasoning from memory.

Assessment

Course Objectives

This course seeks to develop students who:

  1. demonstrate a high level of proficiency in the fundamentals of programming languages, namely
    1. are able to critically understand and analyze programming languages and their constructs
    2. are able to learn and apply programming languages quickly
    3. are able to analyze, compare, and choose the appropriate paradigm for a wide variety of computational tasks
  2. are able to approach or think about problems mathematically, are familiar with the mathematics that relate directly to the field of programming languages, and are able to master new mathematical concepts that arise in the context of their work
  3. master fundamental, advanced, and recent concepts in the field of programming languages
  4. think clearly about tangible problems and create innovative solutions relying on proven techniques such as abstraction, decomposition, iteration and recursion, inductive and deductive thinking, and know the limits of computation
  5. communicate orally and in writing in effective and appropriate ways within the discipline of programming languages, namely
    1. are able to understand and articulate technical ideas
    2. are able to follow and form cogent arguments

Learning Outcomes

Upon successful completion of this course, students will:

  1. know the basics of the theoretical foundations of programming languages and be able to evaluate languages, easily learn additional language, and even design new languages. Namely, students will
    1. be able to extrapolate the concrete syntax of a particular language and assess constructs abstractly independently of the syntax they are written in
    2. be able to discuss the semantics of a construct and describe it semi-formally and formally
    3. appreciate the distinction between static and dynamic semantics
    4. be familiar with the standard assessment tools for programming languages, in particular type safety theorems, and be able to carry out a proof
  2. understand the main concepts in programming languages, namely:
    1. the difference between an interpreted and a compiled language
    2. the degree of abstraction at which a language sits
    3. the standard control flow mechanisms, including sequential execution, branching, loops, recursion and function invocation
    4. types as an organizing principle and an abstraction mechanism for data
    5. the most common mechanisms for code reuse including functions, modules and libraries
  3. have a clear understanding of the mechanisms underlying both imperative and non-imperative languages. Specifically, they will
    1. understand the standard and emerging constructs found in imperative programming languages such as conditionals, loops, functions, polymorphism, and exceptions
    2. understand the various principles underlying the object-oriented paradigm, including encapsulated objects, classes, and inheritance
    3. have familiarity with a functional language and functional programming concepts, in particular recursion, higher-order functions, continuations, and functional modules
    4. have had exposure to some of the paradigms for distributed and concurrent programming, with emphasis on the concepts of threads of computation, state change, synchronous and asynchronous communication
  4. understand basic logic and proof techniques necessary to create and understand a formal proof. Specifically, they will be able to
    1. apply formal methods of symbolic propositional and predicate logic
    2. describe the basic structure of and give examples of the following proof techniques: direct proof, proof by contrapositive, proof by contradiction, mathematical induction
    3. discuss which type of proof is best for a given problem
    4. relate the ideas of mathematical induction to recursion and recursively defined structures
    5. identify the differences between mathematical induction and structural induction and give examples of the appropriate use of each
    6. identify and correct flawed logic used in language design
  5. be able to communicate clearly and effectively ideas, concepts and intentions within the field of programming languages, namely
    1. be able to describe technical constructs (concepts) clearly, so as to be readily understood by their peers
    2. be able to give an individual presentation on a technical subject to audience of peers within the discipline of programming languages
    3. form a cogent, logical argument asserting and reiterating all technical concepts that lie within the bounds of the taught curriculum or their research within that curriculum.


Iliano Cervesato