From stack traces to lazy rewriting sequences

  • Authors:
  • Stephen Chang;Eli Barzilay;John Clements;Matthias Felleisen

  • Affiliations:
  • Northeastern University, Boston, Massachusetts;Northeastern University, Boston, Massachusetts;California Polytechnic State University, San Luis Obispo, California;Northeastern University, Boston, Massachusetts

  • Venue:
  • IFL'11 Proceedings of the 23rd international conference on Implementation and Application of Functional Languages
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Reasoning about misbehaving lazy functional programs can be confusing, particularly for novice programmers. Unfortunately, the complicated nature of laziness also renders most debugging tools ineffective at clarifying this confusion. In this paper, we introduce a new lazy debugging tool for novice programmers, an algebraic stepper that presents computation as a sequence of parallel rewriting steps. Parallel program rewriting represents sharing accurately and enables debugging at the level of source syntax, minimizing the presentation of low-level details or the effects of distorting transformations that are typical for other lazy debuggers. Semantically, our rewriting system represents a compromise between Launchbury's store-based semantics and an axiomatic description of lazy computation as sharing-via-parameters. Finally, we prove the correctness of our tool by showing that the stepper's run-time machinery reconstructs the expected lazy rewriting sequence.