| Quick Start | Syntax | Options | Graph Notation | Primitives | Usage |
Lambda Animator graphically demonstrates a number of alternative reductions strategies for the λ-calculus.
The strategies call-by-name/value/need control the reduction of arguments. The strategies substitute-by-name/value/need control the reduction of functions.
Call-by-value and call-by-need are used by eager and lazy languages respectively. Substitute-by-value and substitute-by-need are used to implement eager-specialization and lazy-specialization respectively.
( func arg1 ... argn )
application is curried so ( func arg1 arg2 ) has the same meaning as ( ( func arg1 ) arg2 )
( lambda ( var1 ... varn ) body )
similarly, abstraction is curried so ( lambda ( var1 var2 ) body ) has the same meaning as ( lambda ( var1 ) ( lambda ( var2 ) body ) )
( letrec ( ( name1 defn1 ) ... ( namen defnn ) ) body )
The letrec keyword introduces mutually recursive bindings.
( quote expr )
The quote keyword quotes data.
( define name defn )
The define keyword introduces top-level definitions, the current definition and all (non-shadowed) previous definitions are visible in the body of the current definition.
var
a variable referes to the nearest enclosing lambda or letrec bound variable, or if none, the most recent prior definition, and failing that a built-in primitive.
The function and argument strategy is shown to the left and right of applications nodes. The strategy is either name, value or need. In the case of value the form of that value can be either HNF or NF for functions, and one of HS, WHNF, WNF, HNF and NF for arguments. Lambda bound variables are identified by integers in the graph representation. The scope of a function body is shown with a rectangular box. Letrec bound variables are shown as sharing in the graph.
application strategy @ strategy abstraction \n variable _n literal value 1, 2, 3, true, false, 'symbol, '() pair cons primitive +, -, *, =, head, tail, if substitution n->
cons, head, tail, car, cdr, if, pair?, null?, equal?, number?, symbol?, +, -, *, =, <, undefined, true, false, seq, hyper-seq, apply-strategy.
To run from the command line, type one of: