Crate adapton [−] [src]
Adapton for Rust
This Rust implementation embodies the latest implementation Adapton, which offers a foundational, language-based semantics for general-purpose incremental computation.
Programming model
See the Rust documentation for the following modules:
The
macros
module, introduces convenience macros that wrap the core interface.Its documentation gives many illustrative examples.
The
engine
module gives the core programming interface.
Resources
- Presentations and benchmark results
- IODyn: Adapton collections, for algorithms with dynamic input and output
- Adapton Lab: Evaluation and testing
Background
Adapton proposes the demanded computation graph (or DCG), and a demand-driven change propagation algorithm. Further, it proposes first-class names for identifying cached data structures and computations.
The following academic papers detail these technical proposals:
- DCG, and change propagation: Adapton: Composable, demand-driven incremental computation, PLDI 2014.
- Nominal memoization: Incremental computation with names, OOPSLA 2015.
- Type and effect structures: The draft Typed Adapton: Refinement types for incremental computation with precise names.
Why Rust?
Adapton's first implementations used Python and OCaml; The latest implementation in Rust offers the best performance thus far, since (1) Rust is fast, and (2) traversal-based garbage collection presents performance challenges for incremental computation. By liberating Adapton from traversal-based collection, our empirical results are both predictable and scalable.
Modules
catalog |
Experimental collections, including those for sequences and sets. (See also: The IODyn crate) |
engine |
Adapton's core calculus, implemented as a runtime library. We implement two versions of this interface, which we refer to as engines: The naive engine and the DCG engine, implemented based on the algorithms from the Adapton papers. |
macros |
Macros to make using the |
parse_val |
Parses the output of Rust |
reflect |
Reflects the DCG engine, including both the effects of the
programs running in it, and the internal effects of the engine
cleaning and dirtying the DCG. For the latter effects, see the
|
Macros
cell |
Convenience wrappers for |
fork |
Wrappers for |
forko |
Optional name forking. |
get |
Convenience wrapper for |
let_cell |
Let-bind a nominal ref cell via |
let_memo |
Let-bind a nominal thunk, force it, and let-bind its result. Permits sequences of bindings. |
let_thunk |
Let-bind a nominal thunk via |
memo |
Wrappers for creating and forcing thunks ( |
thunk |
Wrappers for |