let main () =
  if Inout_parameters.ForceAccessPath.get () then
    !Db.Semantic_Callgraph.topologically_iter_on_functions
      (fun kf ->
         if Kernel_function.is_definition kf && !Db.Value.is_called kf then
           let state =
             Db.Value.get_state
               (Cil_types.Kstmt (Kernel_function.find_first_stmt kf))
           in
           let inputs = !Db.InOutContext.get_internal kf in
           let s = !Db.Access_path.compute state
             (Cvalue_type.Model.fold_base
                (fun base acc -> Base.Set.add base acc)
                (Relations_type.Model.value_state state)
                Base.Set.empty)
           in
           Inout_parameters.result
             "Filtered access_path for %a :@ %a@."
             Kernel_function.pretty_name kf
             !Db.Access_path.pretty
             (!Db.Access_path.filter s
                (Locations.Zone.filter_base
                   (fun b ->
                      not (Base.is_local b (Kernel_function.get_definition kf)))
                   inputs.Inout_type.over_inputs)))