Pietro Lami , Ivan Lanese , Jean-Bernard Stefani , Claudio Sacerdoti Coen , Giovanni Fabbretti
{"title":"并发 Erlang 程序的可逆调试支持命令式基元","authors":"Pietro Lami , Ivan Lanese , Jean-Bernard Stefani , Claudio Sacerdoti Coen , Giovanni Fabbretti","doi":"10.1016/j.jlamp.2024.100944","DOIUrl":null,"url":null,"abstract":"<div><p>Reversible computing is a programming paradigm allowing one to execute programs both in the standard, forward direction as well as backwards, recovering past states. A relevant application of reversible computing is causal-consistent reversible debugging, which allows one to explore concurrent computations backwards and forwards to find a bug. The basic idea is that any action can be undone, provided that its consequences are undone beforehand. This approach has been put into practice in CauDEr, a Causal-consistent reversible Debugger<span> for the Erlang programming language. CauDEr provides the ability to explore a concurrent computation back and forward in a step-by-step way as well as to undo an action far in the past including all and only its consequences (rollback), and to replay an action from a log, together with its causes. CauDEr supports the functional, concurrent and distributed fragment of Erlang. However, Erlang also includes imperative primitives 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, including rollback and replay, to support such imperative primitives. From a theoretical point of view, the imperative primitives create different causal structures to those derived from the concurrent Erlang fragment previously handled in CauDEr, yet we show that the main results proved for previous versions of CauDEr are still valid. From a practical point of view, this allows one to debug a larger subset of Erlang programs, as shown with a small case study of a server providing mathematical functionalities.</span></p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"138 ","pages":"Article 100944"},"PeriodicalIF":0.7000,"publicationDate":"2024-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Reversible debugging of concurrent Erlang programs: Supporting imperative primitives\",\"authors\":\"Pietro Lami , Ivan Lanese , Jean-Bernard Stefani , Claudio Sacerdoti Coen , Giovanni Fabbretti\",\"doi\":\"10.1016/j.jlamp.2024.100944\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>Reversible computing is a programming paradigm allowing one to execute programs both in the standard, forward direction as well as backwards, recovering past states. A relevant application of reversible computing is causal-consistent reversible debugging, which allows one to explore concurrent computations backwards and forwards to find a bug. The basic idea is that any action can be undone, provided that its consequences are undone beforehand. This approach has been put into practice in CauDEr, a Causal-consistent reversible Debugger<span> for the Erlang programming language. CauDEr provides the ability to explore a concurrent computation back and forward in a step-by-step way as well as to undo an action far in the past including all and only its consequences (rollback), and to replay an action from a log, together with its causes. CauDEr supports the functional, concurrent and distributed fragment of Erlang. However, Erlang also includes imperative primitives 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, including rollback and replay, to support such imperative primitives. From a theoretical point of view, the imperative primitives create different causal structures to those derived from the concurrent Erlang fragment previously handled in CauDEr, yet we show that the main results proved for previous versions of CauDEr are still valid. From a practical point of view, this allows one to debug a larger subset of Erlang programs, as shown with a small case study of a server providing mathematical functionalities.</span></p></div>\",\"PeriodicalId\":48797,\"journal\":{\"name\":\"Journal of Logical and Algebraic Methods in Programming\",\"volume\":\"138 \",\"pages\":\"Article 100944\"},\"PeriodicalIF\":0.7000,\"publicationDate\":\"2024-01-17\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Logical and Algebraic Methods in Programming\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S2352220824000026\",\"RegionNum\":4,\"RegionCategory\":\"数学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, THEORY & METHODS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Logical and Algebraic Methods in Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2352220824000026","RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
Reversible debugging of concurrent Erlang programs: Supporting imperative primitives
Reversible computing is a programming paradigm allowing one to execute programs both in the standard, forward direction as well as backwards, recovering past states. A relevant application of reversible computing is causal-consistent reversible debugging, which allows one to explore concurrent computations backwards and forwards to find a bug. The basic idea is that any action can be undone, provided that its consequences are undone beforehand. This approach has been put into practice in CauDEr, a Causal-consistent reversible Debugger for the Erlang programming language. CauDEr provides the ability to explore a concurrent computation back and forward in a step-by-step way as well as to undo an action far in the past including all and only its consequences (rollback), and to replay an action from a log, together with its causes. CauDEr supports the functional, concurrent and distributed fragment of Erlang. However, Erlang also includes imperative primitives 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, including rollback and replay, to support such imperative primitives. From a theoretical point of view, the imperative primitives create different causal structures to those derived from the concurrent Erlang fragment previously handled in CauDEr, yet we show that the main results proved for previous versions of CauDEr are still valid. From a practical point of view, this allows one to debug a larger subset of Erlang programs, as shown with a small case study of a server providing mathematical functionalities.
期刊介绍:
The Journal of Logical and Algebraic Methods in Programming is an international journal whose aim is to publish high quality, original research papers, survey and review articles, tutorial expositions, and historical studies in the areas of logical and algebraic methods and techniques for guaranteeing correctness and performability of programs and in general of computing systems. All aspects will be covered, especially theory and foundations, implementation issues, and applications involving novel ideas.