CS 15-212: Principles of Programming
(Spring 2008)
|
|
About this course
[ Description
| Prerequisites
| Software
| Readings
| Grading
]
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 you will get out of this course is a logical attitude
toward problem solving. You will 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 we do that, you will be exposed to some advanced but pervasive concepts
in Computer Science and programming. In particular, you will learn about
induction and recursion, program correctness, symbolic computation,
search, grammars and parsing, structuring large programs, computability,
continuations, streams and more
- Our vehicle for achieving these objectives will be Standard ML, one of the
most advanced experimental programming languages brewing in the labs
worldwide. It will expose you 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
You must have completed CS 15-211
(Fundamental Data Structures and Algorithms)
The course relies extensively on the programming language Standard ML (SML)
and related utilities, mainly ML-Lex, ML-Yacc and Concurrent ML. The
particular implementation we will be working with is Standard ML of New Jersey (SML/NJ), version
110.65.
SML at CMU-Q
A reference build has 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.
SML on Your Own Laptop
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 software
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:
The 15-212 Wiki
The material for all lectures can be found on the 15-212 wiki. This is
wiki, not a textbook. The main differences are:
- It is dynamic: the content will change over time (for the better)
- It will always be work in progress
- Everybody can make updates. This means YOU!
The Textbook
You have been given a copy of the textbook:
Use it mainly as a reference: the lectures will not follow it.
Further References
- Participation: 10%
This has three components:
- Class participation: volunteer to answer questions asked to the
class
- Class preparedness: you must have done the readings before coming to
class
- Involvment with the wiki: if you see an error, correct it; if you have
a better explanation for something, change it; if you see something
missing, add it
- 6 homework assignments: 55%
- 5% for the first + 10% for all others
- Written and programming parts. A program is like an essay!
- Handed out on alternate Sundays
- Due on Saturday 13 days later at 11:59pm Doha time. Submit on the
Blackboard dropbox.
- You have a total of 3 late days
- After that, late homeworks will be accepted until the beginning of
next class, but with a 25% penalty
- Graded by following Wednesday. Evaluated on the basis of
- Correctness: your program should work in the reference
environment
- Specification: structured comments describing types, meaning of
the returned value, invariants, and side-effects
- Elegance: See these notes about
style
- To encourage good work and integrity, the instructor may invite
students to his office to explain their solutions. Should this happen,
the students' explanations will become part of their grades for that
assignment.
- No joint assignments
- Midterm exam: 15%, in class, closed books
- Final exam: 20%, 3 hours, open books and notes (but not laptops)
- Bonus points: up to 10% for
particularly elegant solutions
- Negative points: up to 100% if caught
cheating