zbMATH — the first resource for mathematics

Adding traces to a lazy monadic evaluator. (English) Zbl 1023.68518
Moreno-Díaz, Roberto (ed.) et al., Computer aided systems theory - EUROCAST 2001. A selection of papers from the 8th international workshop, Las Palmas de Gran Canaria, Spain, February 19-23, 2001. Revised papers. Berlin: Springer. Lect. Notes Comput. Sci. 2178, 627-641 (2001).
Summary: The debugging of lazy functional programs is a not yet satisfactorily solved problem. Different approaches have been proposed during the last years, all of them having a property in common: The graph produced by the traced program is different from the original graph, i.e. the one without traces. In this paper we propose a cleaner and more modular approach to the trace problem. We regard traces as observations of the program and at the same time we want to preserve the original graph. In this way, a clean separation between the trace and the program being observed is established. Consequently, there may be variables in the trace referencing parts of the graph (i.e. pointers from the trace to the graph), but not the other way around. By doing so the correctness is guaranteed, as the normal execution process is not altered. In order to reach this goal, a monadic approach is followed. The success of the approach is shown by simulating three up-to-date Haskell tracers.
For the entire collection see [Zbl 0977.00038].
68N18 Functional programming and lambda calculus
Freja; Hat; Hood
Full Text: Link