Module Costlib.CostDomain

module F = Stdlib.Format
module BasicCost : sig ... end
module BasicCostWithReason : sig ... end

This is for Call instruction. Most top cost function is caused by calling top-costed function. The extension aims to find the root callee with top cost.

module VariantCostMap : sig ... end
type summary = {
  1. post : t;
  2. is_on_ui_thread : bool;
}
val pp_summary : F.formatter -> summary -> unit
val get_cost_kind : IBase.CostKind.t -> t -> BasicCostWithReason.t
val get_operation_cost : t -> BasicCostWithReason.t
val set_operation_cost_zero : t -> t
val find_opt : IBase.CostKind.t -> t -> BasicCostWithReason.t option
val construct : f:(IBase.CostKind.t -> BasicCostWithReason.t) -> t
val zero_record : t

Map representing cost record {OperationCost:0; AllocationCost:0}

val mult_by : t -> nb_exec:BasicCost.t -> t

Special map where each element is multipli by the number of executions

val plus : t -> t -> t

Union of two maps where common costs are added together

val unit_cost_atomic_operation : t

Map representing cost record {OperationCost:1; AllocationCost:0}