rocq/theories/Extract.v
Extraction of the model to OCaml: the decoder (decode_module), the interpreter's instance of the semantics, and judge, which the driver (extraction/main.ml) applies to every line nanofiloutcomes prints, and judge_valid, which it applies to rocq/mutants.pl's mutant verdicts (Transport.v). Integers become zarith's, strings OCaml's, and nat OCaml's int: the model's nats count list elements and rounds, and a unary one as large as the fuel of a big function (before Cfg.v, the square of its block count, a million for Lua's luaV_execute) overflowed the stack.
Maps.v's string_hash decides which bucket a name goes in, never an answer: a lookup compares the names in its bucket with name_eqb. So the extraction may use OCaml's own string hash; the Gallina one goes through eight integer operations per character, which made the validator twice as slow on small functions.
21Extract Constant Maps.string_hash => "(fun s h -> Big_int_Z.big_int_of_int ((Hashtbl.hash s + 31 * Big_int_Z.int_of_big_int h) land 0xFFFFF))".
26Extraction "nanofil_model.ml" term_eqb decode_module judge judge_valid.