<commit_before>let () =
  let files = ref []
  and debug = ref false in
    Arg.parse
      [("-D", Arg.Set debug, "Debugging mode");
       ("-V", Arg.Unit Debug.enable_validate, "Enable validation");
      ]
      (fun file -> files := !files @ [file])
      "ppcleantrace [-D] [-V] files";
    Log.default_setup !debug;
    List.iter
      (fun file -> file
         |> Trace.read_tracefile
         |> CleanTrace.clean_tracefile ~up_to:!level
         |> Printexc.print (Format.printf "%a@." TraceTypes.pp_clean_tracefile))
      !files
<commit_msg>Expose trace cleanup phases.<commit_after>let () =
  let level = ref CleanTrace.SynthesizeEvents in
  let files = ref []
  and debug = ref false in
    Arg.parse
      [("-D", Arg.Set debug, "Debugging mode");
       ("-V", Arg.Unit Debug.enable_validate, "Enable validation");
       ("-1", Arg.Unit (fun () -> level := CleanTrace.JustClean), "Only clean, no normalization");
       ("-2", Arg.Unit (fun () -> level := CleanTrace.Normalizations), "No call or getter/setter normalization");
       ("-3", Arg.Unit (fun () -> level := CleanTrace.SynthesizeGettersAndSetters), "No call normalization");
       ("-4", Arg.Unit (fun () -> level := CleanTrace.SynthesizeEvents), "Full normalization");
      ]
      (fun file -> files := !files @ [file])
      "ppcleantrace [-D] [-V] files";
    Log.default_setup !debug;
    List.iter
      (fun file -> file
         |> Trace.read_tracefile
         |> CleanTrace.clean_tracefile ~up_to:!level
         |> Printexc.print (Format.printf "%a@." TraceTypes.pp_clean_tracefile))
      !files

{'fraction_non_alphanumeric': 0.1604782882315922, 'fraction_numerical': 0.0025173064820641915, 'mean_word_length': 2.7411764705882353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5286771', 'n_tokens_mistral': 503, 'n_tokens_neox': 495, 'n_words': 128}