CostDomain.BasicCostWithReasonThis 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 : tval zero : tval is_top : t -> boolval of_basic_cost : BasicCost.t -> tval is_unreachable : t -> boolval 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 ->
tval degree : t -> BO.Polynomials.Degree.t optionval polynomial_traces : t -> Absint.Errlog.loc_traceval pp_hum : Stdlib.Format.formatter -> t -> unit