Abstract
In recent years, reversibility in concurrent settings has attracted interest thanks to its diverse applications in areas such as error recovery, debugging, and biological modeling. Also, it has been studied in many formalisms, including Petri nets, process algebras, and programming languages like Erlang. However, most attempts made so far suffer from the same limitation: they define the reversible semantics in an ad-hoc fashion. To address this limit, Lanese et al. have recently proposed a novel general method to derive a concurrent reversible semantics from a non-reversible one. However, in most interesting instances the method relies on infinite sets of reductions, making doubtful its practical applicability. We bridge the gap between theory and practice by implementing the above method in Maude. The key insight is that infinite sets of reductions can be captured by a small number of schemas in many relevant cases. This happens indeed for our application: the functional and concurrent fragment of Erlang. We extend the framework with a general rollback operator, allowing one to undo an action far in the past, including all and only its consequences. We can thus use our tool, e.g., as an oracle against which to test the reversible debugger CauDEr for Erlang, or as an executable specification for new reversible debuggers.
The work has been partially supported by French ANR project DCore ANR-18-CE25-0007. We thank the anonymous referees for their helpful comments and suggestions. We also thank Roberto Bruni for the useful comments and discussions provided. The second author also thanks INdAM-GNCS Project CUP_E55F22000270001 “Proprietà qualitative e quantitative di sistemi reversibili”.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Carlsson, R.: An introduction to core erlang. In: Erlang Workshop (2001)
Cristescu, I., Krivine, J., Varacca, D.: A compositional semantics for the reversible \(\pi \)-calculus. In: LICS, pp. 388–397 (2013)
Danos, V., Krivine, J.: Reversible communicating systems. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 292–307. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-28644-8_19
Danos, V., Krivine, J.: Formal molecular biology done in CCS-R. LNCS 180(3), 31–49 (2007)
Fabbretti, G., Lanese, I., Stefani, J.-B.: Causal-consistent debugging of distributed erlang programs. In: Yamashita, S., Yokoyama, T. (eds.) RC 2021. LNCS, vol. 12805, pp. 79–95. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-79837-6_5
Fabbretti, G., Lanese, I., Stefani, JB.: Generation of a reversible semantics for Erlang in Maude. Research Report RR-9468, Inria (2022)
Giachino, E., Lanese, I., Mezzina, C.A.: Causal-consistent reversible debugging. In: Gnesi, S., Rensink, A. (eds.) FASE 2014. LNCS, vol. 8411, pp. 370–384. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54804-8_26
Giachino, E., Lanese, I., Mezzina, C.A., Tiezzi, F.: Causal-consistent rollback in a tuple-based language. J. Log. Algebraic Methods Program. 88, 99–120 (2017)
González-Abril, J.J., Vidal, G.: Causal-consistent reversible debugging: improving CauDEr. In: Morales, J.F., Orchard, D. (eds.) PADL 2021. LNCS, vol. 12548, pp. 145–160. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-67438-0_9
Hewitt, C., Bishop, P., Steiger, R.: A universal modular actor formalism for artificial intelligence. In: IJCAI 1973 (1973)
Kőszegi, J.: KErl: Executable semantics for erlang. In: CEUR Workshop Proceedings, vol. 2046, pp. 144–166 (2018)
Lami, P., Lanese, I., Stefani, J., Coen, C.S., Fabbretti, G.: Reversibility in erlang: imperative constructs. In: Mezzina, C.A., Podlaski, K. (eds.) RC 2022. LNCS, vol. 13354, pp. 187–203. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-09005-9_13
Lanese, I.: From reversible semantics to reversible debugging. In: Kari, J., Ulidowski, I. (eds.) RC 2018. LNCS, vol. 11106, pp. 34–46. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-99498-7_2
Lanese, I., Medic, D.: A general approach to derive uncontrolled reversible semantics. In: CONCUR, vol. 171, pp. 33:1–33:24 (2020)
Lanese, I., Mezzina, C.A., Schmitt, A., Stefani, J.-B.: Controlling reversibility in higher-order Pi. In: Katoen, J.-P., König, B. (eds.) CONCUR 2011. LNCS, vol. 6901, pp. 297–311. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-23217-6_20
Lanese, I., Mezzina, C.A., Stefani, J.-B.: Controlled reversibility and compensations. In: Glück, R., Yokoyama, T. (eds.) RC 2012. LNCS, vol. 7581, pp. 233–240. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-36315-3_19
Lanese, I., Mezzina, C.A., Stefani, J.: Reversibility in the higher-order \(\pi \)-calculus. Theor. Comput. Sci. 625, 25–84 (2016)
Lanese, I., Nishida, N., Palacios, A., Vidal, G.: CauDEr website (2018). https://github.com/mistupv/cauder-v2
Lanese, I., Nishida, N., Palacios, A., Vidal, G.: A theory of reversibility for Erlang. J. Log. Algebraic Methods Program. 100, 71–97 (2018)
Lanese, I., Schultz, U.P., Ulidowski, I.: Reversible computing in debugging of Erlang programs. IT Prof. 24(1), 74–80 (2022)
Laursen, J.S., Schultz, U.P., Ellekilde, L.-P.: Automatic error recovery in robot assembly operations using reverse execution. In: IROS, pp. 1785–1792 (2015)
All about maude (2007)
Melgratti, H.C., Mezzina, C.A., Ulidowski, I.: Reversing place transition nets. Log. Methods Comput. Sci. 16(4) (2020)
Meseguer, J.: Rewriting logic as a semantic framework for concurrency: a progress report. In: Montanari, U., Sassone, V. (eds.) CONCUR 1996. LNCS, vol. 1119, pp. 331–372. Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-61604-7_64
Neuhäußer, M., Noll, T.: Abstraction and model checking of Core Erlang programs in Maude. ENTCS 176(4), 147–163 (2007)
Perumalla, K.S., Park, A.J.: Reverse computation for rollback-based fault tolerance in large parallel systems: evaluating the potential gains and systems effects. Clust. Comput. 17(2), 303–313 (2014)
Philippou, A., Psara, K.: Reversible computation in petri nets. In: Kari, J., Ulidowski, I. (eds.) RC 2018. LNCS, vol. 11106, pp. 84–101. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-99498-7_6
Phillips, I.C.C., Ulidowski, I.: Reversing algebraic process calculi. J. Log. Algebraic Methods Program. 73(1–2), 70–96 (2007)
Automatic generation of reversible semantics in Maude. https://bit.ly/3RQgGsu
Svensson, H., Fredlund, L., Earle, C.B.: A unified semantics for future Erlang. In: ACM SIGPLAN Workshop on Erlang, pp. 23–32. ACM (2010)
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Fabbretti, G., Lanese, I., Stefani, JB. (2022). Generation of a Reversible Semantics for Erlang in Maude. In: Riesco, A., Zhang, M. (eds) Formal Methods and Software Engineering. ICFEM 2022. Lecture Notes in Computer Science, vol 13478. Springer, Cham. https://doi.org/10.1007/978-3-031-17244-1_7
Download citation
DOI: https://doi.org/10.1007/978-3-031-17244-1_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-17243-4
Online ISBN: 978-3-031-17244-1
eBook Packages: Computer ScienceComputer Science (R0)