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 interface in Rust:
For an overview of its Rust programming interface, see the
documentation for the adapton::macros
module, which wraps the
adapton::engine
module with some convenient macros.
See also:
- 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 wrapper for |
cell_call |
Convenience wrapper: Call a function and place the result into an |
eager |
Similar to |
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 |
Convenience wrapper for |
prog_pt |
Generate a "program point", used as a unique ID for memoized functions. |
thunk |
Convenience wrapper for |