15-122: Principles of Imperative Computation

Course Overview

Title: Principles of Imperative Computation

Units: 12


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.



    Prof. Mohammad Hammoud

    • Email: mhhammou at qatar.cmu.edu
    • Office Number: CMUQ 1006.
    • Office Hours: TBD.

    Ammar Karkour

    • Email: akarkour at andrew.cmu.edu.
    • Office Number: CMUQ 1004.
    • Office Hours: TBD.

    Course Assistants

    Name Email
    Aman Haris asharis at andrew.cmu.edu
    Faisal Abdelmonem fts at andrew.cmu.edu
    Mohammed Al-Jawaheri mjawaher at andrew.cmu.edu
    Nouha Tiyal ntiyal at andrew.cmu.edu
    Nour Ali ntali at andrew.cmu.edu
    Abdalla Mohamed abdallam at andrew.cmu.edu

    Class hours


    Mondays & Wednesdays, 08:30 - 09:45 AM, Room 1202


    Tuesdays, 08:45 - 09:35 AM, Room 2163


    Thursdays, 08:45 - 09:35 AM, Room 2163

    Office hours