This is KRoC in a Docker container.
KRoC is the Kent Retargetable occam Compiler.
This Docker container will fetch kroc-1.6.0
from concurrency/kroc
and compile it.
We use i386/ubuntu:12.04
as a base, because KRoC only works in an 32-bit environment.
The Docker container can be build with (if you want to build it yourself):
$ docker build -t TAGNAME .
You can also pull the current Docker image directly from Docker Hub:
$ docker pull omegahm/kroc
Tests can be run afterwards with (if you built it yourself replace omegahm/kroc
with your tag name):
$ docker run -it --rm omegahm/kroc
And lastly, you can enter the Docker container with:
$ docker run -it --rm omegahm/kroc bash
Here you can create a "Hello, world!" program and test it:
$ cat > hello.occ << EOF
#INCLUDE "course.module"
PROC hello (CHAN BYTE out!)
out.string ("Hello, world!*n", 0, out!)
:
EOF
and then compiled and run with
$ occbuild --program hello.occ && ./hello
which will yield
Hello, world!
to the console.