zaterdag 1 oktober 2011

Subscript Code Released

I am "finally" happy to announce the initial release of Subscript: an extension of Scala with a theory named Process Algebra.

Subscript aims to ease event-driven and concurrent programming. You can build so called "scripts" with sequences, choices, parallelism and other kinds of compositions, operating on several kinds of actions. These actions may execute normal Scala code, or handle events, or execute code in a new thread or in the GUI thread. Concurrency in Subscript is often lightweight, so without threading, like in the Actor model.

Application areas are: text parsing, GUI controllers (which happen to be much like parsers) and discrete event simulations.

A complete Subscript implementation will contain at least a compiler and a Subscript Virtual Machine (SVM). The compiler would be a extension of a Scala compiler. It will internally translate typical Subscript items to specific Scala methods and other features, in a form that is for the time being called "Internal Script Language" (ISL). The "old part" of the compiler then generates the usual byte code for these features.

This initial release is meant for people interested in programming languages; it is not suitable yet for application developers. The aim of this immature release is to raise interest to participate in further development of the compiler and SVM. I would also welcome comments and suggestions on the Scala code that I wrote; I am still in the process of learning Scala (but it rocks; I don't want to go back to Java and C# any more). No work has been done on the compiler yet. Compilation to ISL is done by hand. There are 3 sample applications that indicate how compilation should be done; it is fairly straightforward.

The SVM code is "don't worry, be crappy" quality. Some basic tracing functionality is provided. The 3 sample applications are the only tested applications, at the moment. Many language features that are not used in the sample applications, will not work. I already included 100% untested code so that it gives an idea what the good code should do.

The project site is http://code.google.com/p/subscript/. It has more sample applications, that I intend to get working during the next few weeks. I also try to explain Process Algebra there, and how I added it onto Scala. And there is a White Paper.

In April 2011 I gave a guest lecture and a workshop at Amsterdam University (where Process Algebra was invented, 30 years ago) for the master's course Thread Algebra. I discussed Subscript and a predecessor language that extends Java. The Google code site has the Powerpoint presentation, and a link to the student assignments used in the work shop.

I am personally very happy with the combination of Scala and Process Algebra. I like the concise function definitions using an equals sign in Scala; this combines well with the Process Algebra style of definitions. I hope many of you will like Subscript, too, and that some of you will participate in the project at Google Code.

Geen opmerkingen:

Een reactie posten