A timed Finite state machine is a language to specify the system behaviour where actions are divided into inputs and outputs. Time constraints limit the time at which an output has to be produced after an input has been applied. After this, the time variable is reset to zero. Moreover, a state can have a time invariant called time-out. If the time-out expires and no input is applied the system should change its state according to the specification. A special discrete clock variable is used in order to represent a timed behaviour.
This language can be installed by importing the projects of this git repository in a GEMOC Studio. The language projects must be imported in the first workspace (language wokbench), then launch a new Eclipse instance from the first (ie. as a modeling workbench where the language is deployed) and then import the sample models. (see GEMOC documentation for more details about the language deployment process)
Alternatively, this language is part of the basic example of GEMOC and is directly available in the GEMOC Studio. Simply, go to File > New > Example... and use the wizards to install the TFSM projects in the language workbench and modeling workbench.
Organization of the code
Main eclipse plugins:
- org.gemoc.sample.tfsm.concurrent contains the definition of the language using the Melange language.
- org.gemoc.sample.tfsm.concurrent.model contains the metamodel of TFSM, using the Ecore language.
- org.gemoc.sample.tfsm.concurrent.k3dsa contains the Domain Specific Action of the operational semantics of TFSM (ie. the atomic actions of the interpreter), using the Kermeta3 language.
- org.gemoc.sample.tfsm.concurrent.moc.dse contains the Domain Specific Event of the operational semantics of TFSM (ie. the observable events of the interpreter), using the Kermeta3 language.
- org.gemoc.sample.tfsm.concurrent.xtfsm contains the language runtime generated by Melange, ie. a new Ecore model that contains both static elements (from org.gemoc.sample.tfsm.concurrent.model) and dynamic features (from org.gemoc.sample.tfsm.concurrent.k3dsa), along with a copy of the semantics that is compatible with this new Ecore model. In this example, once this project has been generated, it is systematically used in place of org.gemoc.sample.tfsm.concurrent.model or org.gemoc.sample.tfsm.concurrent.k3dsa.
- org.gemoc.sample.tfsm.concurrent.xtfsm.design contains the graphical concrete syntax of TFSM, using Sirius. It defines several layers, the default layer is an editor, the other layers are used by the debug/animation.
- org.gemoc.sample.tfsm.concurrent.xtfsm.edit contains EMF edition support. It is used to customize the various views in Sirius and in the simulator (for example by providing custom icons in the various views)
The projects in modeling workbench contains some sample models.
you can run them from the modeling workbench by creating a launch configuration and usig the GEMOC Concurrent Engine. (see model details about launching the concurrent engine in GEMOC Documentation).
Additionnal resources and related links
Please note that some of the document listed here may describe an early implementation of the language and may slightly differ from the current version.