let remove_locals_keep_formals fundec =
  match fundec with
  | Definition (fundec,_) ->
      Zone.filter_base
         (fun v -> not (Base.is_local v fundec))
  | Declaration _ -> (fun v -> v)