Module 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

type t = {
  1. cost : BasicCost.t;
  2. top_pname_opt : IR.Procname.t option;
}
val one : t
val zero : t
val is_top : t -> bool
val of_basic_cost : BasicCost.t -> t
val is_unreachable : t -> bool
val degree : t -> BO.Polynomials.Degree.t option
val polynomial_traces : t -> Absint.Errlog.loc_trace
val pp_hum : Stdlib.Format.formatter -> t -> unit