Simula

The Cim compiler

The GNU Cim compiler is the result of a master project by Sverre Hvammen Johansen and Terje Mjøs (supervised by professor Stein Krogdahl) at Ifi/UiO. It compiles Simula programs into C from which runnable code may be produced.

Conformance to standard

The Cim compiler adheres to the Simula standard of 1986 with the following exception:

How to obtain Cim

The most recent version is Cim 3.37.

Installation on Linux

$ wget http://simula67.at.ifi.uio.no/Cim/cim-3.37.tar.gz
$ tar -xf cim-3.37.tar.gz
$ cd cim-3.37
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig /usr/local/lib

Installation on Mac

To compile Cim, you must first install the Xcode with command line developer tools, which contains a C compiler. Previously, this C compiler was the GNU GCC, but in recent versions, it has been replaced by Clang. To add to the confusion, these recent versions contain a command gcc which is really just a link to the Clang compiler. You can easily check this:
$ gcc
clang: error: no input files

Cim requires the GNU GCC compiler, so you may have to install it. This is best done using the Homebrew installer, and this Youtube video explains how. Note in particular that you must ensure that the gcc command refers to the GCC compiler:

$ cd /usr/local/bin
$ ln -s gcc-9 gcc
You should now have a proper gcc available:
$ gcc
gcc: error: no input files

Once this has been completed, you can download, compile and install the Cim compiler for Simula:

$ curl -O http://simula67.at.ifi.uio.no/Cim/cim-3.37.tar.gz
$ tar -xf cim-3.37.tar.gz
$ cd cim-3.37
$ CFLAGS='-O0 -m32 -w' ./configure
$ make
$ sudo make install

Installation on Windows

A precompiled instance of version 3.33 may be downloaded. It contains installation instruction.


Last updated Saturday, 15-Feb-2020 18:43:30 CET by simula67@ifi.uio.no.