let compute_infos kf =
let stmts =
try
let f = Kernel_function.get_definition kf in f.sallstmts
with Kernel_function.No_Definition -> invalid_arg
"[traces] cannot compute for a leaf function"
in
let infos = States.create 50 in
let init tops s =
let tops, postdom =
try tops, ToReturn (!Db.Postdominators.stmt_postdominators kf s)
with Db.Postdominators.Top -> s::tops, Init
in
States.add infos s.sid postdom ;
tops
in
let tops = List.fold_left init [] stmts in
let _ = match tops with
| [] -> ()
| _ ->
begin
Cil.log "[traces] computing for function %a"
Kernel_function.pretty_name kf;
Cil.log "[traces] WARNING : experimental feature...";
Cil.log " -> infinite loop processing" ;
compute_on_infinite_traces infos tops
end
in infos