C0 | Specification and Verification in Introductory Computer Science
About Downloads Tutorial References Courses
C0 language Downloads (beta, binary-only)


You may email the maintainer Frank Pfenning for information on the source distribution, or if you want to contribute binaries, documentation, or hints.

Older released binary distributions can be found here.

Mac OS X

Last updated Januray 11, 2015


On Mac OS X you will need Xcode, which should either be already installed, available for free download from Apple, or available from the App store (depending on your version of OS X).

After installing it, open Xcode, go to Preferences > Downloads and click on the "install" button next to "Command line tools".

Download and move to the directory you want to install in. Then, run

$ tar -xvzf cc0-*

Quick check of installation:

$ cd cc0
$ bin/cc0 -d doc/src/exp.c0 doc/src/exp-test.c0
$ ./a.out
All tests passed!

$ bin/coin -l conio doc/src/exp.c0
--> print("Hello World!\n");
Hello World!
--> exp(2,3);
8 (int)
--> #quit

You will also need to make sure libpng and zlib packages are installed; MacPorts is recommended for this purpose.


Last updated January 11, 2016


Same as for Mac OS X.


Last updated January 9, 2015. Coin does not support any libraries.


First, you need a standard Cygwin installation. Download the 32-bit Cygwin installer from http://cygwin.com/install.html (do not get the 64-bit variant). Run the installer using standard paths (should install to C:\cygwin). Eventually, it will ask you which packages to install. Search for the following packages, and for each one, click "Skip" once so a version number appears, like in the image.

<a Cygwin installation screenshot>

The Cygwin installer will create a shortcut on the desktop which opens a Cygwin shell. If it fails, you can create a shortcut to C:\cygwin\bin\mintty.exe and change the "Start in" field to %USERPROFILE%.

To install cc0, you need to choose a location to install the cc0 package. In this example, we'll use a directory we'll create called opt in the cygwin directory. Launch Cygwin:

$ cd /
$ mkdir opt
$ cd opt

Now download and unpack the cc0 binaries:

$ wget http://c0.typesafety.net/dist/cc0-v0440-cygwin32-bin.tgz
$ tar -xzvf cc0-v0440-cygwin32-bin.tgz
$ rm cc0-v0440-cygwin32-bin.tgz

Update your PATH to make cc0 available without specifying the path to the binaries:

$ echo 'export PATH=$PATH:/opt/cc0/bin' >> ~/.bashrc

After a restart of the Cygwin shell, cc0 should now be callable programs from Cygwin (bash).

$ cc0

You can also use Cygwin to connect to AFS through SSH with

$ ssh -X <andrewid>linux.andrew.cmu.edu

If you need to use X-Forwarding to display images, use

$ startxwin

and type your ssh command in the new window that will pop up.

A note on text editors

Terminal based editors (Emacs and Vim) can be installed by selecting the emacs or vim packages during the Cygwin installation process. Alternatively, GUI Emacs exists as a Windows binary (see http://ftp.gnu.org/gnu/emacs/windows/).


The Windows command prompt has trouble interpreting some emacs keyboard shortcuts. To avoid this, ensure that you are starting Cygwin with c:\cygwin\bin\mintty.exe as the terminal.

c0_mode sytax highlighting can be added by adding as follows:

$ setx HOME "~USERPROFILE~"  # emacs will have trouble locating .emacs otherwise.
$ emacs ~/.emacs
(setq c0-root "/opt")  # If using Cygwin's emacs.
(setq c0-root "c:/cygwin/opt")  # If using standalone emacs.
(load (concat c0-root "/cc0/c0-mode/c0.el"))