15-122 Principles of Imperative Computation, Summer II 2018

Software

The C0 Language

In the first part, the course uses C0, a small safe subset of C augmented with a layer to express contracts. This language has been specifically designed to support the student learning objectives in this course. It provides garbage collection (freeing students from dealing with low-level details of explicit memory management), fixed range modular integer arithmetic (avoiding complexities of floating point arithmetic and multiple data sizes), an unambiguous language definition (guarding against relying on undefined behavior), and contracts (making code expectations explicit and localize reasoning).

The C Language

In the last second part, the course transitions to C in preparation for subsequent systems courses. Emphasis is on transferring positive habits developed in the use of C0, and on practical advice for avoiding the pitfalls and understanding the idiosyncrasies of C. We use the valgrind tool to test proper memory management.

Programming Environments

You are welcome to use any programming environment that suits you to write your programming assignments. However, all programming homework will be graded by running them on a Unix system using Autolab — you may want to make sure they work on Andrew Unix. Popular environment choices include emacs, vim and sublime, but you should use what works for you: an environment that allows you to write code quickly and efficiently. Here are some useful links:
UnixEmacs

Style Guides

s