Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
POTTIER Francois
fix
Commits
3ed7d777
Commit
3ed7d777
authored
6 years ago
by
POTTIER Francois
Browse files
Options
Downloads
Patches
Plain Diff
README.
parent
16942dd3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+56
-0
56 additions, 0 deletions
README.md
with
56 additions
and
0 deletions
README.md
0 → 100644
+
56
−
0
View file @
3ed7d777
# Fix: memoization and fixed points made easy
`fix`
is an OCaml library that helps with various constructions
that involve memoization and recursion.
## Installation
Type
`opam install fix`
.
## Overview
At the top of an OCaml module, declare
`open Fix`
.
This gives you access to the following submodules:
*
[
`Gensym`
](
src/Gensym.mli
)
offers a simple facility
for
**generating fresh integer identifiers**
.
*
[
`Memoize`
](
src/Memoize.mli
)
offers a number of combinators
that help
**construct possibly recursive memoizing functions**
, that
is, functions that lazily record their input/output graph,
so as to avoid repeated computation.
*
[
`Tabulate`
](
src/Tabulate.mli
)
offers facilities
for
**tabulating a function**
, that is, eagerly evaluating this function
at every point in its domain, so as to obtain an equivalent
function that can be queried in constant time.
*
[
`Number`
](
src/Number.mli
)
offers a facility for
**discovering and numbering the reachable vertices**
in a directed graph.
*
[
`HashCons`
](
src/HashCons.mli
)
offers support for
**setting up a hash-consed data type**
, that is, a data type whose
values carry unique integer identifiers.
*
[
`Fix`
](
src/Core.mli
)
offers support for
**
computing
the least solution of a set of monotone equations
**
,
as described in the unpublished paper
[
Lazy Least Fixed Points in ML
](
http://gallium.inria.fr/~fpottier/publis/fpottier-fix.pdf
)
.
In other words, it allows defining a recursive function of
type
`variable -> property`
, where
**cyclic dependencies**
between variables are allowed,
and properties must be equipped with a partial order.
*
`Prop`
defines a few common partial orders, including
[
`Prop.Boolean`
](
src/Boolean.mli
)
,
[
`Prop.Option`
](
src/Option.mli
)
,
[
`Prop.Set`
](
src/Set.mli
)
.
*
[
`Glue`
](
src/Glue.mli
)
contains glue code that helps
build various implementations of association maps.
The signatures that appear in the above files,
such as
`MEMOIZER`
,
`TABULATOR`
,
`SOLVER`
, and so on,
are defined
[
here
](
src/Sigs.ml
)
.
<!-- demos -->
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment