Last modified 17th November 2007 NOCC: a new occam-pi compiler |
Welcome to the "new occam-pi compiler" webpage, an attempt to collate information/resources/documentation on the new occam-pi compiler.
[ status | introduction | intentions | download ]
latest is nocc-0.1.4
The bulk of the compiler documentation, including status, has been moved into the research-group Wiki, here: https://www.cs.kent.ac.uk/research/groups/sys/wiki/NOCC/
This compiler is a modern re-implementation of the existing occam-pi compiler (originally from the Inmos occam toolset), that attempts to by highly dynamic and extensible, as well as being reasonably efficient. Like the original, this compiler is programmed in C (but supports several internal "mini-languages" to ease compiler construction).
I've probably had a bit too much fun hacking in places.. ;-). Some parts of the compiler, particularly its aggressive use of function-pointers, hint towards C++. But generally, C is more efficient and I prefer the more direct representation of what's going on in a program, not hidden behaviours as introduced by inheritance/etc. in OO. Also, this compiler is not garbage-collected, and some unpleasant surprises come about as a result of that in C++. Thus, I've used C. Live with it. :-)
On a side note, gdb and valgrind make excellent debugging tools.
Here are some things that I've been keeping in mind whilst writing this compiler:
Here it is..! still very much under construction. The latest/current versions are available from the subversion repository. If you would like write access to the repository, sign up for an account on projects.cs.kent.ac.uk and let me know your username (and why you want write access, of course!).
To use the compiler in practice:
bash$ ./build --reconf -A --force-configure configure-kroc make-kroc install-krocelse if using a fresh source-tree, do:
bash$ ./build -Ain the configuration, select "I" (i) to set the NOCC compiler path:
I. path to NOCC install: 1-7 to change path, A-E, F-XK to toggle/set feature, Ctrl-C to abort, return to confirm and install: i path to NOCC install: /path/to/nocc/treekroc expects to find the compiler executable and the "nocc.specs.xml" file in the given directory.
bash$ kroc -v --nocc myprog.occthe kroc flag --nocc-opts=... can be used to pass extra options to nocc.
Copyright © 2005-2007, Fred Barnes, Department of Computer Science, University of Kent. |