A core Erlang semantics for declarative debugging

Abstract One of the main advantages of declarative languages is their clearly established formal semantics, that allows programmers to reason about the properties of programs and to establish the correctness of tools. In particular, declarative debugging is a technique that analyses the proof trees of computations to locate bugs in programs. However, in the case of commercial declarative languages such as the functional language Erlang, sometimes the semantics is only informally defined, and this precludes these possibilities. Moreover, defining semantics for these languages is far from trivial because they include complex features needed in real applications, such as concurrency. In this paper we define a semantics for Core Erlang, the intermediate language underlying Erlang programs. We focus on the problem of concurrency and show how a medium-sized-step calculus, that avoids the details of small-step semantics but still captures the most common program errors, can be used to define an algorithmic debugger that is sound and complete.

[1]  Josep Silva,et al.  Algorithmic debugging generalized , 2018, J. Log. Algebraic Methods Program..

[2]  Germán Vidal Towards Erlang Verification by Term Rewriting , 2013, LOPSTR.

[3]  Adrián Riesco,et al.  EDD: A Declarative Debugger for Sequential Erlang Programs , 2014, TACAS.

[4]  Amr Sabry,et al.  The essence of compiling with continuations , 1993, PLDI '93.

[5]  Henrik Nilsson,et al.  How to look busy while being as lazy as ever: the Implementation of a lazy functional debugger , 2001, Journal of Functional Programming.

[6]  Lars-Åke Fredlund,et al.  A unified semantics for future Erlang , 2010, Erlang '10.

[7]  Adrián Riesco,et al.  A zoom-declarative debugger for sequential Erlang programs , 2015, Sci. Comput. Program..

[8]  Adrián Riesco,et al.  A Survey of Algorithmic Debugging , 2017, ACM Comput. Surv..

[9]  Salvador Tamarit,et al.  Behaviour Preservation across Code Versions in Erlang , 2018, Sci. Program..

[10]  Adrián Riesco,et al.  Simplifying Questions in Maude Declarative Debugger by Transforming Proof Trees , 2011, LOPSTR.

[11]  Ivan Lanese,et al.  A Theory of Reversibility for Erlang , 2018, J. Log. Algebraic Methods Program..

[12]  Alkis Gotovos,et al.  Test-driven development of concurrent programs using concuerror , 2011, Erlang '11.

[13]  Lars-Åke Fredlund,et al.  Programming distributed erlang applications: pitfalls and recipes , 2007, ERLANG '07.

[14]  Adrian Francalanza,et al.  Towards a formalisation of Erlang failure and failure detection , 2012 .

[15]  Germán Vidal,et al.  A Reversible Semantics for Erlang , 2016, LOPSTR.

[16]  Richard Carlsson An introduction to Core Erlang , 2001 .

[17]  Adrián Riesco,et al.  Speeding Up Algorithmic Debugging Using Balanced Execution Trees , 2013, TAP@STAF.

[18]  Konstantinos Sagonas,et al.  A PropEr integration of types and function specifications with property-based testing , 2011, Erlang Workshop.

[19]  Ivan Lanese,et al.  CauDEr: A Causal-Consistent Reversible Debugger for Erlang , 2018, FLOPS.

[20]  Alkis Gotovos,et al.  Systematic Testing for Detecting Concurrency Errors in Erlang Programs , 2013, 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation.

[21]  Lars-Åke Fredlund,et al.  A more accurate semantics for distributed erlang , 2007, ERLANG '07.

[22]  Joe Armstrong,et al.  Making reliable distributed systems in the presence of software errors , 2003 .

[23]  Frank Huch,et al.  Verification of Erlang programs using abstract interpretation and model checking , 1999, ICFP '99.

[24]  Lars-Åke Fredlund,et al.  A framework for reasoning about Erlang code , 2001 .

[25]  Adrián Riesco,et al.  Declarative debugging of concurrent Erlang programs , 2018, J. Log. Algebraic Methods Program..

[26]  Ehud Shapiro,et al.  Algorithmic Program Debugging , 1983 .

[27]  Koen Claessen,et al.  QuickCheck: a lightweight tool for random testing of Haskell programs , 2000, ICFP.