On the Approximation of the Resource Equivalences in Petri Nets with the Invisible Transitions

Two resources (submarkings) are called similar if in any marking any one of them can be replaced by another one without affecting the observable behavior of the net (regarding marking bisimulation). It is known that resource similarity is undecidable for general labelled Petri nets. In this paper we study the properties of the resource similarity and resource bisimulation (a subset of complete similarity relation closed under transition firing) in Petri nets with invisible transitions (where some transitions may be labelled with an invisible label (τ) that makes their firings unobservable for an external observer). It is shown that for a proper subclass (p-saturated nets) the resource bisimlation can be effectively checked. For a general class of Petri net with invisible transitions it is possible to construct a sequence of so-called (n, m)-equivalences approximating the largest τ-bisimulation of resources.


Introduction
In this paper the behavior of Petri nets is investigated from the standpoint of bisimulation equivalence. e fundamental notion of bisimulation was introduced by R. Milner [1] and D. Park [2]. Two markings of a Petri net are called bisimilar if the choice of each of them as an initial marking gives the same visible behavior of the net. In [3] P. Jančar proved that bisimulation equivalence of markings is undecidable for a general Petri net.
In [4] C. Autant et al. introduced a notion of place bisimulation -a decidable bisimulation-induced equivalence on the nite set of places, that allows to nd out some non-trivial behavior-preserving net reductions. is relation and its applications were studied in [4][5][6]. e notion of resource similarity was introduced in [7]. In general a resource is a submarking. Two resources are similar if, having replaced one resource in any marking by another, we obtain the same observed behavior of the net. Resource bisimulation is a particular case of similarity that is closed under transition ring. Place bisimulation is a proper subset of resource bisimulation. Note that, unlike the place bisimulation [4], resource similarity and bisimulation are de ned on the in nite set (of resources/submarkings).
Resource similarity and its modi cations where studied in [7][8][9]. In particular it was proven that resource similarity is undecidable. However, it was shown that resource bisimulation can be e ectively approximated and used as a basis of net reductions and adaptive control. For an overview, see [10].
is article is an extended version of the workshop report [11]. We consider an important generalization of labelled Petri nets, where some transitions may be labelled with an invisible label (tau), that makes their rings unobservable for an external observer. ite o en when analyzing the system there is a need to abstract from the excessive information about its behavior. For example, it is convenient to hide all transitions, corresponding to the internal actions of the system. e information obtained in this case can be useful, in particular, to detect additional properties of the system in terms of its interaction with the environment.
Place bisimulations in Petri nets with invisible transitions were studied by C. Autant et al. in [5]. It was shown that unlabelled sequences of steps signi cantly complicate the calculations. However, there are speci c nontrivial subclasses of Petri nets with invisible transitions, that have some nice properties w.r.t. place bisimulation.
In this paper we apply a similar approach to the resource equivalences. It is shown that resource bisimulations can be e ectively computed in some non-trivial subclasses of nets with invisible transitions.
A class of -saturated nets is studied. In -saturated nets the ring of any sequence of transitions with at most one visible label can be simulated by a simultaneous (independent) ring of a certain set of transitions with the same label (called parallel step). In -saturated Petri nets -bisimulation coincides with the so-called -bisimulation [5], that takes into account parallel steps instead of transition sequences. It is shown that in the class of -saturated nets the weak transfer property of resource -bisimulation can be e ectively checked. Moreover, we can underapproximate the largest -bisimulation by a parameterized algorithm.
It is shown that for a general class of Petri net with invisible transitions it is possible to construct a sequence of so-called ( , )-equivalences, approximating the largest -bisimulation of resources. e paper is organized as follows. Section 2 contains basic de nitions. Speci cally, in Subsection 2.1 we give some technical notions and lemmata on the properties of additively-transitively closed relations on multisets. Subsection 2.2 contains de nitions of Petri nets and bisimulations. Subsections 2.3 and 2.4 give a short review on Petri net resources and resource equivalences (similarity and bisimulation). Section 3 deals with invisible transitions. In Subsections 3.1 and 3.2 we de ne the -generalizations of resource equivalences and study their properties. It is shown that the straightforward method of bisimulation checking with a weak transfer property is not applicable here. In Section 4 we study the subclass of -saturated nets and the corresponding notion of -bisimulation. In Subsection 4.3 we present an algorithm, computing the parameterized underapproximation of largest -bisimulation. Section 5 is devoted to the general case of Petri nets with invisible transitions. A parameterized approximation procedure for resource bisimulation is de ned and studied. Section 6 contains some conclusions.

Relations on multisets
Denote by an empty sequence. Let and be two sets. Let ∈ * be a sequence over . Denote by | a projection of onto such that for an empty sequence = we have | = and for a non-empty sequence = with ∈ and ∈ * we have | = | for ∈ and | = | for ∉ . A multiset over a set is a mapping ∶ → Nat, where Nat is the set of natural numbers (including zero), i.e. a multiset may contain several copies of the same element.
Size of a multiset is de ned as follows: | | = ∑ ∈ ( ). A multiset is nite if a set { ∈ | ( ) > 0} is nite. By ( ) we denote the set of all nite multisets over . An empty multiset is denoted by ∅.
e operations and relations of set theory are naturally extended to nite multisets. Let 1 , 2 , 3 ∈ ( ). en: ⇔ ∀ ∈ 1 ( ) = 2 ( ) for ∈ and 1 ( ) = 0 otherwise. Non-negative integer vectors are o en used to encode multisets. Actually, the set of all multisets over nite is a homomorphic image of Nat | | .
A binary relation ⊆ Nat × Nat is a congruence if it is an equivalence relation and whenever ( , ) ∈ then ( + , + ) ∈ (here '+' denotes coordinate-wise addition). 1 It was proven by L. Redei [12] that every congruence on Nat is generated by a nite set of pairs. Later P. Jančar [3] and J. Hirshfeld [13] presented a shorter proof and also showed that every congruence on Nat is a semilinear relation, i.e. it is a nite union of linear sets.
Let ⊆ ( ) × ( ) be a binary relation on multisets. A relation ′ is called an AT-basis of i ( ′ ) = . An AT-basis ′ is called minimal i there is no ′′ ⊂ ′ such that ( ′′ ) = . Now we construct a special kind of minimal AT-basis for . De ne a partial order ⊑ on the set ⊆ ( ) × ( ) of pairs of multisets as follows: 1. For loop (i.e. re exive) pairs let 2. For two non-loop pairs, the maximal loop constituents and the addend pairs of nonintersecting multisets are compared separately 3. a loop pair and a non-loop pair are always incomparable. Let denote the set of all minimal (with respect to ⊑) elements of . eorem 1. [8] Let ⊆ ( ) × ( ) be a symmetric and re exive relation. en is an AT-basis of and is nite.
We call the ground basis of . Obviously, it is nite. ere is also a useful where ( ) is the additive closure of .

Labelled Petri nets and bisimulations
Let and be disjoint sets of places and transitions and let ∶ ( × )∪( × ) → Nat. en = ( , , ) is a Petri net. a marking in a Petri net is a function ∶ → Nat, mapping each place to some natural number (possibly zero). us a marking may be considered as a multiset over the set of places. Pictorially, -elements are represented by circles, -elements by boxes, and the ow relation by directed arcs. Places may carry tokens represented by lled circles. a current marking is designated by pu ing ( ) tokens into each place ∈ . Tokens residing in a place are o en interpreted as resources of some type consumed or produced by a transition ring. a marked Petri net ( , 0 ) is a Petri net together with a given initial marking 0 . Let ∈ * be a sequence of transition (possibly empty), ∈ -a transition. e pre-and postcondition for a non-empty sequence are de ned inductively: A sequence ∈ * is enabled in i • ⊆ . An enabled sequence may re yielding a new marking A multiset of transitions may re in parallel (concurrently), if there are enough tokens for all of them. a transition may re in parallel with itself. e concurrent ring of a multiset of transitions is called a parallel step. e pre-and postcondition for a multiset of transitions ∈ ( ) are: To observe the net behavior transitions are labelled by special labels representing observable actions or events. Let Act be a set of action names. A labelled Petri net is a tuple = ( , , , ), where ( , , ) is a Petri net and ∶ → Act is a labelling function. It can be generalized to non-empty sequences: for ∈ * s.t. = with ∈ and ∈ * we have ( ) = ( ) ( ).
And also to multisets of transitions (note that in this case labels are not sequences but multisets of action names): Let = ( , , , ) be a labelled Petri net. We say that a relation ⊆ ( ) × ( ) conforms to the transfer property i for all ( 1 , 2 ) ∈ and for every step ∈ , s.t. 1 → ′ 1 , there exists an imitating step ∈ , s.t. ( ) = ( ), 2 → ′ 2 and ( ′ 1 , ′ 2 ) ∈ . A relation is called a marking bisimulation, if both and −1 conform to the transfer property. It is known that a union of two marking bisimulations is a marking bisimulation. Hence for every labelled Petri net there exists the largest marking bisimulation (a union of all bisimulations; denoted by ∼) and this bisimulation is an equivalence. It was proved by P. Jančar [3], that the marking bisimulation is undecidable for Petri nets. More precisely, it is undecidable whether two markings (of the same net) are marking bisimilar, even if restricted to nets with only two unbounded places.

Resource similarity
Informally, resources are parts of markings which may or may not provide some particular kind of observable net behavior.
[8] Let = ( , , , ) be a labelled Petri net. a resource ∈ ( ) in a Petri net is a multiset over the set of places .
us if two resources are similar, then in every marking each of these resources can be replaced by the other without changing the observable behavior of the system. Here we consider the observability modulo action names: the external observer can see events (labels of red transitions) but cannot distinguish local states (tokens). Some examples of similar resources are shown in Fig. 1. Figure a) shows a Petri net containing two transitions labeled with the same label and leading to the same marking 3 . Here the resources 1 and 2 are similar, as they lead to a completely identical observable behavior -action producing a single token in 3 . Moreover, all the resources containing the same number of tokens in 1 and 2 are similar. Figure b) shows a simple net consisting of a single transition. In this case the resource 2 is similar to an empty resource, since it does not a ect the behavior of the net (the place 2 is redundant).
Figure c) depicts a cycle consisting of one transition and one place. Note that the set of markings of this net can be divided into two disjoint subsets -empty marking and all the others. With empty marking, the transition can not re, for all others -it can re any number of times. Note that for this net the largest marking bisimulation and the resource similarity coincide. Also note that marking bisimulation takes into account only steps made of single transitions hence no auto-concurrency can be considered here. Figure d) shows a more complex situation. We have 1 ≈ 2 + 3 , that is, replacing one token in 1 by two tokens (one in 2 and one in 3 ) does not a ect the observable behavior of the net as a whole. a - Hence it has a nite ground basis. Unfortunately, from the undecidability of a stronger relation of place fusion [6] we get eorem 2.
[8] e resource similarity is undecidable for labelled Petri nets.

Resource bisimulation
e resource similarity is quite fundamental, but the undecidability makes it not very useful in practice. So we studied a number of other non-trivial nitely-based resource equivalence relations, retaining the observable system's behavior. e most interesting of them is a resource bisimulation: is a marking bisimulation.
Note that an AT-closure of a resource similarity relation is not necessarily a marking bisimulation (it is still an open question [10]). However, we already know that each resource bisimulation is a subset of resource similarity relation (≈). e following theorem states this and some other important properties of resource bisimulations. 2. if 1 , 2 are resource bisimulations for then 1 ∪ 2 is a resource bisimulation for ; 3. for any there exists the largest resource bisimulation (denoted by ( )), and it is an equivalence. erefore ( ) (as well as any other resource bisimulation) also has a nite ground basis. e AT-closure of a resource bisimulation is a marking bisimulation, and hence, it conforms to the transfer property. Resource bisimulations satisfy a weak variant of the transfer property, considering only minimal pairs of markings that contain the corresponding resources and enable the corresponding transitions.
We say that a relation ⊆ ( ) × ( ) conforms to the weak transfer property if for all ( , ) ∈ , for each ∈ , such that • ∩ ≠ ∅, there exists an imitating transition ∈ , such that ( ) = ( ) and, writing is an equivalence relation and it conforms to the weak transfer property.
Due to this theorem to check whether a given nite relation is a resource bisimulation, one needs to verify the weak transfer property for only a nite number of pairs of resources. In [8] we have shown that the largest resource bisimulation for resources with a bounded number of tokens can be e ectively constructed (more precisely, it requires O(max{| |  9 , | | 2 | |  7 }) steps, where  is the number of resources in the consideration).

Petri nets with invisible transitions
In this section we investigate the possibilities of e ectively constructing bisimulation-preserving relations for an extended class of systems -Petri nets with invisible transitions.
To distinguish visible and invisible transitions, a special symbol is added to the set of labels: De nition 3. A labelled Petri net with invisible transitions is a tuple = ( , , , ), where ( , , ) is a Petri net and ∶ → Act is an extended labelling function.
Marking bisimulation is a special case of marking -bisimulation (for nets with no -s). It is a stronger relation. Consider as an example the net depicted in Fig. 2. Markings 1 and 2 are not bisimilar, because at 2 no transition with label is active. But they are -bisimilar, because the invisible ring of 2 changes the marking from 2 to 1 .
In particular, this implies the undecidability of marking -bisimulation in Petri nets with invisible transitions [3]. We can show that resource -similarity has all basic properties of resource similarity: 1. Resource -similarity is closed under addition and is transitive; hence it has nite AT-basis. 2. Resource -similarity is undecidable.
2) From . 2 (note that -similarity is a generalization of basic resource similarity).
3) e third statement is an immediate corollary of the second one. e largest resource -bisimulation can be constructed as the union of all resource -bisimulations for . where ( ) is an identity relation s.t. ∀ , ∈ ( , ) ∈ ( ) ⇔ = . conforms to the weak -transfer property. At the same time is not a resource -bisimulation. Consider markings 1 = 1 + 3 and 2 = 2 + 4 . e pair ( 1 , 2 ) belongs to the relation , but the markings are not bisimilar, because an action is possible at 2 (transition 3 ) and is impossible at 1 .
Hence the weak -transfer property can not be used to construct bisimulation. In the case of systems with invisible transitions it is even more important to strengthen the considered relations and/or to restrict the considered class of Petri nets. ere exists a wide and important subclass of Petri nets with invisible transitions for which resourcebisimulation can be constructed using weak transfer property -so-called "p-saturated nets". In -saturated nets [5] the ring of any sequence of transitions with at most one visible label can be simulated by a simultaneous (independent) ring of a certain set of transitions with the same label (called "parallel step").
Denote the set of non-empty transition sequences with at most one visible label: In addition to saturated nets, there is an even broader class of saturable Petri nets. ese are nets that can be transformed into saturated by adding a nite number of transitions while preserving the behavior of the net (in the sense of -bisimilarity). In Fig. 4 a saturated net is shown, obtained by adding the transition 3 to the unsaturated net.
It is known [5] that a net is -saturated i it is 2 -saturated, i.e. all sequences of length 2 are saturated by parallel steps.
Not all nets are saturable [5]. An example is given in Fig. 5. Here all transition sequences has the same precondition (a single token in the upper place) and di erent postconditions. So there is an in nite set of di erent transition sequences with di erent postconditions. On the other hand, the structure of the net also implies that all possible parallel steps with the same precondition (a single token in the upper place) would necessarily contain a single transition. Hence the number of di erent imitating parallel steps is always nite and equal to the number of existing transition. e saturation would not help, because it can not introduce an in nite number of new transitions.
It is also easy to see that the net is saturable i its "invisible subnet" is saturable (an invisible subnet is a net, obtained by removing all visible transitions). m m τ --

-bisimulation
In [5] an equivalence stronger than -bisimulation was de ned, called -bisimulation of markings. e transition in this case is modeled not by a sequence of transitions, but by a parallel step.
De nition 8. It is known [5] that for any net there exists the largest -bisimulation (denoted by ∼ ).
Proof. 1) Immediately from the de nition of resource -similarity.
3) Immediately from the de nitions. 4) e proof is almost the same as in Prop. 3: the only di erence is that we consider not an imitating transition but an imitating parallel step. 5) Note that we can take a union of all resource -bisimulations.
De nition 12. Let = ( , , , ) be a saturated labelled Petri net with invisible transitions. We say that a relation ⊆ ( ) × ( ) conforms to the weak -transfer property if for all ( , ) ∈ , ∈ s.t. • ∩ ≠ ∅, there exists an imitating parallel step ∈ ( ) s.t. ( ) = ( ) and, denoting 1 = • ∪ and 2 = • − + , In saturated nets the weak -transfer property is a necessary and su cient condition for its extended version, which guarantees the imitation of a parallel step rather than a single transition: Proof. (⇐) Since the weak transfer property is a special case of the extended weak transfer property.
Consider the transition ring 1 1 → 1 1 . From the weak -transfer property it follows that this transition has an imitating parallel step 2 1 → 1 2 such that ( 1 1 , 1 2 ) ∈ . Note that = { 1 , … , } is a parallel step at marking 1 , hence a er the ring of one of these transitions all other are still enabled. erefore we can repeat the previous reasoning for the new pair of markings ( 1 1 , 1 2 ) ∈ and transition 2 . And continue this until : At the end we got a sequence of parallel steps imitating the ring of parallel step 1 → ′ 1 . e net is saturated so for any sequence of transitions (note that a parallel step also can be considered as a sequence of transitions) there exists an imitating parallel step with the same label, precondition and postcondition ( 2 → ′ 2 ).
Note that, unlike the weak transfer property, the extended weak transfer property can not be e ectively checked by the search of resource pairs, since the set of parallel steps is in nite. Consider the pair ( 1 , 2 ).
Apply this − 1 times. Using transitive closure of , at the end we obtain a parallel step that can imitate at marking 2 . Now proceed to the next pair ( 2 , 3 ) and repeat the procedure for the parallel step . And so on, until the last pair ( −1 , ). Finally we obtain a parallel step that can imitate at marking = 2 .
us, in saturated nets the weak -transfer property can be used in the construction of resourcebisimulation.

Underapproximation
As in ordinary Petri nets (without invisible transitions), in the case of saturated (saturable) nets with invisible transitions there is a way of constructing an approximation of the maximal resource -bisimulation. If we consider not an in nite set of network resources, but only its nite subset, then it will be possible to check the weak -transfer property. Let = ( , , , ) be a saturated labelled Petri net with invisible transitions, ∈ Nat -some parameter. By  ( ) we denote the set of all resources, containing not more than tokens in the net: Denote by ( , ) the union of all resource -bisimulations on  ( ). Since the union of two resource -bisimulations is always a resource -bisimulation (Prop. 5.4) we obtain the largest resource -bisimulation on  ( ).
Since  ( ) is nite, we can use the weak transfer property to compute ( , ).
Step 1: Let = ∅ -an empty set of pairs (considered as a binary relation over  ( ); it will be used as a set of discovered pairs of non-similar resources).
Step 3: Compute -the ground basis of .
Step 4: Check, whether conforms to the weak -transfer property: it is su cient to test all non-re exive elements of (denote a set of all non-re exive elements of by ). • If all pairs conforms to the weak -transfer property then stop and return -the bisimulation.
• Otherwise there are ( , ) ∈ and ∈ with • ∩ ≠ ∅, s.t. the ring 1 → 1 ′ with 1 = • ∪ can not be imitated by a parallel step with the same label and with precondition 2 = • − + s.t.  ? ? (termination) For any marking the set of active parallel steps is nite. Also note that the set  ( ) ×  ( ) is nite. Hence the algorithm always stops.
(correctness) Note that the algorithm stops only if conforms to the weak -transfer property. Hence the result is always a resource -bisimulation.
(largest equivalence) Assume that not all pairs from the largest resource -bisimulation on  ( ) are found. Hence each of the lost pairs was removed from the consideration (added to ) at some iteration of algorithm. Consider the rst of these iterations. e pair is removed because it doesn't satisfy the weaktransfer property w.r.t. the current con guration of . On the other hand, we know that it satis es the weak -transfer property w.r.t.
( , ). Since current iteration is rst when we remove the "wrong" pair, it is clear that ( , ) ⊆ ( ) . Hence the pair of resources should satisfy the weak -transfer property w.r.t. ( ) -a contradiction.
Denote by  = | ( )| the size of the set of considered resources. At the Step 2 we search through the set of all parallel steps with at most one visible label, that can re at marking 2 . Each invisible transition can participate in the parallel step at most | 2 | times, since it uses at least one input token. 2 ere is also at most one visible transition. Hence we have to check at most | || 2 | | | multisets of transitions. e size of marking 2 = • − + can be evaluated as O(| |) = O( ). Using our previous estimations of complexity for ground basis calculation (polynomial w.r.t. ) and the complexity of other steps of algorithm (polynomial w.r.t. the size of the net), we obtain the overall complexity of O(max{| |  9 , | | 2 | | | |  7 }).
Here the rst and the second components of max are estimations for Step 3 and Step 4 respectively. So in the case of nets with invisible transitions the complexity of the algorithm increased signi cantly (the linear dependence on | | was replaced by an exponential one). Such a jump is explained by the transition from sets of transitions to multisets.
Obviously, the limit of sequence { ( , ) ( )} , for , → ∞ is ( ). Consider two examples of such a sequence: Example 1. For the net depicted in Fig. 2 we have: Indeed, only the sequences of length 2 can nd the similarity between 1 and 2 . Hence ( 1 , 2 ) is added only on the second step. On the third step we nd out that any non-empty multiset of places is equal to any other non-empty multiset of places -this can be de ned by pairs ( , + ) and ( + , ) (all other elements can be obtained from these pairs and re exive pairs with the help of an AT-closure). At the third step the sequence of sets stabilizes.
ere are two open questions on the structure of { ( , ) ( )} , sequence: 1. Does it always stabilizes at some ( , )? 2. If not, does it always become monotonous at some point (w.r.t. + )? e hypothesis is that the answers are: (1) -negative, (2) -positive. e rationale for this is that ( , ) is not always a bisimulation (in contrast to ( , ) from the previous section) and hence the in nite "tail" of { ( , ) ( )} , can consist of an in nite sequence of contracting ( ) overapproximations. However, as it was shown in the previous examples, the ( , )-equivalences can still be used in practice as non-trivial approximations of ( ). e ( , )-weak -transfer property can be e ectively checked for any nitely-based candidate (for example, de ned by a ground base) and nite and .