We’re not prepared to call things “version 1.0″ yet, but we are prepared to open the source. A read-only, anonymous Subversion repository is now available:

svn co http://svn.transterpreter.org/transterpreter/trunk/

If you’re just interested in using the Transterpreter on Mac OSX (PPC), Windows, or Debian GNU/Linux (Intel), you can just download a pre-built binary. However, if you want to use the Transterpreter on Mac OS X (Intel), or some other platform for which we do not have binaries, you will need to check out and build from source.

If you are really crazy (or are really curious, or know what you’re doing), you’re welcome to check everything out, including all our exploratory branches. Simply get rid of ‘trunk’ on that first URL. I’d like to point out that this is not, in the general case, necessary.

Lastly, if you’d just like to browse the source, you can take a look at

http://trac.transterpreter.org/browser/transterpreter/trunk

If you have any questions, I’d encourage you to join the tvm-discuss mailing list, or drop me a note.

Update 20060809: I’ve set up a new download page that provides more detail regarding the Subversion download.

I need to be better about posting regular updates. If we’re going to have a blog, I should use it.

Website and source code

First, we’ve moved to MediaWiki for our main website. This was a large change, and hopefully it means more documentation will find its way more readily to the WWW. If nothing else, it means Damian will be able to edit pages related to projects he works on, since the old system was very, very scary, and very, very ugly. (I thought the old system would be a good idea! My bad!)

Second, source will soon be available via anonymous SVN. We have one or two more things to put into place, but will be making source code available shortly. (If you can’t wait, send me an email at matt at transterpreter dot org.) Tied into this is our switch from Mantis to Trac for project management. You can view

http://trac.transterpreter.org/

which lets you view the source to the Transterpreter, skroc, and slinker, as well as submit bugs and whatnot. We’ll make a Subversion checkout URL available shortly.

42, a compiler for …

Third, we’ve begun work on a new compiler for an oocam-like language. The existing compiler is too large and monolithic to consider extending, and the up-and-coming NOCC is already 50,000 lines of C. I’ve already said my peace on the foolishness of writing a compiler in C, so I’ll move along swiftly.

Our goal is for our compiler to be extensible, first and foremost. To do interesting research in areas surrounding concurrent programming languages, we’re going to need a platform upon which to experiment and test ideas. Furthermore, I want it to be a platform that undergraduates who are interested in doing research can contribute to in meaningful ways. So, we’ve started from scratch with a subset of occam; we’re calling the compiler 42.

I’ll probably show similar pictures again in the future, but I wanted to show a few syntax errors that the compiler generates so far. You see, I’m a bit picky about syntax errors, and if we do our job right, this compiler will have better syntax errors than any other compiler for any other language out there.

42-instance-undefined

An undefined process instance

If you’re trying to call a pre-defined process, the question is: is it defined? This is much like trying to invoke a method in Java that hasn’t been defined, or calling a function in Haskell that you hadn’t yet actually written the code for. Currently, we just say 'process-name' not defined; in my book, this isn’t enough. And since the compiler is written in a micro-pass style (very much like the Indiana nanopass style (PDF)), I can improve this error while writing this post.

One file is responsible for this check, and it is called check-instances-exist.scm. I can open it up and improve the message very simply. I like the improved error a great deal more.

42-instance-undefined-new
An improved, undefined process instance message

That took one minute. Perhaps less. Now, instead of just saying 'bar' is undefined, the message says

instance:not-defined:
	'bar' is not defined. For it to be defined
	you must have something that looks like

		 (proc bar (...) ...)

	in your code, where the '...'s might be filled
	in with code you write yourself.

 in: (seq (:= x 4) (foo x) (bar))

Along with this message, the relevant code is highlighted, so the user can see exactly where their syntax error took place. (To do this, I’m leveraging the excellent and extensible DrScheme programming environment, which was designed to allow end-users the ability to add new programming languages to the environment.)

Adding new syntax errors to the compiler takes only slightly more time than modifying an existing error message, but in general we have broken every check or test out into its own, separate unit of functionality—a separate compiler pass. This makes maintaining and extending the compiler a manageable, and even enjoyable, task. Finding code that fails unit tests also becomes a snap.

Another error a programmer might make is to define a process more than once; again, this is like having two methods in Java with the same name and same arguments—and this isn’t allowed. Likewise, in our little language, you can only define a named process once.

42-duplicate-definition-names
Duplicate definitions

Here, the first instance is highlighted (I can’t easily highlight all of them, unfortunately—but we’ll work on that), and the error message reports all the lines in the code where the process is defined. In this example, we have three definitions of foo in the source code. The compiler catches all three, tells me where they are, and highlights the first offending instance.

My personal goal is for every error message in the compiler to be this rich and informative. I’m considering instrumenting the compiler to catch errors it has never seen before, and report those errors directly back to us (with the user’s permission, of course). This way, as new syntax errors with poor messages are found, we can improve the compiler using real user data. This would provide valuable research data and a paper or two along the way.

As we now have our source code viewable, we’ll soon be making it publicly available. Please drop a note if you’re interested in working with or contributing to any of the tools we’re developing.

For those of you looking for an excellent way to explore programming in a concurrent programming language, and are ready to lead your own evil robotic warlord uprising, you should check out RoboDeb.

Granted, I need to write more documentation, but there are plenty of books and tutorials available for the occam programming language, as it isn’t new… it’s been around for quite some time.

And, in case you were worried, we submitted the most recent version of RoboDeb (an auspicious version 007) to the VMWare $100,000 uber-appliance challenge. Our most recent release does little more than include the new Sun Java Distribution License; as far as we know, we’re 100% legal on this release.

We have a new binary build of the Transterpreter up; version 0.7.3 rolls in some minor fixes, and includes support for SHARED channels. However, it does not support SHARED top-level channels; this is an issue with how the data is passed through the compiler (and therefore, ultimately, to the slinker), and those issues may (or may not) be resolved someday. For now, you may not (directly) share top-level channels.

We also have a VMWare virtual machine available for download; if you are interested in using the Transterpreter and the Player/Stage library for controlling Pioneer class robots (a tastes-great combination, giving you world-class concurrency for robotic control), drop us a note. We’ve got around 60 pages of documentation to accompany it, and deployed it this semester to students enrolled in CO631, a second-year module in concurrency at the University of Kent. We’ll be giving a talk and mini-workshop at DIKU in April regarding this same technology.

Like all things, we’ll do a complete release in due time; we’re adding more things to the VM (like a JDK, JCSP, the FUSE libraries for userland filesystems, the Python Player/Stage bindings, so on and so forth) so we’re not keen on doing a general release at this time. It’s a 250MB download, and until it’s finished, we’ll be happy to release it to people upon request.