Aggregation of Transitions in Marking Graph Generation Based on Maximality Semantics for Petri Nets

In this paper, we propose an operational semantics to build maximality-based labeled transition systems (MLTS) from Place/Transition Petri nets while performing aggregation of equivalent derivations of transitions according to maximality bisimulation relation. We show that generated MLTS are equivalent to MLTS generated without aggregation. As illustration, we apply results on a ticket reservation system


INTRODUCTION
The model of Petri nets is very attractive, not only by its graphical aspect, but also by its ability to capture parallel behavior of systems.One of verification approaches of a Petri net is to generate its marking graph in which nodes represent system states, and arcs represent transitions taking the system from one state to another.After its generation, the marking graph can be seen as a labeled transition system [2].The generated labeled transition system is used for the verification of the system properties specified by the Petri net (model checking, bisimilarity, conformance testing, etc. [7,17,8]).However, the labeled transition system model cannot distinguish between sequential and parallel execution of transitions.On the other hand, this model considers the assumption of structural and temporal atomicity of actions.Nevertheless, this assumption is not always accepted in reality.For instance, an instruction written in a high level programming language is interpreted as an interruptible sequence of machine instructions and each machine instruction is of non-null duration.
Taking into account the non-atomicity of actions in a system has been deeply studied in the literature through the definition of several semantics supporting the concept of action refinement [9,10,11,1,6,5,12,13,14,18,20,24,27].Among these semantics, we can cite the maximality semantics which has deen defined independently on Petri nets and event structures by Devillers and Vogler [13,14,29].In this context, maximality bisimulation relation has been defined and proved to be the coarsest relation preserved by action refinement and supporting action duration.In underlying semantic models of Petri nets and event structures, a system with infinite behavior needs an infinite set of events, which makes the underlying structures interesting just for the theoretical point of view.
Dealing with implementability, another model named maximality-based labeled transition system has been defined in the literature and used for expressing the semantics of process algebras with the hypothesis that actions are not necessary atomic, i.e. actions are abstractions of finite processes and may elapse on time.The main interest of maximality-based labeled transition system model is that it can be implemented and used in verification [21].
In order to take advantage of the different results developed around the model of maximality-based labeled transition systems, we proposed in [22] an operational generation method of maximality-based labeled transition systems for Places/Transitions Petri nets.As result, maximality bisimulation relations defined on maximality-based labeled transition systems are extended to Petri nets.The proposed approach, which will be recalled in Section 3, is valid for Petri nets with cyclic behavior.
As example, consider the Petri net of Figure 1.(a).By applying the approach of [22], corresponding maximality-based labeled transition system of this Petri net is given by Figure 1.(b).
At first, recall that a maximality-based labeled transition system is a graph labeled on both states and transitions.Each state is labeled by a set of event names.Each event name identifies the start of execution of an action (eventually under execution) which occured before this state.This action is said to be potentially under execution in this state.
A transition between two states s i and s j is labeled by a 3-uple (M, a, x) (denoted M a x ) where x is the event name identifying the start of execution of the action a and M denotes the set of event names representing the causes of the action a. Elements of M belong to state s i .Occurence of this transition terminates actions identified by M , thus, the set of event names corresponding to state s j is that of s i from which we substract the set M and add the event name x. Formal definition of a maximality-based labeled transition system will be given in Section 2.2.
In the initial state (state s 1 ) of the maximality-based labeled transition system of Figure 1.(b), no action is running, from where the association of the empty set with this state.From state s 1 , actions a and b can start their execution independently, their starts are respectively identified by event names x and y. a and b can be launched in any order.The set {x} (resp.{y}) in state s 2 (resp.s 3 ) stipulates that the action a (resp.b) are potentially under execution in this state.{x, y} in s 4 shows that actions a and b can be executed simultaneously.
Note that when the system is in state s 2 , while the action a has not been terminated yet, the only evolution concerns the start of b.However, when a terminates, we can start the action b caused by a or the action b which is independent from the end of a. Resulting states are respectively s 4 and s 5 .We can observe that from state s 5 , the start of b is always possible.However, the same ending constraint of a is imposed for the execution of b at the level of state s 4 .Note that causal dependence between execution of b across from the action a is captured by the consumption of the produced token coming from the transition t 1 during the firing of t 2 in the Petri net.
Notice that from state s 2 , transitions leading respectively to states s 4 and s 5 are due to the firing of the same transition t 2 .In the first firing, the token of the initial marking is used whereas in the second firing, the used token is that produced by the firing of t 1 .On the other hand, such as we noted above, the derivation by b leading to state s 4 is not conditioned by the end of the action a, while the derivation leading to state s 5 is conditioned by the end of a.Therefore, is it possible to omit the derivations s 2 → s 5 → s 6 in the maximality-based labeled transition system?In other words, did the maximality-based labeled transition system of Figure 1.(c) preserve the behavior of the Petri net of Figure 1.(a)?
In this paper, we propose an operational semantics for generating maximality-based labeled transition systems.This semantics performs aggregation of derivations according to the idea explained in the previous example.We show that generated maximality-based labeled transition system is equivalent to that generated by operational semantics proposed in [22] modulo the maximality bisimulation relation recalled in Section 2.2.
In Section 5, we show through an example that the proposed approach significantly reduces the size of the maximalitybased labeled transition system.Finally, Section 6 gives some conclusions of this work.Proofs can be found in [23].

Petri nets related definitions [4, 5]
• A Petri net is a tuple (S, T, W ) where S is the set of places, T is the set of transitions such that S ∩ T = ∅, and W : ((S × T ) ∪ (T × S)) → N = {0, 1, 2, ...} is the weight function.Graphically, transitions of T are represented by rectangles, places of S by circles and weight function by arrows associated with their weights.We suppose that all nets are finite, i.e. |S ∪ T | ∈ N. • For x ∈ S ∪ T , the pre-set • x is defined by • x = {y ∈ S ∪ T |W (y, x) = 0} and the post-set x • is defined by • The marking of a Petri net (S, T, W ) is defined as a function M : S → N. A marking is generally represented graphically by putting tokens in places.• The transition rule stipulates that a transition t is enabled by M iff M (s) ≥ W (s, t) for all s ∈ S. The firing of a transition t will produce a new marking M defined by • An alphabet A is a finite set; we suppose that τ / ∈ A (τ will indicate invisible action, or silent action).
or external; at the opposite, t is silent or internal.

Maximality-based labeled transition systems [10, 20]
Definition 2.1 Let M be a countable set of event names, a maximality-based labeled transition system of support M is a tuple (Ω, λ, µ, ξ, ψ) with: • Ω = S, T, α, β, s 0 is a transition system such that: -S is the set of states in which the system can be found, this set can be finite or infinite.
-T is the set of transitions indicating state switch that the system can achieve, this set can be finite or infinite.
α and β are two applications of T in S such that for all transition t we have: α(t) is the origin of the transition and β(t) its goal.-s 0 is the initial state of the transition system Ω.
• ψ : S → 2 M is a function which associates to each state the finite set of maximal event names present in this state.• µ : T → 2 M is a function which associates to each transition the finite set of event names corresponding to actions that have already begun their execution and of which the end of execution enables this transition.• ξ : T → M is a function which associates to each transition the event name identifying its occurrence.such that ψ(s 0 ) = ∅ and for all transition t, µ(t

Notation 2.1 In what follows, we use the following notations:
• Let mlts = (Ω, λ, µ, ξ, ψ) a maximality-based labeled transition system such that Ω = S, T, α, β, s 0 .t ∈ T is a transition for which α(t) = s, β(t) = s , λ(t) = a, µ(t) = E and ξ(t) = x.The transition t will be noted s E ax −→ s .• Let f : E → F be a function of domain Dom(f ) = E and codomain Cod(f ) = F , and let D (respectively C) be a subset of E (respectively of F ). Restrictions of f with respect to its domain and codomain are defined by:

PETRI NETS AND MAXIMALITY SEMANTICS
In this section, we introduce through simple examples useful notations and functions for the definition of marking graph associated to a labeled system in a maximality-based approach.
Consider the example of the marked Petri net of Figure 2.(a).With the launch of the transition t 1 , it is clear that the firings of transitions t 2 and t 3 are conditioned by the end of the action related to t 1 .To capture this causal dependence between firings of transitions, we consider that tokens produced by the firing of the transition t 1 are bound to this transition, namely the token in place s 2 and the token in place s 3 .We can see that, in the initial state, the token in s 1 is not bound to any transition, this token is called free in this state.In the case when t 2 would be fired, it could be argued that the action associated with the firing of t 1 has finished its execution.As a result, the token in s 3 will become free.Resulting marking after the firing of the transition t 2 is given in Figure 2.(c).
To distinguish between free and bound tokens in a place, we can imagine that a place is composed of two separated parts.The left part contains free tokens while the right one will contain bound tokens.In a place, the number of free tokens will be denoted by FT , while bound tokens set will be denoted by BT .Hence, we obtain the succession of markings of Figure 3.
A question that arises is how to bind a token with a transition?To answer the question, we consider the marked Petri net of   The two tokens of the place s 2 are bound.Indeed, one is bound to the first firing of the transition t 1 while the second one is bound to the second firing of the same transition (two actions associated with t 1 can be executed in parallel).To remove this ambiguity, each firing will be identified by an event name.As a result, binding a token may be characterized by both the transition that produced it and the event name identifying the firing of this transition.The succession of firings of the above example is depicted by Figure 5.

FIGURE 5: Firing succession of t1
In the configuration C 2 , the set of bound tokens in s 2 is BT = {t 1x } while the set of bound tokens in s 2 of the configuration C 3 is BT = t 1x , t 1y .The event name x refers to the first firing of the transition t 1 while y refers to the second firing of this transition.
Another problem concerns tokens which are bound to the same transition.To see that, consider the Petri net of Figure 6.(a).
With the firing of the transition t 1 , we obtain the derivation of Figure 6.(b).
The right side BT of the place s 2 contains two tokens bound to the firing t 1x , i.e.BT = {t 1x , t 1x }.Since BT is a set, we consider that a bound token is a tuple (n, t, x) of N × T × M, also denoted nt x , where n is the number of instances, t is the transition that produce this token and x is the event name associated to the firing of t.We denote by We assume that one token of s 3 is bound to the firing of t 1 (t 1x ) and the other one is bound to the firing of t 2 (t 2y ).Among bound tokens in s 3 , we want to know the consumed token in the first firing of t 3 and that consumed in the second firing of the same transition.This information is essential to know, in each configuration, the actions (associated with transitions) which have finished their execution.To do this, we associate at the level of a firing the event names identifying bound tokens consumed by this firing.This gives us firing sequence of Figure 7.In the following paragraph, we give some preliminary definitions that will enable us to propose a generation method of a marking graph in the context of the maximality semantics.

Preliminary definitions
Definition 3.2 Let (S, T, W ) be a Petri net with a marking M : • The set of maximal event names in M is the set of all event names identifying bound tokens in the marking M .Formally, the function ψ will be used to calculate this set, it can be defined as ψ(M ) = makefree ({x 1 , x 2 , . . ., x n } , M ) = makefree ({x 2 , . . ., x n } , makefree ({x 1 } , M )) makefree ({x} , M ) = M such that for all s ∈ S, if M (s) = (FT , BT ) then * If there is (n, t, x) ∈ BT then M (s) = (FT + n, BT − {(n, t, x)}) (Conversion of n bound tokens identified by the event name x to free tokens).* Otherwise, M (s) = M (s).
• Let t be a transition of T ; t is said to be enabled by the marking M iff |M (s)| ≥ W (s, t) for all s ∈ S. The set of all transitions enabled by the marking M will be noted enabled(M ).
• The marking M is said to be minimal for the firing of the transition t iff |M (s)| = W (s, t) for all s ∈ S.
• Let M 1 and M 2 be two markings of the Petri net (S, T, W ). M 1 M 2 iff ∀s ∈ S, if M 1 (s) = (FT 1 , BT 1 ) and M 2 (s) = (FT 2 , BT 2 ) then FT 1 ≤ FT 2 and BT 1 BT 2 such that the relation is extended to bound tokens sets as follows: • Let M 1 and M 2 be two markings of the Petri net (S, T, W M } and M is minimal for the firing of t. • Let M be a set.The function get : 2 M −{∅} → M is a function which satisfies get(E) ∈ E for any E ∈ 2 M −{∅}.
• Given a marking M , a transition t and an event name x / ∈ ψ(M ), occur(t, x, M ) = M such that ∀s ∈ S, if M (s) = (FT , BT ) then M (s) = (FT , BT ) with BT = BT ∪ {W (t, s), t, x)} if W (t, s) = 0 and BT = BT otherwise.Hence, M is the resultant marking from the addition of tokens bound to t to the marking M .

Construction of marking graph
Let Σ = (S, T, W, M 0 , λ) be a labeled system.The marking graph M g labeled by λ associated to Σ is a graph in which the states are defined by all reachable markings from the initial marking M 0 and the transitions between states are labeled according to the derivation rule of Definition 3.3.

Definition 3.3
Let M be a reachable marking of the marked Petri net (S, T, W, M 0 ), t ∈ enabled(M ) then for all M " ∈ M in(M, t), E = ψ(M ") and M = makef ree(E, M − M "); the following derivation is possible: M E tx −→ M (also denoted by (M, E t x , M )) such that • E is the set of maximal event names associated with actions in which the end is required for the launch of the action related to the firing of t.

Properties
Proposition 3.1 Let Σ = (S, T, W, M 0 , λ) be a labeled system and M g its marking graph built according to Definition 3.3, then the structure Σ mlts = (M g, λ, µ, ξ, ψ) is a maximality-based labeled transition system with: • M g = Sg, T g, α, β, M 0 is the marking graph associated to Σ such that -Sg is the set of states defined by the set of reachable markings from the initial marking M 0 .
Proof.Let us observe at first that the initial marking M 0 contains only free tokens, therefore ψ(M 0 ) = ∅.On the other hand, for d = (M, E t x , M ) ∈ T g, according to Definition 3.3, Proposition 3.2 Given a marked Petri net (S, T, W, M 0 ), then the set of sequences of generated transitions in an interleaving approach is the same to the set of sequences generated in a maximality-based approach.
Proof.Derive directly from the fact that in a maximality-based approach, the firing condition of a transition takes into account only the number of tokens in places and not the nature of these tokens.Note that information related to the origin of tokens (BT set) is used only to decorate the graph with event names used in the generation of the maximality-based labeled transition system.Definition 3.4 Let Σ 1 = (S 1 , T 1 , W 1 , M 1 0 , λ 1 ) and Σ 2 = (S 2 , T 2 , W 2 , M 2 0 , λ 2 ) be two labeled systems.Σ 1 and Σ 2 are said to be maximally bisimilar iff their respective maximality-based labeled transition systems are maximally bisimilar.
Example 3.1 Consider the example of the two labeled systems Sys 1 and Sys 2 in Figure 8.(a) (this example is from [13]).By applying the proposed approach, the corresponding maximality-based labeled transition systems are given by Figure 8.(b).The reader may easily check that these two systems are maximally bisimilar.

Operational maximality semantics for Petri nets with aggregation of transitions
Usually, marking graph is generated in the same manner as the previous approach, thus we keep the same basic definitions, but to achieve our goal we must change the semantics of the function M in.In this case, a minimal marking for the firing of a transition t is considered as an element of the set M in (M, t) only if for each place of this marking, bound tokens are only taken in the case when the free part does not satisfy the pre-condition of this transition.Therefore, we can ensure that a transition t will be executed sequentially after a transition t if it cannot be executed independently with this same transition t .
Formally, M in(M, t) is the set of markings M M such that for any state s where M (s) = (FT , BT ), M (s) is defined as follows: with BT BT and BT = w(s, t) − FT

Maximality bisimulation relation on transitions
In this section, we present a maximality bisimulation relation according to Petri net transitions instead of actions.
Definition 4.1 Let M ark be a set of markings, T a set of transitions and → a derivation relation between markings as defined in Definition 3.3.
Let Σ be a system with the initial marking M 0 , and let σ be a sequence of transitions such that Theorem 4.1 Let Σ = (S, T, W ) be a labeled system and let mlts 1 (resp.mlts 2 ) a maximality-based labeled transition system generated from Σ by using the maximality semantics (resp.maximality semantics with aggregation of transitions), then mlts 1 and mlts 2 are maximally bisimilar for the set of transitions T .

CASE STUDY
In order to illustrate the interest of the proposed approach, we study in this section an example of processes synchronization, namely ticket reservation system.We show the important reduction rate, and system properties preservation.
Let us consider a reservation system of plane tickets.To buy a ticket, We pass generally by two ticket-windows.A first window of type R (Reservation) allows reserving a place in a flight and to establish the plane ticket.A second window of type C (Cash desk) allows to take and collect the money and to give the ticket to the customer.This agency has a waiting room, three ticket-windows of type R and two of type C. While arriving, the customers pass initially in waiting room.As soon as a window of type R is free, a customer can present himself at the window and proceed to the reservation.Once this operation finished, he waits until a ticket-window of type C is free to carry out the payment and the withdrawal of his ticket.System specification is given by Petri net of Figure 9.In order to show the reduction rate, we use at first the generating method of a maximality-based labeled transition system presented in Section 3, then we apply generation approach with reduction.This is achieved by varying the number of customers.Obtained results are summarized in Table 1.

CONCLUSION
In this paper, we proposed an operational method for generating reduced maximality-based labeled transition systems associated to Petri nets, based on aggregation of redundant transitions, and we showed that generated maximalitybased labeled transition systems are equivalent to those generated by operational semantics proposed in [22] modulo the maximality bisimulation relation, i.e. degree of parallelism and system properties to be verified are preserved.As  we have seen in the case study, the proposed approach reduces significantly the size of the maximality-based labeled transition system.
By considering maximality semantics, correcteness properties relative to systems specified by a Petri net can be checked on maximality-based labeled transition systems which corresponds to this Petri net.In addition, maximalitybased labeled transition system structure includes information on the parallel execution of actions.This structure enables us to more easily express properties relating to the parallel execution of actions without splitting actions in their start and end events.We note that splitting actions in start and end events to capture the parallel execution of the actions will contribute directly to the problem of combinatorial explosion of the state graph.
In [3], an on-the-fly generation algorithm of maximality-based labeled transition systems, reduced modulo αequivalence was proposed and integrated in FOCOVE 1 environment.We think that this algorithm adapts easily to the context of Petri nets.

Figure 4 .
(a).By a firing of the transition t 1 , we obtain the marked Petri net of Figure4.(b).Starting from this marking, we can see that t 1 is enabled.The firing of this transition will lead to the configuration of Figure4.(c). s

TABLE 1 :
Generation results