Lambda caclulus redex reducer.
This project requires 2024 edition of Rust(>= 1.85). You can install the latest version using rustup, see here for more details.
If you want to run benchmarks, you will have to use Rust >= 1.86.
NOTE: some package managers may provide outdated versions of the Rust toolchain.
$ cargo build --releasecargo install --path ./crates/lambubu_cli/ # install globally
cargo run # run using CargoLambubu CLI accepts its input via standard input. Input is a series of two kinds of statements:
- Lambda expressions
(\x.x)
(,\x.x)
(λx.x)
((\a.\b.a) 2 5)
- Definitions
TWO::(ADD 1 1)
Definitions are added to the context line-by-line and lambda expressions are reduced using the stretegy requested. Each line corresponds to a single expression.
API documentation can be openned using cargo doc --open.
Expression is any of the following:
- A lambda term
(\X.Y), whereXis any variable name(lowercase) andYis any expression - A variable
a, whereais a sequence of lowercase characters - A macro
A, whereAis a sequence of uppercase characters - Application
(A B), whereAis an expression andBis one or more expressions. - Another expression in parenthesis
See LICENSE for details