Logic is a modern structural logic library based on equivalence graphs.
Logic can prove equivalences and optimize expressions according to some criterion. It allows defining a (term-based) language as an abstract syntax tree (AST) associated with the rewriting rules expressing its equivalence relations. Applying rules is automatically performed by a three-stages process based on different "intermediate representations (IRs)".
Note: this is an exploratory project.
An extensive tutorial/book is planned. Until then, you can still read the documentation for the latest version or browse the sources.
It is recommanded to use nightly Rust but Logic should build just fine on stable (MSRV 1.69).
The standard cargo fmt
, clippy
, test
and bench
workflow is available.