Up

Module State

Signature

type status =
| Stabilizing
| Running_on_update_handlers
| Not_stabilizing
| Stabilize_previously_raised of Raised_exn.t
val sexp_of_status : status -> Sexplib.Sexp.t
module Run_on_update_handlers : sig .. end
type t = {
mutable status
: status ;
bind_lhs_change_should_invalidate_rhs
: bool ;
mutable stabilization_num
: Stabilization_num.t ;
mutable current_scope
: Scope.t ;
recompute_heap
: Recompute_heap.t ;
adjust_heights_heap
: Adjust_heights_heap.t ;
propagate_invalidity
: Node.Packed.t Core_kernel.Std.Stack.t ;
mutable num_active_observers
: int ;
mutable all_observers
: Internal_observer.Packed.t Uopt.t ;
finalized_observers
: Internal_observer.Packed.t Core_kernel.Std.Thread_safe_queue.t ;
new_observers
: Internal_observer.Packed.t Core_kernel.Std.Stack.t ;
disallowed_observers
: Internal_observer.Packed.t Core_kernel.Std.Stack.t ;
set_during_stabilization
: Var.Packed.t Core_kernel.Std.Stack.t ;
handle_after_stabilization
: Node.Packed.t Core_kernel.Std.Stack.t ;
run_on_update_handlers
: Run_on_update_handlers.t Core_kernel.Std.Stack.t ;
timing_wheel
: Alarm_value.t Core_kernel.Std.Timing_wheel_ns.t ;
mutable now
: Import.Time_ns.t Var.t ;
handle_fired
: Alarm.t -> unit ;
mutable fired_alarm_values
: Alarm_value.t Uopt.t ;
mutable num_nodes_became_necessary
: int ;
mutable num_nodes_became_unnecessary
: int ;
mutable num_nodes_changed
: int ;
mutable num_nodes_created
: int ;
mutable num_nodes_invalidated
: int ;
mutable num_nodes_recomputed
: int ;
mutable num_nodes_recomputed_directly_because_one_child
: int ;
mutable num_nodes_recomputed_directly_because_min_height
: int ;
mutable num_var_sets
: int ;
}
val sexp_of_t : t -> Sexplib.Sexp.t
val num_var_sets : t -> int
val set_num_var_sets : t -> int -> unit
val num_nodes_recomputed_directly_because_min_height : t -> int
val set_num_nodes_recomputed_directly_because_min_height : t -> int -> unit
val num_nodes_recomputed_directly_because_one_child : t -> int
val set_num_nodes_recomputed_directly_because_one_child : t -> int -> unit
val num_nodes_recomputed : t -> int
val set_num_nodes_recomputed : t -> int -> unit
val num_nodes_invalidated : t -> int
val set_num_nodes_invalidated : t -> int -> unit
val num_nodes_created : t -> int
val set_num_nodes_created : t -> int -> unit
val num_nodes_changed : t -> int
val set_num_nodes_changed : t -> int -> unit
val num_nodes_became_unnecessary : t -> int
val set_num_nodes_became_unnecessary : t -> int -> unit
val num_nodes_became_necessary : t -> int
val set_num_nodes_became_necessary : t -> int -> unit
val fired_alarm_values : t -> Alarm_value.t Uopt.t
val set_fired_alarm_values : t -> Alarm_value.t Uopt.t -> unit
val handle_fired : t -> Alarm.t -> unit
val set_now : t -> Import.Time_ns.t Var.t -> unit
val run_on_update_handlers : t -> Run_on_update_handlers.t Core_kernel.Std.Stack.t
val set_during_stabilization : t -> Var.Packed.t Core_kernel.Std.Stack.t
val all_observers : t -> Internal_observer.Packed.t Uopt.t
val set_all_observers : t -> Internal_observer.Packed.t Uopt.t -> unit
val num_active_observers : t -> int
val set_num_active_observers : t -> int -> unit
val adjust_heights_heap : t -> Adjust_heights_heap.t
val recompute_heap : t -> Recompute_heap.t
val current_scope : t -> Scope.t
val set_current_scope : t -> Scope.t -> unit
val stabilization_num : t -> Stabilization_num.t
val set_stabilization_num : t -> Stabilization_num.t -> unit
val bind_lhs_change_should_invalidate_rhs : t -> bool
val status : t -> status
val set_status : t -> status -> unit
module Fields : sig .. end
val now : t -> Import.Time_ns.t
val timing_wheel_length : t -> int
val num_stabilizes : t -> int
val max_height_allowed : t -> int
val max_height_seen : t -> int
val alarm_would_have_fired : t -> at:Core_kernel.Std.Timing_wheel_ns.Time.t -> bool
val iter_observers : t -> f:(Internal_observer.Packed.t -> unit) -> unit
val directly_observed : t -> Node.Packed.t list
val save_dot : t -> string -> unit
val iter_observer_descendants : t -> f:(Node.Packed.t -> unit) -> unit
module Stats : sig .. end
val stats : t -> Stats.t
val am_stabilizing : t -> bool
val invariant : t -> unit
val ensure_not_stabilizing : t -> name:string -> allow_in_update_handler:bool -> unit
val set_height : t -> 'a Types.Node.t -> int -> unit
val set_max_height_allowed : t -> int -> unit
val handle_after_stabilization : t -> 'a Node.t -> unit
val remove_children : t -> 'a Node.t -> unit
val check_if_unnecessary : t -> 'a Node.t -> unit
val became_unnecessary : t -> 'a Node.t -> unit
val invalidate_node : t -> 'a Node.t -> unit
val invalidate_nodes_created_on_rhs : t -> Types.Packed_node.t Uopt.t -> unit
val rescope_nodes_created_on_rhs : 'a -> Should_not_use.t Node.t Uopt.t -> new_scope:Scope.t -> unit
val propagate_invalidity : t -> unit
val add_parent_without_adjusting_heights : t -> child:'a Node.t -> parent:'b Node.t -> child_index:int -> unit
val became_necessary : t -> 'a Node.t -> unit
val add_parent : t -> child:'a Node.t -> parent:'b Node.t -> child_index:int -> unit
val run_with_scope : t -> Scope.t -> f:(unit -> 'a) -> 'a
val within_scope : t -> Scope.t -> f:(unit -> 'a) -> 'a
val change_child : t -> parent:'a Node.t -> old_child:'b Node.t Uopt.t -> new_child:'b Node.t -> child_index:int -> unit
val recompute : t -> 'a Node.t -> unit
val copy_child : t -> parent:'a Node.t -> child:'a Node.t -> unit
val maybe_change_value : t -> 'a Node.t -> 'a -> unit
val recompute_everything_that_is_necessary : t -> unit
val disallow_future_use : t -> 'a Internal_observer.t -> unit
val disallow_finalized_observers : t -> unit
val observer_finalizer : t -> ('a Internal_observer.t Core_kernel.Std.ref -> unit) Core_kernel.Staged.t
val create_observer : ?should_finalize:bool -> t -> 'a Node.t -> 'a Internal_observer.t Core_kernel.Std.ref
val add_new_observers : t -> unit
val observer_value_exn : t -> 'a Observer.t -> 'a
val observer_value : t -> 'a Observer.t -> ('a, Core_kernel.Std.Error.t) Core_kernel.Std._result
val node_on_update : t -> 'a Node.t -> f:('a On_update_handler.Node_update.t -> unit) -> unit
val observer_on_update_exn : t -> 'a Observer.t -> f:('a On_update_handler.Node_update.t -> unit) -> unit
val set_var_while_not_stabilizing : t -> 'a Var.t -> 'a -> unit
val set_var : t -> 'a Var.t -> 'a -> unit
val stabilize : t -> unit
val create_node_in : t -> Scope.t -> 'a Kind.t -> 'a Node.t
val create_node : t -> 'a Kind.t -> 'a Node.t
val create_node_top : t -> 'a Kind.t -> 'a Node.t
val create_var : ?use_current_scope:bool -> t -> 'a -> 'a Var.t
val const : t -> 'a -> 'a Node.t
val map : t -> 'a Types.Node.t -> f:('a -> 'b) -> 'b Node.t
val map2 : t -> 'a Types.Node.t -> 'b Types.Node.t -> f:('a -> 'b -> 'c) -> 'c Node.t
val map3 : t -> 'a Types.Node.t -> 'b Types.Node.t -> 'c Types.Node.t -> f:('a -> 'b -> 'c -> 'd) -> 'd Node.t
val map4 : t -> 'a Types.Node.t -> 'b Types.Node.t -> 'c Types.Node.t -> 'd Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e) -> 'e Node.t
val map5 : t -> 'a Types.Node.t -> 'b Types.Node.t -> 'c Types.Node.t -> 'd Types.Node.t -> 'e Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f) -> 'f Node.t
val map6 : t -> 'a Types.Node.t -> 'b Types.Node.t -> 'c Types.Node.t -> 'd Types.Node.t -> 'e Types.Node.t -> 'f Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g) -> 'g Node.t
val map7 : t -> 'a Types.Node.t -> 'b Types.Node.t -> 'c Types.Node.t -> 'd Types.Node.t -> 'e Types.Node.t -> 'f Types.Node.t -> 'g Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h) -> 'h Node.t
val map8 : t -> 'a Types.Node.t -> 'b Types.Node.t -> 'c Types.Node.t -> 'd Types.Node.t -> 'e Types.Node.t -> 'f Types.Node.t -> 'g Types.Node.t -> 'h Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h -> 'i) -> 'i Node.t
val map9 : t -> 'a Types.Node.t -> 'b Types.Node.t -> 'c Types.Node.t -> 'd Types.Node.t -> 'e Types.Node.t -> 'f Types.Node.t -> 'g Types.Node.t -> 'h Types.Node.t -> 'i Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h -> 'i -> 'j) -> 'j Node.t
val preserve_cutoff : input:'a Node.t -> output:'b Node.t -> unit
val depend_on : t -> 'a Node.t -> depend_on:'b Types.Node.t -> 'a Node.t
val necessary_if_alive : t -> 'a Node.t -> 'a Node.t
val bind : t -> 'a Node.t -> ('a -> 'b Types.Node.t) -> 'b Node.t
val bind2 : t -> 'a Types.Node.t -> 'b Types.Node.t -> ('a -> 'b -> 'c Types.Node.t) -> 'c Node.t
val bind3 : t -> 'a Types.Node.t -> 'b Types.Node.t -> 'c Types.Node.t -> ('a -> 'b -> 'c -> 'd Types.Node.t) -> 'd Node.t
val bind4 : t -> 'a Types.Node.t -> 'b Types.Node.t -> 'c Types.Node.t -> 'd Types.Node.t -> ('a -> 'b -> 'c -> 'd -> 'e Types.Node.t) -> 'e Node.t
val join : t -> 'a Types.Node.t Types.Node.t -> 'a Node.t
val if_ : t -> bool Types.Node.t -> then_:'a Types.Node.t -> else_:'a Types.Node.t -> 'a Node.t
val lazy_from_fun : t -> f:(unit -> 'a) -> 'a Core_kernel.Std.Lazy.t
val default_hash_table_initial_size : int
val memoize_fun_by_key : ?initial_size:int -> t -> 'a Core_kernel.Std.Hashtbl.key Core_kernel.Core_hashtbl_intf.Hashable.t -> ('b -> 'a Core_kernel.Std.Hashtbl.key) -> ('b -> 'c) -> ('b -> 'c) Core_kernel.Staged.t
val array_fold : t -> 'a Node.t Import.Array.t -> init:'b -> f:('b -> 'a -> 'b) -> 'b Node.t
val all : t -> 'a Node.t list -> 'a list Node.t
val unordered_array_fold : ?full_compute_every_n_changes:Core_kernel.Std.Int.t -> t -> 'a Node.t Import.Array.t -> init:'b -> f:('b -> 'a -> 'b) -> f_inverse:('b -> 'a -> 'b) -> 'b Node.t
val opt_unordered_array_fold : ?full_compute_every_n_changes:Core_kernel.Std.Int.t -> t -> 'a option Node.t Import.Array.t -> init:'b -> f:('b -> 'a -> 'b) -> f_inverse:('b -> 'a -> 'b) -> 'b option Node.t
val at_least_k_of : t -> bool Node.t Import.Array.t -> k:Core_kernel.Std.Int.t -> bool Node.t
val exists : t -> bool Node.t Import.Array.t -> bool Node.t
val for_all : t -> bool Node.t Import.Array.t -> bool Node.t
val sum : ?full_compute_every_n_changes:Core_kernel.Std.Int.t -> t -> 'a Node.t Import.Array.t -> zero:'b -> add:('b -> 'a -> 'b) -> sub:('b -> 'a -> 'b) -> 'b Node.t
val opt_sum : ?full_compute_every_n_changes:Core_kernel.Std.Int.t -> t -> 'a option Node.t Import.Array.t -> zero:'b -> add:('b -> 'a -> 'b) -> sub:('b -> 'a -> 'b) -> 'b option Node.t
val sum_int : t -> int Node.t Import.Array.t -> int Node.t
val sum_float : t -> float Node.t Import.Array.t -> float Node.t
val set_freeze : t -> 'a Node.t -> child:'a Node.t -> only_freeze_when:('a -> bool) -> unit
val freeze : t -> 'a Node.t -> only_freeze_when:('a -> bool) -> 'a Node.t
val next_interval_alarm : t -> base:Import.Time_ns.t -> interval:Core_kernel.Std.Time_ns.Span.t -> Import.Time_ns.t
val at_intervals : t -> Import.Time_ns.Span.t -> unit Node.t
val snapshot : t -> 'a Types.Node.t -> at:Import.Time_ns.t -> before:'a -> 'a Node.t Core_kernel.Std.Or_error.t
val advance_step_function : t -> 'a Node.t -> 'a Step_function.t -> Alarm_value.t -> unit
val step_function : t -> init:'a -> (Import.Time_ns.t * 'a) Core_kernel.Std.List.t -> 'a Node.t
val change_leaf : t -> 'a Node.t -> unit
val advance_clock : t -> to_:Core_kernel.Std.Time_ns.t -> unit
val create : (module Config.Incremental_config) -> max_height_allowed:int -> t