European Symposium on Programming

ESOP 2001: Programming Languages and Systems pp 320-334

Modeling an Algebraic Stepper

  • John Clements
  • Matthew Flatt
  • Matthias Felleisen
Conference paper

DOI: 10.1007/3-540-45309-1_21

Volume 2028 of the book series Lecture Notes in Computer Science (LNCS)
Cite this paper as:
Clements J., Flatt M., Felleisen M. (2001) Modeling an Algebraic Stepper. In: Sands D. (eds) Programming Languages and Systems. ESOP 2001. Lecture Notes in Computer Science, vol 2028. Springer, Berlin, Heidelberg

Abstract

Programmers rely on the correctness of the tools in their programming environments. In the past, semanticists have studied the correctness of compilers and compiler analyses, which are the most important tools. In this paper, we make the case that other tools, such as debuggers and steppers, deserve semantic models, too, and that using these models can help in developing these tools.

Our concrete starting point is the algebraic stepper in DrScheme, our Scheme programming environment. The algebraic stepper explains a Scheme computation in terms of an algebraic rewriting of the program text. A program is rewritten until it is in a canonical form (if it has one). The canonical form is the final result.

The stepper operates within the existing evaluator, by placing breakpoints and by reconstructing source expressions from source information placed on the stack. This approach raises two questions. First, do the run-time breakpoints correspond to the steps of the reduction semantics? Second, does the debugging mechanism insert enough information to reconstruct source expressions?

To answer these questions, we develop a high-level semantic model of the extended compiler and run-time machinery. Rather than modeling the evaluation as a low-level machine, we model the relevant low-level features of the stepper’s implementation in a high-level reduction semantics. We expect the approach to apply to other semantics-based tools.

Download to read the full conference paper text

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • John Clements
    • 1
  • Matthew Flatt
    • 1
  • Matthias Felleisen
    • 1
  1. 1.Department of Computer ScienceRice UniversityHouston
  2. 2.School of ComputingUniversity of UtahSLC