package fix

  1. Overview
  2. Docs
Algorithmic building blocks for memoization, recursion, and more

Install

Dune Dependency

Authors

Maintainers

Sources

archive.tar.gz
md5=75aeb28e58d5a2c8b8c2590d23d1122d
sha512=744b08403beb22d8d960976792dd2f80ee9b47c9b3d3977d98e09aa127c3e21531acb305ab42c734ad1067b0ababa43b251afd3e111d296e3b07fbe2c187b082

Description

Published: 28 Apr 2025

README

Fix: memoization and fixed points made easy

fix is an OCaml library that helps with various algorithmic constructions that involve memoization, recursion, and numbering.

Documentation

See the documentation of the latest released version.

Demos

A few demos are provided:

  • brz sets up a hash-consed representation of regular expressions and shows how to convert a regular expression to a deterministic finite-state automaton by Brzozowski's method. This demo exploits many of the submodules listed above, and is accompanied with a commentary.
  • cyk presents a CYK-style parsing algorithm as an instance of Fix.
  • cfg uses Fix to perform certain static analyses of a context-free grammar; this includes computing nullability information and FIRST sets.
  • fib defines Fibonacci's function in several different ways using the fixed-point combinators offered by Memoize and Fix.
  • hco sets up simple-minded hash-consed trees using HashCons.

Dependencies (2)

  1. dune >= "1.3"
  2. ocaml >= "4.03"

Dev Dependencies

None

Conflicts

None

OCaml

Innovation. Community. Security.