Skip to main content

Formal Translation from Reversing Petri Nets to Coloured Petri Nets

  • Conference paper
  • First Online:
Reversible Computation (RC 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13354))

Included in the following conference series:

Abstract

Reversing Petri nets (RPNs) have recently proposed as a Petri-net inspired formalism that supports the modelling of causal and out-of-causal order reversibility. In previous works we proposed a structural way of translating a specific subclass of RPNs into bounded coloured Petri nets (CPNs). In this paper we extend these results by removing the restriction of token uniqueness. The proposed transformation from RPNs to CPNs has been implemented in a tool, which allows building an RPN and converting it to an equivalent CPN.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Elements of A denote the presence of a base, whereas elements of \(\overline{A}\) their absence.

  2. 2.

    Exemplary implementations of those functions are included in coloured Petri nets generated by our application. Their formal definitions are included in descriptions of guards.

References

  1. CPN-Tools project website. http://cpntools.org/

  2. RPNEditor: Reversing Petri Net Editor. https://www.mat.umk.pl/~folco/rpneditor

  3. Barylska, K., Gogolińska, A., Mikulski, Ł., Philippou, A., Piątkowski, M., Psara, K.: Reversing computations modelled by coloured Petri nets. In: Proceedings of ATAED 2018, CEUR 2115, pp. 91–111 (2018)

    Google Scholar 

  4. Barylska, K., Mikulski, Ł., Piątkowski, M., Koutny, M., Erofeev, E.: Reversing transitions in bounded Petri nets. In: Proceedings of CS&P’16, CEUR 1698, pp. 74–85 (2016). CEUR-WS.org

  5. Barylska, K., Koutny, M., Mikulski, Ł., Piątkowski, M.: Reversible computation vs. reversibility in Petri nets. Sci. Comput. Program. 151, 48–60 (2018)

    Google Scholar 

  6. de Frutos-Escrig, D., Koutny, M., Mikulski, Ł: Investigating reversibility of steps in Petri nets. Fundam. Informaticae 183(1–2), 67–96 (2021)

    MathSciNet  MATH  Google Scholar 

  7. Jensen, K.: Coloured Petri Nets - Basic Concepts, Analysis Methods and Practical Use - Volume 1, 2nd edn. Monographs in Theoretical Computer Science. An EATCS Series. Springer, Heidelberg (1996). https://doi.org/10.1007/978-3-662-03241-1

  8. Kuhn, S., Aman, B., Ciobanu, G., Philippou, A., Psara, K., Ulidowski, I.: Reversibility in chemical reactions. In: Ulidowski, I., Lanese, I., Schultz, U.P., Ferreira, C. (eds.) RC 2020. LNCS, vol. 12070, pp. 151–176. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-47361-7_7

    Chapter  Google Scholar 

  9. Melgratti, H., Mezzina, C.A., Phillips, I., Pinna, G.M., Ulidowski, I.: Reversible occurrence nets and causal reversible prime event structures. In: Lanese, I., Rawski, M. (eds.) RC 2020. LNCS, vol. 12227, pp. 35–53. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-52482-1_2

    Chapter  MATH  Google Scholar 

  10. Melgratti, H.C., Mezzina, C.A., Ulidowski, I.: Reversing place transition nets. Log. Methods Comput. Sci. 16(4) (2020)

    Google Scholar 

  11. Mikulski, Ł, Lanese, I.: Reversing unbounded petri nets. In: Donatelli, S., Haar, S. (eds.) PETRI NETS 2019. LNCS, vol. 11522, pp. 213–233. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-21571-2_13

    Chapter  Google Scholar 

  12. Murata, T.: Petri nets: properties, analysis and applications. Proc. IEEE 77(4), 541–580 (1989)

    Article  Google Scholar 

  13. Philippou, A., Psara, K.: Reversible computation in nets with bonds. J. Log. Algebraic Methods Program. 124(100718), 1–47 (2022)

    MathSciNet  MATH  Google Scholar 

  14. Philippou, A., Psara, K., Siljak, H.: Controlling reversibility in reversing petri nets with application to wireless communications. In: Thomsen, M.K., Soeken, M. (eds.) RC 2019. LNCS, vol. 11497, pp. 238–245. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-21500-2_15

    Chapter  Google Scholar 

  15. Psara, K.: Reversible Computation in Petri Nets. Ph.D. thesis, Department of Computer Science, University of Cyprus (2020)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Anna Gogolińska .

Editor information

Editors and Affiliations

A Explanations of Individual Elements of a Coloured Perti Net Based on Low-Level Reversing Petri Net

A Explanations of Individual Elements of a Coloured Perti Net Based on Low-Level Reversing Petri Net

  • \(\boldsymbol{P_{C}=}\) \(P_R\cup \{h_i \mid t_i\in T_R\} \cup \{h_{ij} \mid t_i,t_j\in T_R; i < j ; t_j\in dpc(t_i)\}\)

    Set of places contains places from the original RPN net, transition history places for each transition and connection history places for pairs of transitions (set dpc determines for which transitions connection history place is added). Notice, that indexes of transition history and connection history places are very important. For transitions \(t_i\) and \(t_j\) transition history places are denoted as \(h_i\) and \(h_j\) (respectively), connection history place is denoted as \(t_{ij}\) (for \(i<j\)) or \(t_{ji}\) (for \(i>j\)).

  • \(\boldsymbol{T_{C}}=\) \(T_R\cup \{tr_i \mid t_i\in T_R\}\cup \{t_{0}\}\)

    Set of transitions contains transitions from the original RPN and reversing transitions - one for each original transition. A reversing transition for \(t_i\) is denoted as \(tr_i\). Transition \(t_{0}\) is added for technical reasons - more about this transition can be found in Software section.

  • \(\boldsymbol{D_{C}}=\) \(Domain(F_R)\cup (Domain(F_R))^{-1}\cup \)

    \(\{(t_i,h_i),(h_i,t_i),(tr_i,h_i),(h_i,tr_i)\mid t_i\in T_R\}\cup \)

    \(\{(tr_i,h_j),(h_j,tr_i)\mid t_i\in T_R ; t_j\in dph(t_i)\}\cup \)

    \(\{(t_i,h_{jk}),(h_{jk},t_i),(tr_i,h_{jk}),(h_{jk},tr_i)\mid t_i\in T_R ; \{i,l\}=\{j,k\};\)

                                                                   \(t_l\in dpc(t_i)\}\)

    This set contains arcs: arcs from RPN \(N_R\), arcs opposite to those from \(N_R\), arcs between every transition \(t_i\) and its history places (in both directions), arcs between every reversing transition \(tr_i\) and the history place of \(t_i\) (in both directions), arcs between every reversing transition \(tr_i\) and history places of transitions from \(dph(t_i)\) (in both directions), arcs between every transition \(t_i\) and all its connection history places (in both directions), arcs between every reversing transition \(tr_i\) and all connection history places of \(t_i\) (in both directions).

  • \(\boldsymbol{\Sigma _{C}}=\) \(A_R\;\cup \;\) \(B_R\;\cup \) \(\overline{A_R}\;\cup \) \(\overline{B_R}\;\cup \) \(\mathcal {A}\;\cup \) \(\mathcal {B}\;\cup \) \((2^{\mathcal {A}}\times 2^{\mathcal {B}})\;\cup \)

    We define the following colours: a bounded set of natural numbers, base types, bond types, negative base types, negative bond types, instances of bases, instances of bonds, Cartesian product of subsets of token instances and subsets of bond instances – molecules, subsets of 4-tuples (one 4-tuple contains the following information: the second transition in the tuple, in the context of the first one in the tuple, was n-th in the sequence of executions and has used the given base instances).

  • \(\boldsymbol{V_{C}}=\) \((\mathcal{{X}},\mathcal{{Y}}) \in (2^{A}\times 2^{B}) \;\cup \)

  • \(\boldsymbol{C_{C}}\) = \(\{\boldsymbol{p}\mapsto (2^{\mathcal {A}}\times 2^{\mathcal {B}})\mid p\in P_R\}\;\cup \)

    This set describes which colours are assigned to which places (respectively): colour molecule to places from RPN, set of 4-tuples to history places, and set of bounded natural numbers to connection history places.

  • \(\boldsymbol{G_{C}}\) = \(G_C^{TRN} \cup G_C^{BC1} \cup G_C^{BC2} \cup G_C^{t_0} \cup G_C^{\overline{t_0}} \cup G_C^{\overline{TRN}} \cup G_C^{\overline{BC1 \cup BC2}}\)

    where

    \({\boldsymbol{G_{C}^{BC1}}} = \{\boldsymbol{t_{i}}\mapsto (\alpha _1\in \mathcal{{X}}_1 \wedge \alpha _2\in \mathcal{{X}}_2) \vee (\alpha _1, \alpha _2 \in \mathcal{{X}}_1 \wedge \langle {\alpha _1},{\alpha _2}\rangle \not \in \mathcal{{Y}}_1 \)

    \( \wedge \; (\mathcal{{X}}_2,\mathcal{{Y}}_2) = (\emptyset , \emptyset ) \mid \)

    \(t_i\in T_R^{BC1} ; \{\ell (\alpha _1),\ell (\alpha _2)\}\subset {F_R(\bullet t_i,t_i)} ;\)

    \(\alpha _1\ne \alpha _2 ;\) \(\{(\mathcal{{X}}_1, \mathcal{{Y}}_1), (\mathcal{{X}}_2, \mathcal{{Y}}_2)\} \subseteq Var[E_C(\bullet t_i, t_i)] ;\)

    \( F_R(\bullet t_i,t_i) \cap (\overline{A}\cup \overline{B})\cap \ell (\mathcal{{X}}_1\cup \mathcal{{X}}_2\cup \mathcal{{Y}}_1\cup \mathcal{{Y}}_2)=\emptyset \}\)

    – Guard of BC1 transition evaluates whether a set of base instances \(\mathcal{{X}}_1\) of a molecule \((\mathcal{{X}}_1, \mathcal{{Y}}_1)\) contains an instance \(\alpha _1\) and a set of instances \(\mathcal{{X}}_2\) of a molecule \((\mathcal{{X}}_2, \mathcal{{Y}}_2)\) contains an instance \(\alpha _2\), both sets are obtained for the only input place. The types of those instances form a label of an arc between the input place and the transition in the original RPN, \(\alpha _1\) and \(\alpha _2\) differs, and the molecules do not contain negative base nor bond types. It might also happen that a new bond is created within the already existing molecule - in that case both instances \(\alpha _1, \alpha _2\) are unbonded and contained in molecule \((\mathcal{{X}}_1, \mathcal{{Y}}_1)\), and the second molecule \((\mathcal{{X}}_2,\mathcal{{Y}}_2)\) is empty (an idle token).

    \({\boldsymbol{G_{C}^{BC2}}} = \{\boldsymbol{t_{i}}\mapsto (\alpha _1\in \mathcal{{X}}_1 \wedge \alpha _2\in \mathcal{{X}}_2) \mid \)

    \(t_i\in T_R^{BC2} ; \{\ell (\alpha _1),\ell (\alpha _2)\}\subset \bigcup _{X\in {F_R(\bullet t_i,t_i)}}X ;\)

    \(\alpha _1\ne \alpha _2 ; p_1 \ne p_2 \in \bullet t_i ; \)

    \( (\mathcal{{X}}_1, \mathcal{{Y}}_1)\in Var[E_C(p_1, t_i)] ;\) \( (\mathcal{{X}}_2, \mathcal{{Y}}_2)\in Var[E_C(p_2, t_i)] ;\)

    \( \bigcup _{X\in {F_R(\bullet t_i,t_i)}}X\cap (\overline{A}\cup \overline{B})\cap \ell (\mathcal{{X}}_1\cup \mathcal{{X}}_2\cup \mathcal{{Y}}_1\cup \mathcal{{Y}}_2)=\emptyset \}\)

    – Guard of BC2 transition evaluates whether a set of base instances \(\mathcal{{X}}_1\) of a molecule \((\mathcal{{X}}_1, \mathcal{{Y}}_1)\) obtained from the first input place contains an instance \(\alpha _1\), set of base instances \(\mathcal{{X}}_2\) of a molecule \((\mathcal{{X}}_2, \mathcal{{Y}}_2)\) obtained from the second input place contains an instance \(\alpha _2\), types of those instances form labels of arcs between the input places and the transition in the original RPN, \(\alpha _1\) and \(\alpha _2\) differs, there are two different input places, and the molecules obtained from input places do not contain negative base nor bond types.

    \({\boldsymbol{G_{C}^{TRN}}} = \{\boldsymbol{t_{i}}\mapsto (\alpha \in \mathcal{{X}}) \mid \)

    \(t_i\in T_R^{TRN} ; \) \(\ell (\alpha )\in F_R(\bullet t_i,t_i) ; \) \(E_C(\bullet t_i, t_i)=\{(\mathcal{{X}},\mathcal{{Y}})\} ;\) \(F_R(\bullet t_i,t_i)\cap (\overline{A}\cup \overline{B})\cap \ell (\mathcal{{X}}\cup \mathcal{{Y}})=\emptyset \}\)

    – Guard of TRN transition evaluates whenever a set of base instances \(\mathcal{{X}}\) of a molecule \((\mathcal{{X}}, \mathcal{{Y}})\) obtained from the input place contains an instance \(\alpha \), type of \(\alpha \) form a label of an arc between the input place and the transition, and the molecule does not contain negative base nor bond types.

    \(\boldsymbol{G_{C}^{t_0}} = \{\boldsymbol{t_{0}}\mapsto false\}\)

    – Guard of the initial transition \(t_0\) - always returns false, hence the transition cannot be executed.

    \(\boldsymbol{G_{C}^{\overline{t_0}}} = \{\boldsymbol{tr_{0}}\mapsto false\}\)

    – Guard of reversing transition for the initial transition \(t_0\) - always returns false, hence the transition cannot be executed.

    The last two guards are a little bit more complex, that is why we include functions in their descriptions. Those functions are: isElement and numOfnonEmptyFootnote 2. The function isElement returns true if its first argument is an element of the set given as the second argument. In the opposite case the function returns false. The function numOfnonEmpty counts how many of its arguments are equal to \((\emptyset , \emptyset )\) and returns that number.

    Both following guards have the same construction. The first element of a guard is a logical conjunction of \(\#dpc(t_i)\) conditions, each of them ensures that the token describing the history of \(t_i\) and obtained from the place \(h_i\) (which is represented as \(E_C(h_i,tr_i)\) in the guards) contains 4-tuple related to the execution which is reversed. In the forward execution of the transition (to be reversed) the base \(\alpha \) was transported (for transporting transition) or a bond between instances \(\alpha _1\) and \(\alpha _2\) was created (for BC1 or BC2 transition), which from now on is denoted as \(\langle {\alpha _1},{\alpha _2}\rangle \). This part of the guards is very important because exactly here the choice: which execution would be reversed? (which is equivalent to the choice: execution related to which instances would be reversed?) is made. In CPN examples, prepared using CPN-Tools, this choice can be made by the user or randomly. The next part of the guards checks whether the set consisting of instances of bases (for TRN transition) or bonds (for BC1 and BC2 transition) obtained from all input places of the transition (to be reversed), contains instances related to its forward execution. The last part of the guards assures that from all tokens obtained from input places only one describes a molecule, the remaining ones should be idle tokens.

    \(\boldsymbol{G_{C}^{\overline{TRN}}} = \{\boldsymbol{tr_{i}}\mapsto \) \((\bigwedge _{t_j\in dpc(t_i)}\) isElement(\((k_j,t_j,t_i,\{\alpha \}), E_C(h_i,tr_i))\); isElement(\(\alpha , \bigcup _{p_g \in rin(t_i)} \mathcal{{X}}_g)\);

    numOfnonEmpty(\(\{ (\mathcal{{X}}_g, \mathcal{{Y}}_g) \mid p_g \in rin(t_i)\})\))\( = 1\)

    where

    \(t_i\in T_R^{TRN}\)\(\ell (\alpha )\in F_R(t_i,t_i \bullet );\) \(\forall _{p_g \in rin(t_i)}(\mathcal{{X}}_g,\mathcal{{Y}}_g)=b(E_C(p_g,tr_i))\) isElement(qQ)\( = true\) if and only if \(q \in Q ;\) numOfnonEmpty(Q)\( = \#\{(q_1, q_2) \in Q \mid (q_1, q_2) \ne (\emptyset , \emptyset )\} \) \(\}\)

    \(\boldsymbol{G_{C}^{\overline{BC1 \cup BC2}}} = \)

    \(\{\boldsymbol{tr_{i}}\mapsto \) \((\bigwedge _{t_j\in dpc(t_i)}\) isElement(\((k_j,t_j,t_i,\{\langle {\alpha _1},{\alpha _2}\rangle \}), E_C(h_i,tr_i)\));

    isElement(\(\langle {\alpha _1},{\alpha _2}\rangle , \bigcup _{p_g \in rin(t_i)} \mathcal{{Y}}_g\));

    numOfnonEmpty(\(\{ (\mathcal{{X}}_g, \mathcal{{Y}}_g) \mid p_g \in rin(t_i)\})\))\( = 1\)

    where

    \(t_i\in (T_R^{BC1} \cup T_R^{BC2});\) \(\{\ell (\alpha _1), \ell (\alpha _2)\} \in F_R(t_i,t_i\bullet )\)

    \(\forall _{p_g \in rin(t_i)}(\mathcal{{X}}_g,\mathcal{{Y}}_g)=b(E_C(p_g,tr_i)) ;\)

    isElement(qQ)\( = true\) if and only if \(q \in Q ;\)

    numOfnonEmpty(Q)\( = \#\{(q_1, q_2) \in Q \mid (q_1, q_2) \ne (\emptyset , \emptyset )\} \) \(\}\)

  • \(\boldsymbol{E_{C}}=\) \(\{\boldsymbol{(p,t)}\mapsto (\mathcal{{X}},\mathcal{{Y}}) \mid (p,t)\in Domain(F_R); t \in T^{TRN}_R \cup T^{BC2}_R\} \)

    Description of input arcs from the original RPN for TRN and BC2 transitions - the transfer of one molecule \((\mathcal{{X}},\mathcal{{Y}})\) obtained from the place p.

    \(\;\cup \)

    \(\{\boldsymbol{(p,t)}\mapsto (1`(\mathcal{{X}}_1,\mathcal{{Y}}_1) ++ 1`(\mathcal{{X}}_2,\mathcal{{Y}}_2)) \mid (p,t)\in Domain(F_R); t \in T^{BC1}_R\} \)

    Description of input arcs from the original RPN for BC1 transition - the transfer of two molecules from place p (in the guard it is assumed that one of those molecules may be empty).

    \(\;\cup \)

    \(\{\boldsymbol{(t,p)}\mapsto (\emptyset ,\emptyset )\mid (p,t)\in Domain(F_R)\}\)

    Description of arcs opposite to input arcs from the original RPN. An idle token is transferred.

    \(\;\cup \)

    \(\{\boldsymbol{(t,p)}\mapsto (\mathcal{{X}},\mathcal{{Y}})\mid \)

                 \(E_C(\bullet t,t)=\{(\mathcal{{X}},\mathcal{{Y}})\} ; t\in T_R^{TRN} ; (t,p)\in Domain(F_R)\}\)

    Description of output arcs for TRN transitions, similar to the ones from RPN. They contain transfer of the molecule obtained from the input place.

    \(\;\cup \)

    \(\{\boldsymbol{(t,p)}\mapsto (\mathcal{{X}}_1\cup \mathcal{{X}}_2,\mathcal{{Y}}_1\cup \mathcal{{Y}}_2\cup \{\langle {\alpha _1},{\alpha _2}\rangle \}) \mid E_C(\bullet t)=\{(\mathcal{{X}}_1,\mathcal{{Y}}_1),(\mathcal{{X}}_2,\mathcal{{Y}}_2)\} ;\)

    \(\{\ell (\alpha _1),\ell (\alpha _2)\}\in F_R(t,p) ; t\in T_R^{BC1} \cup T_R^{BC2}; (t,p)\in Domain(F_R)\}\)

    Description of output arcs for BC1 and BC2 transitions. They describe the transfer of the molecules containing the instances of bases and bonds, obtained from the input places (BC2) or place (BC1) and the new bond. Types of the instances in the new bond should be consistent with the label of the arc in RPN.

    \(\;\cup \)

    \(\{\boldsymbol{(p,t)}\mapsto (\emptyset ,\emptyset )\mid (t,p)\in Domain(F_R); t\in T_R\}\)

    Description of arcs opposite to input arcs from the original RPN. An idle token is transferred.

    \(\;\cup \)

    \(\{\boldsymbol{(h_{jk},t_{i})}\mapsto cnt_l \mid t_i\in T_R ; \{i,l\}=\{j,k\} ; t_l\in dpc(t_i) \}\)

    Description of arc from connection history place to a transition. The value obtained from that place is represented by variable \(cnt_l\).

    \(\;\cup \)

    \(\{\boldsymbol{(t_{i},h_{jk})}\mapsto E_C(h_{jk},t_i)+1\mid t_i\in T_R ; \{i,l\}=\{j,k\} ; t_l\in dpc(t_i)\}\)

    Description of the arc from a transition to its connection history place. It describes the transfer of the value obtained from that place (by the opposite arc) increased by 1.

    \(\;\cup \)

    Description of the arc from transition history place to the transition. The value obtained from that place is represented by variable \(H_l\) and it contains the whole history of transition \(t_i\) (a set of 4-tuples).

    \(\;\cup \)

    \(\{\boldsymbol{(t_{i},h_{i})}\mapsto E_C(h_i,t_i)\cup \bigcup _{t_l\in dpc(t_i)} \{(E_C(h_{jk},t_i)+1,t_l,t_i,\{\langle {\alpha _1},{\alpha _2}\rangle )\}\}\)

    where

    \( t_i\notin T_R^{TRN} ; \{i,l\}=\{j,k\} ;\) \(\langle {\ell (\alpha _1)},{\ell (\alpha _2)}\rangle \in F_R(t_i,t_i\bullet )\}\)

    Description of the arc from BC1 or BC2 transition to its transition history place. The value obtained from the transition history place is transferred back (its described by \(E_C(h_i,t_i)\)) and a new 4-tuple is added for every transition from \(dpc(t_{i})\). Each tuple consists of 4 components: the first is a number of current execution of \(t_{i}\) in the sequence of executions of \(t_{i}\) and \(t_{l}\) - this value is obtained from \(h_{il}\) or \(h_{li}\), the next two components are identifiers of transitions and the last one is the description of the bond created during the considered execution.

    \(\;\cup \)

    \(\{\boldsymbol{(t_{i},h_{i})}\mapsto E_C(h_i,t_i) \cup \bigcup _{t_l\in dpc(t_i)}\{E_C(h_{jk},t_i)+1,t_l,t_i,\{\alpha \})\}\)

    where

    \(t_i\in T_R^{TRN}; \{i,l\}=\{j,k\} ; \ell (\alpha ) \in F_R(t_i,t_i\bullet )\}\)

    Description of the arc from TRN transition to its transition history place. It is very similar to the previous one, except for the last component of the 4-tuples - in this case it is the description of the base instances which were transferred during the considered execution.

    \(\;\cup \)

    \(\{\boldsymbol{(h_{jk},tr_{i})}\mapsto cnt_l\mid t_i\in T_R ; \{i,l\}=\{j,k\} ; t_l\in dpc(t_i)\}\)

    Description of the arc from transition history counter place of \(t_{i}\) to its reversing transition \(tr_{i}\). The value obtained from the place is represented by \(cnt_{l}\) and it is a number of executions of transitions \(t_{i}\) and \(t_{l}\).

    \(\;\cup \)

    \(\{\boldsymbol{(tr_{i},h_{jk})}\mapsto E_C(h_{jk},tr_i)-1\mid t_i\in T_R ; \{i,l\}=\{j,k\} ; t_l\in dpc(t_i) \}\)

    Description of the arc from reversing transition \(tr_{i}\) to connection history place of \(t_{i}\). It describes the transfer of the value obtained from the connection history place by the transition \(tr_{i}\) decreased by one.

    \(\;\cup \)

    Description of the arc from transition history place of \(t_{i}\) to its reversing transition. The value obtained from that place is represented by variable \(H_j\) and it contains the whole history of transition \(t_i\) (a set of 4-tuples).

    \(\;\cup \)

    \(\{\boldsymbol{(p,tr_{i})}\mapsto 2`(\emptyset ,\emptyset )\mid (p \in rin(t_i) ; \forall _{t_j \in T_R} p \notin t_{j}\bullet ) \}\)

    Description of the arc between a place to a reversing transition. The place has to be in a set \(rin(t_i)\) and it cannot be an input place to any transition. Then two idle tokens are transferred from the place.

    \(\;\cup \)

    \(\{\boldsymbol{(p,tr_{i})}\mapsto (1`(\mathcal{{X}},\mathcal{{Y}}) ++ 1`(\emptyset ,\emptyset )) \mid (p \in rin(t_i) ; \exists _{t_j \in T_R} p \in t_{j}\bullet ) \}\)

    Description of the arc between a place to a reversing transition. The place has to be in a set \(rin(t_i)\) and it has to be an input place to some transition from the net. Then a molecule and an idle token are transferred from the place (during execution the molecule also can be an idle token).

    \(\cup \)

    \(\{\boldsymbol{(tr_{i},h_{j})}\mapsto updateExtHist(k_j \in Var[G_C(tr_i)], E_C(h_j, tr_i)) \)

    where

    \(t_i \in T_R ; t_j \in dph(t_i) ; (b(k_j), t_{j}, t_{i}, Y) \in b(E_C(h_i, tr_i)) ;\)

    \( updateExtHist(k_j, E_C(h_j, tr_i)) =\)

    \(\bigcup _{(k, t_{g\ne i}, t_{j}, X) \in b(E_C(h_j, tr_i))} (k, t_{g}, t_{j}, X) \cup \)

    \(\bigcup _{(k < k_j, t_{i}, t_{j}, X) \in b(E_C(h_j, tr_i))} (k, t_{i}, t_{j}, X) \cup \)

    \(\bigcup _{(k > k_j, t_{i}, t_{j}, X) \in b(E_C(h_j, tr_i))} (k-1, t_{i}, t_{j}, X)\}\)

    Description of the arc between the reversing transition of \(t_{i}\) and history places of other transitions. It contains calling of updateExtHist() function. The first argument of the function is number \(k_{j}\) which is the first component of 4-tuple from history of transition \(t_{j}\) which have been binded during evaluation of the \(tr_{i}\) guard. The second argument of updateExtHist() consists of elements of \(t_{j}\)’s history and the function modifies them: elements not related to the pair \(t_{i}\) and \(t_{j}\) are not changed, elements related to \(t_{i}\) and \(t_{j}\) with the first component k smaller than \(k_{j}\) also are not changed, elements related to \(t_{i}\) and \(t_{j}\) with the firs component k greater than \(k_{j}\) are adjusted by decreasing k by 1.

    \(\cup \)

    \(\{\boldsymbol{(tr_{i},h_{i})}\mapsto \)

    \(updateIntHist( K=\{k_j \in Var[G_C(tr_i)] \mid t_j \in dpc(t_i) \}, E_C(h_i, tr_i))\)

    where

    \(t_i \in T_R ; \forall _{k_j \in K} (b(k_j), t_{j}, t_{i}, Y) \in b(E_C(h_i, tr_i)) ;\)

    \( updateIntHist( K, E_C(h_i, tr_i)) = \)

    \(\bigcup _{(k < k_j, t_{j}, t_{i}, X) \in b(E_C(h_i, tr_i))} (k, t_{j}, t_{i}, X) \cup \)

    \(\bigcup _{(k > k_j, t_{j}, t_{i}, X) \in b(E_C(h_i, tr_i))} (k-1, t_{j}, t_{i}, X)\}\)

    \(\cup \)

    Description of the arc between the reversing transition of \(t_{i}\) and history places of transition \(t_{i}\). It contains calling of updateIntHist() function. The first argument of the function is the set of numbers \(k_{j}\) which are the first components of 4-tuple from \(t_{i}\)’s history related to each pair \(t_{i}, t_j\), such that \(t_{j} \in dpc(t_{i})\) which have been binded during evaluation of the \(tr_{i}\) guard. The second argument of updateIntHist() consist of elements of \(t_{i}\) history and the function modifies them: elements related to \(t_{i}\) and \(t_{j}\) with the first component k smaller than \(k_{j}\) are not changed, elements related to \(t_{i}\) and \(t_{j}\) with k greater than \(k_{j}\) are adjusted by decreasing k by 1.

    \(\{\boldsymbol{(tr_{i},p)}\mapsto (1`(\mathcal{{X}}_1,\mathcal{{Y}}_1) ++ 1`(\emptyset , \emptyset )) \)

    where

    \(t_i \in T_R^{TRN} ; p \in rout(t_i) ; \{p\} = t\bullet ; \)

    having \((\mathcal{{X}}_g, \mathcal{{Y}}_g) = E_C(p_g, tr_i)\) and \(\alpha \in Var[G_C(tr_i)]\):

    \((\mathcal{{X}}_1,\mathcal{{Y}}_1) = (\emptyset , \emptyset ) \) if

         \(t \ne max((\bigcup _{t_j \in (dph(t_i) \cup t_i)} b(E_C(h_j, tr_i)) |_{con(\alpha , \bigcup _{p_g \in rin(t_i)} (\mathcal{{X}}_g \cup \mathcal{{Y}}_g))}) ;\)

    \(\mathcal{{X}}_1\cup \mathcal{{Y}}_1 = con(\alpha , \bigcup _{p_g \in rin(t_i)} (\mathcal{{X}}_g \cup \mathcal{{Y}}_g))\) if

         \(t = max((\bigcup _{t_j \in (dph(t_i) \cup t_i)} b(E_C(h_j, tr_i)) |_{con(\alpha , \bigcup _{p_g \in rin(t_i)} (\mathcal{{X}}_g \cup \mathcal{{Y}}_g))}) \}\)

    Description of the arc between reversing transition of transporting transition \(t_{i}\) and its output place p. Transition \(t_{i}\) has transported base instance \(\alpha \) in the execution which is reversed in the current execution of \(tr_{i}\) - the value of \(\alpha \) is evaluated by the \(tr_{i}\) guard. Place p is an output place of some transition t. Molecules obtained by \(tr_{i}\) from its input place \(p_{g}\) are denoted by \((\mathcal{{X}}_g, \mathcal{{Y}}_g)\). Transition \(tr_{i}\) transports an idle token and \((\mathcal{{X}}_1,\mathcal{{Y}}_1)\) token which can be either an idle token or a molecule. It is an idle token if t is not the maximal transition of transitions from \(dph(t_{i})\) indicated by histories obtained from places \(h_{j}\) among those transitions which used the molecule containing \(\alpha \). The \((\mathcal{{X}}_1,\mathcal{{Y}}_1)\) token is equal to the molecule containing \(\alpha \) if t is the maximal one.

    \(\cup \)

    \(\{\boldsymbol{(tr_{i},p)}\mapsto (1`(\mathcal{{X}}_1,\mathcal{{Y}}_1) ++ 1`(\mathcal{{X}}_2, \mathcal{{Y}}_2)) \)

    where

    \(t_i \in (T_R^{BC1} \cup T_R^{BC2}) ; p \in rout(t_i) ; \{p\} = t\bullet ;\)

    having \((\mathcal{{X}}_g, \mathcal{{Y}}_g) = E_C(p_g, tr_i)\) and \(\langle {\alpha _1},{\alpha _2}\rangle \in Var[G_C(tr_i)]\):

    \((\mathcal{{X}}_1, \mathcal{{Y}}_1) = (\emptyset , \emptyset )\) if

         \(t \ne max((\bigcup _{t_j \in (dph(t_i) \cup t_i)}\)

                        \(b(E_C(h_j, tr_i)) |_{con(\alpha _1, \bigcup _{p_g \in rin(t_i)} (\mathcal{{X}}_g \cup \mathcal{{Y}}_g)\setminus \{\langle {\alpha _1},{\alpha _2}\rangle \})});\)

    \(\mathcal{{X}}_1\cup \mathcal{{Y}}_1 = con(\alpha _1, \bigcup _{p_g \in rin(t_i)} (\mathcal{{X}}_g \cup \mathcal{{Y}}_g)\setminus \{\langle {\alpha _1},{\alpha _2}\rangle \})\) if

         \(t = max((\bigcup _{t_j \in (dph(t_i) \cup t_i)}\)

                        \(b(E_C(h_j, tr_i)) |_{con(\alpha _1, \bigcup _{p_g \in rin(t_i)} (\mathcal{{X}}_g \cup \mathcal{{Y}}_g)\setminus \{\langle {\alpha _1},{\alpha _2}\rangle \})});\)

    \(\mathcal{{X}}_2\cup \mathcal{{Y}}_2 = (\emptyset , \emptyset )\) if

         \(( t \ne max((\bigcup _{t_j \in (dph(t_i) \cup t_i)}\)

                        \(b(E_C(h_j, tr_i)) |_{con(\alpha _2, \bigcup _{p_g \in rin(t_i)} (\mathcal{{X}}_g \cup \mathcal{{Y}}_g)\setminus \{\langle {\alpha _1},{\alpha _2}\rangle \})})\)

         \(\vee (\mathcal{{X}}_1,\mathcal{{Y}}_1)= (\mathcal{{X}}_2,\mathcal{{Y}}_2));\)

    \(\mathcal{{X}}_2\cup \mathcal{{Y}}_2 = con(\alpha _2, \bigcup _{p_g \in rin(t_i)} (\mathcal{{X}}_g \cup \mathcal{{Y}}_g)\setminus \{\langle {\alpha _1},{\alpha _2}\rangle \})\) if

         \((t = max((\bigcup _{t_j \in (dph(t_i) \cup t_i)}\)

                        \(b(E_C(h_j, tr_i)) |_{con(\alpha _2, \bigcup _{p_g \in rin(t_i)} (\mathcal{{X}}_g \cup \mathcal{{Y}}_g)\setminus \{\langle {\alpha _1},{\alpha _2}\rangle \})})\)

         \(\wedge (\mathcal{{X}}_1,\mathcal{{Y}}_1) \ne (\mathcal{{X}}_2,\mathcal{{Y}}_2))\) \( \}\)

    Description of the arc between reversing transition of BC1 or BC2 transition \(t_{i}\) and its output place p. Transition \(t_{i}\) has created a bond \(\langle {\alpha _1},{\alpha _2}\rangle \) in the execution which is reversed in the current execution of \(tr_{i}\) - the value of \(\langle {\alpha _1},{\alpha _2}\rangle \) is evaluated by the \(tr_{i}\) guard. Molecules obtained by \(tr_{i}\) from its input place \(p_{g}\) are denoted by \((\mathcal{{X}}_g, \mathcal{{Y}}_g)\). Place p is an output place of some transition t. Transition \(tr_{i}\) transports two tokens: \((\mathcal{{X}}_1,\mathcal{{Y}}_1)\) and \((\mathcal{{X}}_2,\mathcal{{Y}}_2)\) - both can be an idle ones. The \((\mathcal{{X}}_1,\mathcal{{Y}}_1)\) token is an idle token if t is not the maximal transition of transitions from \(dph(t_{i})\) indicated by histories obtained from places \(h_{j}\) among those transitions which used the molecule containing \(\alpha _1\) after breaking bond \(\langle {\alpha _1},{\alpha _2}\rangle \). The \((\mathcal{{X}}_1,\mathcal{{Y}}_1)\) token is equal to the molecule containing \(\alpha _1\) after breaking \(\langle {\alpha _1},{\alpha _2}\rangle \) if t is the maximal one. The same for \((\mathcal{{X}}_2,\mathcal{{Y}}_2)\) but then we consider molecule containing \(\alpha _2\). \((\mathcal{{X}}_1,\mathcal{{Y}}_1)\) cannot be equal to \((\mathcal{{X}}_2,\mathcal{{Y}}_2)\).

  • \(\boldsymbol{I_{C}}=\) \(\{\boldsymbol{p}\mapsto ConCom(M_0(p))++(\mathbb {K}- \#ConCom(M_0(p)))`(\emptyset , \emptyset )\mid p\in P_R\}\;\cup \)

    \(\{\boldsymbol{h_{i}}\mapsto \emptyset \mid t_i\in T_R\}\;\cup \)

    \(\{\boldsymbol{h_{ij}}\mapsto 0\mid t_i,t_j \in T_R ; t_i\prec t_j ; t_j\in dpc(t_i)\}\)

    Initial expressions of places. All places from \(P_{R}\) contain molecules from the initial marking of \(N_{R}\) and idle tokens (to fulfill \(\mathbb {K}\) strong safeness), places \(h_{i}\) contain empty sets and places \(h_{ij}\) contain 0. For technical reasons those initial values in places are set by initialization transition \(t_{0}\). That transition is a part of dph(t) set for every \(t \in T_{R}\), is executed at the initial marking and cannot be reversed. It is added to the net so that the max always exists.

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Barylska, K., Gogolińska, A., Mikulski, Ł., Philippou, A., Piatkowski, M., Psara, K. (2022). Formal Translation from Reversing Petri Nets to Coloured Petri Nets. In: Mezzina, C.A., Podlaski, K. (eds) Reversible Computation. RC 2022. Lecture Notes in Computer Science, vol 13354. Springer, Cham. https://doi.org/10.1007/978-3-031-09005-9_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-09005-9_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-09004-2

  • Online ISBN: 978-3-031-09005-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics