Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Harel Statechart DSL tool for Java?

I'm looking for a tool that understands a DSL in which I can define my statechart that generates Java code or where the statechart in the DSL is runnable as is. The tool would ideally be written in Java and must support superstates and orthogonal regions by definition of Harel Statecharts (or equivalently UML 2 State Machines). Alternatively, what would be the best library or tool to write such a DSL with?

like image 992
stephan f Avatar asked Dec 11 '11 20:12

stephan f


4 Answers

Yakindu looks good: http://www.statecharts.org

  • Harel Statecharts
  • Visual Language
  • Textual DSL
  • Generates Java
  • Generates C
  • Generates C++
  • Generation configurable / customisable
  • Eclipse-based
  • Open source
  • Simulation
  • History and deep history
like image 54
ahcox Avatar answered Oct 01 '22 06:10

ahcox


There is a Harel Statechart DSL written in Pharo Smalltalk and published in OBJEKTspektrum:
http://www.sigs-datacom.de/fileadmin/user_upload/zeitschriften/os/2011/04/krasemann_brauer_crasemann_OS_04_11.pdf
Alas, this is in German. However, the code is in English:
www.squeaksource.com/AuDSL3.html

The implementation of this DSL might easily be ported to Scala parser combinators, which means, it would become available for Java.

If you want to do the port, we would gladly help ([email protected]).
We just have not done it yet.

* added 2012-03-17 * The Scala port is ready now. It comes as a Scala Trait and thus can easily be inherited by your scala class that might be used by your Java program. You find it here: http://dl.dropbox.com/u/4548797/AuDSLinScala-src.zip

like image 24
Hartmut Krasemann Avatar answered Oct 02 '22 06:10

Hartmut Krasemann


ThingML is a textual DSL that allows modelling UML-like state machines (including composite states, parallel regions, etc). From a ThingML specification, Java, C or JavaScript can be generated. A set of tutorials is available here

like image 22
bmorin Avatar answered Sep 29 '22 06:09

bmorin


I have developed a library that I use to keep track of states and to move between states within an application, called JavaKI. This is based on the KI framework that is now part of the SproutCore JavaScript framework. Both are based on Harel charts.

Currently, JavaKI does not support history states, but you are welcome to implement this functionality if you need it. JavaKI is Java-based and licensed under the MIT license.

https://github.com/joachimhs/JavaKI

With JavaKI you defined your states and your state chart in "Plain Old Java".

like image 40
Joachim H. Skeie Avatar answered Oct 01 '22 06:10

Joachim H. Skeie