Skip to main content

Reversibility in Erlang: Imperative Constructs

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

Abstract

A relevant application of reversibility is causal-consistent reversible debugging, which allows one to explore concurrent computations backward and forward to find a bug. This approach has been put into practice in CauDEr, a causal-consistent reversible debugger for the Erlang programming language. CauDEr supports the functional, concurrent and distributed fragment of Erlang. However, Erlang also includes imperative features to manage a map (shared among all the processes of a same node) associating process identifiers to names. Here we extend CauDEr and the related theory to support such imperative features. From a theoretical point of view, the added primitives create different causal structures than those derived from the concurrent Erlang fragment previously handled in CauDEr, yet we show that the main results proved for CauDEr are still valid.

The work has been partially supported by French ANR project DCore ANR-18-CE25-0007 and by INdAM ā€“ GNCS 2020 project Sistemi Reversibili Concorrenti: dai Modelli ai Linguaggi. We thank the anonymous referees for their helpful comments and suggestions.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Carothers, C.D., Perumalla, K.S., Fujimoto, R.: Efficient optimistic parallel simulations using reverse computation. TOMACS 9(3), 224ā€“253 (1999)

    Article  Google Scholar 

  2. CauDEr repository (2022). https://github.com/mistupv/cauder

  3. CauDEr with imperative primitives repository (2022). https://github.com/PietroLami/cauder

  4. 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

    Chapter  Google Scholar 

  5. Erlang/OTP 24.1.5. https://www.erlang.org/doc/index.html

  6. 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

    Chapter  Google Scholar 

  7. 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

    Chapter  Google Scholar 

  8. 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)

    Article  MathSciNet  Google Scholar 

  9. GonzƔlez-Abril, J.J., Vidal, G.: A lightweight approach to computing message races with an application to causal-consistent reversible debugging. CoRR (2021)

    Google Scholar 

  10. Hewitt, C., Bishop, P.B., Steiger, R.: A universal modular ACTOR formalism for artificial intelligence. In: IJCAI, pp. 235ā€“245. William Kaufmann (1973)

    Google Scholar 

  11. Hoey, J., Ulidowski, I.: Reversible imperative parallel programs and debugging. In: Thomsen, M.K., Soeken, M. (eds.) RC 2019. LNCS, vol. 11497, pp. 108ā€“127. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-21500-2_7

    Chapter  MATH  Google Scholar 

  12. Lami, P., Lanese, I., Stefani, J., Sacerdoti Coen, C., Fabbretti, G.: Improving CauDEr with imperative features - Technical report (2022). https://hal.archives-ouvertes.fr/hal-03655372

  13. Landauer, R.: Irreversibility and heat generation in the computing process. IBM J. Res. Dev. 5(3), 183ā€“191 (1961)

    Article  MathSciNet  Google Scholar 

  14. Lanese, I., Medic, D.: A general approach to derive uncontrolled reversible semantics. In: CONCUR, vol. 171. LIPIcs, pp. 33:1ā€“33:24. Schloss Dagstuhl - Leibniz-Zentrum fĆ¼r Informatik (2020)

    Google Scholar 

  15. Lanese, I., Mezzina, C.A., Stefani, J.: Reversibility in the higher-order \(\pi \)-calculus. Theor. Comput. Sci. 625, 25ā€“84 (2016)

    Article  MathSciNet  Google Scholar 

  16. Lanese, I., Nishida, N., Palacios, A., Vidal, G.: CauDEr: a causal-consistent reversible debugger for Erlang. In: Gallagher, J.P., Sulzmann, M. (eds.) FLOPS 2018. LNCS, vol. 10818, pp. 247ā€“263. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-90686-7_16

    Chapter  Google Scholar 

  17. Lanese, I., Nishida, N., Palacios, A., Vidal, G.: A theory of reversibility for Erlang. J. Log. Algebraic Methods Program. 100, 71ā€“97 (2018)

    Article  MathSciNet  Google Scholar 

  18. Lanese, I., Phillips, I., Ulidowski, I.: An axiomatic approach to reversible computation. In: FoSSaCS 2020. LNCS, vol. 12077, pp. 442ā€“461. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45231-5_23

    Chapter  MATH  Google Scholar 

  19. Laursen, J.S., Schultz, U.P., Ellekilde, L.: Automatic error recovery in robot assembly operations using reverse execution. In: IROS, pp. 1785ā€“1792. IEEE (2015)

    Google Scholar 

  20. Phillips, I., Ulidowski, I., Yuen, S.: A reversible process calculus and the modelling of the ERK signalling pathway. In: GlĆ¼ck, R., Yokoyama, T. (eds.) RC 2012. LNCS, vol. 7581, pp. 218ā€“232. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-36315-3_18

    Chapter  MATH  Google Scholar 

  21. Schordan, M., Oppelstrup, T., Jefferson, D.R., Barnes, P.D., Jr.: Generation of reversible C++ code for optimistic parallel discrete event simulation. New Gener. Comput. 36(3), 257ā€“280 (2018)

    Article  Google Scholar 

  22. 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

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Pietro Lami , Ivan Lanese , Jean-Bernard Stefani , Claudio Sacerdoti Coen or Giovanni Fabbretti .

Editor information

Editors and Affiliations

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

Lami, P., Lanese, I., Stefani, JB., Sacerdoti Coen, C., Fabbretti, G. (2022). Reversibility in Erlang: Imperative Constructs. 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_13

Download citation

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

  • 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