Computer Science Department
School of Computer Science, Carnegie Mellon University
CO an Imperative Programming Language
The primary goal of a computer science course on data structures and algorithms is to educate students on the fundamental abstract concepts and expose them to concrete examples using programming assignments. For these assignments, the programming language should not dominate the assignment but instead complement it so that students spend most of their time engaged in learning the course material. Choosing an appropriate programming language requires consideration not just of the course material and the programs students will write but also their prior programming experience and the position of the course in the course sequence for their degree program.
We have developed a new programming language, C0, designed for Carnegie Mellon's new Principles of Imperative Programming course. CO is almost a subset of C, eschewing complex semantics and undefined or unspecified behaviors in favor of simple semantics and formally specified behavior. It provides features such as garbage collection and array bounds checks to aid students in developing and reasoning about their programs. In addition to the compiler and runtime, we have also developed a small set of libraries for students to use in their assignments.