let compute_pragmas () =
  Ast.compute ();
  let pragmas = ref [] in
  let visitor = object
    inherit Visitor.generic_frama_c_visitor
      (Project.current ()) (inplace_visit ())
    method vstmt_aux s =
      pragmas :=
        List.map
          (fun a -> s, a)
          (Annotations.get_filter Logic_utils.is_impact_pragma s)
      @ !pragmas;
      DoChildren
  end in
  (* fill [pragmas] with all the pragmas of all the selected functions *)
  Pragma.iter
    (fun s ->
       try
         match (Globals.Functions.find_def_by_name s).fundec with
         | Definition(f, _) -> ignore (visitFramacFunction visitor f)
         | Declaration _ -> assert false
       with Not_found ->
         fatal "function %s not found@." s);
  (* compute impact analyses on [!pragmas] *)
  let res = on_pragma (fun acc s -> compute_one_stmt s @ acc) [] !pragmas in
  if Options.Slicing.get () then ignore (slice res)