Reversible debugging of concurrent Erlang programs: Supporting imperative primitives

IF 0.7 4区 数学 Q3 COMPUTER SCIENCE, THEORY & METHODS
Pietro Lami , Ivan Lanese , Jean-Bernard Stefani , Claudio Sacerdoti Coen , Giovanni Fabbretti
{"title":"Reversible debugging of concurrent Erlang programs: Supporting imperative primitives","authors":"Pietro Lami ,&nbsp;Ivan Lanese ,&nbsp;Jean-Bernard Stefani ,&nbsp;Claudio Sacerdoti Coen ,&nbsp;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}
引用次数: 0

Abstract

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.

并发 Erlang 程序的可逆调试支持命令式基元
可逆计算是一种编程范式,允许人们以标准的正向和反向执行程序,恢复过去的状态。可逆计算的一个相关应用是因果一致的可逆调试,它允许人们反向和正向探索并发计算,以查找错误。其基本思想是,任何操作都可以撤销,前提是其后果必须事先撤销。CauDEr 是 Erlang 编程语言的因果一致可逆调试器,它将这种方法付诸实践。CauDEr 提供了逐步向前和向后探索并发计算的能力,也提供了撤销过去操作的能力,包括撤销所有和仅撤销其后果(回滚),以及从日志中重放操作及其原因的能力。CauDEr 支持 Erlang 的功能、并发和分布式片段。然而,Erlang 还包含了一些命令式原语,用于管理将进程标识符与名称关联起来的映射(同一节点的所有进程共享)。在此,我们扩展了 CauDEr 及其相关理论,包括回滚和重放,以支持此类命令式原语。从理论的角度来看,命令式原语创建的因果结构与 CauDEr 以前处理的并发 Erlang 片段所产生的因果结构不同,但我们证明了以前版本的 CauDEr 所证明的主要结果仍然有效。从实用的角度来看,这允许我们调试更大的 Erlang 程序子集,正如一个提供数学功能的服务器的小型案例研究所示。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Logical and Algebraic Methods in Programming
Journal of Logical and Algebraic Methods in Programming COMPUTER SCIENCE, THEORY & METHODS-LOGIC
CiteScore
2.60
自引率
22.20%
发文量
48
期刊介绍: 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.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信