An efficient calculus, similar to the λ-calculus, but based on Elementary Affine Logic, with two desirable features:
-
It is terminating without types (and in elementary time).
-
It is compatible with efficient optimal reductions (without costly book-keeping).
This, in turn, allows us to compile EAC to an efficient, non garbage-collected, parallel runtime, EA-NET. It is similar to FM-CORE but without native numbers, making it easier to formalize. Specification.
Right now, this repository includes a small, dependency-free JS implementation, including parser, interpreter and optimal (NASIC) reducer. Using it from the terminal is simple:
npm i -g elementary-affine-calculus
eac term_name # in a directory with .eac files
You can also import it and use as a library.