-
Notifications
You must be signed in to change notification settings - Fork 0
Graph Computation #52
Comments
Graph IncrementalGraph Incremental defines a collection of interdependent values, and automatically tracks all the dependencies between these values and can bubble-up or propagate changed variables and recompute the incremental values that depend on them. *several things that needs to be considered concerning graph incrementation
|
after studying on the incremental computation on janestreet/incremental
|
Incremental DAG‘s NodeNode [t] is constructed in a struct. The node has parent and child, and the height of the parent node is always bigger than that of children when this node is necessary. A node is necessary iff Node [t] is a descendant of an observer node , or [t] is a [Freeze] node. A Node [t] is marked as an observer node when we want data from it [t] . A node which needs to be recomputed when changes occur should be stored in recompute heap. some major element in a DAG Node [t]:
parent-child relationshipparents:
scope
recompute heap
adjust_height_heap
stabilization
Other Kinds of DAG node
(Ordered/Unordered)array_fold:an immutable value that holds the If_then_else: Value of the nodes is conditional |
The Heap Data Structure that organise the DAG nodesBind
The structure of bind:('a, 'b) t: ScopeA scope is a bind in which nodes are created. It is either [top], for nodes not in a some major element of Scopetop The Recompute HeapThe recompute heap holds the set of nodes such that [Node.needs_to_be_computed]. It is used during stabilization to visit the nodes that need to be computed in topological order, using the recompute heap to visit them in increasing order of height. The Adjust Heights HeapThe adjust-heights heap is used after an edge is added to the graph from a child node to a parent node. If the child's height is greater than or equal to the parent's height, then [Adjust_heights_heap.adjust_heights] increases the height of the parent and its ancestors as necessary in order to restore the height invariant. This is done by visiting ancestors in topological order, using the adjust-heights heap to visit them in increasing order of pre-adjusted height. [adjust_heights t recompute_heap ~child ~parent] is called when [parent] is added as a
|
#Observer An observer is a "handle" to an {!Internal_observer} that is given to user code -- the handle exists so the implementation can hold on to the internal observer and use a finalizer to detect when the user is done with the observer. The finalizer disallows future use of the observer if it has no on-update handlers, so even if user code uses a finalizer to resurrect the observer, it will still have [not (use_is_allowed t)]. state transition:
|
https://github.com/janestreet/incremental/blob/master/src/incremental_intf.ml
research on graph computations like:
graph incremental computation
graph rewrite
optional transformation
The text was updated successfully, but these errors were encountered: