let print_project och proj =
let get_slices var_fct =
let kf = Globals.Functions.get var_fct in
let fct_info = M.get_kf_fi proj kf in
M.fi_slices fct_info
in
let print_var_decl glob var _spec =
match var.Cil_types.vtype with
| Cil_types.TFun _ ->
PrintSlice.print_original_glob och glob
| _ -> PrintSlice.print_original_glob och glob
in
let print glob =
match glob with
| Cil_types.GVarDecl (spec, var, _) -> print_var_decl glob var spec
| Cil_types.GFun (func, _) ->
let slices = get_slices func.Cil_types.svar in
let rec print_slices slices =
match slices with [] -> ()
| s :: others -> PrintSlice.print_marked_ff och s;
print_slices others
in print_slices slices
| _ -> PrintSlice.print_original_glob och glob
in
let rec print_globs globs =
match globs with
| [] -> ()
| glob :: tail -> print glob ; print_globs tail
in
let source = Ast.get () in
let global_decls = source.Cil_types.globals in
print_globs global_decls