3.5 Asynchronous-channels
3.5.3 Asynchronous-channels execution semantics
Each asynchronous-channel specify message sending from one synchronous component to another. The asynchronous-channels do not specify the communication delay, which
means that the time taken by each message from the source to the target sub-model is un- defined and variable (this way the asynchronous-channels ensure network-independent specifications). A message indicates the occurrence of one of three events in the source component: (1) reporting that one transition fired (in SimpleACs); (2) that one transi- tion received a message but it was disabled (in NotACs); or (3) that one or more transi- tions received a message (in AckACs). Additionally, in high-level Petri nets each message can carry additional data. In low-level Petri nets no additional data is carried. In high- level Petri nets, if the source channel arc has no annotation, no additional data is carried, whereas, if the source channel arc has an annotation (associating a set of variables to that channel), the associated variable values are carried by the message.
The asynchronous-channels behavior can be expressed through behaviorally equiv- alent Petri net sub-models (presenting their execution semantics). Any Petri net model with asynchronous-channels (such as the one presented in Figure3.15) can be specified through a Petri net model without asynchronous-channels, if the channels are replaced by their behaviorally equivalent sub-models. To illustrate it, the Petri net model that spec- ifies the behavior of the model from Figure3.15, where the asynchronous-channels AC1, AC2, and AC3, were replaced by their behaviorally equivalent sub-models, is presented in Figure3.16. The transitions with dashed squares (from Figure3.16) are reference tran- sitions (they refer to other transitions [52]). To obtain a single Petri net model, the refer- ence transitions must be merged with the transitions that they refer to. An algorithm that transforms a Petri net model with asynchronous-channels into a behaviorally equivalent Petri net model without asynchronous-channels is presented in section3.6.
3.5. ASYNCHRONOUS-CHANNELS
Figure 3.16: The Petri net model that specifies the behavior of the model from Figure
3.15, where the asynchronous-channels were replaced by their behaviorally equivalent sub-models (presenting their execution semantics).
It is important to note that the behaviorally equivalent Petri net models that are pre- sented in this section and that are created using the algorithm proposed in section3.6, use the time-domain concept without fulfilling all its assumptions. These models have nodes without time-domain, which is not compliant with the time-domain function presented in section3.4; however, this is not a problem because these models are used to present the asynchronous-channels behavior and to support the GALS-DESs verification, and not to support the GALS-DESs documentation or implementation.
The core of the behaviorally equivalent Petri net model of any asynchronous-channel, regardless of being a SimpleAC, an AckAC, or a NotAC, regardless of its source and target transitions, and regardless of being used in low-level or high-level Petri nets, is presented in Figure3.17. In the model:
• the place pgoing can contain several tokens, each one specifying a message going from the source to the target component;
• the transition tarrive has an unique time-domain, different from the other asyn- chronous-channels’ time-domains and different from the components’ time-domains (as illustrated in Figure3.16), making its firing nondeterministic (to ensure that the channel communication delay is undefined);
illustrated in Figure3.16);
• the transition tdeliver ensures that each arrived token (message) is only available during one execution step to enable the target transition firing, being destroyed after that;
• the place plimit limits the maximal number of "messages" in the place parrived to one (this is important for high-level Petri nets), to specify that no more than one message can be consumed in each execution step;
• the test arc is connected to the target transition (as illustrated in Figure3.16). The test arc, also known as read arc, is represented in this document by a line with an arrow in the middle. Each test arc connects a place to a transition and does not destroy tokens when the transition fires.
Figure 3.17: The core of the behaviorally equivalent Petri net sub-model of any asynchronous-channel.
The three types of channels have similar execution semantics, but they react to dif- ferent events in their source transitions. This way, the arc without source node from the behaviorally equivalent Petri net model presented in Figure3.17can be connected to dif- ferent transitions, as illustrated in Figure 3.16. When the model specifies the behavior of:
• a SimpleAC, the arc without source node is connected to the source transition; • an AckAC, the arc without source node is connected to the transition tdeliver of
the behaviorally equivalent Petri net sub-model of the asynchronous-channel that is source of its source transition;
3.5. ASYNCHRONOUS-CHANNELS
• a NotAC, the arc without source node is connected to the transition tnotenabled as presented in Figure3.18.
Figure 3.18: The NotAC behaviorally equivalent Petri net sub-model.
The NotAC behaviorally equivalent Petri net sub-model is presented in Figure3.18. The disconnected arcs from place pxor must be connected to the source transition, as illustrated in Figure3.16. The place pxor ensures that the source transition and transition tnotenabled cannot fire simultaneously. To ensure that the transition tnotenabled fires if and only if the source transition does not fire (when receives a message), the tnotenabled has lower priority than the source transition (tsource<tnotenabled) and its input test arc (the arc without source node) must be connected to the place parrived of the behaviorally equivalent Petri net sub-model of the asynchronous-channel that is source of its source transition (this is also illustrated in Figure3.16).
The sub-models presented in Figures 3.17and3.18just have one test arc connected to place parrived; however, the number of test arcs from parrive is equal to the number of target transitions of the associated channel, plus the number of NotACs that are target of its target transitions. Each test arc connects the place parrived to each of its target transitions and to each transition tnotenabled of the NotACs behaviorally equivalent Petri net sub-models that are target of its target transitions.
When an asynchronous-channel is used in high-level Petri nets, the behaviorally equiv- alent Petri net sub-model (Figure3.17or Figure3.18) additionally includes annotations. Places pgoing and parrived have annotations to specify their data type, and their input and output arcs can have annotations to specify the data variables that are transmitted through the channel. In high-level Petri nets, when the transition tarrive fires, it randomly
destroys one of the tokens from pgoing (this is because place pgoing is not a priority queue) and create an equal token in parrived, ensuring that these channels do not guarantee the order of the messages (thereby ensuring network-independent specifications). This is il- lustrated in Figure 3.19, which shows the high-level Petri net model that presents the execution semantics of the high-level Petri net model presented in Figure3.14, replacing the asynchronous-channels by their behaviorally equivalent sub-models.
Figure 3.19: The high-level Petri net model behaviorally equivalent to the high-level Petri net model presented in Figure3.14.