method private compute_kf_with_def kf =
let f = Kernel_function.get_definition kf in
if List.exists (Kernel_function.equal kf) call_stack then (
if Db.Value.ignored_recursive_call kf then
Inout_parameters.warning ~current:true
"During %s analysis of %a: ignoring probable recursive call."
X.analysis_name Kernel_function.pretty kf;
self#add_cycle (Kernel_function.Hptset.singleton kf);
self#bottom
)
else
let computer = new do_it_cached (kf :: call_stack) in
ignore (visitFramacFunction (computer:>frama_c_visitor) f);
let v = computer#result in
let v = computer#clean_kf_result kf v in
let cycle_aux = Kernel_function.Hptset.remove kf computer#cycle in
self#add_cycle cycle_aux;
if Kernel_function.Hptset.is_empty cycle then (
Inout_parameters.debug "Caching %s result for %a"
X.analysis_name Kernel_function.pretty kf;
Memo.add kf v;
) else
Inout_parameters.debug
"Not caching %s result for %a because of cycle"
X.analysis_name Kernel_function.pretty kf;
v