Main Page

From CS 15-212

Jump to: navigation, search

15-212 is an undergraduate course offered by the Department of Computer Science of Carnegie Mellon University. Its official name (that nobody ever remembers) is Principles of Programming.



This course has the purpose of introducing students who have had experience with basic data structures and algorithms to more advanced skills, concepts and techniques in programming and Computer Science in general. This will be accomplished along three dimensions.

  • The main skill students get out of this course is a logical attitude toward problem solving. They learn how to decompose a problem into manageable parts, how to compose their solutions into a complete program, and how to reason about programs to ensure that they are correct
  • As the course progresses, students are exposed to some advanced but pervasive concepts in Computer Science and programming. In particular, they learn about induction and recursion, program correctness, symbolic computation, search, grammars and parsing, structuring large programs, computability, continuations, streams and more
  • The vehicle for achieving these objectives is Standard ML, one of the most advanced experimental programming languages brewing in the labs worldwide. It exposes students to a number of high-level programming techniques such as recursive functions, higher-order functions, data abstraction, polymorphism, exceptions and modularity. Bits and pieces are found in current commercial programming language such as Java, and more will be part of the programming languages of the future


This wiki collects the lecture material for the course. It draws on slides and lecture notes gathered by generations of Carnegie Mellon instructors and teaching assistants. It is open to students and instructors elsewhere to improve and extend. It currently has 138 articles.

This wiki is not the blueprint for delivering a course along the lines of 15-212. It contains no syllabus. Instead, it is a loosely organized collection of pages intended to cover a growing selection of advanced concepts in programming and Computer Science at a level appropriate to educate and stimulate a 2nd or 3rd year undergraduate student in Computer Science. A subset of this material can be used as the skeleton of a course like 15-212.

Still, there is some organization to these pages. There are currently three main categories of pages:

  • Core concept pages introduce general programming notions such as recursion or polymorphism and general ideas in Computer Science such as induction or decidability. Each such page consists of:
    • a motivating problem,
    • an explanation of the concept itself at a level appropriate to the target students of 15-212; this explanation is typically interspersed with code showing how to solve problems in this class,
    • exercises,
    • references to further readings, both within this wiki and outside.
  • ML concepts pages systematically cover every aspect of Standard ML, the programming language that has historically been used to introduce the core concepts in 15-212. Each such page typically spans:
    • the syntax of the construct or concept,
    • its semantics, typically presented in an informal or semi-formal fashion,
    • a few examples.
Other pages in this category focus on higher-level ML concepts, such as the organization of an ML run-time environment, and on lower-level issues such as the error messages of the specific implementation of ML used in this course (Standard ML of New Jersey).
  • Further readings pages point either to interesting facts related to the contents of 15-212, such as the history of ML or brief biographies of contributors, or to pages providing a more complete or advance take on concepts typically covered in 15-212.

Two things that will not be found in this wiki are a syllabus, as noted earlier, and any kind of homework assignment or exam. These are provided externally by specific instructors who may choose to use any part of this wiki.

The Wiki Concept

This is a wiki.

Similarly to any web page, it collects useful information that can be read. This is the standard way to passively acquire knowledge, similar also to reading a book or a newspaper.

But this is a wiki!

Every reader can be an active contributor to the breadth and accuracy of the contents. To do so, go to a page you dislike, click on one of the pervasive "edit" links, and make improvements. The easiest way is to do so is by example, but if you are unsure go play in the Sandbox! If you are the type who likes to read before doing, the following two guides are for you:

If you don't like a page but don't know how to make it better, you can also use the "discussion" tag at the top of each page. This is a great way to ask questions, make suggestions, point to inaccuracies, etc.

If you do edit a page, please insert your own content and not somebody else's: plagiarism is bad! If somebody else has already written that perfect explanation, just add a link if it is on the web.

Of course, if this wiki were truly open to anybody to edit, it would get immediately defaced and turned into a pervasive advertisement site for about anything. For this reason, it is open without restriction for reading, but only approved people can edit pages. These include the people listed below and their students. Others wanting to contribute or edit this wiki should send an email to

Finally, edits are actively monitored for accuracy. This means that if an edit is found to be incorrect, whether by mistake or by malice, it will be promptly rectified.


This wiki was initiated by Iliano Cervesato and Thierry Sans on the basis of material by Frank Pfenning, Michael Erdmann, Stephen Brookes and Robert Harper as well as their own.

Many people have thought of using a wiki to collect the material used in a course, but Luis von Ahn was the first to put it in practice.

Other contributors to this page include Lina Agha, Rishav Bhowmick, Keghani Kouzoujian, Yasser Khan, Kaleem Rahman, Arihant Agarwal... <add your name here if you extend these pages>.

Personal tools