VictorTaelin/Interaction-Calculus
FreeA programming language and model of computation that matches the optimal λ-calculus reduction algorithm perfectly.
About VictorTaelin/Interaction-Calculus
The Interaction Calculus (IC) is a minimal term rewriting system inspired by the Lambda Calculus (λC), with key differences that make it inherently more efficient and expressive. Vars are affine (can only occur up to one time) and global (can occur anywhere in the program). It features first-class superpositions and duplications, enabling optimal evaluation that can make some computations exponentially faster. Global lambdas allow expressing concepts not possible in traditional λC, including continuations, linear HOAS, and mutable references. Being fully affine simplifies garbage collection and parallelism. This repository includes a reference implementation in C (with native numbers) and a single-file implementation in Haskell (with a step debugger). The IC is the theoretical foundation for the HVM (Higher-Order Virtual Machine).
Key Features
Pros & Cons
- Enables optimal evaluation of λ-calculus, yielding exponential speedups for certain computations
- Expressive beyond traditional lambda calculus (continuations, linear HOAS, mutable references)
- Affine typing simplifies garbage collection and parallelism
- Open-source with reference implementations in C and Haskell
- Compact formal specification with clear interaction rules