Unfrozen Cyclone
April 22, 2016  

Cyclone was an early attempt to create a programming language at the level of C, combining manual memory management with complete static memory safety. You can think of it as one step on the path that Rust and other languages have continued, one that I believe will eventually replace C, eliminating a host of severe security problems.

One of the more interesting features of Cyclone is that not only is the Cyclone language type and memory safe, but the Cyclone system compiles to a type and memory safe assembly language! While this does not provide as strong a guarantee of correctness as a machine-verified compiler, it does mean that an implementation bug in the compiler itself cannot introduce a buffer overflow or memory corruption bug.

In my experience, programming with a compiler for any type and memory safe language (Java, ML, Go, …) is several orders of magnitude more reliable than programming in C. Adding a type and memory safe assembly language adds another order of magnitude of reliability. This level of assurance is something that even more modern languages like Rust lack.

The problem with this is that it’s very hard to build, maintain, and upgrade such a compiler. Changing the compiler can mean changing the assembly language and the assembly language typechecker; and of course the Cyclone compiler is bootstrapped (written in Cyclone itself), adding another challenge.

Eventually, the team of people working on Cyclone moved on to other projects and development stopped. Unfortunately, this means that it is hard to get Cyclone running on modern machines—in particular, it would require a lot of work to get Cyclone running on 64-bit machines, as 32-bit machines were the rule when we originally developed it.

Nowadays, however, we have virtual machines, and it’s possible to get older versions of operating systems running on any current computer. So, in a fit of nostalgia I’ve built such a machine with Cyclone installed, for anyone who’d like to play around with the compiler.

To use this, you’ll need to have Vagrant and VirtualBox installed. Then inside of a fresh directory, execute

vagrant init tjim/cyclone; vagrant up --provider virtualbox

Then log in to the VM with

vagrant ssh

and you should be able to run cyclone from the command line.