Lambda Calculus (interpreters)

home1 home2
and the

FP (external)
FP (local)

Also see:
 PFL (|| λ)

There are lazy and strict versions of the toy lambda-calculus interpreter. They both share the same input syntax and can be used on the same example lambda-calculus programs, although some programs will not work (i.e. will loop) when using the strict interpreter of course.

  Lazy Interpreter Strict Interpreter
main programs Lazy.p Strict.p
declarations define values lazy.type.P <--
interpreters proper lazy.exec.P strict.exec.P
(evaluation is print driven)
expressions lazy.eval.p
(by-need evaluation)
(strict evaluation)
apply functions lazy.apply.P strict.apply.P
process declarations lazy.D.P strict.D.P
binary operators lazy.O.P <--
unary operators lazy.U.P strict.U.P
manipulate environments lazy.env.P strict.env.P
form basic values lazy.mkval.P <--
It is a useful exercise to compare the strict and lazy versions of the above files, particularly the two *.eval.P files.
  • General routines common to both interpreters:
lexical syntax
Neither interpreter is a production system. They are as small and simple as possible, written to illustrate evaluation strategies. Notably omitted: type checker, garbage collector. The lazy interpreter can be run through this form:

There is more on [λ-calculus here] and additional [λ examples here].

Coding Ockham's Razor, L. Allison, Springer

A Practical Introduction to Denotational Semantics, L. Allison, CUP

free op. sys.
free office suite
~ free photoshop
web browser

© L. Allison   (or as otherwise indicated),
Faculty of Information Technology (Clayton), Monash University, Australia 3800 (6/'05 was School of Computer Science and Software Engineering, Fac. Info. Tech., Monash University,
was Department of Computer Science, Fac. Comp. & Info. Tech., '89 was Department of Computer Science, Fac. Sci., '68-'71 was Department of Information Science, Fac. Sci.)
Created with "vi (Linux + Solaris)",  charset=iso-8859-1,  fetched Thursday, 25-Jul-2024 11:37:52 AEST.