## 3 Proposed Approach  
As identified in Section 1, the main goal of this work is to improve the model compactness by encapsulating the input signal evolution dependencies into events. The proposed approach can be applied to different state-based formalisms. In this paper, IOPT nets will be considered the supporting formalism for their usage. In this context, the most simple event associated with a Boolean signal is generated by a change in the value of the signal in two consecutive execution steps, previously proposed in [1, 12, 25]. This leads to the common _Up_ and _Down_ events associated with the two possible changes in signal value. However, other types of simple events are of interest to mimic the more complex evolution of signals. Two of those events are the _UpDown_ event and the _DownUp_ event, initially proposed in [12]. In the _UpDown_ event, a full evolution of the signal from 0 to 1 and back to 0 is necessary to be observed, while the _DownUp_ event detects dual evolution. In Figure 2, those events are presented (showing the time evolution of signal \(a\) and the instant where the associated event is generated), along with the _UpOrDown_ event, where any of the evolutions associated with the events _Up_ or _Down_ are detected. For all these events, a simple state diagram using a Petri net notation is presented, allowing for the detection of that evolution of the signal \(a\) (taking advantage of the transition guards constrained by the signal value). To better clarify the diagrams' semantics, we now detail the working of the first diagram in Figure 2. As stated in the previous section, each transition can only fire when it is _enabled_ and _ready_. A transition is _enabled_ when there is one token in all of its input places (all are _marked_). In the example, it suffices to have one token in place _pa_ as it is the only input place for transition \(t1\); in IOPT nets, the tokens in each place are specified by a positive number in each place (\(I\) in Figure 2a). A transition is _ready_ when the respective guard and input event are true. Absent guards or absent input events are semantically equivalent to guards and input events that evaluate to true. In the model in Figure 2a, transition \(t1\) only fires when signal \(a\) has value \(0\); then, transition \(t1\) becomes enabled (one token in place \(p1\)) and can only fire when signal \(a\) has value \(I\) (it becomes _ready_. The model in Figure 2a represents the behavior of the input signal \(a\) as depicted in the time evolution diagram below the Petri net. Therefore, the signal \(a\) behavior _Up(\(a\))_ can be expressed by the above time evolution diagram or by the Petri net. The same happens for each of the other diagrams in Figure 2. This dual representation has a direct correspondence to what can be performed in the implementation: (1) either the Petri net model (IOPT model) is added to the primary model to specify the signal behavior or (2) the signal time evolution is computed so that the event is made available for the Petri net modeler to use in one or more transitions. The proposed approach intends to shrink the model collapsing sequence of nodes associated with a specific signal evolution into an event depending on the same signal evolution. In this sense, instead of using the Petri net model presented in Figure 3a associated with the _Up_ event (introduced in Figure 2a), it is proposed to use the simplified model presented in Figure 3b, composed of a simplified model where transition _ta_ encapsulates the sub-model composed of \(t1\), \(p1\), and \(t2\), which will be executed concurrently with the model responsible for the analysis of the signal \(a\) evolution and for the generation of the event _Up(\(a\))_.  
Figure 3: Restructuring the model introducing dependency on one event: (**a**) the initial model and (**b**) the model used for execution. Figure 2: Different types of events associated with Boolean signals: (**a**) _Up_ event, (**b**) _Down_ event, (**c**) _UpOrDown_ event, (**d**) _UpDown_ event, and (**e**) _DownUp_ event.