Abstract λ-Calculus Machines

  • Authors:
  • Werner E. Kluge

  • Affiliations:
  • Department of Computer Science, University of Kiel, Kiel, Germany D---24105

  • Venue:
  • Central European Functional Programming School
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper is about fully normalizing λ-calculusmachines that permit symbolic computations involving freevariables. They employ full-fledged β-reductions topreserve static binding scopes when substituting and reducing underabstractions. Abstractions and variables thus become truly firstclass objects: both may be freely substituted forλ-bound variables and returned as abstractionvalues. This contrasts with implementations of conventionalfunctional languages which realize a weakly normalizingλ-calculus that is capable of computing closedterms (or basic values) only.The two machines described in this paper are descendants of aweakly normalizing secd-machine that supports a namelessλ-calculus which has bound variable occurrencesreplaced by binding indices. Full normalization is achieved by afew more state transition rules that η-extendunapplied abstractions to full applications, inserting in ascendingorder binding indices for missing arguments. Updating these indicesin the course of performing β-reductions isaccomplished by means of a simple counting mechanism that inflictsvery little overhead. Both machines realize a head-order strategythat emphasizes normalization along the leftmost spine of aλ-expression. The simpler fn_secd-machine abides bythe concept of saving (and unsaving) on a dump structure machinecontexts upon each individual β-reduction. The moresophisticated fn_se(m)cd-machine performs what are calledβ-reductions-in-the-large that head-normalize entirespines in the same contexts. It also employs an additional tracestack Mthat facilitates traversing spines in search forand contracting redices.The paper also gives an outline of how the fn_se(m)cd-machinecan be implemented as a graph reducer.