Click on a class day to go to that particular lecture or recitation. Due
dates for homeworks are set in bold. The due date
of the next homework blinks.
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
abstraction, induction and recursion, program correctness and
verification, asymptotic cost analysis, parallelism, symbolic computation,
search, structuring large programs, computability, 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. SML will expose you to a programming paradigm that is totally
different from what you have seen in earlier classes, namely functional
programming. This will give you first-hand experience with a number
of high-level programming techniques such as recursion, data-centric
computation, higher-order functions, data abstraction, polymorphism,
exceptions and modularity. Bits and pieces are found in current
commercial programming languages such as Java, and more will be part of the
programming languages of the future
After completing 15-150, you will be able to take 15-210 (
Parallel and Sequential Data Structures and Algorithms) and 15-214 (
Principles of Software System Construction).
You must have completed
21-127 (
Concepts of Mathematics).
It is my goal to make this course successful, stimulating and enjoyable. If at any time you feel that the course is not meeting your expectations or you want to provide feedback on how the course is progressing for you, please
contact me. If you would like to provide anonymous comments, please use
the feedback form on the course home page or slide a note under my door. Comments of general interest will be answered on the
course discussion board.
The course relies extensively on the programming language Standard ML (SML) and related utilities. The particular implementation we will be working with is
Standard ML of New Jersey (SML/NJ), version 110.75.
SML on Your Own Laptop
The most convenient way to use SML is to install a personal copy of SML/NJ on your laptop. For Windows laptops, download
this file and follow
these instructions. If you run a different operating systems, read
here. You will want to configure your favorite editor so that you can run SML directly inside it, not from a separate terminal window.
SML at CMU
A reference build has also been made available in the virtual 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.
Documentation
Useful documentation can be found on the
SML/NJ web site. The following files will be
particularly useful:
Latex
We strongly encourage you to typeset the written part of your homeworks in
LaTeX (we will take this into account as part of your
participation grade). It takes some getting used to it, especially if MS Word is all you've been exposed to, but it enormously simplifies producing pleasant mathematics. Here are some useful references:
You may find this
Latex template for homeworks useful.
The 15-212 Wiki
The material for most of the 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!
Further References
This is a
10 unit course.
Tasks and Percentages
- Labs (mandatory): 10%
- 1 point for reaching the lab threshold
- 0 points if you don't reach threshold or if you don't show up
- Daily exercises and participation: 5%
- At the end of the every lecture, you will be given daily
exercises, a couple of simple exercises or questions collected
during the next class or lab. Each will be graded, with negative points for missing or sloppy
work.
- Participation has the following components:
- Class participation: volunteer to answer questions asked to the
class
- Class preparedness: you must have done the readings before coming
to class
- Get extra points by using Latex
- 11 + 1 homework assignments: 50%
- 1 to 2 weeks each
- Due at 11:59pm Doha time — strict!
- Written and programming parts
- Graded ASAP based on
- 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
homework
- No joint homework unless explicitly instructed
- Midterm exam: 15%, in class, closed books
- Final exam: 20%, 3 hours, closed books
Evaluation Criteria
Your assignments and exams are evaluated on the basis of:
- Correctness: your arguments should make sense, your proofs should be valid, and your program should work in the reference environment
- Specification: say what you want to do before doing it. In the case of programs, use structured comments describing types, meaning of the returned value, invariants, and side-effects
- Elegance: written material should be of the same quality as what a professional would write. No typos, no bad grammar, clarity is paramount. See these notes about ML programming style
- Bonus points:
- 2% of the earned grade for each 12-hour period a homework is submitted ahead of the deadline
- up to 10% for particularly elegant solutions
- Negative
points: at least -100% if caught
cheating
Late Policy
There are no late days. Assignments submitted past the deadline will get a grade of 0.
Academic Integrity
You are expected to comply with the
University Policy on Academic Integrity and Plagiarism. Note that the policy now requires that students acknowledge any help received from the Academic Resource Center (ARC).
Collaboration is regulated by the
whiteboard policy: you can bounce ideas about a homework with other students, but when it comes to typing it down for submission, you are on your own — no notes, files, snapshots, etc. Morever, you must wait at least 4 hours before writing down the solution.
Course Objectives
This course seeks to develop students who:
- can leverage the mathematical structure of a problem to develop a solution
- can use abstraction and modularity to manage complexity
- can use formal arguments to justify the correctness of a problem solution and determine its asymptotic cost
- master a non-declarative programming paradigm
- have gained advanced skills, concepts and techniques in programming and
Computer Science
Upon successful completion of this course, students will be able to:
- explain and use basic programming language concepts such as typing, evaluation, declarations, expressions, values, and types
- explain and use advanced programming language concepts such as data types, pattern matching, polymorphism, higher-order functions, continuations, exceptions, streams, memoization, modularity
- design recursive algorithms and develop recursive programs
- use mathematical induction to prove program correctness
- determine the asymptotic cost of a sequential and maximally parallel solution to a problem
- model problems in Computer Science using lists, trees and graphs
- exploit a problem's data flow to program parallel solutions
- program symbolic solutions to problems using data types and pattern matching
- use polymorphism and functional arguments to build reusable program modules
- develop abstract and parametric modules for code reusability
- recognize non-computable problems and give formal arguments to support non-computability claims