let file_for_lang base lang =
  let dir = Wp_parameters.get_output () in
  let suffix =
    match lang with
      | L_altergo -> "_ergo.why"
      | L_why -> ".why"
      | L_coq -> ".v"
  in Printf.sprintf "%s/%s%s" dir base suffix