Module Incremental__.State
type status
=
|
Stabilizing
|
Running_on_update_handlers
|
Not_stabilizing
|
Stabilize_previously_raised of Incremental__.Raised_exn.t
val sexp_of_status : status -> Ppx_sexp_conv_lib.Sexp.t
module Node_update = Incremental__.On_update_handler.Node_update
module Run_on_update_handlers : sig ... end
module Only_in_debug : sig ... end
module Packed_weak_hashtbl : sig ... end
type t
=
{
mutable status : status;
bind_lhs_change_should_invalidate_rhs : bool;
mutable stabilization_num : Incremental__.Stabilization_num.t;
mutable current_scope : Incremental__.Scope.t;
recompute_heap : Incremental__.Recompute_heap.t;
adjust_heights_heap : Incremental__.Adjust_heights_heap.t;
propagate_invalidity : Incremental__.Node.Packed.t Core_kernel.Stack.t;
mutable num_active_observers : int;
mutable all_observers : Incremental__.Internal_observer.Packed.t Incremental__.Import.Uopt.t;
finalized_observers : Incremental__.Internal_observer.Packed.t Thread_safe_queue.t;
new_observers : Incremental__.Internal_observer.Packed.t Core_kernel.Stack.t;
disallowed_observers : Incremental__.Internal_observer.Packed.t Core_kernel.Stack.t;
set_during_stabilization : Incremental__.Var.Packed.t Core_kernel.Stack.t;
handle_after_stabilization : Incremental__.Node.Packed.t Core_kernel.Stack.t;
run_on_update_handlers : Run_on_update_handlers.t Core_kernel.Stack.t;
mutable only_in_debug : Only_in_debug.t;
weak_hashtbls : Packed_weak_hashtbl.t Thread_safe_queue.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 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 weak_hashtbls : t -> Packed_weak_hashtbl.t Thread_safe_queue.t
val only_in_debug : t -> Only_in_debug.t
val set_only_in_debug : t -> Only_in_debug.t -> unit
val run_on_update_handlers : t -> Run_on_update_handlers.t Core_kernel.Stack.t
val handle_after_stabilization : t -> Incremental__.Node.Packed.t Core_kernel.Stack.t
val set_during_stabilization : t -> Incremental__.Var.Packed.t Core_kernel.Stack.t
val disallowed_observers : t -> Incremental__.Internal_observer.Packed.t Core_kernel.Stack.t
val new_observers : t -> Incremental__.Internal_observer.Packed.t Core_kernel.Stack.t
val finalized_observers : t -> Incremental__.Internal_observer.Packed.t Thread_safe_queue.t
val all_observers : t -> Incremental__.Internal_observer.Packed.t Incremental__.Import.Uopt.t
val set_all_observers : t -> Incremental__.Internal_observer.Packed.t Incremental__.Import.Uopt.t -> unit
val num_active_observers : t -> int
val set_num_active_observers : t -> int -> unit
val propagate_invalidity : t -> Incremental__.Node.Packed.t Core_kernel.Stack.t
val adjust_heights_heap : t -> Incremental__.Adjust_heights_heap.t
val recompute_heap : t -> Incremental__.Recompute_heap.t
val current_scope : t -> Incremental__.Scope.t
val set_current_scope : t -> Incremental__.Scope.t -> unit
val stabilization_num : t -> Incremental__.Stabilization_num.t
val set_stabilization_num : t -> Incremental__.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 sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
module Clock : sig ... end
val now : Clock.t -> Incremental__.Import.Time_ns.t
val timing_wheel_length : Clock.t -> Core_kernel__.Import.int
val num_stabilizes : t -> int
val max_height_allowed : t -> int
val max_height_seen : t -> int
val alarm_would_have_fired : Clock.t -> at:Core_kernel.Timing_wheel_ns.Time.t -> bool
val iter_observers : t -> f:(Incremental__.Internal_observer.Packed.t -> 'a) -> unit
val directly_observed : t -> Incremental__.Node.Packed.t list
val save_dot : t -> string -> unit
val iter_observer_descendants : t -> f:(Incremental__.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 Incremental__.Types.Node.t -> int -> unit
val set_max_height_allowed : t -> int -> unit
val handle_after_stabilization : a. t -> 'a Incremental__.Node.t -> unit
val remove_children : a. t -> 'a Incremental__.Node.t -> unit
val remove_child : a b. t -> child:'b Incremental__.Node.t -> parent:'a Incremental__.Node.t -> child_index:int -> unit
val check_if_unnecessary : a. t -> 'a Incremental__.Node.t -> unit
val became_unnecessary : a. t -> 'a Incremental__.Node.t -> unit
val remove_alarm : Clock.t -> Incremental__.Alarm_value.t Core_kernel.Timing_wheel_ns.Alarm.t -> Core_kernel__.Import.unit
val invalidate_node : a. t -> 'a Incremental__.Node.t -> unit
val invalidate_nodes_created_on_rhs : t -> Incremental__Types.Node.Packed.t Incremental__.Import.Uopt.t -> Core_kernel__.Import.unit
val rescope_nodes_created_on_rhs : 'a -> Incremental__.Node.Packed.t Incremental__.Import.Uopt.t -> new_scope:Incremental__.Scope.t -> unit
val propagate_invalidity : t -> unit
val add_parent_without_adjusting_heights : a b. t -> child:'a Incremental__.Node.t -> parent:'b Incremental__.Node.t -> child_index:int -> unit
val became_necessary : a. t -> 'a Incremental__.Node.t -> unit
val became_necessary : t -> 'a Incremental__.Node.t -> unit
val add_parent : t -> child:'a Incremental__.Node.t -> parent:'b Incremental__.Node.t -> child_index:int -> unit
val run_with_scope : t -> Incremental__.Scope.t -> f:(unit -> 'a) -> 'a
val within_scope : t -> Incremental__.Scope.t -> f:(unit -> 'a) -> 'a
val change_child : a b. t -> parent:'a Incremental__.Node.t -> old_child:'b Incremental__.Node.t Incremental__.Import.Uopt.t -> new_child:'b Incremental__.Node.t -> child_index:int -> unit
val recompute : a. t -> 'a Incremental__.Node.t -> unit
val copy_child : a. t -> parent:'a Incremental__.Node.t -> child:'a Incremental__.Node.t -> unit
val maybe_change_value : a. t -> 'a Incremental__.Node.t -> 'a -> unit
val recompute_everything_that_is_necessary : t -> unit
val unlink_disallowed_observers : t -> unit
val disallow_future_use : t -> 'a Incremental__.Internal_observer.t -> unit
val disallow_finalized_observers : t -> unit
val observer_finalizer : t -> ('a Incremental__.Internal_observer.t Core_kernel.ref -> unit) Core_kernel__.Import.Staged.t
val create_observer : ?should_finalize:bool -> t -> 'a Incremental__.Node.t -> 'a Incremental__.Internal_observer.t Core_kernel.ref
val add_new_observers : t -> unit
val observer_value_exn : t -> 'a Incremental__.Observer.t -> 'a
val observer_value : t -> 'a Incremental__.Observer.t -> ('a, Core_kernel.Error.t) Core_kernel._result
val node_on_update : t -> 'a Incremental__.Node.t -> f:('a Incremental__.On_update_handler.Node_update.t -> unit) -> unit
val observer_on_update_exn : t -> 'a Incremental__.Observer.t -> f:('a Incremental__.On_update_handler.Node_update.t -> unit) -> unit
val set_var_while_not_stabilizing : t -> 'a Incremental__.Var.t -> 'a -> unit
val set_var : t -> 'a Incremental__.Var.t -> 'a -> unit
val reclaim_space_in_weak_hashtbls : t -> unit
val stabilize : t -> Core_kernel__.Import.unit
val create_node_in : t -> Incremental__.Scope.t -> 'a Incremental__.Kind.t -> 'a Incremental__.Node.t
val create_node : t -> 'a Incremental__.Kind.t -> 'a Incremental__.Node.t
val create_node_top : t -> 'a Incremental__.Kind.t -> 'a Incremental__.Node.t
val create_var : ?use_current_scope:bool -> t -> 'a -> 'a Incremental__.Var.t
val const : t -> 'a -> 'a Incremental__.Node.t
val map : t -> 'a Incremental__Types.Node.t -> f:('a -> 'b) -> 'b Incremental__.Node.t
val map2 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> f:('a -> 'b -> 'c) -> 'c Incremental__.Node.t
val map3 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> 'c Incremental__Types.Node.t -> f:('a -> 'b -> 'c -> 'd) -> 'd Incremental__.Node.t
val map4 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> 'c Incremental__Types.Node.t -> 'd Incremental__Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e) -> 'e Incremental__.Node.t
val map5 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> 'c Incremental__Types.Node.t -> 'd Incremental__Types.Node.t -> 'e Incremental__Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f) -> 'f Incremental__.Node.t
val map6 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> 'c Incremental__Types.Node.t -> 'd Incremental__Types.Node.t -> 'e Incremental__Types.Node.t -> 'f Incremental__Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g) -> 'g Incremental__.Node.t
val map7 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> 'c Incremental__Types.Node.t -> 'd Incremental__Types.Node.t -> 'e Incremental__Types.Node.t -> 'f Incremental__Types.Node.t -> 'g Incremental__Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h) -> 'h Incremental__.Node.t
val map8 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> 'c Incremental__Types.Node.t -> 'd Incremental__Types.Node.t -> 'e Incremental__Types.Node.t -> 'f Incremental__Types.Node.t -> 'g Incremental__Types.Node.t -> 'h Incremental__Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h -> 'i) -> 'i Incremental__.Node.t
val map9 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> 'c Incremental__Types.Node.t -> 'd Incremental__Types.Node.t -> 'e Incremental__Types.Node.t -> 'f Incremental__Types.Node.t -> 'g Incremental__Types.Node.t -> 'h Incremental__Types.Node.t -> 'i Incremental__Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h -> 'i -> 'j) -> 'j Incremental__.Node.t
val preserve_cutoff : input:'a Incremental__.Node.t -> output:'b Incremental__.Node.t -> unit
val depend_on : t -> 'a Incremental__.Node.t -> depend_on:'b Incremental__Types.Node.t -> 'a Incremental__.Node.t
val necessary_if_alive : t -> 'a Incremental__.Node.t -> 'a Incremental__.Node.t
val bind : t -> 'a Incremental__.Node.t -> f:('a -> 'b Incremental__Types.Node.t) -> 'b Incremental__.Node.t
val bind2 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> f:('a -> 'b -> 'c Incremental__Types.Node.t) -> 'c Incremental__.Node.t
val bind3 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> 'c Incremental__Types.Node.t -> f:('a -> 'b -> 'c -> 'd Incremental__Types.Node.t) -> 'd Incremental__.Node.t
val bind4 : t -> 'a Incremental__Types.Node.t -> 'b Incremental__Types.Node.t -> 'c Incremental__Types.Node.t -> 'd Incremental__Types.Node.t -> f:('a -> 'b -> 'c -> 'd -> 'e Incremental__Types.Node.t) -> 'e Incremental__.Node.t
val join : t -> 'a Incremental__Types.Node.t Incremental__Types.Node.t -> 'a Incremental__.Node.t
val if_ : t -> bool Incremental__Types.Node.t -> then_:'a Incremental__Types.Node.t -> else_:'a Incremental__Types.Node.t -> 'a Incremental__.Node.t
val lazy_from_fun : t -> f:(unit -> 'a) -> 'a Core_kernel.Lazy.t
val default_hash_table_initial_size : int
val memoize_fun_by_key : ?initial_size:Core_kernel__.Import.int -> t -> 'a Core_kernel__Hashtbl.key Core_kernel.Hashtbl_intf.Hashable.t -> ('b -> 'a Core_kernel.Hashtbl.key) -> ('b -> 'c) -> ('b -> 'c) Core_kernel__.Import.Staged.t
val array_fold : t -> 'a Incremental__.Node.t Core_kernel__.Import.array -> init:'b -> f:('b -> 'a -> 'b) -> 'b Incremental__.Node.t
val all : t -> 'a Incremental__.Node.t list -> 'a list Incremental__.Node.t
val unordered_array_fold : ?full_compute_every_n_changes:Core_kernel.Int.t -> t -> 'a Incremental__.Node.t Core_kernel__.Import.array -> init:'b -> f:('b -> 'a -> 'b) -> f_inverse:('b -> 'a -> 'b) -> 'b Incremental__.Node.t
val opt_unordered_array_fold : ?full_compute_every_n_changes:Core_kernel.Int.t -> t -> 'a option Incremental__.Node.t Core_kernel__.Import.array -> init:'b -> f:('b -> 'a -> 'b) -> f_inverse:('b -> 'a -> 'b) -> 'b option Incremental__.Node.t
val at_least_k_of : t -> bool Incremental__.Node.t Core_kernel__.Import.array -> k:Core_kernel__Int.t -> bool Incremental__.Node.t
val exists : t -> bool Incremental__.Node.t Core_kernel__.Import.array -> bool Incremental__.Node.t
val for_all : t -> bool Incremental__.Node.t Core_kernel__.Import.array -> bool Incremental__.Node.t
val sum : ?full_compute_every_n_changes:Core_kernel.Int.t -> t -> 'a Incremental__.Node.t Core_kernel__.Import.array -> zero:'b -> add:('b -> 'a -> 'b) -> sub:('b -> 'a -> 'b) -> 'b Incremental__.Node.t
val opt_sum : ?full_compute_every_n_changes:Core_kernel.Int.t -> t -> 'a option Incremental__.Node.t Core_kernel__.Import.array -> zero:'b -> add:('b -> 'a -> 'b) -> sub:('b -> 'a -> 'b) -> 'b option Incremental__.Node.t
val sum_int : t -> int Incremental__.Node.t Core_kernel__.Import.array -> int Incremental__.Node.t
val sum_float : t -> float Incremental__.Node.t Incremental__.Import.Array.t -> float Incremental__.Node.t
val set_freeze : t -> 'a Incremental__.Node.t -> child:'a Incremental__.Node.t -> only_freeze_when:('a -> bool) -> unit
val freeze : t -> 'a Incremental__.Node.t -> only_freeze_when:('a -> bool) -> 'a Incremental__.Node.t
val add_alarm : Clock.t -> at:Core_kernel.Timing_wheel_ns.Time.t -> Incremental__.Alarm_value.t -> Incremental__.Alarm_value.t Core_kernel.Timing_wheel_ns.Alarm.t
val at : t -> Clock.t -> Core_kernel.Timing_wheel_ns.Time.t -> Incremental__.Before_or_after.t Incremental__.Node.t
val after : t -> Clock.t -> Incremental__.Import.Time_ns.Span.t -> Incremental__.Before_or_after.t Incremental__.Node.t
val next_interval_alarm : Clock.t -> base:Incremental__.Import.Time_ns.t -> interval:Incremental__.Import.Time_ns.Span.t -> Incremental__.Import.Time_ns.t
val at_intervals : t -> Clock.t -> Incremental__.Import.Time_ns.Span.t -> unit Incremental__.Node.t
val snapshot : t -> Clock.t -> 'a Incremental__Types.Node.t -> at:Incremental__.Import.Time_ns.t -> before:'a -> 'a Incremental__.Node.t Core_kernel.Or_error.t
val advance_step_function : Clock.t -> 'a Incremental__.Node.t -> 'a Incremental__.Step_function.t -> Incremental__.Alarm_value.t -> unit
val step_function : t -> Clock.t -> init:'a -> (Incremental__.Import.Time_ns.t * 'a) Core_kernel.List.t -> 'a Incremental__.Node.t
val change_leaf : t -> 'a Incremental__.Node.t -> unit
val advance_clock : t -> Clock.t -> to_:Core_kernel.Time_ns.Alternate_sexp.t -> unit
val now_dummy : Incremental__.Import.Time_ns.t Incremental__.Var.t
val create_clock : t -> timing_wheel_config:Core_kernel.Timing_wheel_ns.Config.t -> start:Core_kernel.Timing_wheel_ns.Time.t -> Clock.t
val create : (module Incremental.Config.Incremental_config) -> max_height_allowed:int -> t
val weak_memoize_fun_by_key : ?initial_size:int -> t -> 'a Weak_hashtbl__.Import.Hashtbl.Hashable.t -> ('b -> 'a) -> ('b -> 'c Weak_hashtbl__.Import.Heap_block.t) -> ('b -> 'c Weak_hashtbl__.Import.Heap_block.t) Core_kernel__.Import.Staged.t
module Expert : sig ... end