Playing with LambdaAPI3

LambdaAPI3 is a java-written implementation of applied lambda-calculus.

The purpose of this document is to help you to experiment the version 2.0 of the LambdaAPI3 software.


The LambdaAPI3 software is provided in source form. Experimenting it is easier using a platform like the Eclipse Platform .

In order to install the software with Eclipse you have to create a Java project, within which you import the LambdaAPI3 source directory content.

The software uses no other library than the JRE System Library, version 1.6 or later.

The main class to run is: org.xmloperator.lambda3.Test


Running Test produces this text on System.out. It covers the following topics:

Term printing

The following informations are given for a set of combinators:

Type:Type assignment a la Curry
Lambda:Usual expression of a lambda-term
DeBruijn:Expression indexed a la De Bruijn
DAG:DAG representation
Combinat:Abstraction elimination

[A,B,C] is a tupple. It means \x.xABC

Number coding

The following number encodings are used:

Step by step reducing

A step by step reduction is shown for a set of lambda-terms.

At each step a DAG representation of the current lambda-term is displayed, followed by a line that underscores the leftermost outermost redex of this lambda-term. The argument part of the redex is underscored differently.

Normal form evaluation

Normal form and number of steps used for obtaining it are shown for a set of lambda-terms.

Term statistics

Term statistics are compiled at the end.

For each type of Term (Variable, Constant2, Constant3, Abstraction or Application) the following countings are realized:

living instance countA living Term has not be collected.
consumed instance countA consumed Term has been collected.
reusable instance countA reusable Term is ready for reusing.

Living Term counts must be zero for a full garbage collection.

Each reusable Term count is limited by the size of the corresponding reuse stack size. They can judge the correct size of these stacks.

Last update: 2013-07-28 Copyright (c) 2013 The_xmloperator_project