let get_data_scope_at_stmt kf stmt lval =
let dpds, _, zone = get_lval_zones ~for_writing:false stmt lval in
let zone = Locations.Zone.join dpds zone in
let allstmts, info = compute kf in
let modif_stmts = InitSid.find info zone in
let (f_scope, fb_scope, b_scope) =
find_scope allstmts modif_stmts stmt
in
R.debug
"@[<hv 4>get_data_scope_at_stmt %a at %d @\nmodified by = %a@\nf = %a@\nfb = %a@\nb = %a@]"
Locations.Zone.pretty zone stmt.sid
(Cilutil.pretty_list (Cilutil.space_sep " ") Stmt.pretty_sid)
(StmtSetLattice.to_list ~keep_default:false modif_stmts)
Stmt.Set.pretty f_scope
Stmt.Set.pretty fb_scope
Stmt.Set.pretty b_scope;
(f_scope, (fb_scope, b_scope))