CostDomain.BasicCostWithReason
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.
If the callee top cost and thus the caller has top cost, then
1. if for callee, top_pname_opt
is None
, then callee is itself top cost, so for the caller, we record top_pname_opt = callee
;
2. if for callee, top_pname_opt
is f
, then we know that callee calls f
, which is top cost, so for the caller, we record top_pname_opt = f
val one : t
val zero : t
val is_top : t -> bool
val of_basic_cost : BasicCost.t -> t
val is_unreachable : t -> bool
val subst :
IR.Procname.t ->
IBase.Location.t ->
t ->
BO.Bounds.Bound.eval_sym ->
BO.FuncPtr.Set.eval_func_ptrs ->
(IR.Procname.t -> t option) ->
default_closure_cost:BO.Ints.NonNegativeInt.t ->
t
val degree : t -> BO.Polynomials.Degree.t option
val polynomial_traces : t -> Absint.Errlog.loc_trace
val pp_hum : Stdlib.Format.formatter -> t -> unit