A sneak peek at Heron: a programming language for executable UML
While the Heron specification isn’t yet ready to be downloaded, I recently completed a sample application using the prototype Heron to Java compiler and thought I would share it with the community. The Heron source code is available at: http://code.google.com/p/heron-language/wiki/BouncingBallsExample. The resulting applet requires Java 1.6 and can be viewed at http://www.heron-language.com/demo.html.
The Heron to Java compiler is written in C++ using the YARD parsing library. The source code is licensed under the MIT licence 1.0. and can be browsed online at Google codehosting. Contact me if you would like the source as a single archive, or if you need a different license. Please note that this is a very preliminary version of the Heron to Java compiler and is not intended for general consumption.
Heron is a general purpose programming language that is designed to be compatible with executable UML (xUML). It is intended to facilitate round-trip engineering between UML and text-based source code. Heron is an object-oriented language with support for functional programming inspired by the Scala language by Martin Odersky at EPFL and the Object Action Language used in the book Executable UML: A Foundation for Model-Driven Architecture by Mellor and Balcer . The Heron language extends the JAction action language, a surface syntax for UML actions, that allows programmers to develop xUML applications using text-based tools. JAction is being developed by professor Abdelwahab Hamou-Lhadj at Concordia University and myself.
One of the more novel features of Heron is the ability for objects to handles asynchronous messages using state diagrams. This allows us to write code that explicitly models an object’s lifecycle. This makes Heron particularly well suited for event driven applications, such as those with graphical users interfaces.