package ego

  1. Overview
  2. Docs

Ego is an extensible egraph library for OCaml. The interface to Ego is loosely based on the Rust's egg library and reimplements their EClass analysis in pure OCaml.

Ego provides two interfaces to its equality saturation engine:

1. Ego.Basic - an out-of-the-box interface to pure equality saturation (i.e supporting only syntactic rewrites).

2. Ego.Generic - a higher order interface to equality saturation, parameterised over custom-user defined analyses.

You may want to check out the quick start guide.

module Id : sig ... end

This module provides an implementation of an efficient union-find data-structure. It's main exported type, t, is used to represent equivalence classes in the EGraph data-structures provided by Ego.

module Basic : sig ... end

This module implements a fairly efficient "syntactic-rewrite-only" EGraph-based equality saturation engine that operates over Sexps.

module Generic : sig ... end

This module implements a generic EGraph-based equality saturation engine that operates over arbitrary user-defined languages and provides support for extensible custom user-defined EClass analyses.

OCaml

Innovation. Community. Security.