let main () =
  let not_quiet = From_parameters.verbose_atleast 1 in
  let forcedeps = Parameters.Dynamic.Bool.get "-deps" in
  let forcecalldeps = Parameters.Dynamic.Bool.get "-calldeps" in
  if forcedeps then begin
    !Db.From.compute_all ();
    From_parameters.result "%t@\n====== DEPENDENCIES COMPUTED ======" !Db.From.display
  end;
  if forcecalldeps then !Db.From.compute_all_calldeps ();
  if not_quiet && forcecalldeps then begin
    From_parameters.result "====== DISPLAYING CALLWISE DEPENDENCIES ======@\n%t@\n====== END OF CALLWISE DEPENDENCIES ======"
      (fun fmt -> 
         !Db.From.Callwise.iter
           (fun ki d ->
              let id,typ =
                match ki with
                | Cil_types.Kglobal ->
                    "entry point",
                    Kernel_function.get_type (fst (Globals.entry_point ()))
                | Cil_types.Kstmt s ->
                    string_of_int s.Cil_types.sid,
                    match Db.Value.call_to_kernel_function s with
                    | [] -> assert false
                    | f :: _ -> Kernel_function.get_type f
              in
              Format.fprintf fmt 
                "@[call %s:@ %a@\n@]" 
                id (Function_Froms.pretty_with_type typ) d))
  end