fact: Definition profile_parser {T stringT} (line : stringT) (parse : stringT -> bool) (num_times : nat) (duplicates_per_iteration : nat) (all_say_yes : T) (all_say_no : T) (mixed_answers : forall (yes no : nat), T) : T * list Ocaml.float := let parse_once := (fun x : unit => let () := x in parse line) in let starters := copy duplicates_per_iteration tt in let parse_many := (fun x : unit => let () := x in List.map parse_once starters) in let time_results := List.map (fun x : unit => let () := x in @profile (list bool) parse_many) (copy num_times tt) in let times := List.map fst time_results in let results := List.map snd time_results in ((if List.fold_right andb true (flatten1 results) then all_say_yes else if List.fold_right andb true (List.map negb (flatten1 results)) then all_say_no else mixed_answers (List.length (List.filter (fun x => x) (flatten1 results))) (List.length (List.filter negb (flatten1 results)))), times).
imports: Fiat.Common.Equality Fiat.Parsers.ParserFromParserADT Coq.ZArith.BinInt Fiat.Parsers.Refinement.Tactics Fiat.Common.BoolFacts Fiat.ADTNotation.BuildComputationalADT Fiat.Common.NatFacts Fiat.Parsers.StringLike.FirstCharSuchThat Coq.Strings.Ascii Coq.extraction.ExtrOcamlBasic Coq.extraction.ExtrOcamlNatInt Coq.extraction.ExtrOcamlZInt Coq.extraction.ExtrOcamlString Coq.extraction.ExtrOcamlIntConv Fiat.Parsers.ExtrOcamlPrimitives