Creating a new term-rewrite language
This article walks through the design and implementation of a simple but remarkably powerful new programming language that uses term rewriting as an evaluation model and, consequently, is well suited to computer algebra.
The term rewriter
We begin with the definition of an expression type Expr
:
type Expr =
| Int of System.Numerics.BigInteger