Adapting combinator and SECD machines to display snapshots of functional computations (Q1082792)

From MaRDI portal
scientific article
Language Label Description Also known as
English
Adapting combinator and SECD machines to display snapshots of functional computations
scientific article

    Statements

    Adapting combinator and SECD machines to display snapshots of functional computations (English)
    0 references
    0 references
    0 references
    1986
    0 references
    A functional computation involves substituting for function applications in an expression until that expression is reduced to normal form. The views of computations presented by the sequence- and state-oriented debugging tools of imperative systems are inappropriate for use with functional computations. New debugging tools are needed to aid the development of functional programs, especially in the context of lazy evaluation. After surveying previously reported debugging tools, we discuss a new debugging tool. Its implementation involves changing the reduction rules of the machine. The new reduction rules are applied to an interrupted computation to give a snapshot of that computation in source-level terms. We have implemented tools to produce snapshots for eager SECD and lazy combinator reduction machines. Example snapshots are shown from each. The implementation for an eager SECD machine is relatively straightforward, so we confine discussion of this to a brief sketch. A more detailed account is given of the implementation for a lazy combinator reduction machine; as this offers one solution to well-known problems with debugging functional programs in the context of lazy evaluation and combinator code.
    0 references
    debugging tools
    0 references
    functional programs
    0 references
    lazy evaluation
    0 references
    snapshots
    0 references
    combinator reduction
    0 references

    Identifiers