Engine Models¶
Engines communicate via message passing. Each message consists of a header and a body. The header gives information about the sender and the intended destination, e.g., in the form of IDs or addresses. The type of the body almost always depends on the specific type of message. For each engine, we provide the following.
- A list of type names Each type name is a string that specifies the type of message bodies that the engine has to be able to process (with the additional context that the header provides). Optionally, each type name in this list is mapped to a set of protocols to which it belongs.
- A list of pairs of type names and engines for message reactions Each type name has a “static” approximation of all message reactions that a received message might trigger. Typically, there is no need to add identities or addresses of engine instance here.
-
A type for each type name The type of the message body is called message type as shorthand for message body type. The message type does not need to re-iterate information of the message header. It is allowed that several type names refer to the message type.
-
The types and behaviour for each message body type Using links to GitHub, Message types should be specified as colour sets or as rust types as a fallback option, ideally both. The behaviour also has to give some information about headers, and define the behaviour, using SML functions.
Thus, the structure of the description of engine models is as follows.
- Engine 1 […]
- Engine 2 […]
- ⋮
- Engine \(i\)
- MessageTypeName_\(i_1\) [\(\scriptscriptstyle\{<\mathrm{protocols}(i,1)>\}\)]
<↑link to GitHub repo
MessageType_i_1
> […] - ⋮
- MessageTypeName_\(i_j\) [\(\scriptscriptstyle\{<\mathrm{protocols}(i,j)>\}\)]
<↑link to GitHub repo
MessageType_i_j
>- ReactionTypeName_\(p_{i,j,1}\) → Engine_\(q_{i,j,1}\)
- ReactionTypeName_\(p_{i,j,2}\) → Engine_\(q_{i,j,2}\)
- ⋮
- ReactionTypeName_\(p_{i,j,k}\) → Engine_\(q_{i,j,k}\)
- ⋮
- ReactionTypeName_\(p_{i,j,m_{i,j}}\) → Engine_\(q_{i,j,m_{i,j}}\)
- ReactionTypeName_\(p_{i,j,1}\) → Engine_\(q_{i,j,1}\)
- ⋮
- MessageTypeName_\(i_{m_i}\) [\(\scriptscriptstyle\{<\mathrm{protocols}(i,m_i)>\}\)]
<↑link to GitHub repo
MessageType_i_{m_i}
> […]
- MessageTypeName_\(i_1\) [\(\scriptscriptstyle\{<\mathrm{protocols}(i,1)>\}\)]
<↑link to GitHub repo
- ⋮
- engine \(N\)