Code generation for asynchronous distributed statecharts in the Gamma framework

OData support
Supervisor:
Molnár Vince
Department of Measurement and Information Systems

The Gamma Statechart Composition Framework is a tool developed by the Fault Tolerant Systems Research Group that is able to design and verify component-based reactive systems and automatically generate their implementation. Composite systems are built from components and their communication channels, and the components are described with statecharts.

Currently the framework supports the generation of single-threaded monolithic composition code only, but the modeling approach could be applicable to asynchronous and distributed implementations as well. In this thesis I present an implementation of the generation of distributed software components realizing a composite system.

In the implementation I have extended and modified the generation of the components so that they can communicate via MQTT messages. I have created an allocation model that provides the allocation of the components in a given composition to the declared hosts. It is possible to generate configuration files for each declared host containing the necessary pieces of information for the host. I have created an Xtext grammar to help the editing of the allocation file in an editor which provides syntax highlight and content assist in the Eclipse IDE. The generation of configuration files is implemented as an Eclipse plugin, which integrates the functionality into the Eclipse GUI.

During the execution of the generated code a proxy class is created for each component on each host. This proxy class can either contain or not contain the actual statemachine. If it does, then it can receive MQTT messages from other proxy classes on the other hosts (which will not contain the statemachine). These messages are sent when the remote proxies receive messages from other locally available components or external sources. The fact whether the proxy contains the actual statemachine or not is defined by the generated configuration files.

In this thesis, first I show why model-based (specially statechart-based) design is important and how the statecharts (that are the core of Gamma components) are built up. Then I present the used technologies and tools, where I show the message queue technologies available in the Java environment in details with their advantages and disadvantages. I also present the tools Xtext, Xtend and Yakindu and the Gamma Statechart Composition Framework. Afterwards I present the implementation of the allocation model with the Xtext grammar and the configuration generator. I show the details of the validation of the values defined in the model and the way I implemented the configuration generator based on the allocation model.

Then I also present a proof of concept solution for a distributed Gamma composite system and the way I extended and modified the code generator based on my experiences and the differences between the original generated code and the modified one.

Finally, I present the usage of the tool I have created through an example, then I summarize the results and the possibilities for further development.

Downloads

Please sign in to download the files of this thesis.