Title: Principles of Imperative Computation
You must have passed 15-112 (Fundamentals of Programming) or equivalent. It is strongly advised that you either have taken or are currently taking 21-127 (Concepts of Mathematics) or 15-151 (Mathematical Foundations of Computer Science). Historically, students who did not do so ended up learning less, spending considerably more time on the course and earning one letter grade lower than their peers who did, on average.
This course teaches imperative programming in a C-like language and methods for ensuring the correctness of imperative programs. It is intended for students who are familiar with elementary programming concepts such as variables, expressions, loops, arrays, and functions. Given these building blocks, students will learn the process and techniques needed to go from high-level descriptions of algorithms to correct imperative implementations, with specific applications to basic data structures and algorithms. Much of the course will be conducted in a subset of C amenable to verification, with a transition to full C near the end. This will be accomplished along three dimensions:
- The main skill you will get out of this course is the ability to write code that is correct by design and accounts for the needs of its application context. You will learn about deliberate programming as a way to write high quality code, about assessing the performance of a program, and about comparing solutions to satisfy deployment constraints.
- As you do so, you will gain exposure to fundamental concepts in Computer Science — as opposed to programming — such as abstraction, correctness, complexity, and modularity. This will also give you a vocabulary to communicate effectively and precisely with other computer scientists.
- Our vehicle for achieving these objectives will initially be C0, a safe variant of C, and later C itself. Using them, you will gain exposure to a number of data structures and algorithms that are used pervasively in computer science. C is the language of choice for system-level applications, and both are representative of the popular imperative programming paradigm.
After completing 15-122, you will be able to take 15-213 (Introduction to Computer Systems) and 15-210 (Parallel and Sequential Data Structures and Algorithms), among others. Other prerequisites or restrictions may apply.