let get_annot_zone kf stmt annot =
let add_zone z info =
let s = info.Db.Properties.Interp.To_zone.ki in
let before = info.Db.Properties.Interp.To_zone.before in
let zone = info.Db.Properties.Interp.To_zone.zone in
R.debug ~level:2 "[forward_prop_scope] need %a %s stmt %d@."
Locations.Zone.pretty zone
(if before then "before" else "after") s.sid;
if before && stmt.sid = s.sid then
Locations.Zone.join zone z
else
raise ToDo
in
let (info, _), _ =
!Db.Properties.Interp.To_zone.from_stmt_annot annot (stmt, kf)
in
match info with
| None -> raise ToDo
| Some info ->
let zone = List.fold_left add_zone Locations.Zone.bottom info in
R.debug "[get_annot_zone] need %a" Locations.Zone.pretty zone ;
zone