package grenier

  1. Overview
  2. Docs
A collection of various algorithms in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

grenier-0.14.tbz
sha256=e5362e6ad0e888526517415e78b9e8243bb0cc1b0c952201884148832ac4442f
sha512=4e2f16b52b3c2786a1b8e93156184fd69d448cea571ca839b6cb88ab73f380994d1561fe24c1523c43ed8fc42d2ac01b673a13b6151fff4af4f009923d3aaf37

doc/grenier.binder_introducer/Binder_introducer/index.html

Module Binder_introducer

type 'a graph = 'a Fastdom.graph = {
  1. memoize : 'b. ('a -> 'b) -> 'a -> 'b;
    (*

    Memoize a function on nodes

    *)
  2. successors : 'b. ('b -> 'a -> 'b) -> 'b -> 'a -> 'b;
    (*

    Fold over successors of a node

    *)
}

Representation of a graph with nodes of type 'a

Rewrite a (possibly cyclic) directed graph by introducing let-binders at dominating nodes

type ('term, 'var) binding_structure = {
  1. map_subterms : ('term -> 'term) -> 'term -> 'term;
  2. name_term : 'term -> 'var;
  3. var_term : 'var -> 'term;
  4. introduce_let : recursive:bool -> ('var * 'term) list -> 'term -> 'term;
}
val explicit_sharing : 'a graph -> ('a, 'b) binding_structure -> 'a -> 'a
OCaml

Innovation. Community. Security.