HackerPapers

arXiv:1108.4706cs.PL

Stepping Lazy Programs

Stephen Chang, John Clements, Eli Barzilay, Matthias Felleisen

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Debugging lazy functional programs poses serious challenges. In support of the "stop, examine, and resume" debugging style of imperative languages, some debugging tools abandon lazy evaluation. Other debuggers preserve laziness but present it in a way that may confuse programmers because the focus of evaluation jumps around in a seemingly random manner. In this paper, we introduce a supplemental tool, the algebraic program stepper. An algebraic stepper shows computation as a mathematical calculation. Algebraic stepping could be particularly useful for novice programmers or programmers new to lazy programming. Mathematically speaking, an algebraic stepper renders computation as the standard rewriting sequence of a lazy lambda-calculus. Our novel lazy semantics introduces lazy evaluation as a form of parallel program rewriting. It represents a compromise between Launchbury's store-based semantics and a simple, axiomatic description of lazy computation as sharing-via-parameters. Finally, we prove that the stepper's run-time machinery correctly reconstructs the standard rewriting sequence.

arXiv comments
submitted to ICFP 2011
Journal reference
DOI
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Aug 2011 to Aug 2011.

Comments linking this paper, per year.

Discussed in comments1 thread

  1. Why Haskell is Kinda Cool 1 comment
    • This looks like some interesting research in the right direction for debugging lazy programs, http://arxiv.org/pdf/1108.4706v1. Which goes to show, people need to be looking at Racket a lot more then they do - including Haskellers.

      swannodetteView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.