Skip to main content

Causal-Consistent Reversible Debugging: Improving CauDEr

  • Conference paper
  • First Online:
Book cover Practical Aspects of Declarative Languages (PADL 2021)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12548))

Included in the following conference series:

Abstract

Causal-consistent reversible debugging allows one to explore concurrent computations back and forth in order to locate the source of an error. In this setting, backward steps can be chosen freely as long as they are causal consistent, i.e., as long as all the actions that depend on the action we want to undo have been already undone. Here, we consider a framework for causal-consistent reversible debugging in the functional and concurrent language Erlang. This framework considered programs translated to an intermediate representation, called Core Erlang. Although using such an intermediate representation simplified both the formal definitions and their implementation in a debugging tool, the choice of Core Erlang also complicated the use of the debugger. In this paper, we extend the framework in order to deal with source Erlang programs, also including some features that were not considered before. Moreover, we integrate the two existing approaches (user-driven debugging and replay debugging) into a single, more general framework, and develop a new version of the debugging tool CauDEr including all the mentioned extensions as well as a renovated user interface.

This work has been partially supported by EU (FEDER) and Spanish MCI/AEI under grants TIN2016-76843-C4-1-R and PID2019-104735RB-C41, by the Generalitat Valenciana under grant Prometeo/2019/098 (DeepTrust), and by French ANR project DCore ANR-18-CE25-0007.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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.

    To the best of our knowledge, CauDEr is the first causal-consistent reversible debugger for a realistic programming language. Previous approaches did not consider concurrency, only allowed a deterministic replay—e.g., the case of rr [15] and ocamldebug [12]—or considered a very simple language, as in [2]. The reader is referred to [11] for a detailed comparison of CauDEr with other, related approaches.

  2. 2.

    Note that the state of the process is represented by the argument of the call to function \(\mathtt{server}\).

  3. 3.

    In Erlang, function calls are often prefixed by the module where the function is defined.

  4. 4.

    Here, we use the auxiliary function \(\mathsf {match\_rec}\) to select the matching clause, so that it returns the matching substitution as well as the body of the selected clause.

  5. 5.

    The extension to n steps is straightforward. We omit it for simplicity.

  6. 6.

    Note that, if the process’ log is empty, only the first two rules are applicable; in other words, the user must provide feasible requests to drive the forward computation.

References

  1. Carlsson, R.: An introduction to core erlang. In: Proceedings of the PLI 2001 Erlang Workshop (2001). http://www.erlang.se/workshop/carlsson.ps

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

  3. González-Abril, J.J., Vidal, G.: Causal-consistent reversible debugging: improving CauDEr. Technical report, DSIC, Universitat Politècnica de València (2020). http://personales.upv.es/~gvidal/german/padl21/tr.pdf

  4. Grishman, R.: The debugging system AIDS. In: American Federation of Information Processing Societies: AFIPS Conference Proceedings: 1970 Spring Joint Computer Conference. AFIPS Conference Proceedings, vol. 36, pp. 59–64. AFIPS Press (1970). https://doi.org/10.1145/1476936.1476952

  5. Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Commun. ACM 21(7), 558–565 (1978)

    Article  Google Scholar 

  6. Landauer, R.: Irreversibility and heat generation in the computing process. IBM J. Res. Dev. 5, 183–191 (1961)

    Article  MathSciNet  Google Scholar 

  7. Lanese, I., Medic, D.: A general approach to derive uncontrolled reversible semantics. In: Konnov, I., Kovács, L. (eds.) 31st International Conference on Concurrency Theory, CONCUR 2020, 1–4 September 2020, Vienna, Austria (Virtual Conference). LIPIcs, vol. 171, pp. 33:1–33:24. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020). https://doi.org/10.4230/LIPIcs.CONCUR.2020.33

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

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

  10. Lanese, I., Nishida, N., Palacios, A., Vidal, G.: CauDEr website (2019). https://github.com/mistupv/cauder

  11. Lanese, I., Palacios, A., Vidal, G.: Causal-consistent replay debugging for message passing programs. In: Pérez, J.A., Yoshida, N. (eds.) FORTE 2019. LNCS, vol. 11535, pp. 167–184. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-21759-4_10

    Chapter  Google Scholar 

  12. Leroy, X., Doligez, D., Frisch, A., Garrigue, J., Rémy, D., Vouillon, J.: The OCaml system release 4.11. Documentation and user’s manual. Technical report, INRIA (2020)

    Google Scholar 

  13. Nishida, N., Palacios, A., Vidal, G.: A reversible semantics for Erlang. In: Hermenegildo, M.V., Lopez-Garcia, P. (eds.) LOPSTR 2016. LNCS, vol. 10184, pp. 259–274. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63139-4_15

    Chapter  Google Scholar 

  14. Nishida, N., Palacios, A., Vidal, G.: Reversible computation in term rewriting. J. Log. Algebraic Methods Program. 94, 128–149 (2018). https://doi.org/10.1016/j.jlamp.2017.10.003

    Article  MathSciNet  MATH  Google Scholar 

  15. O’Callahan, R., Jones, C., Froyd, N., Huey, K., Noll, A., Partush, N.: Engineering record and replay for deployability: Extended technical report. CoRR abs/1705.05937 (2017). http://arxiv.org/abs/1705.05937

  16. Svensson, H., Fredlund, L.A., Earle, C.B.: A unified semantics for future Erlang. In: 9th ACM SIGPLAN workshop on Erlang, pp. 23–32. ACM (2010)

    Google Scholar 

  17. Undo Software: Increasing software development productivity with reversible debugging (2014). https://undo.io/media/uploads/files/Undo_ReversibleDebugging_Whitepaper.pdf

  18. Zelkowitz, M.V.: Reversible execution. Commun. ACM 16(9), 566 (1973). https://doi.org/10.1145/362342.362360

    Article  Google Scholar 

Download references

Acknowledgements

The authors would like to thank Ivan Lanese for his useful remarks that helped us to improve the new version of the CauDEr debugger.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Germán Vidal .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

González-Abril, J.J., Vidal, G. (2021). Causal-Consistent Reversible Debugging: Improving CauDEr. In: Morales, J.F., Orchard, D. (eds) Practical Aspects of Declarative Languages. PADL 2021. Lecture Notes in Computer Science(), vol 12548. Springer, Cham. https://doi.org/10.1007/978-3-030-67438-0_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-67438-0_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-67437-3

  • Online ISBN: 978-3-030-67438-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics