Introducing Incremental
Incremental is a new library for building self-adjusting computations that efficiently update when inputs change, similar to spreadsheets but with dynamic computational graphs that can change structure at runtime. It enables efficient recomputation in applications like online combinatorial algorithms, GUI construction, and configurable risk calculations in financial modeling. The library uses a functional approach with variables and incremental mappings to manage dependencies and updates in complex systems.
- ▪Incremental is a library for self-adjusting computations that optimize updates in response to changing inputs.
- ▪The computational graph in Incremental can change dynamically at runtime, unlike static spreadsheet models.
- ▪It has been applied to online combinatorial algorithms, incremental GUI construction, and financial risk calculations with complex dependencies.
- ▪Incremental computations start with variables, and changes propagate only to dependent parts of the graph.
- ▪The library is implemented as a generative functor, ensuring isolated computational worlds through fresh type creation.
Opening excerpt (first ~120 words) tap to expand
I’m pleased to announce the release of Incremental (well commented mli here), a powerful library for building self-adjusting computations, i.e., computations that can be updated efficiently when their inputs change. At its simplest, you can think of a self-adjusting computation as a fancy spreadsheet. In a spreadsheet, each cell contains either simple data, or an equation that describes how the value in this cell should be derived from values in other cells. Collectively, this amounts to a graph-structured computation, and one of the critical optimizations in Excel is that when some of the cells change, Excel only recomputes the parts of the graph that depend on those changed cells. What makes self-adjusting computation (or SAC) different from a spreadsheet is its dynamism.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Jane Street Blog.