Skip to content
  Kermeta  

How to describe concurrent behaviors in KerMeta ?

Document Actions
KerMeta supports any execution behavior (sequential or concurrent for example). So, as an example how can we run two FSM at the same time using Kermeta ?

KerMeta supports any execution behavior (sequential  or concurrent for example). So, as an example how can we run two FSM at the same time using Kermeta ?

One of the purposes of Kermeta is to let you define semantics, that is *mappings* between a syntactic model and an execution model.

The case of the simple automata is very special in the sense that the syntactic model is equal to the execution model (or more precisely the execution model is the syntactic model plus the notion of current state). So despite its simplicity, or because of it, it is not such a good example to start designing semantics with Kermeta. A better way to start is to look at the Logo language where there is a clear distinction between the syntactic model (move forward, turn, if, repeat, procedure call...) and the execution model (turtle, points, lines).

To get back to the question, if you want to implement the semantic of concurrent automata, you must first decide on an execution model (it can still be an automaton). Then you define the mapping, with eg. you represent concurrency by interleavings on the execution domain.

In a conclusion, Kermeta does not impose on you any specific concurrency semantics: it lets you define yours in an explicit way. 


Another related question : Does KerMeta have the facility to define a new thread, like the concept of a thread in Java?
> No, because if it would have that, then it would force upon you its own semantics of concurrency instead of letting you precisely define the one that suits you.