Full Code of hacspec/hax for AI

main ad110bfa7a25 cached
1353 files
7.2 MB
2.0M tokens
5651 symbols
1 requests
Download .txt
Showing preview only (7,838K chars total). Download the full file or copy to clipboard to get everything.
Repository: hacspec/hax
Branch: main
Commit: ad110bfa7a25
Files: 1353
Total size: 7.2 MB

Directory structure:
gitextract_cva_42qr/

├── .cargo/
│   └── config.toml
├── .docker/
│   └── Dockerfile
├── .dockerignore
├── .envrc
├── .github/
│   ├── assets/
│   │   └── change-padding.sh
│   └── workflows/
│       ├── bertie.yml
│       ├── changelog.yml
│       ├── clippy_rust_engine.yml
│       ├── extract_and_run_coq.yml
│       ├── flake_lock.yml
│       ├── format.yml
│       ├── gh_pages.yml
│       ├── install_and_test.yml
│       ├── licenses.yml
│       ├── mldsa.yml
│       ├── mlkem.yml
│       ├── playwright-docs.yml
│       ├── release.yml
│       ├── rustc-coverage-tests.yml
│       ├── stale.yml
│       ├── test.yml
│       ├── test_installs.yml
│       └── this-month-in-hax.yml
├── .gitignore
├── .utils/
│   ├── jq_utils.jq
│   ├── rebuild.sh
│   ├── rust-by-example.js
│   └── this-month-in-hax-skeleton.sh
├── CHANGELOG.md
├── CI.md
├── CODEOWNERS
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE
├── PUBLISHING.md
├── README.md
├── cli/
│   ├── default.nix
│   ├── driver/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── callbacks_wrapper.rs
│   │       ├── driver.rs
│   │       ├── exporter.rs
│   │       └── features.rs
│   └── subcommands/
│       ├── Cargo.toml
│       ├── build.rs
│       └── src/
│           ├── cargo_hax.rs
│           ├── engine_debug_webapp/
│           │   ├── README.md
│           │   ├── mod.rs
│           │   └── static/
│           │       ├── index.html
│           │       └── script.js
│           └── json_schema.rs
├── deny.toml
├── dependabot.yml
├── docs/
│   ├── .test/
│   │   ├── .gitignore
│   │   ├── global-setup.ts
│   │   ├── package.json
│   │   ├── playwright.config.ts
│   │   └── tests/
│   │       └── docs.spec.ts
│   ├── RFCs/
│   │   ├── .nav.yml
│   │   ├── 0000-template.md
│   │   └── index.md
│   ├── blog/
│   │   ├── .authors.yml
│   │   ├── index.md
│   │   └── posts/
│   │       ├── announce-v0.1.md
│   │       ├── hax-for-everyone.md
│   │       ├── lucas-departure.md
│   │       ├── reworking-names/
│   │       │   └── reworking-names.md
│   │       ├── rust-gcd-1.md
│   │       ├── rust-gcd-2.md
│   │       └── this-month-in-hax/
│   │           ├── 2025-01.md
│   │           ├── 2025-02.md
│   │           ├── 2025-03.md
│   │           ├── 2025-04.md
│   │           ├── 2025-05.md
│   │           ├── 2025-06.md
│   │           ├── 2025-07.md
│   │           ├── 2025-08.md
│   │           ├── 2025-09.md
│   │           ├── 2025-10.md
│   │           ├── 2025-11.md
│   │           ├── 2026-01.md
│   │           ├── 2026-02.md
│   │           ├── 2026-03.md
│   │           └── 2026-04.md
│   ├── default.nix
│   ├── dev/
│   │   ├── architecture.md
│   │   ├── ast_ebnf.md
│   │   ├── docs.md
│   │   ├── index.md
│   │   └── libraries_macros.md
│   ├── engine/
│   │   ├── index.md
│   │   └── toolchain_structure/
│   │       └── index.md
│   ├── frontend/
│   │   ├── evaluation.md
│   │   └── index.md
│   ├── index.md
│   ├── javascripts/
│   │   ├── ansi_up.js
│   │   ├── fstar.js
│   │   ├── hax_playground.js
│   │   └── lz-string.js
│   ├── manual/
│   │   ├── faq/
│   │   │   ├── include-flags.md
│   │   │   ├── index.md
│   │   │   └── into.md
│   │   ├── fstar/
│   │   │   ├── .nav.yml
│   │   │   ├── index.md
│   │   │   ├── quick_start.md
│   │   │   └── tutorial/
│   │   │       ├── data-invariants.md
│   │   │       ├── index.md
│   │   │       ├── panic-freedom.md
│   │   │       ├── proofs/
│   │   │       │   └── fstar/
│   │   │       │       └── extraction/
│   │   │       │           ├── Makefile
│   │   │       │           ├── Tutorial_src.Math.Lemmas.fst
│   │   │       │           └── Tutorial_src.fst
│   │   │       └── properties.md
│   │   ├── index.md
│   │   └── lean/
│   │       ├── index.md
│   │       ├── internals.md
│   │       ├── quick_start.md
│   │       └── tutorial/
│   │           ├── index.md
│   │           ├── panic-freedom.md
│   │           └── properties.md
│   ├── overrides/
│   │   └── main.html
│   ├── publications.md
│   └── stylesheets/
│       ├── hax_playground.css
│       ├── logo.css
│       └── tags-colors.css
├── engine/
│   ├── .ocamlformat
│   ├── DEV.md
│   ├── backends/
│   │   ├── coq/
│   │   │   ├── coq/
│   │   │   │   ├── coq_backend.ml
│   │   │   │   ├── coq_backend.mli
│   │   │   │   └── dune
│   │   │   ├── coq_ast.ml
│   │   │   ├── dune
│   │   │   └── ssprove/
│   │   │       ├── dune
│   │   │       ├── ssprove_backend.ml
│   │   │       └── ssprove_backend.mli
│   │   ├── easycrypt/
│   │   │   ├── dune
│   │   │   ├── easycrypt_backend.ml
│   │   │   └── easycrypt_backend.mli
│   │   ├── fstar/
│   │   │   ├── dune
│   │   │   ├── fstar-surface-ast/
│   │   │   │   ├── .gitignore
│   │   │   │   ├── .ocamlformat-ignore
│   │   │   │   ├── FStar_BaseTypes.ml
│   │   │   │   ├── FStar_Char.ml
│   │   │   │   ├── FStar_Compiler_Effect.ml
│   │   │   │   ├── FStar_Compiler_List.ml
│   │   │   │   ├── FStar_Compiler_Range.ml
│   │   │   │   ├── FStar_Compiler_Util.ml
│   │   │   │   ├── FStar_Const.ml
│   │   │   │   ├── FStar_Errors.ml
│   │   │   │   ├── FStar_Errors_Codes.ml
│   │   │   │   ├── FStar_Getopt.ml
│   │   │   │   ├── FStar_Ident.ml
│   │   │   │   ├── FStar_ImmutableArray_Base.ml
│   │   │   │   ├── FStar_List.ml
│   │   │   │   ├── FStar_Parser_AST.ml
│   │   │   │   ├── FStar_Parser_AST_Util.ml
│   │   │   │   ├── FStar_Parser_Const.ml
│   │   │   │   ├── FStar_Parser_Driver.ml
│   │   │   │   ├── FStar_Parser_LexFStar.ml
│   │   │   │   ├── FStar_Parser_Parse.ml
│   │   │   │   ├── FStar_Parser_ParseIt.ml
│   │   │   │   ├── FStar_Parser_ToDocument.ml
│   │   │   │   ├── FStar_Parser_Utf8.ml
│   │   │   │   ├── FStar_Parser_Util.ml
│   │   │   │   ├── FStar_Pervasives.ml
│   │   │   │   ├── FStar_Pervasives_Native.ml
│   │   │   │   ├── FStar_Pprint.ml
│   │   │   │   ├── FStar_Sedlexing.ml
│   │   │   │   ├── FStar_String.ml
│   │   │   │   ├── FStar_VConfig.ml
│   │   │   │   ├── README
│   │   │   │   ├── dune
│   │   │   │   ├── prims.ml
│   │   │   │   └── z.ml
│   │   │   ├── fstar_ast.ml
│   │   │   ├── fstar_backend.ml
│   │   │   └── fstar_backend.mli
│   │   ├── lean/
│   │   │   ├── dune
│   │   │   └── lean_backend.ml
│   │   └── proverif/
│   │       ├── dune
│   │       ├── proverif_backend.ml
│   │       └── proverif_backend.mli
│   ├── bin/
│   │   ├── dune
│   │   ├── dune-js
│   │   ├── js_driver.ml
│   │   ├── js_stubs/
│   │   │   ├── mutex.js
│   │   │   ├── stdint.js
│   │   │   └── unix.js
│   │   ├── lib.ml
│   │   ├── lib.mli
│   │   └── native_driver.ml
│   ├── default.nix
│   ├── doc/
│   │   ├── dune
│   │   └── index.mld
│   ├── dune-project
│   ├── hax-engine.opam
│   ├── hax-engine.opam.template
│   ├── lib/
│   │   ├── analyses/
│   │   │   ├── function_dependency.ml
│   │   │   └── mutable_variables.ml
│   │   ├── analyses.ml
│   │   ├── ast.ml
│   │   ├── ast_builder.ml
│   │   ├── ast_destruct.ml
│   │   ├── ast_utils.ml
│   │   ├── attr_payloads.ml
│   │   ├── backend.ml
│   │   ├── concrete_ident/
│   │   │   ├── concrete_ident.ml
│   │   │   ├── concrete_ident.mli
│   │   │   ├── concrete_ident_render_sig.ml
│   │   │   ├── concrete_ident_types.ml
│   │   │   ├── concrete_ident_view.ml
│   │   │   ├── concrete_ident_view.mli
│   │   │   ├── concrete_ident_view_types.ml
│   │   │   ├── explicit_def_id.ml
│   │   │   ├── explicit_def_id.mli
│   │   │   ├── impl_infos.ml
│   │   │   └── thir_simple_types.ml
│   │   ├── dependencies.ml
│   │   ├── dependencies.mli
│   │   ├── deprecated_generic_printer/
│   │   │   ├── deprecated_generic_printer.ml
│   │   │   ├── deprecated_generic_printer.mli
│   │   │   └── deprecated_generic_printer_base.ml
│   │   ├── diagnostics.ml
│   │   ├── dune
│   │   ├── export_ast.ml
│   │   ├── feature_gate.ml
│   │   ├── features.ml
│   │   ├── generic_printer/
│   │   │   ├── generic_printer.ml
│   │   │   ├── generic_printer_template.generate.js
│   │   │   └── generic_printer_template.ml
│   │   ├── hax_io.ml
│   │   ├── import_ast.ml
│   │   ├── import_thir.ml
│   │   ├── import_thir.mli
│   │   ├── local_ident.ml
│   │   ├── local_ident.mli
│   │   ├── phase_utils.ml
│   │   ├── phases/
│   │   │   ├── phase_and_mut_defsite.ml
│   │   │   ├── phase_and_mut_defsite.mli
│   │   │   ├── phase_bundle_cycles.ml
│   │   │   ├── phase_bundle_cycles.mli
│   │   │   ├── phase_cf_into_monads.ml
│   │   │   ├── phase_cf_into_monads.mli
│   │   │   ├── phase_direct_and_mut.ml
│   │   │   ├── phase_direct_and_mut.mli
│   │   │   ├── phase_drop_blocks.ml
│   │   │   ├── phase_drop_blocks.mli
│   │   │   ├── phase_drop_match_guards.ml
│   │   │   ├── phase_drop_match_guards.mli
│   │   │   ├── phase_drop_references.ml
│   │   │   ├── phase_drop_references.mli
│   │   │   ├── phase_drop_return_break_continue.ml
│   │   │   ├── phase_drop_return_break_continue.mli
│   │   │   ├── phase_drop_sized_trait.ml
│   │   │   ├── phase_drop_sized_trait.mli
│   │   │   ├── phase_explicit_conversions.ml
│   │   │   ├── phase_explicit_conversions.mli
│   │   │   ├── phase_functionalize_loops.ml
│   │   │   ├── phase_functionalize_loops.mli
│   │   │   ├── phase_hoist_disjunctive_patterns.ml
│   │   │   ├── phase_hoist_disjunctive_patterns.mli
│   │   │   ├── phase_local_mutation.ml
│   │   │   ├── phase_local_mutation.mli
│   │   │   ├── phase_newtype_as_refinement.ml
│   │   │   ├── phase_newtype_as_refinement.mli
│   │   │   ├── phase_reconstruct_asserts.ml
│   │   │   ├── phase_reconstruct_asserts.mli
│   │   │   ├── phase_reconstruct_for_index_loops.ml
│   │   │   ├── phase_reconstruct_for_index_loops.mli
│   │   │   ├── phase_reconstruct_for_loops.ml
│   │   │   ├── phase_reconstruct_for_loops.mli
│   │   │   ├── phase_reconstruct_question_marks.ml
│   │   │   ├── phase_reconstruct_question_marks.mli
│   │   │   ├── phase_reconstruct_while_loops.ml
│   │   │   ├── phase_reconstruct_while_loops.mli
│   │   │   ├── phase_reject.ml
│   │   │   ├── phase_reject_impl_type_method.ml
│   │   │   ├── phase_reject_impl_type_method.mli
│   │   │   ├── phase_reorder_fields.ml
│   │   │   ├── phase_reorder_fields.mli
│   │   │   ├── phase_rewrite_control_flow.ml
│   │   │   ├── phase_rewrite_control_flow.mli
│   │   │   ├── phase_rewrite_local_self.ml
│   │   │   ├── phase_rewrite_local_self.mli
│   │   │   ├── phase_simplify_hoisting.ml
│   │   │   ├── phase_simplify_hoisting.mli
│   │   │   ├── phase_simplify_match_return.ml
│   │   │   ├── phase_simplify_match_return.mli
│   │   │   ├── phase_simplify_question_marks.ml
│   │   │   ├── phase_simplify_question_marks.mli
│   │   │   ├── phase_sort_items.ml
│   │   │   ├── phase_sort_items.mli
│   │   │   ├── phase_sort_items_namespace_wise.ml
│   │   │   ├── phase_sort_items_namespace_wise.mli
│   │   │   ├── phase_specialize.ml
│   │   │   ├── phase_specialize.mli
│   │   │   ├── phase_traits_specs.ml
│   │   │   ├── phase_traits_specs.mli
│   │   │   ├── phase_transform_hax_lib_inline.ml
│   │   │   ├── phase_transform_hax_lib_inline.mli
│   │   │   ├── phase_trivialize_assign_lhs.ml
│   │   │   └── phase_trivialize_assign_lhs.mli
│   │   ├── phases.ml
│   │   ├── prelude.ml
│   │   ├── print_rust.ml
│   │   ├── print_rust.mli
│   │   ├── profiling.ml
│   │   ├── rust_engine_types.ml
│   │   ├── side_effect_utils.ml
│   │   ├── span.ml
│   │   ├── span.mli
│   │   ├── subtype.ml
│   │   ├── untyped_phases/
│   │   │   ├── gen.js
│   │   │   └── untyped_phases.ml
│   │   └── utils.ml
│   ├── names/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── extract/
│   │   │   ├── Cargo.toml
│   │   │   ├── build.rs
│   │   │   └── src/
│   │   │       └── main.rs
│   │   └── src/
│   │       ├── crypto_abstractions.rs
│   │       └── lib.rs
│   └── utils/
│       ├── generate_from_ast/
│       │   ├── README.md
│       │   ├── codegen_ast_builder.ml
│       │   ├── codegen_ast_destruct.ml
│       │   ├── codegen_printer.ml
│       │   ├── codegen_visitor.ml
│       │   ├── dune
│       │   ├── errors.ml
│       │   ├── generate_from_ast.ml
│       │   ├── primitive_types.ml
│       │   ├── types.ml
│       │   ├── utils.ml
│       │   └── visitors.ml
│       ├── hacspeclib-macro-parser/
│       │   ├── dune
│       │   └── hacspeclib_macro_parser.ml
│       ├── ocaml_of_json_schema/
│       │   └── ocaml_of_json_schema.js
│       ├── ppx_functor_application/
│       │   ├── README.md
│       │   ├── dune
│       │   └── ppx_functor_application.ml
│       ├── ppx_generate_features/
│       │   ├── README.md
│       │   ├── dune
│       │   └── ppx_generate_features.ml
│       ├── ppx_inline/
│       │   ├── README.md
│       │   ├── dune
│       │   └── ppx_inline.ml
│       ├── ppx_phases_index/
│       │   ├── README.md
│       │   ├── dune
│       │   └── ppx_phases_index.ml
│       ├── sourcemaps/
│       │   ├── base64.ml
│       │   ├── dune
│       │   ├── location.ml
│       │   ├── mappings/
│       │   │   ├── dual.ml
│       │   │   ├── instruction.ml
│       │   │   ├── mappings.ml
│       │   │   ├── mappings.mli
│       │   │   ├── spanned.ml
│       │   │   └── types.ml
│       │   ├── prelude.ml
│       │   ├── source_maps.ml
│       │   ├── source_maps.mli
│       │   └── vql.ml
│       └── universe-hash.sh
├── examples/
│   ├── .envrc
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── Makefile
│   ├── README.md
│   ├── barrett/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   ├── fstar/
│   │   │   │   └── extraction/
│   │   │   │       └── Makefile
│   │   │   ├── lean/
│   │   │   │   ├── lakefile.toml
│   │   │   │   └── lean-toolchain
│   │   │   └── rust/
│   │   │       └── extraction/
│   │   │           └── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── chacha20/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   ├── coq/
│   │   │   │   └── extraction/
│   │   │   │       ├── Chacha20.Hacspec_helper.v
│   │   │   │       └── Chacha20.v
│   │   │   └── fstar/
│   │   │       └── extraction/
│   │   │           ├── Chacha20.Hacspec_helper.fst
│   │   │           ├── Chacha20.fst
│   │   │           └── Makefile
│   │   ├── src/
│   │   │   ├── hacspec_helper.rs
│   │   │   └── lib.rs
│   │   └── tests/
│   │       └── kat.rs
│   ├── commonArgs.nix
│   ├── coq-example/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── proofs/
│   │   │   └── coq/
│   │   │       └── extraction/
│   │   │           ├── Coq_example.v
│   │   │           ├── Coq_example_Dummy_core_lib.v
│   │   │           ├── Coq_proofs.v
│   │   │           ├── Makefile
│   │   │           └── dummy_core_lib.v
│   │   └── src/
│   │       ├── dummy_core_lib.rs
│   │       └── lib.rs
│   ├── coverage/
│   │   ├── Cargo.toml
│   │   ├── default.nix
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── test_arrays.rs
│   │       ├── test_closures.rs
│   │       ├── test_enum.rs
│   │       ├── test_functions.rs
│   │       ├── test_instance.rs
│   │       ├── test_primitives.rs
│   │       ├── test_sequence.rs
│   │       ├── test_struct.rs
│   │       └── test_trait.rs
│   ├── default.nix
│   ├── hax.fst.config.json
│   ├── kyber_compress/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── fstar/
│   │   │       └── extraction/
│   │   │           └── Makefile
│   │   └── src/
│   │       └── lib.rs
│   ├── lean_adc/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── lean/
│   │   │       ├── lake-manifest.json
│   │   │       ├── lakefile.toml
│   │   │       └── lean-toolchain
│   │   └── src/
│   │       └── lib.rs
│   ├── lean_barrett/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── lean/
│   │   │       ├── lake-manifest.json
│   │   │       ├── lakefile.toml
│   │   │       └── lean-toolchain
│   │   └── src/
│   │       └── lib.rs
│   ├── lean_chacha20/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── lean/
│   │   │       ├── lake-manifest.json
│   │   │       ├── lakefile.toml
│   │   │       └── lean-toolchain
│   │   └── src/
│   │       ├── hacspec_helper.rs
│   │       └── lib.rs
│   ├── lean_tutorial/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── lean/
│   │   │       ├── lake-manifest.json
│   │   │       ├── lakefile.toml
│   │   │       └── lean-toolchain
│   │   └── src/
│   │       └── lib.rs
│   ├── limited-order-book/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── README.md
│   │   ├── lob_backend.did
│   │   ├── proofs/
│   │   │   ├── coq/
│   │   │   │   └── extraction/
│   │   │   │       └── Lob_backend.v
│   │   │   └── fstar/
│   │   │       └── extraction/
│   │   │           ├── Lob_backend.fst
│   │   │           └── Makefile
│   │   └── src/
│   │       ├── canister.rs
│   │       └── lib.rs
│   ├── proverif-psk/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── proofs/
│   │   │   └── proverif/
│   │   │       └── analysis.pv
│   │   ├── psk.pv
│   │   ├── pv_div_by_zero_fix.diff
│   │   └── src/
│   │       └── lib.rs
│   └── sha256/
│       ├── .gitignore
│       ├── Cargo.toml
│       ├── Makefile
│       ├── proofs/
│       │   ├── coq/
│       │   │   └── extraction/
│       │   │       └── Sha256.v
│       │   └── fstar/
│       │       └── extraction/
│       │           ├── Makefile
│       │           └── Sha256.fst
│       ├── src/
│       │   └── sha256.rs
│       └── tests/
│           └── test_sha256.rs
├── flake.nix
├── frontend/
│   └── exporter/
│       ├── Cargo.toml
│       ├── README.md
│       ├── adt-into/
│       │   ├── .gitignore
│       │   ├── Cargo.toml
│       │   ├── README.md
│       │   ├── src/
│       │   │   └── lib.rs
│       │   └── tests/
│       │       └── lib.rs
│       ├── default.nix
│       ├── options/
│       │   ├── Cargo.toml
│       │   └── src/
│       │       └── lib.rs
│       └── src/
│           ├── body.rs
│           ├── comments.rs
│           ├── constant_utils/
│           │   └── uneval.rs
│           ├── constant_utils.rs
│           ├── deterministic_hash.rs
│           ├── id_table.rs
│           ├── index_vec.rs
│           ├── lib.rs
│           ├── prelude.rs
│           ├── rustc_utils.rs
│           ├── sinto.rs
│           ├── state.rs
│           ├── traits/
│           │   ├── resolution.rs
│           │   └── utils.rs
│           ├── traits.rs
│           ├── types/
│           │   ├── attributes.rs
│           │   ├── def_id.rs
│           │   ├── hir.rs
│           │   ├── mir.rs
│           │   ├── mod.rs
│           │   ├── new/
│           │   │   ├── full_def.rs
│           │   │   ├── impl_infos.rs
│           │   │   ├── item_attributes.rs
│           │   │   ├── mod.rs
│           │   │   ├── predicate_id.rs
│           │   │   ├── synthetic_items.rs
│           │   │   └── variant_infos.rs
│           │   ├── serialize_int.rs
│           │   ├── span.rs
│           │   ├── thir.rs
│           │   └── ty.rs
│           └── utils/
│               ├── error_macros.rs
│               ├── mod.rs
│               └── type_map.rs
├── hax-bounded-integers/
│   ├── Cargo.toml
│   ├── proofs/
│   │   └── fstar/
│   │       └── extraction/
│   │           ├── Hax_bounded_integers.Num_traits.fst
│   │           └── Hax_bounded_integers.fst
│   └── src/
│       ├── lib.rs
│       └── num_traits.rs
├── hax-lib/
│   ├── Cargo.toml
│   ├── README.md
│   ├── build.rs
│   ├── core-models/
│   │   ├── .gitignore
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── alloc/
│   │   │   ├── Cargo.toml
│   │   │   └── src/
│   │   │       └── lib.rs
│   │   ├── hax.sh
│   │   ├── rand_core/
│   │   │   ├── Cargo.toml
│   │   │   └── src/
│   │   │       └── lib.rs
│   │   ├── rust_primitives/
│   │   │   ├── Cargo.toml
│   │   │   └── src/
│   │   │       └── lib.rs
│   │   ├── src/
│   │   │   ├── core/
│   │   │   │   ├── array.rs
│   │   │   │   ├── borrow.rs
│   │   │   │   ├── clone.rs
│   │   │   │   ├── cmp.rs
│   │   │   │   ├── convert.rs
│   │   │   │   ├── default.rs
│   │   │   │   ├── error.rs
│   │   │   │   ├── f32.rs
│   │   │   │   ├── fmt.rs
│   │   │   │   ├── hash.rs
│   │   │   │   ├── hint.rs
│   │   │   │   ├── iter.rs
│   │   │   │   ├── marker.rs
│   │   │   │   ├── mem.rs
│   │   │   │   ├── num/
│   │   │   │   │   ├── error.rs
│   │   │   │   │   └── mod.rs
│   │   │   │   ├── ops.rs
│   │   │   │   ├── option.rs
│   │   │   │   ├── panicking.rs
│   │   │   │   ├── result.rs
│   │   │   │   ├── slice.rs
│   │   │   │   └── str.rs
│   │   │   └── lib.rs
│   │   └── std/
│   │       ├── Cargo.toml
│   │       └── src/
│   │           └── lib.rs
│   ├── macros/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── src/
│   │   │   ├── dummy.rs
│   │   │   ├── hax_paths.rs
│   │   │   ├── impl_fn_decoration.rs
│   │   │   ├── implementation.rs
│   │   │   ├── lib.rs
│   │   │   ├── quote.rs
│   │   │   ├── rewrite_self.rs
│   │   │   ├── syn_ext.rs
│   │   │   └── utils.rs
│   │   └── types/
│   │       ├── Cargo.toml
│   │       ├── README.md
│   │       └── src/
│   │           └── lib.rs
│   ├── proof-libs/
│   │   ├── coq/
│   │   │   ├── coq/
│   │   │   │   ├── .gitignore
│   │   │   │   ├── default.nix
│   │   │   │   └── generated-core/
│   │   │   │       ├── _CoqProject
│   │   │   │       ├── phase_library/
│   │   │   │       │   ├── ControlFlow.v
│   │   │   │       │   ├── NumberNotation.v
│   │   │   │       │   └── TODO.v
│   │   │   │       ├── spec/
│   │   │   │       │   ├── Core_Base_Spec.v
│   │   │   │       │   ├── Core_Base_Spec_Binary.v
│   │   │   │       │   ├── Core_Base_Spec_Binary_Pos.v
│   │   │   │       │   ├── Core_Base_Spec_Binary_Positive.v
│   │   │   │       │   ├── Core_Base_Spec_Constants.v
│   │   │   │       │   ├── Core_Base_Spec_Haxint.v
│   │   │   │       │   ├── Core_Base_Spec_Seq.v
│   │   │   │       │   ├── Core_Base_Spec_Unary.v
│   │   │   │       │   └── Core_Base_Spec_Z.v
│   │   │   │       └── src/
│   │   │   │           ├── Core.v
│   │   │   │           ├── Core_Array.v
│   │   │   │           ├── Core_Array_Iter.v
│   │   │   │           ├── Core_Array_Rec_bundle_579704328.v
│   │   │   │           ├── Core_Base.v
│   │   │   │           ├── Core_Base_Binary.v
│   │   │   │           ├── Core_Base_Number_conversion.v
│   │   │   │           ├── Core_Base_Pos.v
│   │   │   │           ├── Core_Base_Seq.v
│   │   │   │           ├── Core_Base_Z.v
│   │   │   │           ├── Core_Base_interface.v
│   │   │   │           ├── Core_Base_interface_Coerce.v
│   │   │   │           ├── Core_Base_interface_Int.v
│   │   │   │           ├── Core_Base_interface_Int_I128_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_I16_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_I32_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_I64_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_I8_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U128_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U16_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U32_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U64_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U8_proofs.v
│   │   │   │           ├── Core_Clone.v
│   │   │   │           ├── Core_Cmp.v
│   │   │   │           ├── Core_Convert.v
│   │   │   │           ├── Core_Fmt.v
│   │   │   │           ├── Core_Intrinsics.v
│   │   │   │           ├── Core_Iter.v
│   │   │   │           ├── Core_Iter_Range.v
│   │   │   │           ├── Core_Iter_Traits.v
│   │   │   │           ├── Core_Iter_Traits_Collect.v
│   │   │   │           ├── Core_Iter_Traits_Exact_size.v
│   │   │   │           ├── Core_Iter_Traits_Iterator.v
│   │   │   │           ├── Core_Iter_Traits_Marker.v
│   │   │   │           ├── Core_Marker.v
│   │   │   │           ├── Core_Num.v
│   │   │   │           ├── Core_Num_Int_macros.v
│   │   │   │           ├── Core_Num_Uint_macros.v
│   │   │   │           ├── Core_Ops.v
│   │   │   │           ├── Core_Ops_Arith.v
│   │   │   │           ├── Core_Ops_Arith_Impls_for_prims.v
│   │   │   │           ├── Core_Ops_Bit.v
│   │   │   │           ├── Core_Ops_Bit_Impls_for_prims.v
│   │   │   │           ├── Core_Ops_Function.v
│   │   │   │           ├── Core_Ops_Index.v
│   │   │   │           ├── Core_Ops_Index_range.v
│   │   │   │           ├── Core_Ops_Range.v
│   │   │   │           ├── Core_Option.v
│   │   │   │           ├── Core_Panicking.v
│   │   │   │           ├── Core_Primitive.v
│   │   │   │           ├── Core_Primitive_Number_conversion.v
│   │   │   │           ├── Core_Primitive_Number_conversion_i.v
│   │   │   │           ├── Core_Result.v
│   │   │   │           ├── Core_Slice.v
│   │   │   │           ├── Core_Slice_Index.v
│   │   │   │           ├── Core_Slice_Index_Private_slice_index.v
│   │   │   │           ├── Core_Slice_Iter.v
│   │   │   │           ├── Core_Slice_Iter_Macros.v
│   │   │   │           └── _CoqProject
│   │   │   └── ssprove/
│   │   │       ├── .gitignore
│   │   │       ├── README.md
│   │   │       ├── _CoqProject
│   │   │       ├── coq-hacspec-ssprove.opam.template
│   │   │       ├── docker_build/
│   │   │       │   └── Dockerfile
│   │   │       └── src/
│   │   │           ├── ChoiceEquality.v
│   │   │           ├── ConCertLib.v
│   │   │           ├── Hacspec_Lib.v
│   │   │           ├── Hacspec_Lib_Coercions.v
│   │   │           ├── Hacspec_Lib_Comparable.v
│   │   │           ├── Hacspec_Lib_Controlflow.v
│   │   │           ├── Hacspec_Lib_Eq.v
│   │   │           ├── Hacspec_Lib_Integers.v
│   │   │           ├── Hacspec_Lib_Loops.v
│   │   │           ├── Hacspec_Lib_Ltac.v
│   │   │           ├── Hacspec_Lib_Monad.v
│   │   │           ├── Hacspec_Lib_Natmod.v
│   │   │           ├── Hacspec_Lib_Notation.v
│   │   │           ├── Hacspec_Lib_Pre.v
│   │   │           ├── Hacspec_Lib_Seq.v
│   │   │           ├── Hacspec_Lib_TODO.v
│   │   │           ├── LocationUtility.v
│   │   │           └── dune
│   │   ├── fstar/
│   │   │   ├── .envrc
│   │   │   ├── Makefile.copy
│   │   │   ├── README.md
│   │   │   ├── core/
│   │   │   │   ├── Alloc.Alloc.fst
│   │   │   │   ├── Alloc.Borrow.fst
│   │   │   │   ├── Alloc.Boxed.fst
│   │   │   │   ├── Alloc.Collections.Binary_heap.fst
│   │   │   │   ├── Alloc.Collections.Btree.Set.fsti
│   │   │   │   ├── Alloc.Collections.Vec_deque.fsti
│   │   │   │   ├── Alloc.Fmt.fst
│   │   │   │   ├── Alloc.Slice.fst
│   │   │   │   ├── Alloc.String.fst
│   │   │   │   ├── Alloc.Vec.Drain.fst
│   │   │   │   ├── Alloc.Vec.Into_iter.fsti
│   │   │   │   ├── Alloc.Vec.fst
│   │   │   │   ├── Core_models.Array.Iter.fst
│   │   │   │   ├── Core_models.Array.fst
│   │   │   │   ├── Core_models.Borrow.fsti
│   │   │   │   ├── Core_models.Bundle.fst
│   │   │   │   ├── Core_models.Clone.fst
│   │   │   │   ├── Core_models.Cmp.fst
│   │   │   │   ├── Core_models.Convert.fst
│   │   │   │   ├── Core_models.Core_arch.Arm_shared.Neon.fsti
│   │   │   │   ├── Core_models.Core_arch.X86.Pclmulqdq.fsti
│   │   │   │   ├── Core_models.Core_arch.X86.Sse2.fsti
│   │   │   │   ├── Core_models.Core_arch.X86.fsti
│   │   │   │   ├── Core_models.Core_arch.X86_64_.Sse2.fsti
│   │   │   │   ├── Core_models.Core_arch.fsti
│   │   │   │   ├── Core_models.Default.fsti
│   │   │   │   ├── Core_models.Error.fsti
│   │   │   │   ├── Core_models.F32.fst
│   │   │   │   ├── Core_models.Fmt.Rt.fsti
│   │   │   │   ├── Core_models.Fmt.fsti
│   │   │   │   ├── Core_models.Hash.fsti
│   │   │   │   ├── Core_models.Hint.fsti
│   │   │   │   ├── Core_models.Iter.Adapters.Enumerate.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Flat_map.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Flatten.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Map.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Rev.fsti
│   │   │   │   ├── Core_models.Iter.Adapters.Step_by.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Take.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Zip.fst
│   │   │   │   ├── Core_models.Iter.Bundle.fst
│   │   │   │   ├── Core_models.Iter.Sources.Repeat_with.fsti
│   │   │   │   ├── Core_models.Iter.Traits.Collect.fst
│   │   │   │   ├── Core_models.Iter.Traits.Iterator.fst
│   │   │   │   ├── Core_models.Iter.Traits.fst
│   │   │   │   ├── Core_models.Marker.fst
│   │   │   │   ├── Core_models.Mem.Manually_drop.fsti
│   │   │   │   ├── Core_models.Mem.Maybe_uninit.fsti
│   │   │   │   ├── Core_models.Mem.Transmutability.fsti
│   │   │   │   ├── Core_models.Mem.fsti
│   │   │   │   ├── Core_models.Num.Error.fsti
│   │   │   │   ├── Core_models.Num.Niche_types.fsti
│   │   │   │   ├── Core_models.Num.fst
│   │   │   │   ├── Core_models.Ops.Arith.fsti
│   │   │   │   ├── Core_models.Ops.Bit.fsti
│   │   │   │   ├── Core_models.Ops.Control_flow.fst
│   │   │   │   ├── Core_models.Ops.Deref.fst
│   │   │   │   ├── Core_models.Ops.Drop.fst
│   │   │   │   ├── Core_models.Ops.Function.fst
│   │   │   │   ├── Core_models.Ops.Index.IndexMut.fst
│   │   │   │   ├── Core_models.Ops.Index.Index_mut.fst
│   │   │   │   ├── Core_models.Ops.Index.fst
│   │   │   │   ├── Core_models.Ops.Range.fst
│   │   │   │   ├── Core_models.Ops.Try_trait.fst
│   │   │   │   ├── Core_models.Option.fst
│   │   │   │   ├── Core_models.Panicking.Internal.fsti
│   │   │   │   ├── Core_models.Panicking.fst
│   │   │   │   ├── Core_models.Result.fst
│   │   │   │   ├── Core_models.Slice.Iter.fst
│   │   │   │   ├── Core_models.Slice.fst
│   │   │   │   ├── Core_models.Str.Converts.fsti
│   │   │   │   ├── Core_models.Str.Error.fsti
│   │   │   │   ├── Core_models.Str.Iter.fsti
│   │   │   │   ├── Core_models.Str.Traits.fsti
│   │   │   │   ├── Core_models.Str.fsti
│   │   │   │   ├── Core_models.Time.fsti
│   │   │   │   ├── Core_models.TypeClassPlaceHolder.fst
│   │   │   │   ├── Core_models.fst
│   │   │   │   ├── Makefile
│   │   │   │   ├── README.md
│   │   │   │   ├── Rand.Distr.Distribution.fsti
│   │   │   │   ├── Rand.Distr.Integer.fsti
│   │   │   │   ├── Rand.Distributions.Distribution.fsti
│   │   │   │   ├── Rand.Distributions.Integer.fsti
│   │   │   │   ├── Rand.Rng.fsti
│   │   │   │   ├── Rand_core.Os.fsti
│   │   │   │   ├── Rand_core.fsti
│   │   │   │   ├── Std.Collections.Hash.Map.fsti
│   │   │   │   ├── Std.F64.fsti
│   │   │   │   ├── Std.Hash.Random.fsti
│   │   │   │   ├── Std.Io.Error.fsti
│   │   │   │   ├── Std.Io.Impls.fsti
│   │   │   │   ├── Std.Io.Stdio.fsti
│   │   │   │   └── Std.Io.fsti
│   │   │   ├── hax_lib/
│   │   │   │   └── Makefile
│   │   │   └── rust_primitives/
│   │   │       ├── Makefile
│   │   │       ├── Rust_primitives.Arithmetic.fsti
│   │   │       ├── Rust_primitives.Arrays.fsti
│   │   │       ├── Rust_primitives.BitVectors.fsti
│   │   │       ├── Rust_primitives.Char.fsti
│   │   │       ├── Rust_primitives.Float.fsti
│   │   │       ├── Rust_primitives.Hax.Control_flow_monad.Mexception.fst
│   │   │       ├── Rust_primitives.Hax.Control_flow_monad.Moption.fst
│   │   │       ├── Rust_primitives.Hax.Control_flow_monad.Mresult.fst
│   │   │       ├── Rust_primitives.Hax.Folds.fsti
│   │   │       ├── Rust_primitives.Hax.Int.fst
│   │   │       ├── Rust_primitives.Hax.Monomorphized_update_at.fsti
│   │   │       ├── Rust_primitives.Hax.fst
│   │   │       ├── Rust_primitives.Integers.fsti
│   │   │       ├── Rust_primitives.Iterators.fsti
│   │   │       ├── Rust_primitives.Mem.fsti
│   │   │       ├── Rust_primitives.Notations.fsti
│   │   │       ├── Rust_primitives.Sequence.fst
│   │   │       ├── Rust_primitives.Slice.fsti
│   │   │       ├── Rust_primitives.String.fsti
│   │   │       └── Rust_primitives.fst
│   │   ├── fstar-secret-integers/
│   │   │   ├── .envrc
│   │   │   ├── Makefile.copy
│   │   │   ├── README.md
│   │   │   ├── core/
│   │   │   │   ├── Alloc.Alloc.fst
│   │   │   │   ├── Alloc.Collections.Binary_heap.fsti
│   │   │   │   ├── Alloc.Slice.fst
│   │   │   │   ├── Alloc.Vec.fst
│   │   │   │   ├── Core.Array.Iter.fsti
│   │   │   │   ├── Core.Array.fst
│   │   │   │   ├── Core.Clone.fst
│   │   │   │   ├── Core.Cmp.fsti
│   │   │   │   ├── Core.Convert.fst
│   │   │   │   ├── Core.Iter.Adapters.Enumerate.fst
│   │   │   │   ├── Core.Iter.Adapters.Step_by.fst
│   │   │   │   ├── Core.Iter.Traits.Collect.fst
│   │   │   │   ├── Core.Iter.Traits.Iterator.fst
│   │   │   │   ├── Core.Iter.fsti
│   │   │   │   ├── Core.Marker.fst
│   │   │   │   ├── Core.Num.Error.fsti
│   │   │   │   ├── Core.Num.fsti
│   │   │   │   ├── Core.Ops.Arith.Neg.fsti
│   │   │   │   ├── Core.Ops.Arith.fsti
│   │   │   │   ├── Core.Ops.Control_flow.fst
│   │   │   │   ├── Core.Ops.Deref.fst
│   │   │   │   ├── Core.Ops.Index.IndexMut.fst
│   │   │   │   ├── Core.Ops.Index.fst
│   │   │   │   ├── Core.Ops.Range.fsti
│   │   │   │   ├── Core.Ops.Try_trait.fst
│   │   │   │   ├── Core.Ops.fst
│   │   │   │   ├── Core.Option.fst
│   │   │   │   ├── Core.Panicking.fst
│   │   │   │   ├── Core.Result.fst
│   │   │   │   ├── Core.Slice.Iter.fst
│   │   │   │   ├── Core.Slice.fsti
│   │   │   │   ├── Core.Str.Converts.fsti
│   │   │   │   ├── Core.Str.Error.fsti
│   │   │   │   ├── Core.Str.fsti
│   │   │   │   ├── Core.fst
│   │   │   │   ├── Makefile
│   │   │   │   └── README.md
│   │   │   ├── hax_lib/
│   │   │   │   └── Makefile
│   │   │   └── rust_primitives/
│   │   │       ├── Makefile
│   │   │       ├── Rust_primitives.Arrays.fst
│   │   │       ├── Rust_primitives.Arrays.fsti
│   │   │       ├── Rust_primitives.BitVectors.fst
│   │   │       ├── Rust_primitives.BitVectors.fsti
│   │   │       ├── Rust_primitives.Hax.Monomorphized_update_at.fst
│   │   │       ├── Rust_primitives.Hax.Monomorphized_update_at.fsti
│   │   │       ├── Rust_primitives.Hax.fst
│   │   │       ├── Rust_primitives.Integers.fst
│   │   │       ├── Rust_primitives.Integers.fsti
│   │   │       ├── Rust_primitives.Iterators.fsti
│   │   │       └── Rust_primitives.fst
│   │   └── lean/
│   │       ├── Hax/
│   │       │   ├── MissingLean/
│   │       │   │   ├── Init/
│   │       │   │   │   ├── Data/
│   │       │   │   │   │   ├── Array/
│   │       │   │   │   │   │   └── Lemmas.lean
│   │       │   │   │   │   ├── BitVec/
│   │       │   │   │   │   │   └── Basic.lean
│   │       │   │   │   │   ├── Int/
│   │       │   │   │   │   │   └── DivMod/
│   │       │   │   │   │   │       └── Lemmas.lean
│   │       │   │   │   │   ├── Nat/
│   │       │   │   │   │   │   ├── Div/
│   │       │   │   │   │   │   │   └── Basic.lean
│   │       │   │   │   │   │   └── MinMax.lean
│   │       │   │   │   │   ├── SInt/
│   │       │   │   │   │   │   ├── Basic.lean
│   │       │   │   │   │   │   ├── Basic_Int128.lean
│   │       │   │   │   │   │   ├── Lemmas.lean
│   │       │   │   │   │   │   └── Lemmas_Int128.lean
│   │       │   │   │   │   ├── UInt/
│   │       │   │   │   │   │   ├── Basic.lean
│   │       │   │   │   │   │   ├── BasicAux.lean
│   │       │   │   │   │   │   ├── Lemmas.lean
│   │       │   │   │   │   │   └── Lemmas_UInt128.lean
│   │       │   │   │   │   └── Vector/
│   │       │   │   │   │       └── Basic.lean
│   │       │   │   │   ├── GrindInstances/
│   │       │   │   │   │   ├── Ring/
│   │       │   │   │   │   │   ├── SInt.lean
│   │       │   │   │   │   │   └── UInt.lean
│   │       │   │   │   │   └── ToInt.lean
│   │       │   │   │   ├── Prelude.lean
│   │       │   │   │   └── While.lean
│   │       │   │   ├── Lean/
│   │       │   │   │   ├── Tactic/
│   │       │   │   │   │   └── Simp/
│   │       │   │   │   │       └── BuiltinSimpProcs/
│   │       │   │   │   │           ├── SInt.lean
│   │       │   │   │   │           └── UInt.lean
│   │       │   │   │   └── ToExpr.lean
│   │       │   │   └── Std/
│   │       │   │       └── Do/
│   │       │   │           ├── PostCond.lean
│   │       │   │           └── Triple/
│   │       │   │               ├── Basic.lean
│   │       │   │               └── SpecLemmas.lean
│   │       │   ├── MissingLean.lean
│   │       │   ├── Tactic/
│   │       │   │   ├── HaxBVDecide.lean
│   │       │   │   ├── HaxConstructPure.lean
│   │       │   │   ├── HaxMvcgen.lean
│   │       │   │   ├── HaxSpec.lean
│   │       │   │   ├── HaxZify.lean
│   │       │   │   ├── Init.lean
│   │       │   │   └── SpecSet.lean
│   │       │   ├── Tactic.lean
│   │       │   ├── core_models/
│   │       │   │   ├── core_models.lean
│   │       │   │   ├── epilogue/
│   │       │   │   │   ├── alloc.lean
│   │       │   │   │   ├── convert.lean
│   │       │   │   │   ├── float.lean
│   │       │   │   │   ├── folds.lean
│   │       │   │   │   ├── function.lean
│   │       │   │   │   ├── num.lean
│   │       │   │   │   ├── ops.lean
│   │       │   │   │   ├── range.lean
│   │       │   │   │   ├── result.lean
│   │       │   │   │   ├── slice.lean
│   │       │   │   │   └── string.lean
│   │       │   │   ├── epilogue.lean
│   │       │   │   ├── prologue/
│   │       │   │   │   ├── clone.lean
│   │       │   │   │   ├── marker.lean
│   │       │   │   │   └── num.lean
│   │       │   │   └── prologue.lean
│   │       │   ├── core_models.lean
│   │       │   ├── rust_primitives/
│   │       │   │   ├── BVDecide.lean
│   │       │   │   ├── Cast.lean
│   │       │   │   ├── GetElemResult.lean
│   │       │   │   ├── RustM.lean
│   │       │   │   ├── Spec.lean
│   │       │   │   ├── USize64.lean
│   │       │   │   ├── arithmetic.lean
│   │       │   │   ├── boxed.lean
│   │       │   │   ├── hax/
│   │       │   │   │   ├── array.lean
│   │       │   │   │   ├── int.lean
│   │       │   │   │   ├── logical_op.lean
│   │       │   │   │   ├── machine_int.lean
│   │       │   │   │   ├── never.lean
│   │       │   │   │   ├── tuple.lean
│   │       │   │   │   └── while_loop.lean
│   │       │   │   ├── hax.lean
│   │       │   │   ├── hax_lib.lean
│   │       │   │   ├── mem.lean
│   │       │   │   ├── ops.lean
│   │       │   │   ├── sequence.lean
│   │       │   │   └── slice.lean
│   │       │   └── rust_primitives.lean
│   │       ├── Hax.lean
│   │       ├── README.md
│   │       ├── lake-manifest.json
│   │       ├── lakefile.toml
│   │       └── lean-toolchain
│   ├── proofs/
│   │   └── fstar/
│   │       └── extraction/
│   │           ├── Hax_lib.Abstraction.fst
│   │           ├── Hax_lib.Bundle.fst
│   │           ├── Hax_lib.Int.Bigint.fst
│   │           ├── Hax_lib.Int.fst
│   │           ├── Hax_lib.Prop.Bundle.fst
│   │           ├── Hax_lib.Prop.Constructors.fst
│   │           ├── Hax_lib.Prop.fst
│   │           ├── Hax_lib.fst
│   │           └── Makefile
│   └── src/
│       ├── abstraction.rs
│       ├── dummy.rs
│       ├── implementation.rs
│       ├── int/
│       │   ├── bigint.rs
│       │   └── mod.rs
│       ├── lib.rs
│       ├── proc_macros.rs
│       └── prop.rs
├── hax-lib-protocol/
│   ├── Cargo.toml
│   ├── README.md
│   └── src/
│       ├── crypto.rs
│       ├── lib.rs
│       └── state_machine.rs
├── hax-lib-protocol-macros/
│   ├── Cargo.toml
│   └── src/
│       └── lib.rs
├── hax-types/
│   ├── Cargo.toml
│   ├── README.md
│   ├── build.rs
│   └── src/
│       ├── cli_options/
│       │   ├── extension.rs
│       │   └── mod.rs
│       ├── diagnostics/
│       │   ├── message.rs
│       │   ├── mod.rs
│       │   └── report.rs
│       ├── driver_api.rs
│       ├── engine_api.rs
│       ├── lib.rs
│       └── prelude.rs
├── justfile
├── mkdocs.yml
├── rust-engine/
│   ├── Cargo.toml
│   ├── README.md
│   ├── macros/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── partial_application.rs
│   │       ├── replace.rs
│   │       └── struct_fields.rs
│   └── src/
│       ├── ast/
│       │   ├── diagnostics.rs
│       │   ├── fragment.rs
│       │   ├── identifiers/
│       │   │   ├── global_id/
│       │   │   │   ├── compact_serialization.rs
│       │   │   │   ├── generated.rs
│       │   │   │   ├── generated_names.rs
│       │   │   │   └── view.rs
│       │   │   └── global_id.rs
│       │   ├── identifiers.rs
│       │   ├── literals.rs
│       │   ├── resugared.rs
│       │   ├── span.rs
│       │   ├── utils.rs
│       │   └── visitors.rs
│       ├── ast.rs
│       ├── attributes.rs
│       ├── backends/
│       │   ├── fstar.rs
│       │   ├── lean.rs
│       │   ├── rust/
│       │   │   ├── renamings
│       │   │   └── renamings.rs
│       │   └── rust.rs
│       ├── backends.rs
│       ├── debugger.rs
│       ├── hax_io.rs
│       ├── import_thir.rs
│       ├── interning.rs
│       ├── lib.rs
│       ├── main.rs
│       ├── names.rs
│       ├── ocaml_engine.rs
│       ├── phase/
│       │   ├── explicit_monadic.rs
│       │   ├── filter_unprintable_items.rs
│       │   ├── legacy.rs
│       │   └── reject_not_do_lean_dsl.rs
│       ├── phase.rs
│       ├── printer/
│       │   ├── pretty_ast/
│       │   │   ├── debug_json.rs
│       │   │   └── to_document.rs
│       │   ├── pretty_ast.rs
│       │   └── render_view.rs
│       ├── printer.rs
│       ├── resugarings.rs
│       └── symbol.rs
├── rust-toolchain.toml
├── rustc-coverage-tests/
│   ├── Cargo.toml
│   ├── README.md
│   ├── proofs/
│   │   ├── fstar/
│   │   │   └── extraction/
│   │   │       └── Makefile
│   │   └── lean/
│   │       └── extraction/
│   │           └── lakefile.toml
│   ├── requirements.txt
│   ├── run-coverage-tests.py
│   ├── snapshots/
│   │   └── fstar/
│   │       ├── Coverage.Abort.fst
│   │       ├── Coverage.Assert.fst
│   │       ├── Coverage.Assert_ne.fst
│   │       ├── Coverage.Assert_not.fst
│   │       ├── Coverage.Attr.Impl_.fst
│   │       ├── Coverage.Attr.Module.Nested_a.Nested_b.fst
│   │       ├── Coverage.Attr.Module.Off.fst
│   │       ├── Coverage.Attr.Module.On.fst
│   │       ├── Coverage.Attr.Module.fst
│   │       ├── Coverage.Attr.Off_on_sandwich.fst
│   │       ├── Coverage.Attr.Trait_impl_inherit.fst
│   │       ├── Coverage.Auxiliary.Discard_all_helper.fst
│   │       ├── Coverage.Auxiliary.Used_crate.fst
│   │       ├── Coverage.Auxiliary.Used_inline_crate.fst
│   │       ├── Coverage.Closure_macro.fst
│   │       ├── Coverage.Closure_unit_return.fst
│   │       ├── Coverage.Color.fst
│   │       ├── Coverage.Condition.Conditions.fst
│   │       ├── Coverage.Conditions.fst
│   │       ├── Coverage.Continue_.fst
│   │       ├── Coverage.Dead_code.fst
│   │       ├── Coverage.Drop_trait.fst
│   │       ├── Coverage.Fn_sig_into_try.fst
│   │       ├── Coverage.Generics.fst
│   │       ├── Coverage.If_.fst
│   │       ├── Coverage.If_else.fst
│   │       ├── Coverage.If_not.fst
│   │       ├── Coverage.Ignore_map.fst
│   │       ├── Coverage.Ignore_run.fst
│   │       ├── Coverage.Inline.fst
│   │       ├── Coverage.Inline_dead.fst
│   │       ├── Coverage.Inner_items.fst
│   │       ├── Coverage.Issue_83601_.fst
│   │       ├── Coverage.Lazy_boolean.fst
│   │       ├── Coverage.Let_else_loop.fst
│   │       ├── Coverage.Long_and_wide.fst
│   │       ├── Coverage.Loop_break.fst
│   │       ├── Coverage.Loop_break_value.fst
│   │       ├── Coverage.Loops_branches.fst
│   │       ├── Coverage.Macro_in_closure.fst
│   │       ├── Coverage.Match_or_pattern.fst
│   │       ├── Coverage.Mcdc.Condition_limit.fst
│   │       ├── Coverage.Mcdc.If_.fst
│   │       ├── Coverage.Mcdc.Inlined_expressions.fst
│   │       ├── Coverage.Mcdc.Nested_if.fst
│   │       ├── Coverage.Mcdc.Non_control_flow.fst
│   │       ├── Coverage.Nested_loops.fst
│   │       ├── Coverage.No_cov_crate.Nested_fns.fst
│   │       ├── Coverage.No_cov_crate.fst
│   │       ├── Coverage.No_spans.fst
│   │       ├── Coverage.No_spans_if_not.fst
│   │       ├── Coverage.Overflow.fst
│   │       ├── Coverage.Panic_unwind.fst
│   │       ├── Coverage.Partial_eq.fst
│   │       ├── Coverage.Simple_loop.fst
│   │       ├── Coverage.Simple_match.fst
│   │       ├── Coverage.Sort_groups.fst
│   │       ├── Coverage.Test_harness.fst
│   │       ├── Coverage.Tight_inf_loop.fst
│   │       ├── Coverage.Trivial.fst
│   │       ├── Coverage.Try_error_result.fst
│   │       ├── Coverage.Unicode.fst
│   │       ├── Coverage.Unused.fst
│   │       ├── Coverage.Unused_mod.Unused_module.fst
│   │       ├── Coverage.Unused_mod.fst
│   │       ├── Coverage.While_.fst
│   │       └── Coverage.While_early_ret.fst
│   ├── src/
│   │   ├── abort.rs
│   │   ├── assert-ne.rs
│   │   ├── assert.rs
│   │   ├── assert_not.rs
│   │   ├── async.rs
│   │   ├── async2.rs
│   │   ├── async_block.rs
│   │   ├── async_closure.rs
│   │   ├── attr/
│   │   │   ├── impl.rs
│   │   │   ├── mod.rs
│   │   │   ├── module.rs
│   │   │   ├── nested.rs
│   │   │   ├── off-on-sandwich.rs
│   │   │   └── trait-impl-inherit.rs
│   │   ├── auxiliary/
│   │   │   ├── discard_all_helper.rs
│   │   │   ├── executor.rs
│   │   │   ├── inline_always_with_dead_code.rs
│   │   │   ├── inline_mixed_helper.rs
│   │   │   ├── macro_name_span_helper.rs
│   │   │   ├── mod.rs
│   │   │   ├── unused_mod_helper.rs
│   │   │   ├── used_crate.rs
│   │   │   └── used_inline_crate.rs
│   │   ├── await_ready.rs
│   │   ├── bad_counter_ids.rs
│   │   ├── bench.rs
│   │   ├── branch/
│   │   │   ├── generics.rs
│   │   │   ├── guard.rs
│   │   │   ├── if-let.rs
│   │   │   ├── if.rs
│   │   │   ├── lazy-boolean.rs
│   │   │   ├── let-else.rs
│   │   │   ├── match-arms.rs
│   │   │   ├── match-trivial.rs
│   │   │   ├── mod.rs
│   │   │   ├── no-mir-spans.rs
│   │   │   └── while.rs
│   │   ├── closure.rs
│   │   ├── closure_bug.rs
│   │   ├── closure_macro.rs
│   │   ├── closure_macro_async.rs
│   │   ├── closure_unit_return.rs
│   │   ├── color.rs
│   │   ├── condition/
│   │   │   ├── conditions.rs
│   │   │   └── mod.rs
│   │   ├── conditions.rs
│   │   ├── continue.rs
│   │   ├── coroutine.rs
│   │   ├── coverage_attr_closure.rs
│   │   ├── dead_code.rs
│   │   ├── discard-all-issue-133606.rs
│   │   ├── drop_trait.rs
│   │   ├── fn_sig_into_try.rs
│   │   ├── generic-unused-impl.rs
│   │   ├── generics.rs
│   │   ├── holes.rs
│   │   ├── if.rs
│   │   ├── if_else.rs
│   │   ├── if_not.rs
│   │   ├── ignore_map.rs
│   │   ├── ignore_run.rs
│   │   ├── inline-dead.rs
│   │   ├── inline.rs
│   │   ├── inline_mixed.rs
│   │   ├── inner_items.rs
│   │   ├── issue-83601.rs
│   │   ├── issue-84561.rs
│   │   ├── issue-85461.rs
│   │   ├── issue-93054.rs
│   │   ├── lazy_boolean.rs
│   │   ├── let_else_loop.rs
│   │   ├── lib.rs
│   │   ├── long_and_wide.rs
│   │   ├── loop-break.rs
│   │   ├── loop_break_value.rs
│   │   ├── loops_branches.rs
│   │   ├── macro_in_closure.rs
│   │   ├── macro_name_span.rs
│   │   ├── match_or_pattern.rs
│   │   ├── mcdc/
│   │   │   ├── condition-limit.rs
│   │   │   ├── if.rs
│   │   │   ├── inlined_expressions.rs
│   │   │   ├── mod.rs
│   │   │   ├── nested_if.rs
│   │   │   └── non_control_flow.rs
│   │   ├── nested_loops.rs
│   │   ├── no-core.rs
│   │   ├── no_cov_crate.rs
│   │   ├── no_spans.rs
│   │   ├── no_spans_if_not.rs
│   │   ├── overflow.rs
│   │   ├── panic_unwind.rs
│   │   ├── partial_eq.rs
│   │   ├── simple_loop.rs
│   │   ├── simple_match.rs
│   │   ├── sort_groups.rs
│   │   ├── test_harness.rs
│   │   ├── tight_inf_loop.rs
│   │   ├── trivial.rs
│   │   ├── try_error_result.rs
│   │   ├── unicode.rs
│   │   ├── unreachable.rs
│   │   ├── unused.rs
│   │   ├── unused_mod.rs
│   │   ├── uses_crate.rs
│   │   ├── uses_inline_crate.rs
│   │   ├── while.rs
│   │   ├── while_early_ret.rs
│   │   └── yield.rs
│   ├── test_config.yaml
│   └── update-test-sources.sh
├── rustfmt.toml
├── setup.sh
├── test-harness/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── README.md
│   └── src/
│       ├── command_hax_ext.rs
│       ├── harness.rs
│       ├── lib.rs
│       └── snapshots/
│           ├── toolchain__assert into-coq.snap
│           ├── toolchain__assert into-fstar.snap
│           ├── toolchain__assert into-ssprove.snap
│           ├── toolchain__attribute-opaque into-fstar.snap
│           ├── toolchain__attributes into-fstar.snap
│           ├── toolchain__constructor-as-closure into-fstar.snap
│           ├── toolchain__cyclic-modules into-fstar.snap
│           ├── toolchain__cyclic-modules into-lean.snap
│           ├── toolchain__dyn into-fstar.snap
│           ├── toolchain__enum-repr into-coq.snap
│           ├── toolchain__enum-repr into-fstar.snap
│           ├── toolchain__enum-repr into-ssprove.snap
│           ├── toolchain__functions into-coq.snap
│           ├── toolchain__functions into-fstar.snap
│           ├── toolchain__generics into-fstar.snap
│           ├── toolchain__guards into-coq.snap
│           ├── toolchain__guards into-fstar.snap
│           ├── toolchain__guards into-ssprove.snap
│           ├── toolchain__include-flag into-coq.snap
│           ├── toolchain__include-flag into-fstar.snap
│           ├── toolchain__interface-only into-fstar.snap
│           ├── toolchain__lean-core-models into-lean.snap
│           ├── toolchain__lean-tests into-lean.snap
│           ├── toolchain__let-else into-coq.snap
│           ├── toolchain__let-else into-fstar.snap
│           ├── toolchain__let-else into-ssprove.snap
│           ├── toolchain__literals into-coq.snap
│           ├── toolchain__literals into-fstar.snap
│           ├── toolchain__literals into-lean.snap
│           ├── toolchain__loops into-fstar.snap
│           ├── toolchain__mut-ref-functionalization into-fstar.snap
│           ├── toolchain__naming into-coq.snap
│           ├── toolchain__naming into-fstar.snap
│           ├── toolchain__pattern-or into-coq.snap
│           ├── toolchain__pattern-or into-fstar.snap
│           ├── toolchain__patterns into-fstar.snap
│           ├── toolchain__recursion into-fstar.snap
│           ├── toolchain__reordering into-coq.snap
│           ├── toolchain__reordering into-fstar.snap
│           ├── toolchain__reordering into-ssprove.snap
│           ├── toolchain__side-effects into-fstar.snap
│           ├── toolchain__side-effects into-ssprove.snap
│           ├── toolchain__slices into-coq.snap
│           ├── toolchain__slices into-fstar.snap
│           ├── toolchain__statics into-fstar.snap
│           ├── toolchain__traits into-fstar.snap
│           └── toolchain__unsafe into-fstar.snap
└── tests/
    ├── .gitignore
    ├── Cargo.toml
    ├── README.md
    ├── assert/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── attribute-opaque/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── attributes/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── cli/
    │   ├── include-flag/
    │   │   ├── Cargo.toml
    │   │   └── src/
    │   │       └── lib.rs
    │   └── interface-only/
    │       ├── Cargo.toml
    │       └── src/
    │           └── lib.rs
    ├── constructor-as-closure/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── cyclic-modules/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── dyn/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── enum-repr/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── enum-struct-variant/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── even/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── functions/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── generics/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── guards/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── if-let/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── lean-core-models/
    │   ├── Cargo.toml
    │   └── src/
    │       ├── default.rs
    │       ├── function.rs
    │       ├── lib.rs
    │       ├── option.rs
    │       ├── phantom.rs
    │       └── result.rs
    ├── lean-tests/
    │   ├── Cargo.toml
    │   └── src/
    │       ├── array.rs
    │       ├── associated_types.rs
    │       ├── binops.rs
    │       ├── casts.rs
    │       ├── comments.rs
    │       ├── constants.rs
    │       ├── enums.rs
    │       ├── floats.rs
    │       ├── ite.rs
    │       ├── lib.rs
    │       ├── loops.rs
    │       ├── matching.rs
    │       ├── monadic.rs
    │       ├── nested_control_flow.rs
    │       ├── opaque.rs
    │       ├── recursion.rs
    │       ├── specs.rs
    │       ├── structs.rs
    │       ├── traits.rs
    │       └── types.rs
    ├── let-else/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── literals/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── loops/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── mut-ref-functionalization/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── naming/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── nested-derefs/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── never-type/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── odd/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── pattern-or/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── patterns/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── proverif-basic-structs/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── proverif-fn-to-letfun/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── proverif-minimal/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── proverif-noise/
    │   ├── Cargo.toml
    │   └── src/
    │       ├── lib.rs
    │       ├── noise_crypto.rs
    │       ├── noise_kkpsk0.rs
    │       └── noise_lib.rs
    ├── proverif-ping-pong/
    │   ├── Cargo.toml
    │   ├── pingpong.pv
    │   └── src/
    │       ├── a.rs
    │       ├── b.rs
    │       └── lib.rs
    ├── raw-attributes/
    │   ├── Cargo.toml
    │   ├── README.md
    │   └── src/
    │       └── lib.rs
    ├── recursion/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── reordering/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── side-effects/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── slices/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── statics/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── traits/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── tuples/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    └── unsafe/
        ├── Cargo.toml
        └── src/
            └── lib.rs

================================================
FILE CONTENTS
================================================

================================================
FILE: .cargo/config.toml
================================================
[build]
rustflags = ["--cfg", "hax"]


================================================
FILE: .docker/Dockerfile
================================================
# This Dockerfile should be run from the root directory of this repo
# e.g. `docker build -f .docker/Dockerfile .` from the parent directory

FROM nixpkgs/nix-flakes

# See issue #71
RUN if [ "$(uname)" = Darwin ]; then \
    echo "filter-syscalls = false" >> /etc/nix/nix.conf; \
    fi

# Prepare the sources
COPY . /hax-sources
RUN cd /hax-sources && git init && git add .

# Use cache to speed up install
ENV PATH="$PATH:/root/.nix-profile/bin"
RUN nix-env -iA cachix -f https://cachix.org/api/v1/install
RUN cachix use hacspec

# Install
RUN nix profile install /hax-sources


================================================
FILE: .dockerignore
================================================
.git
.gitignore
**/target
**/_build
debug

================================================
FILE: .envrc
================================================
watch_file rust-toolchain.toml
use flake


================================================
FILE: .github/assets/change-padding.sh
================================================
#!/usr/bin/env bash
# set padding so that logos are centered when rendered by GH

set -euo pipefail
X="${1:?Usage: $0 <new Y value>}"

find . -type f -name '*.svg' -exec sd 'id="__topPaddingWrapper" transform="translate\(0, \d+\)"' "id=\"__topPaddingWrapper\" transform=\"translate(0, ${1})\"" {} +


================================================
FILE: .github/workflows/bertie.yml
================================================
name: Extract Bertie

on:
  pull_request:
  merge_group:
  workflow_dispatch:
  push:
    branches: [main]

env:
  CARGO_TERM_COLOR: always

jobs:
  extract-bertie:
    if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group' }}
    runs-on: "ubuntu-latest"

    steps:
      - name: ⤵ Clone Bertie repository
        uses: actions/checkout@v4
        with:
          repository: cryspen/bertie

      - uses: actions/checkout@v4
        with:
          path: hax

      - uses: DeterminateSystems/nix-installer-action@main
      - name: ⤵ Install hax
        run: |
          nix profile install ./hax

      - name: 🏃 Extract fstar
        run: ./hax-driver.py extract-fstar


================================================
FILE: .github/workflows/changelog.yml
================================================
name: Check Changelog Update

on:
  pull_request:
    types: [opened, synchronize, reopened, edited]
    if: github.actor != 'github-merge-queue[bot]'

jobs:
  check-changelog:
    if: github.actor != 'github-merge-queue[bot]'
    runs-on: ubuntu-latest

    steps:
      - name: Check for [skip changelog] tag in PR body
        id: skip_check
        uses: actions/github-script@v7
        with:
          script: |
            const body = context.payload.pull_request.body || "";
            core.debug(body);
            if (body.includes('[skip changelog]')) {
              core.notice("Skipping changelog check because [skip changelog] was found in PR body.");
              core.setOutput("skip", "true");
            } else {
              core.setOutput("skip", "false");
            }

      - name: Checkout full git history
        if: steps.skip_check.outputs.skip == 'false'
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Fetch base branch
        if: steps.skip_check.outputs.skip == 'false'
        run: git fetch origin ${{ github.base_ref }}

      - name: Check if CHANGELOG.md was updated
        if: steps.skip_check.outputs.skip == 'false'
        id: updated
        run: |
          git diff --name-only origin/${{ github.base_ref }} HEAD > changed_files.txt
          echo "::group::Changed files"
          cat changed_files.txt
          echo "::endgroup::"

          if ! grep -q 'CHANGELOG.md' changed_files.txt; then
            {
              echo '**Missing `CHANGELOG.md` entry**'
              echo ''
              echo 'Please do one of the following:'
              echo '- Add relevant changes to `CHANGELOG.md`'
              echo '- Or add `[skip changelog]` to the pull request body'
              echo ''
              echo 'Once done, re-run this workflow by clicking **"Re-run jobs"**.'
              echo ''
              cat CONTRIBUTING.md | awk '/^### Changelog$/{f=1;next} /^##?#? /&&f{exit} f' | sed 's/^###\s*//'
            } > error-message
            cat error-message >> $GITHUB_STEP_SUMMARY
            exit 1
          fi

      - name: Fail with markdown error
        if: failure()
        uses: actions/github-script@v7
        with:
          script: |
            const msg = require('fs').readFileSync('error-message', 'utf8');
            core.setFailed(msg);


================================================
FILE: .github/workflows/clippy_rust_engine.yml
================================================
name: Linting for the Rust engine

on:
  pull_request:
  merge_group:
  workflow_dispatch:
  push:
    branches: [main]

jobs:
  clippy:
    name: clippy
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Install clippy
      run: |
        rustup component add clippy
    - name: Run clippy
      run: |
        cargo clippy -p hax-rust-engine -- -D warnings --no-deps


================================================
FILE: .github/workflows/extract_and_run_coq.yml
================================================
name: Extract and Run - Coq

on: [pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: DeterminateSystems/nix-installer-action@main

      - name: ⤵ Install hax
        run: |
          nix build .\#check-coq-coverage

================================================
FILE: .github/workflows/flake_lock.yml
================================================
name: Make sure flake.lock is up-to-date

on:
  pull_request:
  merge_group:
  workflow_dispatch:

jobs:
  flake_lock_up_to_date:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: DeterminateSystems/nix-installer-action@main
    - name: Lock flake
      run: nix flake lock
    - name: Diff `flake.lock`
      run: git diff --exit-code flake.lock


================================================
FILE: .github/workflows/format.yml
================================================
name: Ensure formatting

on:
  pull_request:
  merge_group:
  workflow_dispatch:
  push:
    branches: [main]

jobs:
  ocamlformat:
    name: ocamlformat
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: DeterminateSystems/nix-installer-action@main
    - name: Run OCaml formatter
      run: |
        nix shell ..#ocamlformat -c \
          ocamlformat --check $(find . -name '*.ml')
      working-directory: engine
  rustfmt:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Run Rust formatter
      run: |
        cargo fmt --check


================================================
FILE: .github/workflows/gh_pages.yml
================================================
name: Deploy to GH Pages

on:
  workflow_dispatch:
  push:
    branches: [main]

jobs:
  # Build job
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: DeterminateSystems/nix-installer-action@main
      - name: Build documentation
        run: nix build .#docs
      - name: Upload static files as artifact
        id: deployment
        uses: actions/upload-pages-artifact@v3
        with:
          path: result/
  # Deploy job
  deploy:
    needs: build
    permissions:
      pages: write      # to deploy to Pages
      id-token: write   # to verify the deployment originates from an appropriate source

    # Deploy to the github-pages environment
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}

    # Specify runner + deployment step
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action


================================================
FILE: .github/workflows/install_and_test.yml
================================================
name: Install & test

on:
  pull_request:
  merge_group:
  workflow_dispatch:
  push:
    branches: [main]

jobs:
  tests:
    name: nix-action
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: DeterminateSystems/nix-installer-action@main
    - uses: cachix/cachix-action@v15
      with:
        name: hax
        skipPush: true
        extraPullNames: fstar-nix-versions, z3-nix-versions

    - name: Build
      run: nix build -L

    - name: Install the toolchain
      run: |
        nix profile install nixpkgs#yq
        nix profile install .#rustc
        nix profile install .

    - name: Ensure readme coherency
      run: |
        nix build .#check-readme-coherency -L

    - name: Test the toolchain
      run: |
        nix build .#check-toolchain -L

    - name: Try to extract Rust By Examples
      run: |
        nix build .#rust-by-example-hax-extraction -L

    - name: Test the examples
      run: |
        cd examples
        nix develop ..#ci-examples --command make clean
        nix develop ..#ci-examples --command make

    - name: Checkout specifications
      uses: actions/checkout@v4
      with:
        repository: 'hacspec/specs'
        path: specs

    - name: Push to Cachix
      if: ${{ github.event_name == 'workflow_dispatch'  || github.event_name == 'merge_group'  }}
      env:
        CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
      run: |
        nix-store -qR --include-outputs $(nix build .# --json | jq -r '.[].outputs | to_entries[].value') \
          | cachix push hax


================================================
FILE: .github/workflows/licenses.yml
================================================
name: Check licenses

on:
  pull_request:
  merge_group:
  workflow_dispatch:
  push:
    branches: [main]

jobs:
  tests:
    name: nix-action
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: extractions/setup-just@v1
    - name: Set-up OCaml
      uses: ocaml/setup-ocaml@v3
      with:
        ocaml-compiler: 5
    - uses: actions-rust-lang/setup-rust-toolchain@v1
      with:
        toolchain: stable
    - name: Install cargo-deny
      run: cargo install cargo-deny
    - name: Install cargo-deny
      run: cargo install toml2json
    - name: Check the licenses
      run: just check-licenses



================================================
FILE: .github/workflows/mldsa.yml
================================================
name: Extract and lax-check libcrux ML-DSA

on:
  schedule:
    - cron: '0 0 * * *'
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  extract-and-lax-mldsa:
    runs-on: "ubuntu-latest"

    steps:
      - name: ⤵ Clone Libcrux repository
        uses: actions/checkout@v4
        with:
          repository: cryspen/libcrux
          path: libcrux

      - uses: actions/checkout@v4
        with:
          path: hax

      - name: Use local hax-lib
        working-directory: libcrux
        run: |
          cargo remove hax-lib -v -p libcrux-ml-dsa
          cargo add hax-lib --path "../hax/hax-lib" -v -p libcrux-ml-dsa

      - uses: DeterminateSystems/nix-installer-action@main
      - name: Set up Cachix
        uses: cachix/cachix-action@v15
        with:
          name: fstar-nix-versions
          push: false
    
      - name: ⤵ Install hax
        run: |
          nix profile install ./hax

      - name: ⤵ Install FStar
        run: nix profile install github:FStarLang/FStar/v2025.03.25

      - name: 🏃 Extract ML-DSA crate
        working-directory: libcrux/libcrux-ml-dsa
        run: ./hax.py extract
  
      - name: 🏃 Lax ML-DSA crate
        working-directory: libcrux/libcrux-ml-dsa
        run: |
          env FSTAR_HOME=${{ github.workspace }}/fstar \
              HAX_HOME=${{ github.workspace }}/hax \
              PATH="${PATH}:${{ github.workspace }}/fstar/bin" \
              ./hax.py prove --admit


================================================
FILE: .github/workflows/mlkem.yml
================================================
name: Extract and TC ML-Kem

on:
  pull_request:
  merge_group:
  workflow_dispatch:
  push:
    branches: [main]

env:
  CARGO_TERM_COLOR: always

jobs:
  extract-mlkem:
    if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group' }}
    runs-on: "ubuntu-latest"

    steps:
      - name: ⤵ Extract libcrux version from PR body
        id: extract_version
        uses: actions/github-script@v7
        with:
          result-encoding: string
          script: |
            let extractLibcruxRef = body => body.match(/libcrux-ref:\s*([a-zA-Z0-9._\/-]+)/)?.[1];
            const refMap = new Map();
            if (context.eventName === 'pull_request') {
              const ref = extractLibcruxRef(context.payload.pull_request?.body || '') ?? 'main';
              core.notice(`Using libcrux ref: ${resolved}`);
              return resolved;
            } else if (context.eventName === 'merge_group') {
              const query = 'query {repository(owner:"cryspen", name:"hax") {mergeQueue {entries(first:100) {nodes {pullRequest {body, number}}}}}}';
              const result = await github.graphql(query);
              const mergeQueuePRs = result.repository.mergeQueue.entries.nodes;
              for (const entry of mergeQueuePRs) {
                const pr = entry.pullRequest
                core.notice("Found merge queue PR:", pr);
                const ref = extractLibcruxRef(pr.body);
                ref && refMap.set(pr.number, ref);
              }
              if (refMap.size === 0) {
                core.notice('No libcrux-ref specified, defaulting to "main"');
                return 'main';
              }
              const uniqueRefs = new Set(refMap.values());
              if (uniqueRefs.size > 1) {
                let errorMessage = 'Error: Multiple different libcrux refs detected:\n';
                for (const [prNum, ref] of refMap.entries())
                  errorMessage += `- PR #${prNum}: ${ref}\n`;
                core.setFailed(errorMessage);
                return;
              }

              const [ref] = uniqueRefs;
              core.notice(`Using libcrux ref: ${ref}`);
              return ref;
            }
            core.warning(`Unsupported event type: ${context.eventName}, default to main`);
            return 'main';

      - name: ⤵ Clone Libcrux repository
        uses: actions/checkout@v4
        with:
          repository: cryspen/libcrux
          path: libcrux
          ref: ${{ steps.extract_version.outputs.result }}

      - uses: actions/checkout@v4
        with:
          path: hax

      - name: Use local hax-lib
        working-directory: libcrux
        run: |
          cargo remove hax-lib -v -p libcrux-ml-kem
          cargo add hax-lib --path "../hax/hax-lib" -v -p libcrux-ml-kem

      - uses: DeterminateSystems/nix-installer-action@main
      - name: Set up Cachix
        uses: cachix/cachix-action@v15
        with:
          name: fstar-nix-versions
          push: false
    
      - name: ⤵ Install hax
        run: |
          nix profile install ./hax

      - name: ⤵ Install FStar
        run: nix profile install github:FStarLang/FStar/v2025.02.17

      - name: 🏃 Extract ML-KEM crate
        working-directory: libcrux/libcrux-ml-kem
        run: ./hax.py extract
  
      - name: 🏃 Lax ML-KEM crate
        working-directory: libcrux/libcrux-ml-kem
        run: |
          env FSTAR_HOME=${{ github.workspace }}/fstar \
              HAX_HOME=${{ github.workspace }}/hax \
              PATH="${PATH}:${{ github.workspace }}/fstar/bin" \
              ./hax.py prove --admit


================================================
FILE: .github/workflows/playwright-docs.yml
================================================
name: Playwright Docs Tests
on:
  schedule:
    - cron: '0 0 * * *'
  workflow_dispatch:
jobs:
  test:
    timeout-minutes: 45
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v5
    - uses: DeterminateSystems/determinate-nix-action@v3
    - uses: actions/setup-node@v5
      with:
        node-version: lts/*
    - name: Install dependencies
      working-directory: docs/.test
      run: npm ci
    - name: Install Playwright Browsers
      working-directory: docs/.test
      run: npx playwright install --with-deps
    - name: Replace version with commit hash
      run: sed -i "s/const HAX_PLAYGROUND_FORCED_VERSION = false;/const HAX_PLAYGROUND_FORCED_VERSION = \"${GITHUB_SHA}\";/" hax_playground.js
      working-directory: docs/javascripts
    - name: Playground warmup and build docs
      run: |
        set -euo pipefail

        nix build .#docs & pid1=$!
        curl -sS "https://hax-playground.cryspen.com/query/$GITHUB_SHA/fstar" \
          -X POST \
          -H 'User-Agent: bot' \
          -H 'Accept: application/json' \
          -H 'Content-Type: application/json' \
          --data-raw '[["src/lib.rs","fn f(){}"]]' & pid2=$!

        wait $pid1 || exit_code1=$?
        wait $pid2 || exit_code2=$?

        exit ${exit_code1:-0} || exit ${exit_code2:-0}
    - name: Run Playwright tests
      working-directory: docs/.test
      run: npx playwright test --reporter github,html --trace on 
    - uses: actions/upload-artifact@v4
      if: ${{ !cancelled() }}
      with:
        name: playwright-report
        path: docs/.test/playwright-report/
        retention-days: 30


================================================
FILE: .github/workflows/release.yml
================================================
name: Release binaries for hax-engine

on:
  push:
    tags:
      - '*'

jobs:
  release-js:
    if: startsWith(github.ref, 'refs/tags/')
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
    - uses: actions/checkout@v4
    - uses: DeterminateSystems/nix-installer-action@main
    - name: Build JS
      run: nix build .#hax-engine.passthru.js -L -o hax-engine.js

    - run: |
        tar --dereference -czf hacspec_js.tar.gz hax-engine.js

    - name: Release
      uses: softprops/action-gh-release@v1
      with:
        files: hacspec_js.tar.gz

  release:
    if: startsWith(github.ref, 'refs/tags/')
    strategy:
      fail-fast: false
      matrix:
        os:
          - macos-latest
          - ubuntu-latest
          # - windows-latest (See #4)
        ocaml-compiler: [4.14.x]
        
    runs-on: ${{ matrix.os }}
    permissions:
      contents: write
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - uses: ocaml/setup-ocaml@v2
        with:
          ocaml-compiler: ${{ matrix.ocaml-compiler }}

      - uses: dtolnay/rust-toolchain@1.70
          
      - run: cargo install --path cli/driver && cargo install --path cli/subcommands

      - run: opam install . --deps-only
        working-directory: engine
        
      - run: opam exec -- dune build
        working-directory: engine

      - run: |
          cp engine/_build/default/bin/native_driver.exe  hax-engine
          tar -czf hacspec_${{ matrix.os }}.tar.gz hax-engine
        
      - name: Release
        uses: softprops/action-gh-release@v1
        with:
          files: hacspec_${{ matrix.os }}.tar.gz

          


================================================
FILE: .github/workflows/rustc-coverage-tests.yml
================================================
name: Rustc coverage tests with negative results, and snapshots verification

on:
    pull_request:
    merge_group:
    workflow_dispatch:
    push:
        branches: [main]

jobs:
    rustc-coverage-tests:
      runs-on: ubuntu-latest
  
      steps:
        - uses: actions/checkout@v4
  
        - if: runner.environment == 'github-hosted'
          uses: DeterminateSystems/nix-installer-action@main
        - name: Set up Cachix
          uses: cachix/cachix-action@v15
          with:
            name: fstar-nix-versions
            push: false
      
        - name: ⤵ Install hax
          run: |
            nix profile install .
            nix profile install nixpkgs#rustup
  
        - name: ⤵ Install FStar
          run: nix profile install github:FStarLang/FStar/v2025.02.17

        - name: Set up Python
          uses: actions/setup-python@v5
          with:
            python-version: '3.x'

        - name: Install Python dependencies
          uses: py-actions/py-dependency-install@v4
          with:
            path: rustc-coverage-tests/requirements.txt
  
        - name: Run tests with negative checking
          working-directory: rustc-coverage-tests
          run: |
            FSTAR_HOME=~/.nix-profile python3 run-coverage-tests.py all --with-negative --check-stability


================================================
FILE: .github/workflows/stale.yml
================================================
name: 'Triage stale issues and PRs'
on:
  schedule:
    - cron: '00 00 * * 4'
  workflow_dispatch:

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v9
        with:
          stale-issue-message: "This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days."
          stale-pr-message: "This PR has been marked as stale due to a lack of activity for 60 days. If you believe this pull request is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days."
          stale-issue-label: 'stale'
          exempt-issue-labels: 'keep-open'
          stale-pr-label: 'stale'
          exempt-pr-labels: 'keep-open'
          days-before-stale: 60
          days-before-close: 7
          close-issue-message: "This issue has been closed due to a lack of activity since being marked as stale. If you believe this issue is still relevant, please reopen it with an update or comment."
          close-pr-message: "This PR has been closed due to a lack of activity since being marked as stale. If you believe this pull request is still relevant, please reopen it with an update or comment."


================================================
FILE: .github/workflows/test.yml
================================================
name: Test Workspace

on:
  push:
    branches: [main]
  pull_request:
  merge_group:
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test-workspace:
    strategy:
      fail-fast: false
      matrix:
        os:
          - macos-latest
          - ubuntu-latest
          - windows-latest

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v4
      - uses: Swatinem/rust-cache@v2

      - name: Test
        run: cargo test --workspace --exclude hax-engine-names-extract --exclude hax-rust-engine --verbose

      - name: Test `hax-frontend-exporter` with feature `rustc` off
        run: cargo check -p hax-frontend-exporter --no-default-features --verbose

  no-std-lib:
    runs-on: ubuntu-latest
    steps:
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          targets: thumbv7em-none-eabi
      - uses: actions/checkout@v4
      - uses: Swatinem/rust-cache@v2

      - name: Build no-std
        run: |
          rustup target add thumbv7em-none-eabi
          cargo build -p hax-lib --target thumbv7em-none-eabi


================================================
FILE: .github/workflows/test_installs.yml
================================================
name: Test installations

on:
  pull_request:
  merge_group:
  workflow_dispatch:
  push:
    branches: [main]
    
jobs:
  docker:
    if: ${{ github.event_name == 'workflow_dispatch'  || github.event_name == 'merge_group'  }}
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - run: docker build -f .docker/Dockerfile . -t hax
  setup_sh:
    if: ${{ github.event_name == 'workflow_dispatch'  || github.event_name == 'merge_group'   }}
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - ubuntu-22.04
          - macos-latest
          - macos-15-intel
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v4
    - if: runner.os == 'macOS'
      run: brew install opam nodejs rustup-init jq
    - if: runner.os == 'Linux'
      run: sudo apt-get update
    - if: runner.os == 'Linux'
      run: sudo apt-get install -y opam nodejs jq
    - run: curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y
    - run: opam init --bare -y && opam switch create -y 4.14.1
    - name: Run `setup.sh`
      run: |
        export OPAMERRLOGLEN=0
        ./setup.sh
    - run: cargo hax --version
    - name: Test an extraction
      run: |
        cd examples/chacha20
        eval $(opam env)
        cargo hax into fstar
  setup_sh_status:
    if: |
      always() &&
      github.event_name ==  'workflow_dispatch'  ||github.event_name ==  'merge_group'  
    needs: setup_sh
    runs-on: ubuntu-latest
    steps:
      - name: Successful
        if: ${{ !(contains(needs.*.result, 'failure')) }}
        run: exit 0
      - name: Failing
        if: ${{ contains(needs.*.result, 'failure') }}
        run: exit 1


================================================
FILE: .github/workflows/this-month-in-hax.yml
================================================
name: Generate This Month in hax

on:
  workflow_dispatch:
  schedule:
    - cron: '0 4 1 * *'

jobs:
  generate:
    permissions:
      issues: write
      contents: write
    if: github.repository == 'cryspen/hax'
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v5

      - name: Run script and capture output
        id: run_script
        run: |
          bash .utils/this-month-in-hax-skeleton.sh
        env:
          GH_TOKEN: ${{ github.token }}

      - name: Commit changes
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git checkout -b $(cat this-month-in-hax-branch)
          git add docs/blog
          git commit -m "chore(blog): set up a skeleton for 'This Month in hax'"
          git push --force origin $(cat this-month-in-hax-branch)

      - uses: JasonEtco/create-an-issue@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          filename: this-month-in-hax-issue.yml


================================================
FILE: .gitignore
================================================
debug/
target/
**/*.rs.bk
**/*.profraw
node_modules
TODO.org
.direnv
_build
result
.DS_Store
.depend
.cache
.lake
proof-libs/fstar/rust_primitives/#*#
**/proofs/*/extraction/*
!**/proofs/*/extraction/Makefile
!**/proofs/*/extraction/*.diff
!**/proofs/fstar/extraction/*.fst
!**/proofs/coq/extraction/*.v
!**/proofs/lean/extraction/lakefile.toml
!**/proofs/rust/extraction/Cargo.toml


================================================
FILE: .utils/jq_utils.jq
================================================
# Removes a field from an object at any depth
def remove_field(field):
    walk(if type == "object" and has(field) then del(.[field]) else . end);

# Remove `table_id` indirections whenever a value is found
def thir_drop_table_id_nodes:
    walk(if type == "object" and has("cache_id") and has("value") and .value then .value else . end);

# Prints a THIR def_id as a string, useful for searching
def thir_str_of_def_id_contents:
  (
      [.krate]
    + [
          .path.[]
        | try (.disambiguator as $d | .data | . as $data | keys | .[0] | $data[.] + (if $d > 0 then "#" + $d else "" end))
        | select(type == "string")]
  ) | join("::");

# Prints all THIR def_ids
def thir_str_of_def_ids:
     thir_drop_table_id_nodes | walk(
          # if type == "object" and has("contents") and (.contents | type) == "object" and .contents | has("krate") and .contents | has("path") then
          if try(. as $o | ($o.contents.krate | type == "string") and ($o.contents.path | type == "array")) catch false then
            .contents | thir_str_of_def_id_contents
          else
            .
          end);


================================================
FILE: .utils/rebuild.sh
================================================
#!/usr/bin/env bash

# This is a small script to rebuild Hax (the Rust CLI & frontend and
# OCaml engine) quickly.

# Options:
#  - the flag `--online` allow Cargo to look for updates on the internet;
#  - the environment variable `DUNEJOBS` limits the number of jobs `dune`
#    is allowed to spawn in parallel while building.

set -euo pipefail

OFFLINE_FLAG="--offline"
if [[ "${1:-}" == "--online" ]]; then
    OFFLINE_FLAG=""
    shift 1
fi

TARGETS="${1:-rust ocaml}"
DUNEJOBS=${DUNEJOBS:-} # required since `set -u`

YELLOW=43
GREEN=42
RED=41
BLACK=90
status () { echo -e "\033[1m[rebuild script] \033[30m\033[$1m$2\033[0m"; }

cd_rootwise () {
    cd $(git rev-parse --show-toplevel)/$1
}

rust () {
    cd_rootwise "cli"
    for i in driver subcommands ../engine/names/extract ../rust-engine; do
        CURRENT="rust/$i"
        cargo install --locked --quiet $OFFLINE_FLAG --debug --path $i
    done
}

ocaml () {
    cd_rootwise "engine"
    CURRENT="ocaml"
    dune build $([ -z $DUNEJOBS ] || echo "-j $DUNEJOBS")
    CURRENT="ocaml/install"

    # Small hack for those that are not using [opam] at all: by
    # default install OCaml binaries in `~/.cargo` (which is supposed
    # to be in PATH anyway).
    INSTALL_PREFIX="${OPAM_SWITCH_PREFIX:-${DUNE_INSTALL_PREFIX:-$HOME/.cargo}}"
    dune install --profile dev --prefix $INSTALL_PREFIX

    if ( command -v "which" && command -v "sort" && command -v "wc" ) >/dev/null; then
        case $(which -a hax-engine | sort -u | wc -l) in
            0) status $YELLOW 'Warning: cannot detect `hax-engine` in PATH';;
            1) :;;
            *) status $YELLOW 'Warning: multiple `hax-engine` detected in PATH. Maybe you installed Hax with OPAM (i.e. via `setup.sh`)? Please uninstall it, otherwise you might use a stale engine!';;
        esac
    else
        status $YELLOW 'Warning: cannot run sanity checks because `which`, `sort` or `wc` commands are not available. Please install them.'
    fi
}

on_exit () {
    if [ $? -ne 0 ]; then
        status $RED "ERR: $CURRENT";
    fi
}
trap on_exit                EXIT ERR
trap "status $RED 'SIGINT'" SIGINT

CURRENT="none"
started() { [ -z ${QUIET+x} ] && status $BLACK "$1 build started" || true; }
if [[ "$TARGETS" == *rust* ]]; then
    started rust
    rust
    status $GREEN "rust succeed"
fi
if [[ "$TARGETS" == *ml* ]]; then
    started ocaml
    ocaml
    status $GREEN "ocaml succeed"
fi



================================================
FILE: .utils/rust-by-example.js
================================================
// This script expects Rust By Example to be in current directory
// (clone the repo https://github.com/rust-lang/rust-by-example, `cd` into it, and run `node rust-by-examples.js`)

const fs = require('fs');
const SRC_DIR = 'src';

// Lists all markdown files under `SRC_DIR`
function getMarkdownFiles() {
    return fs.readdirSync(SRC_DIR, { recursive: true })
        .filter(path => path.endsWith('.md'));
}

// Code blocks from a file of given path
function extractCodeBlocks(path) {
    let contents = fs.readFileSync(SRC_DIR + '/' + path).toString();
    let blocks = contents
        .split(/^```/m)
        .filter((_, i) => i % 2 == 1)
        .map(s => {
            let lines = s.split('\n');
            let modifiers = lines[0].split(',').map(x => x.trim()).filter(x => x);
            let contents = lines.slice(1).join('\n');
            return {modifiers, contents};
        })
        .filter(x => x.modifiers.includes('rust'));
    let name = path.replace(/[.]md$/, '').split('/').join('_');
    return {name, blocks};
}

let code = getMarkdownFiles()
    .map(extractCodeBlocks)
    .filter(({blocks}) => blocks.length);

// Strips the comments of a rust snippet
let stripComments = rust_snippet => rust_snippet.replace(/[/][/]+.*/mg, '');

// Given a Rust snippet, returns `true` whenever we detect a top-level
// `let` binding: this means we need to wrap the snippet in a function.
let isDirectLet = rust_snippet => stripComments(rust_snippet).trim().startsWith('let ');

// Wraps a Rust snippet inside a function
let protectSnippet = rust_snippet => `fn wrapper_fn() { let _ = {${rust_snippet}}; }`;

function codeBlocksToModules(code_blocks) {
    let denylist = [
        /unsafe_asm \d+/
    ];
    let modules = {};

    for(let {name, blocks} of code_blocks) {
        let mod_section = `section_${name}`;
        modules[mod_section] = {};
        let nth = 0;
        for(let {modifiers, contents} of blocks) {
            nth += 1;
            if(['edition2015', 'compile_fail', 'ignore'].some(m => modifiers.includes(m))) {
                continue;
            }
            let id = `section_${name} ${nth}`;
            // Remove top-level assertions
            contents = contents.replace(/^# assert.*\n?/mg, '');
            // Strip `# ` (the mdbook marker to hide a line)
            contents = contents.replace(/^# /mg, '');
            // Whenever we detect a `let`
            if(isDirectLet(contents))
                contents = protectSnippet(contents);
            if(denylist.some(re => id.match(re)))
                continue;
            let mod_snippet = `snippet_${nth}`;
            // Replace `crate::` by a full path to the current module
            contents = contents.replace(/crate::/g, 'crate::' + mod_section + '::' + mod_snippet + '::');
            modules[mod_section][mod_snippet] = `// modifiers: ${modifiers.join(', ')}\n` + contents;
        }
    }

    return modules;
}

let modules = codeBlocksToModules(code);

let OUTPUT_CRATE = 'rust-by-examples-crate';
fs.rmSync(OUTPUT_CRATE, { recursive: true, force: true });
fs.mkdirSync(OUTPUT_CRATE, { recursive: true });
const { execSync } = require('child_process');
execSync("cargo init --lib", { cwd: OUTPUT_CRATE });

let OUTPUT_CRATE_SRC = OUTPUT_CRATE + '/src/';
fs.rmSync(OUTPUT_CRATE_SRC, { recursive: true, force: true });
let root_mod = '#![allow(unused)]';
for(let mod_name in modules) {
    let submodules = modules[mod_name];
    fs.mkdirSync(OUTPUT_CRATE_SRC + mod_name, { recursive: true });
    let mod_contents = '';
    for (let submod_name in submodules) {
        let contents = submodules[submod_name];
        fs.writeFileSync(OUTPUT_CRATE_SRC + mod_name + '/' + submod_name + '.rs', contents);
        mod_contents += 'pub mod ' + submod_name + ';\n';
    }
fs.writeFileSync(OUTPUT_CRATE_SRC + mod_name + '.rs', mod_contents);
    root_mod += 'pub mod ' + mod_name + ';\n';
}
fs.writeFileSync(OUTPUT_CRATE_SRC + '/lib.rs', root_mod);


// A list of [<module_name>, [<snippet_number>]] that are known not to be processed by hax
let cargo_hax_denylist = [
    ['error_iter_result', [3]],
    ['error_multiple_error_types_boxing_errors', [1]], // uses dyn
    ['error_multiple_error_types_reenter_question_mark', [2]], // uses dyn
    ['error_multiple_error_types_wrap_error', [1]], // uses dyn
    ['error_option_unwrap_defaults', [3,4]],
    ['flow_control_for', [1,2,3,5]],
    ['flow_control_if_let', [3]],
    ['flow_control_let_else', [1,2]], // Let else panics, bug #1460
    ['flow_control_loop_nested', [1]],
    ['flow_control_loop_return', [1]],
    ['flow_control_loop', [1]],
    ['flow_control_match_binding', [1,2]],
    ['flow_control_match_destructuring_destructure_pointers', [1]],
    ['flow_control_match_destructuring_destructure_slice', [1]],
    ['flow_control_match_destructuring_destructure_tuple', [1]], // .. pattern, bug #1462
    ['flow_control_match', [1]],
    ['flow_control_while_let', [1,2]],
    ['fn_closures_capture', [1]],
    ['fn_closures_input_parameters', [1]],
    ['fn', [1]],
    ['hello_print_fmt', [1]],
    ['generics_bounds_testcase_empty', [1]], // Marker traits, bug #1221
    ['macros_dry', [1]],
    ['scope_borrow_alias', [1]],
    ['scope_borrow_ref', [1]],
    ['scope_move_mut', [1]],
    ['scope_raii', [1]],
    ['std_arc', [1]],
    ['std_hash', [1]],
    ['std_misc_arg_matching', [1]],
    ['std_misc_channels', [1]],
    ['std_misc_file_read_lines', [3]],
    ['std_misc_threads', [1]],
    ['std_misc_threads_testcase_mapreduce', [1]],
    ['std_str', [1]],
    ['trait_iter', [1]],
    ['trait', [1]],
    ['trait_dyn', [1]], // uses dyn
    ['trait_supertraits', [1]], // uses dyn
    ['unsafe', [1,2]],
].map(([module, snippets]) => snippets.map(n => `section_${module}::snippet_${n}`)).flat();

let include_clause = cargo_hax_denylist.map(path => `-*::${path}::**`).join(' ');

execSync(`cargo hax into -i '${include_clause}' fstar`, { cwd: OUTPUT_CRATE, stdio: 'inherit' });


================================================
FILE: .utils/this-month-in-hax-skeleton.sh
================================================
#!/usr/bin/env bash
# This script creates a skeleton blog post for the "This Month in hax" blog series.
# It writes a new markdown file, and outputs a PR body.
# This script is an helper for the github action workflow "this-month-in-hax.yml".

set -e

# Go to the folder of blog posts
cd $(git rev-parse --show-toplevel)/docs/blog/posts/this-month-in-hax

# By default, use `cryspen/hax`, and the month and year from two weeks ago
repo="--repo cryspen/hax"
month=$(date -d "14 days ago" +'%m')
year=$(date -d "14 days ago" +'%Y')

# Set date formatting to English
export LC_ALL=C

# Parse command line arguments.
all_args=("$@")
while [ $# -gt 0 ]; do
    case "$1" in
    -r | --repo) repo="--repo $2"; shift ;;
    -m | --month) month=$2; shift ;;
    -y | --year) year=$2; shift ;;
    --author) author=$2; shift ;;
    esac
    shift
done

report() {
    # Calculate the first day of the month
    start=$(date -u -d "$year-$month-01" +"%Y-%m-%dT%H:%M:%SZ")

    # Get the next month
    end=$(date -u -d "$year-$month-01 + 1 month - 1 day" +"%Y-%m-%dT%H:%M:%SZ")

    # Get all closed PRs with number, title, and description
    pr_data=$(
        gh pr list $repo --state merged --limit 1000 \
            --json number,title,url,author,mergedAt \
            --jq "map(select(.mergedAt >= \"$start\" and .mergedAt <= \"$end\" and .author.login != \"app/dependabot\")) | .[] | {number, title, url, author}" | jq -s
    )

    echo "In $(date -d "$year-$month-01" +"%B"), we successfully merged **$(echo "$pr_data" | jq -r 'length') pull requests**!"
    echo ""
    echo "<DESCRIPTION>"
    echo ""
    echo "### Full list of PRs"

    # Extract markdown list with jq
    echo "$pr_data" | jq -r '.[] | . | "* \\#\(.number): [\(.title)](\(.url))"'

    echo ""
    echo "### Contributors"
    # Extract markdown list of authors with jq
    echo "$pr_data" | jq -r 'map(.author.login) | unique | .[] | "* [@\(.)](https://github.com/\(.))"'
}

# Available authors, and their GH handles
authors_and_handles() {
    sort -u <<AUTHORS | sed '/^[[:space:]]*$/d'
maxime:maximebuyse
clement:clementblaudeau
alex:abentkamp
AUTHORS
}
authors() {
    authors_and_handles | cut -d: -f1
}
handle_of() {
    authors_and_handles | grep "^$1:" | cut -d: -f2
}

find_last_blog_authors() {
    N=$(authors_and_handles | wc -l)
    N=$((N - 1))
    ls -t1 | head -n$N | xargs awk '/^authors:/,/^---/{ if ($0 ~ /^  - /) { sub(/^  - /, ""); print } }' | sort -u
}

pick_author() {
    diff <(authors) <(find_last_blog_authors) | grep '^< ' | cut -d' ' -f2 | shuf -n1
}

author=$(pick_author)

BLOG_POST_FILE="$year-$month.md"


cat << HEADER > $BLOG_POST_FILE
---
authors:
  - $author
title: "This Month in Hax: $(date -d "$year-$month-15" +"%B %Y")"
date: $(date +"%Y-%m-%d")
---

HEADER
report >> $BLOG_POST_FILE

BLOG_POST="$(cat $BLOG_POST_FILE)"

# Go to root
cd $(git rev-parse --show-toplevel)
BRANCH="this-month-in-hax-blog-post-$year-$month"
echo $BRANCH > this-month-in-hax-branch

# Echo the author's handle
cat <<MESSAGE > this-month-in-hax-issue.yml
---
title: Write This Month in Hax
assignees: $(handle_of $author)
---

This is an auto-generated issue for the "This Month in hax" blog series.

Branch [\`$BRANCH\`](https://github.com/cryspen/hax/tree/$BRANCH) have been created with the following template:
\`\`\`md
$(echo "$BLOG_POST")
\`\`\`

It is an skeleton blog post with the list of PRs pushed in $(date -d "$year-$month-01" +"%B %Y") and a list of contributor.

Suggested person to pick this draft PR: @$(handle_of $author)

## Action Items
 - [ ] Write the blog article
 - [ ] Release a new version of hax
    - [ ] Follow \`PUBLISHING.md\`
    - [ ] Create Github release
MESSAGE


================================================
FILE: CHANGELOG.md
================================================
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

Changes to the Rust Engine:
 - Rename `GenericConstraint::Type` to `TypeClass` and `::Projection` to `Equality` (#1996)
 - Remove `BinOp` resugaring (#1950)
 - Apply resugarings to linked items (pre/post conditions) (#1961)
 - Add new import_thir implemented in Rust and using `FullDef`, activated with `--experimental-full-def` (#1967)

Changes to the engine:
 - Omit type aliases whose body has unresolvable trait bounds instead of crashing (#2014)
 - Report let-chains (`if let .. && let ..`) as a soft error instead of panicking (#2014)

Changes to the frontend:
 - Fix support for ellipsis: add wildcard for every field (based on type info
   rather than number of subpatterns) (#2001)
 - Fix panic on constants of type `&[&T]` (e.g. `&[&str]`) caused by a wrong type for the synthesized array length (#2014)

Changes to cargo-hax:

Changes to hax-lib:
 - Lean lib: use Rust core models (#1865)
 - Lean lib: specs for negation (#1891)
 - Lean lib: Add casting for all integer type pairs (#1837)
 - Lean lib: bump lean to v4.28.0-rc1 (#1900)
 - Lean lib: Extract more core models (#1919)
 - Lean lib: Separate symbolic and bit-blasting specs (#1933)
 - Lean lib: Communicate user-generated specs to mvcgen (#1937)
 - Lean lib: Rust primitives for prop (#1942)
 - Lean lib: For-loops for all unsigned integers (#1951)
 - Lean lib: Upgrade to Lean v4.29.0-rc1 (#1962)
 - Lean lib: Add support for Int128 and UInt128 while waiting for upstream in Lean (#1968)
 - Lean lib: Refactor `RustM` as `ExceptT Error Option` (#1994)
 - Lean lib: Add Repr instance for tuples (#2000)
 - Lean lib: Make the proof of `RustM.toBVRustM_bind` compatible with Lean 4.29.0 (#2005)

Changes to the Lean backend:
 - Add `hax_zify` and `hax_construct_pure` tactics (#1888)
 - Add support for opaque `impl`s (#1887)
 - Fix support for associated constants in trait impls (#1906)
 - Gather definitions in namespaces, shortening names (#1901)
 - Add support for associated types with constraints and inheritance (#1909)
 - Fix bug with monadic wrapping of trait constants (#1929)
 - Add type annotation for cast_op (#1925)
 - Add attributes for pureEnsures/pureRequires (#1931)
 - Extract correct `PhantomData` structure (#1932)
 - Standardize generated Lean naming to lowercase namespaces (#1914)
 - Fix associated constants with default values (#1941)
 - New default proof for the Lean backend & proof method attribute (#1938)
 - Prettier proof_mode annotations (#1943)
 - Detect recursive functions and mark them partial_fixpoint (#1946)
 - Add more binops (#1963)
 - Add a resugaring for ellipsis patterns (#2002)

Miscellaneous:
 - Fix Nix development shell: add an `fstar` devShell providing F* and the
   required environment variables (#1972)

## 0.3.6

Changes to the Rust Engine:
 - Add a rejection phase for interleaving of expressions and statements not
   supported by the Lean do-notation syntax (#1739).
 - Add a phase to handle the monadic encoding: it explicitly introduces two new
   Hax primitives `pure` (to wrap values as monadic computations) and `lift` (to
   lift monadic computations into values) (#1746)
 - Add a mechanism to lookup pre- and post-conditions (#1805)
 - Add a proper Rust backend (#1898)

Changes to the frontend:
 - Update the pin of rustc (#1765)
 - Miscellaneous changes related to Charon (#1765)

Change to cargo-hax:

Changes to hax-lib:
 - Add Lean core models for options, results, default (#1747)
 - F* lib: improved while loops support, additions of some specific arithmetic operations and fixed `TryInto` for integer types (#1742)
 - Lean lib: use macros for int operations (#1795)
 - Lean lib: add new setup for `bv_decide` (#1828)
 - Lean lib: base specs on mathematical integers (#1829)
 - Lean lib: represent `usize` via a copy of `UInt64` (#1829)
 - Lean lib: Add support for while loops (#1857, #1863)
 - Core models: integers, arrays, iterators, full replacement of the F* proof-lib (#1898)

Changes to the Lean backend:
 - Support for constants with arbitrary computation (#1738)
 - Add support for base-expressions of structs (#1736)
 - Use the explicit monadic phase to insert `pure` and `←` only on demand, and
   not introduce extra `do` block (#1746)
 - Rename `Result` monad to `RustM` to avoid confusion with Rust `Result` type (#1768)
 - Add support for shift-left (#1785)
 - Add support for default methods of traits (#1777)
 - Add support for floats (#1784)
 - Add support for pattern matching on constant literals (#1789)
 - Add support for binding subpatterns in match constructs (#1790)
 - Add error when using patterns in function parameters (#1792)
 - Add grind annotations for various lemmas in the Lean library (#1802)
 - Add support for constant parameters to functions and traits (#1797)
 - Add support for associated types with equality constraints (#1806)
 - Make trait-level arguments explicit for all trait functions, adding them as
   extra parameters (#1803)
 - Add generation of specs from requires/ensures-annotations (#1815)
 - Add support for nonliteral array sizes (#1826)
 - Add `hax_lib::lean::proof` attribute (#1831)
 - Add support for `#[hax_lib::opaque]` (#1846)
 - Turn rejection phase into a transformation phase (#1840)
 - Fix string escaping (#1834)

Miscellaneous:
- Reserve extraction folder for auto-generated files in Lean examples (#1754)
- Add `lean_adc` example to the Lean examples section, demonstrating tactics introduced in PR(#1933)

## 0.3.5

Changes to the Rust Engine:
 - The module `names` now produces `ExplicitDefId`s instead of `DefId`s (#1648)
 - Add a resugaring `FunctionsToConstants` (#1559)
 - Drop the tuple nodes of the AST, add resugaring node for tuples (#1662)
 - Add support for enums and structs to the Lean backend (type definitions,
   expressions, pattern-matching) (#1623)
 - Update name rendering infrastructure in the Lean backend (#1623, #1624)
 - Printers now emit proper diagnostics (PR #1669)
 - Global identifiers are now interned (#1689)
 - Global identifiers are encapsulated properly, and provide easy destructuring as tuple identifiers (#1693)
 - Add support for `trait` and `impl` in the Lean backend (#1679): trait definitions, trait bounds
   on functions, impl definitions. The typeclass resolution in the generated code is left implicit
   (relies on Lean). Limited support for associated types. No support for default implementations.
 - Refactor of the printing infrastructure: lowers the boilerplate, get rid of most lifetimes annotation, add proper contextual span support (#1735)

Changes to the frontend:
- Add an explicit `Self: Trait` clause to trait methods and consts (#1559)
- Fix `ImplExpr::Builtin` that had some type errors (#1559)
- Improve the translation of `Drop` information (#1559)
- Add variance information to type parameters (#1559)
- Cleanup the `State` infrastructure a little bit (#1559)
- Add information about the metadata to use in unsize coercions (#1559)
- Resolve `dyn Trait` predicates (#1559)
- Many improvements to `FullDef` (#1559)
- Add infrastructure to get a monomorphized `FullDef`; this is used in charon to monomorphize a crate graph (#1559)
- Fix a regression affecting projection predicates (#1678)

Change to cargo-hax:
- Improve the caching of rustc when using `cargo hax` commands (#1719)
- Add hidden commands and flags to explicitly manipulate `haxmeta` files (#1722)

Changes to hax-lib:
- New behavior for `hax_lib::include`: it now forces inclusion when in contradiction with `-i` flag.
- hax-lib requires edition 2021 instead of 2024 (#1726)
- Improved `VecDeque` model in F* proof lib (#1728)
- Split the Lean library into several files, update to lean 4.23.0 (#1696)

Changes to the Lean backend:
- Improve support for functionalized loops (#1695)
- Improve error messages, having each error (coming from the Lean backend) point to a specific github issue (#1717).

Miscellaneous:
 - A lean tutorial has been added to the hax website (#1626)
 - Add end-to-end tests for the website (#1690)
 - Diagnostics reporting were improved (#1692)

## 0.3.4

The release of `0.3.3` got troubles because of the new Rust Engine crates.
This release is mostly empty.

## 0.3.3

Changes to the frontend:
 - A field `visibility` was added to HIR items (#1643)

Rust Engine:
 - A Lean backend was introduced (#1593, #1591, #1590, #1607)
 - The Rust engine was improved (#1624, #1603, #1600, #1585)
 - The F* backend has been improved (#1587, #1585)

## 0.3.2

Changes to the frontend:
 - Provide the `FnOnce` shim for closures (#1477)
 - Update pin of rustc (#1482)
 - Add `Ty::FnDef` (splitting `FnPtr` and `FnDef`) (#1487)
 - Regroup generic and trait arguments in a struct `ItemRef` (#1514)
 - Support trait aliases in `FullDef` (#1494)
 - Separate `{Add,Sub,Mul}Unchecked` and `{Add,Sub,Mul}` (#1513)
 - Our pin to rustc was updated (#1534)

Changes to the engine:
 - introduce an experimental Rust engine (#1501, #1502, #1504, #1505, #1518)

Changes the `hax-lib`:
 - Support hax octal and binary literals in the `int!` macro
 - F*: additions of integer function implementations (#1520)
 - F*: change the definition of the `Clone` tyepclass (#1552)


## 0.3.1 (2025-05-26)

Changes to `hax-lib`:
- Bug fix with PartialOrd in f* lib: [#1473](https://github.com/cryspen/hax/pull/1473)
- Move `proof-libs` into `hax-lib` to allow dependencies using crates.io

## 0.3.0 (2025-05-16)

Changes to `hax-lib`:
- Support for SMT patterns in lemmas: [#1428](https://github.com/cryspen/hax/pull/1428)
- While loop invariants and termination (`loop_decreases`): [#1375](https://github.com/cryspen/hax/pull/1375)
- Removal of deprecated dependencies: [#1385](https://github.com/cryspen/hax/pull/1385) and [#1394](https://github.com/cryspen/hax/pull/1394)
- Support for mathematical integers and logical propositions has been strengthened: [#1372](https://github.com/cryspen/hax/pull/1372), [#1352](https://github.com/cryspen/hax/pull/1352), [#1351](https://github.com/cryspen/hax/pull/1351)
- `hax_lib::BACKEND::replace_body`: [#1321](https://github.com/cryspen/hax/pull/1321)
- `hax_lib::decreases`: [#1342](https://github.com/cryspen/hax/pull/1342)

## 0.2.0 (2024-01-20)
 - Initial release


================================================
FILE: CI.md
================================================
# Continuous Integration (CI)

## Github Actions
 - [`add_to_project`](./.github/workflows/add_to_project.yml): each
   time an issue or a PR is open, this action adds it to the project
   [https://github.com/orgs/hacspec/projects/1](https://github.com/orgs/hacspec/projects/1).
 - [`release`](./.github/workflows/release.yml): whenever a tagged
   commit is pushed, this action builds the Linux binary, MacOS
   binary and JS of `hax-engine`, and uploads them to a new GitHub
   release.
 - [`format`](./.github/workflows/format.yml): ensure formatting for
   Rust and OCaml files.
 - [`specs`](./.github/workflows/specs.yml): compiles the toolchain
   (using Nix) and runs it on (for now) a selection of the examples
   provided by [hacspec/specs](https://github.com/hacspec/specs). For
   now this only tests the extraction of the specifications to Coq and
   FStar, we do not run Coq or FStar on the extractions.
 - [`test_installs`](./.github/workflows/test_installs.yml): compiles
   the toolchain on two versions of Ubuntu and two versions of MacOS
   using `apt` or `homebrew` and the `setup.sh` script;
 - [`engine-js-build`](./.github/workflows/engine_js_build.yml): tests
   the build the JS version of the engine.
 
## Merge queue
Additional actions are triggered on pull requests in the merge queue. They are
found in [`test_installs`](./.github/workflows/test_installs.yml).


================================================
FILE: CODEOWNERS
================================================
* @cryspen/hax


================================================
FILE: CONTRIBUTING.md
================================================
# Engineering & Contributing Guidelines

The following is a set of guidelines for contributing to this repository.
These are mostly guidelines, not rules.
Use your best judgement, and feel free to propose changes to this document in a pull request.
The processes described here is not to pester you but to increase and maintain code quality.

## Working with this repository

We use issues to organise and prioritise work items.

**Assignee meaning in issues:** The assignee is the person responsible for following up on the issue (making sure it eventually gets addressed). It is usually (but not necessarily) the one working on it.

After picking up an issue, create a branch.
There can be any number of branches and pull requests for one issue.
But make sure that each issue is clearly linked to the pull request.
There must be one pull request that closes the issue.
If there are multiple PRs for an issue, make sure this is clear in the pull request.

## Pull Requests

We use the GitHub-based PR workflow.
When starting to work on an issue, create a branch and an according pull request that fixes the issue.
The changeset in a pull request must not be larger than 1000 lines (with some exceptions for test snapshots or generated code).
If an issue needs more work than that, split it into multiple pull requests.

After submitting the pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing before asking for review.

While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.

### PR & Commit Guidelines

- Split out mass-changes or mechanical changes into a separate PR from the substantive changes.
- Separate commits into conceptually-separate pieces for review purposes (even if you then later collapse them into a single changeset to merge), if technically possible.
- Address all comments from previous reviews (either by fixing as requested, or explaining why you haven't) before requesting another review.
- If your request only relates to part of the changes, say so clearly.

### Force pushing

It is fine to force-push either (1) before asking for a review or (2) after PR approval, just before merging. Otherwise, in between two reviews, please do not force-push.

### Regressions

When a PR introduces a regression, a fix should be submitted in a
window of 2 days, otherwise the PR will be reverted.

## Rules for the OCaml code
 - Never use the OCaml standard library, always use [`base`](https://v3.ocaml.org/p/base/latest/doc/index.html), [`core`](https://v3.ocaml.org/p/core/latest/doc/index.html) or [`stdlib`](https://v3.ocaml.org/p/stdlib/latest/doc/index.html) instead.
 - Avoid non-total functions (e.g. all the `_exn` functions in `base`).
 - Try to avoid exceptions, if possible.
 - Never use `==`, which is the physical equality, and almost never what you want.

### Changelog
Our changelog format is based on https://keepachangelog.com/.
Please add an entry in a subsection (`Added`, `Changed`, `Deprecated`, `Removed`, `Fixed` -- see https://keepachangelog.com/en/1.0.0/#how) for each notable change.

Please prefix with `engine:`, `frontend:` or similar.

#### Should I add an entry to `CHANGELOG.md`?

**Include in CHANGELOG.md:**
 - New features and enhancements
 - Bug fixes
 - Breaking changes
 - Security patches
 - Major documentation updates
 - Dependency updates that affect users

**Do not include:**
 - Code refactoring with no user impact
 - Minor doc fixes (typos, grammar)
 - CI/CD or tooling changes with no external effect
 - Linting, formatting, or style-only commits
 - Reverts or fixup commits
 - Dependency bumps with no behavioral impact

**Rule of thumb:**
If a user (developer or customer) wouldn’t notice or need to know, leave it out.

## Styleguides

### Optional Title Prefixes for Issues
To help quickly convey the focus of an issue, we sometimes add a short prefix in square brackets at the start of the title: `[prefix] Issue short title`. This is optional; you can just use it if the issue has a clear direction or goal.

Keep it short and intuitive, think of it as a lightweight hint, not a strict taxonomy or replacements for labels or milestones.

Use it when it helps. Leave it out when it doesn’t.

### Git Commit Messages

- Use the present tense
- Use the imperative mood
- Limit the first line to 80 characters
- Don't end the first line of the commit message with a period
- Reference issues and pull requests liberally after the first line
- If the patch is of nontrivial size, point to the important comments in the non-first lines of the commit message.

### Styleguide

Use `rustfmt` for every Rust code and `ocamlformat` for every OCaml
code. From the command line, run `cargo fmt` in the root of hax and
`dune fmt` in `engine`.

### Documentation Styleguide

Use [rustdoc](https://doc.rust-lang.org/rustdoc/index.html) comments
on Rust files and functions. Use
[`odoc`](https://ocaml.github.io/odoc/) comments on OCaml files. It is
mandatory on public functions and encouraged on internal functions.


## Reviews

As a reviewer always keep in mind the following principles

- Reviewing code is more valuable than writing code as it results in higher overall project activity. If you find you can't write code any more due to prioritizing reviews over coding, let's talk.
- You should respond to a review request within one working day of getting it, either with a review, a deadline by which you promise to do the review, or a polite refusal. If you think a patch is lower priority than your other work communicate that.

### Review Guidelines

- Check that the issue is assigned and linked.
- Commit title and message make sense and says what is being changed.
- Check that the PR applies cleanly on the target branch.
- Check new files for license and administrative issues.
- Check out code changes
  - Run automated tests
  - Manually verify changes if possible
- Code review
  - Does the change address the issue at hand?
  - Is the code well documented?
  - Do you understand the code changes?
    - If not, add a comment. The PR can't be accepted in this stage.
  - Is the public API changed?
    - Are the changes well documented for consumers?
    - Do the changes break backwards compatibility?
    - Is the new API sensible/needed?
  - Is the code maintainable after these changes?
  - Are there any security issues with these changes?
  - Are all code changes tested?
  - Do the changes effect performance?
  - Look at the interdiff for second and subsequent reviews.
- Ask if more information is needed to understand and judge the changes.

## AI guidelines

Using AI tools to generate code for Hax is accepted under the following conditions:
- The PR should clearly state that AI has been used and say for which parts of the code, tests, or documentation.
- The author should also explain the methodology: how AI has been used and how the result has been tested.
- Any AI generated content should be carefully reviewed by the author of the PR (before the reviewer).


================================================
FILE: Cargo.toml
================================================
[workspace]
members = [
     "frontend/exporter",
     "frontend/exporter/options",
     "cli/subcommands",
     "cli/driver",
     "test-harness",
     "hax-lib",
     "hax-lib/macros",
     "hax-lib/macros/types",
     "hax-lib-protocol",
     "hax-lib-protocol-macros",
     "hax-bounded-integers",
     "engine/names",
     "engine/names/extract",
     "hax-types",
     "rust-engine",
     "rust-engine/macros",
]
exclude = ["tests", "rustc-coverage-tests", "rust-engine/tests", "hax-lib/core-models"]
default-members = [
     "frontend/exporter",
     "frontend/exporter/options",
     "cli/subcommands",
     "cli/driver",
     "test-harness",
     "hax-lib",
     "hax-lib/macros",
     "hax-lib/macros/types",
     "hax-lib-protocol",
     "hax-lib-protocol-macros",
     "engine/names",
]
resolver = "2"

[workspace.package]
version = "0.3.6"
authors = ["hax Authors"]
license = "Apache-2.0"
homepage = "https://github.com/hacspec/hax"
edition = "2024"
repository = "https://github.com/hacspec/hax"
readme = "README.md"

[workspace.dependencies]
itertools = "0.11.0"
schemars = "0.8"
which = "4.4"
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
clap = { version = "4.0", features = ["derive"] }
syn = { version = "1.0.107", features = [
     "derive",
     "printing",
     "extra-traits",
     "parsing",
     "full",
] }
tracing = { version = "0.1", features = [
     "max_level_trace",
     "release_max_level_trace",
] }
tracing-subscriber = { version = "0.3", features = [
     "env-filter",
     "std",
     "fmt",
] }
tracing-tree = "^0.2"
quote = "1.0.32"
proc-macro2 = "1.0.66"
cargo_metadata = "0.15"
colored = "2"
annotate-snippets = "0.11"

# Crates in this repository
hax-frontend-exporter = { path = "frontend/exporter", version = "=0.3.6", default-features = false }
hax-adt-into = { path = "frontend/exporter/adt-into", version = "=0.3.6" }
hax-frontend-exporter-options = { path = "frontend/exporter/options", version = "=0.3.6" }
hax-lib-macros = { path = "hax-lib/macros", version = "=0.3.6" }
hax-lib-macros-types = { path = "hax-lib/macros/types", version = "=0.3.6" }
hax-lib = { path = "hax-lib", version = "=0.3.6" }
hax-engine-names = { path = "engine/names", version = "=0.3.6" }
hax-types = { path = "hax-types", version = "=0.3.6" }
hax-rust-engine = { path = "rust-engine", version = "=0.3.6" }
hax-rust-engine-macros = { path = "rust-engine/macros", version = "=0.3.6" }

[workspace.metadata.release]
owners = ["github:cryspen:tools"]


================================================
FILE: LICENSE
================================================

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   Copyright 2023 Hax Authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

================================================
FILE: PUBLISHING.md
================================================
# Publishing

## OCaml

There is only the package `hax-engine`, that includes a binary and a
number of libraries.

We have no particular release procedure for the engine: we don't plan
on publishing it to opam.

## Rust

This repository is divided into several crates, some to be published,
some not. All crates should start with the `hax-` prefix, but
`cargo-hax` which is the entrypoint to the cargo `hax` subcommand.

Here is the list of the crates in this repository (excluding `tests`
and `examples`):

- `hax-test-harness` **(doesn't need to be published)**

### cargo-hax

1. `hax-frontend-exporter-options` (`frontend/exporter/options `)
2. `hax-adt-into` (`frontend/exporter/adt-into`)
3. `hax-frontend-exporter` (`frontend/exporter`)
4. `hax-types` (`hax-types`)
5. `hax-subcommands` (binaries) (`cli/subcommands`)
   - `cargo-hax`
   - `hax-export-json-schemas`
   - `hax-pretty-print-diagnostics`

- `hax-driver`

### hax-lib

We publish the following crates that are helper libraries to be used
for hax code:

1. `hax-lib-macros-types`
2. `hax-lib-macros`
3. `hax-lib`

### Supporting crates for the engine
The crate listed below are used only by the OCaml build of the
engine. Those should not be published on `crate.io`.

1. `cargo-hax-engine-names`
2. `cargo-hax-engine-names-extract`

## Procedure
 1. Move the contents of `CHANGELOG.md` under the `[Unreleased]` section to a new section named following the target version. Commit this change.
 2. Bump the version number with `cargo release LEVEL --workspace --no-publish --no-tag --execute` (`cargo release --help` for more details on `LEVEL`, `cargo install cargo-release` if you don't already have this package). This will bump the version of every Rust crate, but also the version in `engine/dune-project`. This will also regenerate `engine/hax-engine.opam`. Note this will *not* publish the crate.
 3. PR the change
 4. when the PR is merged in main, checkout `main` and run `cargo release --workspace --execute`

Note: for now, we are not publishing to Opam. Instead, let's just advertise the following for installation:
```bash
opam pin hax-engine https://github.com/hacspec/hax.git#the-release-tag
opam install hax-engine
```

## Notes
`cargo release` reads the `Cargo.toml` of each crates of the workspace.
Some creates are excluded from releasing: in their `Cargo.toml` manifest, they have `package.metadata.release.release` set to `false`.

Also, `cli/subcommands/Cargo.toml` specifies pre-release replacements for the engine: the version of the engine is bumped automatically by `cargo release`.


================================================
FILE: README.md
================================================
<p align="center">
  <img src="logo.svg"/>
</p>

<p align="center">
  <a href="https://hacspec.zulipchat.com/"><img src="https://img.shields.io/badge/Zulip-50ADFF?logo=Zulip&logoColor=white" alt="Zulip"></a>
  <a href="https://hax-playground.cryspen.com"><img src="https://img.shields.io/badge/try-Playground-1f6feb" alt="Playground"></a>
  <a href="https://hax.cryspen.com"><img src="https://img.shields.io/badge/docs-Website-brightgreen" alt="Website"></a>
  <a href="https://hax.cryspen.com/blog"><img src="https://img.shields.io/badge/Blog-9b59b6" alt="Blog"></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License: Apache-2.0"></a>
</p>

# Hax

hax is a tool for high assurance translations of a large subset of
Rust into formal languages such as [F\*](https://www.fstar-lang.org/) or [Rocq](https://rocq-prover.org/).

<p align="center">
    <a href="https://hax-playground.cryspen.com/#fstar+tc/latest-main/gist=5252f86237adbca7fdeb7a8fea0b1648">
    Try out hax online now!
    </a>
</p>

### Supported Backends

<table align="center">
  <tr>
    <td align="center" colspan="3">
      General purpose proof assistants
    </td>
    <td align="center" colspan="2">
      Cryptography & protocols
    </td>
  </tr>
  <tr>
    <td align="center">
      <a href="https://www.fstar-lang.org/">
        F*
        <!-- <picture>
          <source srcset=".github/assets/fstar-dark.png" media="(prefers-color-scheme: dark)">
          <source srcset=".github/assets/fstar-light.png" media="(prefers-color-scheme: light)">
          <img src=".github/assets/fstar-light.png" height="40" alt="F*">
        </picture> -->
      </a>
    </td>
    <td align="center">
      <a href="https://rocq-prover.org/">
        <picture>
          <source srcset=".github/assets/rocq-dark.svg" media="(prefers-color-scheme: dark)">
          <source srcset=".github/assets/rocq-light.svg" media="(prefers-color-scheme: light)">
          <img src=".github/assets/rocq-light.svg" height="18" alt="Rocq">
        </picture>
      </a>
    </td>
    <td align="center" style="vertical-align: center; ">
      <a href="https://lean-lang.org/">
        <picture>
          <source srcset=".github/assets/lean-dark.svg" media="(prefers-color-scheme: dark)">
          <source srcset=".github/assets/lean-light.svg" media="(prefers-color-scheme: light)">
          <img src=".github/assets/lean-light.svg" height="18" alt="Lean">
        </picture>
      </a>
    </td>
    <td align="center">
      <a href="https://github.com/SSProve/ssprove">
        <picture>
          <source srcset=".github/assets/ssprove-dark.svg" media="(prefers-color-scheme: dark)">
          <source srcset=".github/assets/ssprove-light.svg" media="(prefers-color-scheme: light)">
          <img src=".github/assets/ssprove-light.svg" height="18" alt="SSProve">
        </picture>
      </a>
    </td>
    <td align="center">
      <a href="https://proverif.inria.fr/">
        <b>ProVerif</b>
      </a>
    </td>
  </tr>
  <tr>
    <!-- 🟢🟡🟠🔴 -->
    <td align="center"><sub>🟢 stable</sub></td>
    <td align="center"><sub>🟡 partial</sub></td>
    <td align="center"><sub>🚀 active dev.</sub></td>
    <td align="center"><sub>🟡 partial</sub></td>
    <td align="center"><sub>🟠 PoC</sub></td>
  </tr>
</table>

## Learn more

Here are some resources for learning more about hax:

 - [Manual](https://hax.cryspen.com/manual/index.html) (work in progress)
    + Quick start: [F*](https://hax.cryspen.com/manual/fstar/quick_start/), [Lean](https://hax.cryspen.com/manual/lean/quick_start/)
    + Tutorial: [F*](https://hax.cryspen.com/manual/fstar/tutorial/), [Lean](https://hax.cryspen.com/manual/lean/tutorial/)
 - [Examples](./examples/): the [examples directory](./examples/) contains
   a set of examples that show what hax can do for you.
 - Other [specifications](https://github.com/hacspec/specs) of cryptographic protocols.

Questions? Join us on [Zulip](https://hacspec.zulipchat.com/) or open a [GitHub Discussion](https://github.com/cryspen/hax/discussions). For bugs, file an [Issue](https://github.com/cryspen/hax/issues).

## Usage
Hax is a cargo subcommand. 
The command `cargo hax` accepts the following subcommands:
 * **`into`** (`cargo hax into BACKEND`): translate a Rust crate to the backend `BACKEND` (e.g. `fstar`, `coq`, `lean`).
 * **`json`** (`cargo hax json`): extract the typed AST of your crate as a JSON file.
 
Note:
 * `BACKEND` can be `fstar`, `lean`, `coq`, `easycrypt` or `pro-verif`. `cargo hax into --help`
   gives the full list of supported backends.
 * The subcommands `cargo hax`, `cargo hax into` and `cargo hax into
   <BACKEND>` takes options. For instance, you can `cargo hax into
   fstar --z3rlimit 100`. Use `--help` on those subcommands to list
   all options.

## Installation
<details>
  <summary><b>Manual installation</b></summary>

1. Make sure to have the following installed on your system:

- [`opam`](https://opam.ocaml.org/) (`opam switch create 5.1.1`)
- [`rustup`](https://rustup.rs/)
- [`nodejs`](https://nodejs.org/)
- [`jq`](https://jqlang.github.io/jq/)

2. Clone this repo: `git clone git@github.com:cryspen/hax.git && cd hax`
3. Run the [setup.sh](./setup.sh) script: `./setup.sh`.
4. Run `cargo-hax --help`

</details>

<details>
  <summary><b>Nix</b></summary>

 This should work on [Linux](https://nixos.org/download.html#nix-install-linux), [MacOS](https://nixos.org/download.html#nix-install-macos) and [Windows](https://nixos.org/download.html#nix-install-windows).

<details>
  <summary><b>Prerequisites:</b> <a href="https://nixos.org/">Nix package
manager</a> <i>(with <a href="https://nixos.wiki/wiki/Flakes">flakes</a> enabled)</i></summary>

  - Either using the [Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer), with the following bash one-liner:
    ```bash
    curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
    ```
  - or following [those steps](https://github.com/mschwaig/howto-install-nix-with-flake-support).

</details>

+ **Run hax on a crate directly** to get F\*/Coq/Lean/... (assuming you are in the crate's folder):
   - `nix run github:hacspec/hax -- into fstar` extracts F*.

+ **Install hax**:  `nix profile install github:hacspec/hax`, then run `cargo hax --help` anywhere
+ **Note**: in any of the Nix commands above, replace `github:hacspec/hax` by `./dir` to compile a local checkout of hax that lives in `./some-dir`
+ **Setup binary cache**: [using Cachix](https://app.cachix.org/cache/hax), just `cachix use hax`

</details>

<details>
  <summary><b>Using Docker</b></summary>

1. Clone this repo: `git clone git@github.com:hacspec/hax.git && cd hax`
3. Build the docker image: `docker build -f .docker/Dockerfile . -t hax`
4. Get a shell: `docker run -it --rm -v /some/dir/with/a/crate:/work hax bash`
5. You can now run `cargo-hax --help` (notice here we use `cargo-hax` instead of `cargo hax`)

Note: Please make sure that `$HOME/.cargo/bin` is in your `$PATH`, as
that is where `setup.sh` will install hax.

</details>

## Supported Subset of the Rust Language

Hax intends to support full Rust, with the one exception, promoting a functional style: mutable references (aka `&mut T`) on return types or when aliasing (see https://github.com/hacspec/hax/issues/420) are forbidden.

Each unsupported Rust feature is documented as an issue labeled [`unsupported-rust`](https://github.com/hacspec/hax/issues?q=is%3Aissue+is%3Aopen+label%3Aunsupported-rust). When the issue is labeled [`wontfix-v1`](https://github.com/hacspec/hax/issues?q=is%3Aissue+is%3Aopen+label%3Aunsupported-rust+label%3Awontfix%2Cwontfix-v1), that means we don't plan on supporting that feature soon.

Quicklinks:
 - [🔨 Rejected rust we want to support](https://github.com/hacspec/hax/issues?q=is%3Aissue+is%3Aopen+label%3Aunsupported-rust+-label%3Awontfix%2Cwontfix-v1);
 - [💭 Rejected rust we don't plan to support in v1](https://github.com/hacspec/hax/issues?q=is%3Aissue+is%3Aopen+label%3Aunsupported-rust+label%3Awontfix%2Cwontfix-v1).

## Hacking on Hax
The documentation of the internal crate of hax and its engine can be
found [here for the engine](https://hax.cryspen.com/engine/index.html)
and [here for the frontend](https://hax.cryspen.com/frontend/index.html).

### Edit the sources (Nix)

Just clone & `cd` into the repo, then run `nix develop .`.
You can also just use [direnv](https://github.com/nix-community/nix-direnv), with [editor integration](https://github.com/direnv/direnv/wiki#editor-integration).

### Structure of this repository

- `rust-frontend/`: Rust library that hooks in the rust compiler and
  extract its internal typed abstract syntax tree
  [**THIR**](https://rustc-dev-guide.rust-lang.org/thir.html) as JSON.
- `engine/`: the simplification and elaboration engine that translates programs
  from the Rust language to various backends (see `engine/backends/`). Written
  in OCaml.
- `rust-engine/`: an on-going rewrite of our engine from OCaml to Rust.
- `cli/`: the `hax` subcommand for Cargo.

### Compiling, formatting, and more
We use the [`just` command runner](https://just.systems/). If you use
Nix, the dev shell provides it automatically, if you don't use Nix,
please [install `just`](https://just.systems/man/en/packages.html) on
your system.

Anywhere within the repository, you can build and install in PATH (1)
the Rust parts with `just rust`, (2) the OCaml parts with `just ocaml`
or (3) both with `just build`. More commands (e.g. `just fmt` to
format) are available, please run `just` or `just --list` to get all
the commands.

## Publications & Other material

* [📕 Tech report](https://hal.inria.fr/hal-03176482)
* [📕 HACSpec: A gateway to high-assurance cryptography](https://github.com/hacspec/hacspec/blob/master/rwc2023-abstract.pdf)
* [📕 Original hacspec paper](https://www.franziskuskiefer.de/publications/hacspec-ssr18-paper.pdf)

### Secondary literature, using hacspec:
* [📕 Last yard](https://eprint.iacr.org/2023/185)
* [📕 A Verified Pipeline from a Specification Language to Optimized, Safe Rust](https://github.com/hacspec/hacspec.github.io/blob/master/coqpl22-final61.pdf) at [CoqPL'22](https://popl22.sigplan.org/details/CoqPL-2022-papers/5/A-Verified-Pipeline-from-a-Specification-Language-to-Optimized-Safe-Rust)
* [📕 Hax - Enabling High Assurance Cryptographic Software](https://github.com/hacspec/hacspec.github.io/blob/master/RustVerify24.pdf) at [RustVerify24](https://sites.google.com/view/rustverify2024)
* [📕 A formal security analysis of Blockchain voting](https://github.com/hacspec/hacspec.github.io/blob/master/coqpl24-paper8-2.pdf) at [CoqPL'24](https://popl24.sigplan.org/details/CoqPL-2024-papers/8/A-formal-security-analysis-of-Blockchain-voting)
* [📕 Specifying Smart Contract with Hax and ConCert](https://github.com/hacspec/hacspec.github.io/blob/master/coqpl24-paper9-13.pdf) at [CoqPL'24](https://popl24.sigplan.org/details/CoqPL-2024-papers/9/Specifying-Smart-Contract-with-Hax-and-ConCert)

## Contributing

Before starting any work please join the [Zulip chat][chat-link], start a [discussion on Github](https://github.com/hacspec/hax/discussions), or file an [issue](https://github.com/hacspec/hax/issues) to discuss your contribution.


[chat-link]: https://hacspec.zulipchat.com

## Acknowledgements

[Zulip] graciously provides the hacspec & hax community with a "Zulip Cloud Standard" tier.


[Zulip]: https://zulip.com/


================================================
FILE: cli/default.nix
================================================
{ craneLib, stdenv, makeWrapper, lib, rustc, rustc-docs, gcc, hax-engine
, doCheck ? true, libz, libiconv }:
let
  pname = "hax";
  is-webapp-static-asset = path:
    builtins.match ".*(script[.]js|index[.]html)" path != null;
  buildInputs = lib.optionals stdenv.isDarwin [ libiconv libz.dev ];
  binaries = [ hax hax-engine.bin rustc gcc hax_rust_engine ] ++ buildInputs;
  commonArgs = {
    version = "0.0.1";
    src = lib.cleanSourceWith {
      src = craneLib.path ./..;
      filter = path: type:
        (builtins.isNull
        (builtins.match ".*/(tests|examples|docs|proof-libs)/.*" path)
        && builtins.isNull (builtins.match ".*[.](md|svg)" path)
        && (craneLib.filterCargoSources path type
          || is-webapp-static-asset path))
        || !(builtins.isNull (builtins.match ".*/renamings" path));
    };
    inherit buildInputs doCheck;
    doNotRemoveReferencesToRustToolchain = true;
  } // (if doCheck then {
    # [cargo test] builds independent workspaces. Each time another
    # workspace is added, it's corresponding lockfile should be added
    # in the [cargoLockList] list below.
    cargoVendorDir = craneLib.vendorMultipleCargoDeps {
      cargoLockList = [ ../Cargo.lock ../tests/Cargo.lock ];
    };
  } else
    { });
  # hax dependencies (without hax itself)
  cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { pname = pname; });
  # hax with cargo artifact for incremental compilation
  hax_with_artifacts = craneLib.buildPackage (commonArgs // {
    inherit cargoArtifacts pname;
    doInstallCargoArtifacts = true;
  });
  # hax without cargo artifacts: only binaries
  hax = stdenv.mkDerivation {
    name = hax_with_artifacts.name;
    unpackPhase = "true";
    buildPhase = "true";
    installPhase = ''
      mkdir -p $out
      cp -r ${hax_with_artifacts}/bin $out/bin
    '';
  };
  hax_rust_engine = craneLib.buildPackage (commonArgs // {
    inherit cargoArtifacts;
    buildInputs = buildInputs ++ [ makeWrapper ];
    pname = "hax-rust-engine";
    cargoExtraArgs = "--manifest-path rust-engine/Cargo.toml --locked";
  });
  docs = craneLib.cargoDoc (commonArgs // {
    # preBuildPhases = [ "addRustcDocs" ];
    cargoDocExtraArgs = "--document-private-items";
    # addRustcDocs = ''
    #   mkdir -p target/doc
    #   cp --no-preserve=mode -rf ${rustc-docs}/share/doc/rust/html/rustc/* target/doc/
    # '';
    inherit cargoArtifacts pname;
  });
  tests = craneLib.buildPackage (commonArgs // {
    inherit cargoArtifacts;
    pname = "hax-tests";
    doCheck = true;
    CI = "true";
    cargoBuildCommand = "true";
    checkPhaseCargoCommand = ''
      SNAPS_DIR=test-harness/src/snapshots && rmdir "$SNAPS_DIR"
      TESTS_DIR=tests                      && rmdir "$TESTS_DIR"

      ln -s ${../test-harness/src/snapshots}        "$SNAPS_DIR"
      cp -r --no-preserve=mode   ${../tests}        "$TESTS_DIR"

      cargo test --test toolchain --profile release
    '';
    buildInputs = binaries;
    CARGO_TESTS_ASSUME_BUILT = "yes";
  });
in stdenv.mkDerivation {
  name = hax.name;
  buildInputs = [ makeWrapper ];
  phases = [ "installPhase" ];
  installPhase = ''
    mkdir -p $out/bin
    makeWrapper ${hax}/bin/cargo-hax $out/bin/cargo-hax \
      --prefix PATH : ${lib.makeBinPath binaries} \
      ${
        lib.optionalString stdenv.isDarwin ''
          --prefix RUSTFLAGS : "-C link-arg=-L${libiconv}/lib" \
          --suffix DYLD_LIBRARY_PATH : ${lib.makeLibraryPath [ libz rustc ]}
        ''
      }
  '';
  meta.mainProgram = "cargo-hax";
  passthru = {
    unwrapped = hax;
    hax-engine-names-extract = craneLib.buildPackage (commonArgs // {
      pname = "hax_engine_names_extract";
      cargoLock = ../Cargo.lock;
      cargoToml = ../engine/names/extract/Cargo.toml;
      cargoArtifacts = hax_with_artifacts;
      nativeBuildInputs = [ hax_with_artifacts ];
      postUnpack = ''
        cd $sourceRoot/engine/names/extract
        sourceRoot="."
      '';
    });
    inherit docs tests;
  };
}


================================================
FILE: cli/driver/Cargo.toml
================================================
[package]
name = "hax-driver"
version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
edition.workspace = true
repository.workspace = true
readme.workspace = true
description = "The custom rustc driver used by hax."

[package.metadata.rust-analyzer]
rustc_private = true

[[bin]]
path = "src/driver.rs"
name = "driver-hax-frontend-exporter"

[dependencies]
serde.workspace = true
serde_json.workspace = true
clap.workspace = true
colored.workspace = true
hax-frontend-exporter = {workspace = true, features = ["rustc"]}
hax-types = {workspace = true, features = ["rustc"]}
hax-frontend-exporter-options.workspace = true
hax-lib-macros-types.workspace = true
itertools.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
tracing-tree.workspace = true


================================================
FILE: cli/driver/src/callbacks_wrapper.rs
================================================
use hax_types::cli_options::{ENV_VAR_OPTIONS_FRONTEND, ExporterOptions};

use rustc_ast::Crate;
use rustc_driver::{Callbacks, Compilation};
use rustc_interface::interface;
use rustc_middle::ty::TyCtxt;
use rustc_span::symbol::Symbol;

/// Wraps a [Callbacks] structure, and injects some cache-related
/// configuration in the `config` phase of rustc
pub struct CallbacksWrapper<'a> {
    pub sub: &'a mut (dyn Callbacks + Send + 'a),
    pub options: ExporterOptions,
}
impl<'a> Callbacks for CallbacksWrapper<'a> {
    fn config(&mut self, config: &mut interface::Config) {
        let options = self.options.clone();
        config.psess_created = Some(Box::new(move |parse_sess| {
            // Silence the "unexpected cfg" lints.
            parse_sess.check_config.exhaustive_names = false;
            let depinfo = parse_sess.env_depinfo.get_mut();
            depinfo.insert((
                Symbol::intern(ENV_VAR_OPTIONS_FRONTEND),
                Some(Symbol::intern(&serde_json::to_string(&options).unwrap())),
            ));
            depinfo.insert((
                Symbol::intern("HAX_CARGO_CACHE_KEY"),
                std::env::var("HAX_CARGO_CACHE_KEY")
                    .ok()
                    .as_deref()
                    .map(Symbol::intern),
            ));
        }));
        self.sub.config(config)
    }
    fn after_crate_root_parsing<'tcx>(
        &mut self,
        compiler: &interface::Compiler,
        krate: &mut Crate,
    ) -> Compilation {
        self.sub.after_crate_root_parsing(compiler, krate)
    }
    fn after_expansion<'tcx>(
        &mut self,
        compiler: &interface::Compiler,
        tcx: TyCtxt<'tcx>,
    ) -> Compilation {
        self.sub.after_expansion(compiler, tcx)
    }
    fn after_analysis<'tcx>(
        &mut self,
        compiler: &interface::Compiler,
        tcx: TyCtxt<'tcx>,
    ) -> Compilation {
        self.sub.after_analysis(compiler, tcx)
    }
}


================================================
FILE: cli/driver/src/driver.rs
================================================
#![feature(rustc_private)]
#![feature(box_patterns)]
#![feature(trait_alias)]
#![allow(unused_imports)]
#![allow(unused_variables)]
#![allow(unreachable_code)]
#![allow(dead_code)]
#![feature(macro_metavar_expr)]
#![feature(internal_output_capture)]

extern crate rustc_ast;
extern crate rustc_borrowck;
extern crate rustc_data_structures;
extern crate rustc_driver;
extern crate rustc_errors;
extern crate rustc_feature;
extern crate rustc_hashes;
extern crate rustc_hir;
extern crate rustc_hir_analysis;
extern crate rustc_hir_id;
extern crate rustc_index;
extern crate rustc_interface;
extern crate rustc_middle;
extern crate rustc_mir_build;
extern crate rustc_session;
extern crate rustc_span;
extern crate rustc_target;
extern crate rustc_type_ir;

mod exporter;

use std::collections::HashSet;

use exporter::ExtractionCallbacks;

mod callbacks_wrapper;
mod features;
use callbacks_wrapper::*;
use features::*;

use hax_types::cli_options::{ENV_VAR_OPTIONS_FRONTEND, ExporterOptions};

use rustc_driver::{Callbacks, Compilation};
use rustc_interface::interface;
use rustc_span::symbol::Symbol;

fn rustc_sysroot() -> String {
    std::process::Command::new("rustc")
        .args(["--print", "sysroot"])
        .output()
        .ok()
        .and_then(|out| String::from_utf8(out.stdout).ok())
        .map(|s| s.trim().to_string())
        .unwrap()
}

fn setup_logging() {
    use tracing_subscriber::prelude::*;
    let enable_colors = {
        /* Respect [never] in [RUST_LOG_STYLE] */
        !std::env::var("RUST_LOG_STYLE").is_ok_and(|style| style == "never")
    };
    let subscriber = tracing_subscriber::Registry::default()
        .with(tracing_subscriber::EnvFilter::from_default_env())
        .with(
            tracing_tree::HierarchicalLayer::new(2)
                .with_ansi(enable_colors)
                .with_indent_lines(true),
        );
    tracing::subscriber::set_global_default(subscriber).unwrap();
}

const HAX_VANILLA_RUSTC: &str = "HAX_VANILLA_RUSTC";

fn main() {
    setup_logging();

    let options: ExporterOptions = serde_json::from_str(
        &std::env::var(ENV_VAR_OPTIONS_FRONTEND).unwrap_or_else(|_| {
            panic!(
                "Cannot find environnement variable {}",
                ENV_VAR_OPTIONS_FRONTEND
            )
        }),
    )
    .unwrap_or_else(|_| {
        panic!(
            "Invalid value for the environnement variable {}",
            ENV_VAR_OPTIONS_FRONTEND
        )
    });

    let mut rustc_args: Vec<String> = std::env::args().skip(1).collect();
    // add [--sysroot] if not present
    if !rustc_args.iter().any(|arg| arg.starts_with("--sysroot")) {
        rustc_args.extend(vec!["--sysroot".into(), rustc_sysroot()])
    };

    // When `HAX_FEATURES_DETECTION_MODE` is set, we just detect
    // features for the current crate, output them in JSON on stderr
    // and exit immediately
    if std::env::var("HAX_FEATURES_DETECTION_MODE").is_ok() {
        use std::io::BufWriter;
        return serde_json::to_writer(
            BufWriter::new(std::io::stderr()),
            &Features::detect(&options, &rustc_args),
        )
        .unwrap();
    }

    let (vanilla_rustc, vanilla_rustc_never) = {
        let vanilla_rustc = std::env::var(HAX_VANILLA_RUSTC);
        let vanilla_rustc_never = vanilla_rustc == Ok("never".into());
        (
            !vanilla_rustc_never && vanilla_rustc.is_ok(),
            vanilla_rustc_never,
        )
    };

    // fetch the correct callback structure given the command, and
    // coerce options
    let is_primary_package = std::env::var("CARGO_PRIMARY_PACKAGE").is_ok();
    let is_build_script = std::env::var("CARGO_CRATE_NAME") == Ok("build_script_build".to_string()); // FIXME: is there a more robust way to do this?
    let translate_package =
        !vanilla_rustc && !is_build_script && (options.deps || is_primary_package);
    let mut callbacks: Box<dyn Callbacks + Send> = if translate_package {
        Box::new(exporter::ExtractionCallbacks {
            body_kinds: options.body_kinds.clone(),
            experimental_full_def: options.experimental_full_def,
        })
    } else {
        struct CallbacksNoop;
        impl Callbacks for CallbacksNoop {}
        Box::new(CallbacksNoop)
    };

    if translate_package {
        // We want to enable certain features, but only if the crate
        // itself doesn't enable those
        let features = Features {
            adt_const_params: false,    // not useful for now
            generic_const_exprs: false, // not useful for now
            register_tool: true,
            registered_tools: HashSet::from_iter(vec![hax_lib_macros_types::HAX_TOOL.into()]),
            auto_traits: true,
            negative_impls: true,
        } - Features::detect_forking();
        rustc_args = [rustc_args[0].clone()]
            .into_iter()
            .chain([
                "--cfg".into(),
                hax_lib_macros_types::HAX_CFG_OPTION_NAME.into(),
            ])
            .chain(match &options.backend {
                Some(backend) => vec!["--cfg".into(), format!("hax_backend_{backend}")],
                None => vec![],
            })
            .chain(features.into_iter().map(|s| format!("-Zcrate-attr={}", s)))
            .chain(rustc_args[1..].iter().cloned())
            .collect();
    };

    let mut callbacks = CallbacksWrapper {
        sub: &mut *callbacks,
        options: {
            let mut options = options.clone();
            options.force_cargo_build = if translate_package {
                options.force_cargo_build
            } else {
                hax_types::cli_options::ForceCargoBuild::default()
            };
            options
        },
    };

    let exit_code = rustc_driver::catch_with_exit_code({
        let rustc_args = rustc_args.clone();
        move || rustc_driver::run_compiler(&rustc_args, &mut callbacks)
    });

    std::process::exit(
        if !vanilla_rustc_never && translate_package && exit_code == 0 {
            // When the hax translation is successful, we need to re-run
            // rustc. Indeed, hax translation doesn't actually build a
            // package: no `rlib` will be written on disk.
            self::vanilla_rustc()
        } else {
            exit_code
        },
    )
}

/// Re-run rustc without doing any hax translation. This ensures a
/// `rlib` is produced (when the crate compiles correctly).
fn vanilla_rustc() -> i32 {
    use std::process::{Command, Stdio};
    let output = Command::new(std::env::args().next().unwrap())
        .args(std::env::args().skip(1))
        .env(HAX_VANILLA_RUSTC, "1")
        .stdout(Stdio::piped())
        .stderr(Stdio::piped())
        .spawn()
        .unwrap()
        .wait_with_output()
        .unwrap();
    if output.status.success() {
        0
    } else {
        let stdout = &std::str::from_utf8(&output.stdout).unwrap();
        let stderr = &std::str::from_utf8(&output.stderr).unwrap();
        println!("{stdout}");
        eprintln!("{stderr}");
        output.status.code().unwrap_or(1)
    }
}


================================================
FILE: cli/driver/src/exporter.rs
================================================
use hax_frontend_exporter::SInto;
use hax_frontend_exporter::state::LocalContextS;
use hax_types::cli_options::PathOrDash;
use hax_types::driver_api::Items;
use rustc_driver::{Callbacks, Compilation};
use rustc_interface::interface;
use rustc_interface::interface::Compiler;
use rustc_middle::middle::region::Scope;
use rustc_middle::ty::TyCtxt;
use rustc_middle::{
    thir,
    thir::{Block, BlockId, Expr, ExprId, ExprKind, Pat, PatKind, Stmt, StmtId, StmtKind, Thir},
};
use rustc_span::symbol::Symbol;
use serde::Serialize;
use std::cell::RefCell;
use std::collections::{HashMap, HashSet};
use std::rc::Rc;

/// Browse a crate and translate every item
#[tracing::instrument(skip_all)]
fn export_crate<'tcx, Body: hax_frontend_exporter::IsBody>(
    options: &hax_frontend_exporter_options::Options,
    tcx: TyCtxt<'tcx>,
    experimental_full_def: bool,
) -> (
    Vec<rustc_span::Span>,
    Vec<hax_frontend_exporter::DefId>,
    Vec<(
        hax_frontend_exporter::DefId,
        hax_frontend_exporter::ImplInfos,
    )>,
    Items<Body>,
    hax_frontend_exporter::id_table::Table,
) {
    use hax_frontend_exporter::WithGlobalCacheExt;
    let state = hax_frontend_exporter::state::State::new(tcx, options.clone());

    let result = if experimental_full_def {
        let owners = tcx.hir_crate_items(()).owners();
        Items::FullDef(
            owners
                .map(|owner_id| {
                    owner_id
                        .to_def_id()
                        .sinto(&state)
                        .full_def(&state)
                        .as_ref()
                        .clone()
                })
                .collect(),
        )
    } else {
        Items::Legacy(
            tcx.hir_free_items()
                .map(|id| tcx.hir_item(id).sinto(&state))
                .collect(),
        )
    };
    let impl_infos = hax_frontend_exporter::impl_def_ids_to_impled_types_and_bounds(&state)
        .into_iter()
        .collect();
    let exported_spans = state.with_global_cache(|cache| cache.spans.keys().copied().collect());
    let exported_def_ids = state.with_global_cache(|cache| {
        cache
            .per_item
            .values()
            .filter_map(|per_item_cache| per_item_cache.def_id.clone())
            .collect()
    });
    let cache_map = state.with_global_cache(|cache| cache.id_table_session.table().clone());

    (
        exported_spans,
        exported_def_ids,
        impl_infos,
        result,
        cache_map,
    )
}

/// Callback for extraction
#[derive(Debug, Clone, Serialize)]
pub(crate) struct ExtractionCallbacks {
    pub body_kinds: Vec<hax_types::cli_options::ExportBodyKind>,
    pub experimental_full_def: bool,
}

impl From<ExtractionCallbacks> for hax_frontend_exporter_options::Options {
    fn from(opts: ExtractionCallbacks) -> hax_frontend_exporter_options::Options {
        hax_frontend_exporter_options::Options {
            inline_anon_consts: true,
            bounds_options: hax_frontend_exporter_options::BoundsOptions {
                resolve_destruct: false,
                prune_sized: true,
            },
            item_ref_use_concrete_impl: false,
        }
    }
}

impl Callbacks for ExtractionCallbacks {
    fn config(&mut self, config: &mut rustc_interface::interface::Config) {
        config.override_queries = Some(|_sess, providers| {
            hax_frontend_exporter::override_queries_store_body(providers);
        });
    }
    fn after_expansion<'tcx>(&mut self, compiler: &Compiler, tcx: TyCtxt<'tcx>) -> Compilation {
        use std::ops::{Deref, DerefMut};

        use hax_frontend_exporter::ThirBody;
        use hax_types::cli_options::Command;
        use rustc_session::config::CrateType;
        use serde::{Deserialize, Serialize};
        use std::fs::File;
        use std::io::BufWriter;

        use std::path::PathBuf;

        let opts = &compiler.sess.opts;
        let externs: Vec<_> = opts
            .externs
            .iter()
            .flat_map(|(_, ext)| match &ext.location {
                rustc_session::config::ExternLocation::ExactPaths(set) => set
                    .iter()
                    .map(|cp| cp.canonicalized())
                    .collect::<Vec<_>>()
                    .into_iter(),
                _ => vec![].into_iter(),
            })
            .map(|path| path.with_extension("haxmeta"))
            .collect();

        let cg_metadata = opts.cg.metadata[0].clone();
        let crate_name = opts.crate_name.clone().unwrap();

        let output_dir = compiler.sess.io.output_dir.clone().unwrap();
        let haxmeta_path = output_dir.join(format!("{crate_name}-{cg_metadata}.haxmeta",));

        let mut file = BufWriter::new(File::create(&haxmeta_path).unwrap());

        use hax_types::driver_api::{HaxMeta, with_kind_type};
        with_kind_type!(
            self.body_kinds.clone(),
            <Body>|| {
                let (spans, def_ids, impl_infos, items, cache_map) =
                    export_crate(&self.clone().into(), tcx, self.experimental_full_def);
                let files: HashSet<PathBuf> =
                    match &items {
                        Items::Legacy(items) => HashSet::from_iter(items
                        .iter()
                        .flat_map(|item| item.span.filename.to_path().map(|path| path.to_path_buf()))),
                        Items::FullDef(items) => HashSet::from_iter(items
                            .iter()
                            .flat_map(|item| item.span.filename.to_path().map(|path| path.to_path_buf()))),
                    }

                ;
                let haxmeta: HaxMeta<Body> = HaxMeta {
                    crate_name,
                    cg_metadata,
                    externs,
                    impl_infos,
                    items,
                    comments: files.into_iter()
                        .flat_map(|path|hax_frontend_exporter::comments::comments_of_file(path).ok())
                        .flatten()
                        .collect(),
                    def_ids,
                    hax_version: hax_types::HAX_VERSION.into(),
                };
                haxmeta.write(&mut file, cache_map);
            }
        );

        let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
        let manifest_dir = std::path::Path::new(&manifest_dir);

        let data = hax_types::driver_api::EmitHaxMetaMessage {
            manifest_dir: Some(manifest_dir.to_path_buf()),
            working_dir: Some(
                opts.working_dir
                    .to_path(rustc_span::FileNameDisplayPreference::Local)
                    .to_path_buf(),
            ),
            path: haxmeta_path,
        };
        eprintln!(
            "{}{}",
            hax_types::driver_api::HAX_DRIVER_STDERR_PREFIX,
            &serde_json::to_string(&hax_types::driver_api::HaxDriverMessage::EmitHaxMeta(data))
                .unwrap()
        );

        Compilation::Stop
    }
}


================================================
FILE: cli/driver/src/features.rs
================================================
use std::collections::HashSet;

use rustc_driver::{Callbacks, Compilation};
use rustc_interface::interface;
use rustc_middle::ty::TyCtxt;
use rustc_span::symbol::Symbol;

use crate::callbacks_wrapper::CallbacksWrapper;

use serde::{Deserialize, Serialize};

/// A subset of `rustc_feature::Features` that is relevant to us
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Features {
    pub adt_const_params: bool,
    pub generic_const_exprs: bool,
    pub register_tool: bool,
    pub auto_traits: bool,
    pub negative_impls: bool,
    pub registered_tools: HashSet<String>,
}

impl From<&rustc_feature::Features> for Features {
    fn from(rfeatures: &rustc_feature::Features) -> Self {
        Features {
            adt_const_params: rfeatures.adt_const_params(),
            generic_const_exprs: rfeatures.generic_const_exprs(),
            register_tool: rfeatures.register_tool(),
            auto_traits: rfeatures.auto_traits(),
            negative_impls: rfeatures.negative_impls(),
            registered_tools: HashSet::new(),
        }
    }
}

impl core::ops::Sub for Features {
    type Output = Self;
    fn sub(self, rhs: Self) -> Self {
        fn sub(x: bool, y: bool) -> bool {
            x & !y
        }
        Features {
            adt_const_params: sub(self.adt_const_params, rhs.adt_const_params),
            generic_const_exprs: sub(self.generic_const_exprs, rhs.generic_const_exprs),
            register_tool: sub(self.register_tool, rhs.register_tool),
            auto_traits: sub(self.auto_traits, rhs.auto_traits),
            negative_impls: sub(self.negative_impls, rhs.negative_impls),
            registered_tools: self
                .registered_tools
                .difference(&rhs.registered_tools)
                .cloned()
                .collect(),
        }
    }
}

impl Default for Features {
    fn default() -> Self {
        (&rustc_feature::Features::default()).into()
    }
}

impl Features {
    pub fn into_iter(&self) -> impl Iterator<Item = String> {
        [
            self.adt_const_params.then_some("adt_const_params"),
            self.generic_const_exprs.then_some("generic_const_exprs"),
            self.register_tool.then_some("register_tool"),
        ]
        .into_iter()
        .flatten()
        .map(|s| format!("feature({})", s))
        .chain(
            self.registered_tools
                .clone()
                .into_iter()
                .map(|tool| format!("register_tool({})", tool)),
        )
    }
    /// Runs Rustc with a driver that only collects which unstable
    /// Rustc features are enabled
    pub fn detect(
        options: &hax_types::cli_options::ExporterOptions,
        rustc_args: &Vec<String>,
    ) -> Self {
        struct CollectFeatures {
            features: Features,
        }
        impl Callbacks for CollectFeatures {
            fn after_expansion<'tcx>(
                &mut self,
                compiler: &interface::Compiler,
                tcx: TyCtxt<'tcx>,
            ) -> Compilation {
                self.features = tcx.features().into();
                self.features.registered_tools = tcx
                    .registered_tools(())
                    .iter()
                    .map(|x| x.name.to_ident_string())
                    .collect();
                rustc_driver::Compilation::Stop
            }
        }
        let mut callbacks = CollectFeatures {
            features: Features::default(),
        };
        let exit_code = rustc_driver::catch_with_exit_code(|| {
            rustc_driver::run_compiler(
                rustc_args,
                &mut CallbacksWrapper {
                    sub: &mut callbacks,
                    options: options.clone(),
                },
            )
        });
        if exit_code != 0 {
            std::process::exit(exit_code);
        }
        callbacks.features.clone()
    }

    /// Just like `detect`, but wraps the call in a subprocess so that
    /// we can capture `stdout` and `stderr`: we don't want the use to
    /// see error message from Rustc twice, or Cargo to have to parse
    /// Rustc messages twice.
    pub fn detect_forking() -> Self {
        use std::process::{Command, Stdio};
        let output = Command::new(std::env::args().next().unwrap())
            .args(std::env::args().skip(1))
            .env("HAX_FEATURES_DETECTION_MODE", "1")
            .stdout(Stdio::piped())
            .stderr(Stdio::piped())
            .spawn()
            .unwrap()
            .wait_with_output()
            .unwrap();
        let stderr = &std::str::from_utf8(&output.stderr).unwrap();
        serde_json::from_str(stderr).unwrap_or_else(|e| {
            eprintln!("{}", stderr);
            tracing::error!("rustc emitted an error, aborting hax custom driver.");
            std::process::exit(1);
        })
    }
}


================================================
FILE: cli/subcommands/Cargo.toml
================================================
[package]
name = "cargo-hax"
version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
edition.workspace = true
repository.workspace = true
readme.workspace = true
build = "build.rs"
description = "The high assurance translation toolchain"

[[bin]]
path = "src/cargo_hax.rs"
name = "cargo-hax"

[[bin]]
path = "src/json_schema.rs"
name = "hax-export-json-schemas"

[dependencies]
serde.workspace = true
serde_json.workspace = true
schemars.workspace = true
itertools.workspace = true
clap.workspace = true
paste = "1.0.11"
hax-frontend-exporter.workspace = true
hax-frontend-exporter-options.workspace = true
hax-types.workspace = true
path-clean = "1.0.1"
tempfile = "3.8"
which.workspace = true
version_check = "0.9"
rustup-toolchain = "0.1"
colored.workspace = true
is-terminal = "0.4.9"
tiny_http = "0.12"
inquire = "0.6"
annotate-snippets.workspace = true
serde-jsonlines = "0.5.0"
prettyplease = "0.2.20"
syn = { version = "2.*", features = ["full"] }
cargo_metadata.workspace = true
extension-traits = "1.0.1"

[build-dependencies]
serde.workspace = true
serde_json.workspace = true
hax-types.workspace = true
hax-rust-engine.workspace = true
schemars.workspace = true
hax-frontend-exporter.workspace = true
hax-lib-macros-types = { workspace = true, features = ["schemars"] }
version_check = "0.9"
toml = "0.8"

[package.metadata.release]
pre-release-hook = [
    "dune",
    "build",
    "--root",
    "../../engine",
    "hax-engine.opam",
]

[[package.metadata.release.pre-release-replacements]]
file = "../../engine/dune-project"
search = "version [a-z0-9\\.-]+"
replace = "version {{version}}"
prerelease = true


================================================
FILE: cli/subcommands/build.rs
================================================
fn rustc_version_env_var() {
    let (_version, channel, date) = version_check::triple().unwrap();
    println!("cargo:rustc-env=HAX_RUSTC_VERSION={channel}-{date}");

    let rust_toolchain_file = include_str!("rust-toolchain.toml")
        .parse::<toml::Table>()
        .unwrap();
    println!(
        "cargo:rustc-env=HAX_TOOLCHAIN={}",
        rust_toolchain_file["toolchain"]["channel"]
            .as_str()
            .expect("Could not find key [toolchain.channel] in [rust-toolchain.toml]")
    );
}

fn json_schema_static_asset() {
    let mut schema = schemars::schema_for!((
        hax_frontend_exporter::Item<hax_frontend_exporter::ThirBody>,
        hax_types::cli_options::Options,
        hax_types::diagnostics::Diagnostics,
        hax_types::engine_api::EngineOptions,
        hax_types::engine_api::Output,
        hax_types::engine_api::WithDefIds<hax_frontend_exporter::ThirBody>,
        hax_types::engine_api::protocol::FromEngine,
        hax_types::engine_api::protocol::ToEngine,
        hax_lib_macros_types::AttrPayload,
        hax_rust_engine::ocaml_engine::Query,
        hax_rust_engine::ocaml_engine::Response,
    ));
    schema.schema.metadata.get_or_insert_default().id = Some(hax_types::HAX_VERSION.into());
    serde_json::to_writer(
        std::fs::File::create(format!("{}/schema.json", std::env::var("OUT_DIR").unwrap()))
            .unwrap(),
        &schema,
    )
    .unwrap();
}

fn git_dirty_env_var() {
    println!("cargo:rurun-if-env-changed=HAX_GIT_IS_DIRTY");
    let dirty = {
        use std::process::Command;
        let _ = Command::new("git")
            .args(["update-index", "-q", "--refresh"])
            .status();
        !Command::new("git")
            .args(["diff-index", "--quiet", "HEAD", "--"])
            .status()
            .map(|status| status.success())
            .unwrap_or(true)
    };
    println!("cargo:rustc-env=HAX_GIT_IS_DIRTY={}", dirty);
}

fn main() {
    rustc_version_env_var();
    json_schema_static_asset();
    git_dirty_env_var();
}


================================================
FILE: cli/subcommands/src/cargo_hax.rs
================================================
#![feature(rustc_private)]
use annotate_snippets::{Level, Renderer};
use clap::Parser;
use colored::Colorize;
use hax_types::cli_options::*;
use hax_types::driver_api::*;
use hax_types::engine_api::*;
use is_terminal::IsTerminal;
use serde_jsonlines::BufReadExt;
use std::collections::HashMap;
use std::fs;
use std::io::BufRead;
use std::io::Write;
use std::path::PathBuf;
use std::process;

mod engine_debug_webapp;
use hax_frontend_exporter::id_table;

/// Return a toolchain argument to pass to `cargo`: when the correct nightly is
/// already present, this is None, otherwise we (1) ensure `rustup` is available
/// (2) install the nightly (3) return the toolchain
fn toolchain() -> Option<&'static str> {
    let current_rustc_version = version_check::triple()
        .map(|(_, channel, date)| format!("{channel}-{date}"))
        .unwrap_or("unknown".into());
    if env!("HAX_RUSTC_VERSION") != current_rustc_version {
        const TOOLCHAIN: &str = env!("HAX_TOOLCHAIN");
        // ensure rustup is available
        which::which("rustup").ok().unwrap_or_else(|| {
            println!("Error: {} was not found, but toolchain {} is required while the current toolchain is {}\n\nExiting.", "rustup".bold(), TOOLCHAIN.bold(), current_rustc_version.bold());
            std::process::exit(1)
        });
        // make sure the toolchain is installed
        rustup_toolchain::install(TOOLCHAIN).unwrap();
        // return the correct toolchain
        Some(TOOLCHAIN)
    } else {
        None
    }
}

/// [`get_args`] is a wrapper of `std::env::args` that strips a possible
/// cargo subcommand. This allows for a binary `BINARY` to be called
/// both with `cargo BINARY args...` and `cargo-BINARY args...`.
pub fn get_args(subcommand: &str) -> Vec<String> {
    let mut args: Vec<_> = std::env::args().collect();
    if args.get(1) == Some(&subcommand.to_string()) {
        // we face a call `cargo [subcommand]`: we need to get rid of the first argument
        args = args.into_iter().skip(1).collect();
    }
    args
}

/// Our custom rustc driver will *not* be run in an proper terminal,
/// thus logs would appear uncolored. When no `RUST_LOG_STYLE` env. var.
/// is set, [`rust_log_style`] checks wether the `cargo hax` command was
/// run inside a terminal. If it was inside a terminal,
/// [`rust_log_style`] returns `"always"`, which is the usual default
/// behavior. Otherwise we return `"never"`. When [`RUST_LOG_STYLE`] is
/// set, we just return its value.
const RUST_LOG_STYLE: &str = "RUST_LOG_STYLE";
fn rust_log_style() -> String {
    std::env::var(RUST_LOG_STYLE).unwrap_or_else(|_| {
        if std::io::stderr().is_terminal() {
            "always".to_string()
        } else {
            "never".to_string()
        }
    })
}

/// We set `cfg(hax)` so that client crates can include dependencies
/// or cfg-gate pieces of code.
const RUSTFLAGS: &str = "RUSTFLAGS";
fn rustflags() -> String {
    let rustflags = std::env::var(RUSTFLAGS).unwrap_or("".into());
    [rustflags, "--cfg hax".into()].join(" ")
}

const ENGINE_BINARY_NAME: &str = "hax-engine";
const ENGINE_BINARY_NOT_FOUND: &str = "The binary [hax-engine] was not found in your [PATH].";

/// Dynamically looks for binary [ENGINE_BINARY_NAME].  First, we
/// check whether [HAX_ENGINE_BINARY] is set, and use that if it
/// is. Then, we try to find [ENGINE_BINARY_NAME] in PATH. If not
/// found, detect whether nodejs is available, download the JS-compiled
/// engine and use it.
#[allow(unused_variables, unreachable_code)]
fn find_hax_engine(message_format: MessageFormat) -> process::Command {
    use which::which;

    std::env::var("HAX_ENGINE_BINARY")
        .ok()
        .map(process::Command::new)
        .or_else(|| which(ENGINE_BINARY_NAME).ok().map(process::Command::new))
        .or_else(|| {
            which("node").ok().and_then(|_| {
                if let Ok(true) = inquire::Confirm::new(&format!(
                    "{} Should I try to download it from GitHub?",
                    ENGINE_BINARY_NOT_FOUND,
                ))
                .with_default(true)
                .prompt()
                {
                    let cmd = process::Command::new("node");
                    let engine_js_path: String =
                        panic!("TODO: Downloading from GitHub is not supported yet.");
                    cmd.arg(engine_js_path);
                    Some(cmd)
                } else {
                    None
                }
            })
        })
        .unwrap_or_else(|| {
            fn is_opam_setup_correctly() -> bool {
                std::env::var("OPAM_SWITCH_PREFIX").is_ok()
            }
            HaxMessage::EngineNotFound {
                is_opam_setup_correctly: is_opam_setup_correctly(),
            }
            .report(message_format, None);
            std::process::exit(2);
        })
}

const RUST_ENGINE_BINARY_NAME: &str = "hax-rust-engine";
const RUST_ENGINE_BINARY_NOT_FOUND: &str =
    "The binary [hax-rust-engine] was not found in your [PATH].";

#[allow(unused_variables, unreachable_code)]
fn find_rust_hax_engine(message_format: MessageFormat) -> process::Command {
    use which::which;

    std::env::var("HAX_RUST_ENGINE_BINARY")
        .ok()
        .map(process::Command::new)
        .or_else(|| {
            which(RUST_ENGINE_BINARY_NAME)
                .ok()
                .map(process::Command::new)
        })
        .expect(RUST_ENGINE_BINARY_NOT_FOUND)
}

use hax_types::diagnostics::message::HaxMessage;
use hax_types::diagnostics::report::ReportCtx;

#[extension_traits::extension(trait ExtHaxMessage)]
impl HaxMessage {
    fn report(self, message_format: MessageFormat, mut rctx: Option<&mut ReportCtx>) {
        if let (Some(r), HaxMessage::Diagnostic { diagnostic, .. }) = (rctx.as_mut(), &self)
            && r.seen_already(diagnostic.clone())
        {
            return;
        }
        match message_format {
            MessageFormat::Json => println!("{}", serde_json::to_string(&self).unwrap()),
            MessageFormat::Human => self.report_styled(rctx),
        }
    }
    fn report_styled(self, rctx: Option<&mut ReportCtx>) {
        let renderer = Renderer::styled();
        match self {
            Self::Diagnostic {
                diagnostic,
                working_dir,
            } => {
                let mut _rctx = None;
                let rctx = rctx.unwrap_or_else(|| _rctx.get_or_insert(ReportCtx::default()));
                diagnostic.with_message(
                    rctx,
                    working_dir.as_ref().map(PathBuf::as_path),
                    Level::Error,
                    |msg| eprintln!("{}", renderer.render(msg)),
                );
            }
            Self::EngineNotFound {
                is_opam_setup_correctly,
            } => {
                use colored::Colorize;
                let message = format!("hax: {}\n{}\n\n{} {}\n",
                      &ENGINE_BINARY_NOT_FOUND,
                      "Please make sure the engine is installed and is in PATH!",
                      "Hint: With OPAM, `eval $(opam env)` is necessary for OPAM binaries to be in PATH: make sure to run `eval $(opam env)` before running `cargo hax`.".bright_black(),
                      format!("(diagnostics: {})", if is_opam_setup_correctly { "opam seems okay ✓" } else {"opam seems not okay ❌"}).bright_black()
            );
                let message = Level::Error.title(&message);
                eprintln!("{}", renderer.render(message))
            }
            Self::ProducedFile { mut path, wrote } => {
                // Make path relative if possible
                if let Ok(current_dir) = std::env::current_dir() {
                    if let Ok(relative) = path.strip_prefix(current_dir) {
                        path = PathBuf::from(".").join(relative).to_path_buf();
                    }
                }
                let title = if wrote {
                    format!("hax: wrote file {}", path.display())
                } else {
                    format!("hax: unchanged file {}", path.display())
                };
                eprintln!("{}", renderer.render(Level::Info.title(&title)))
            }
            Self::HaxEngineFailure { exit_code } => {
                let title = format!(
                    "hax: {} exited with non-zero code {}",
                    ENGINE_BINARY_NAME, exit_code,
                );
                eprintln!("{}", renderer.render(Level::Error.title(&title)));
            }
            Self::ProfilingData(data) => {
                fn format_with_dot(shift: u32, n: u64) -> String {
                    let factor = 10u64.pow(shift);
                    format!("{}.{}", n / factor, n % factor)
                }
                let title = format!(
                    "hax[profiling]: {}: {}ms, memory={}, {} item{}{}",
                    data.context,
                    format_with_dot(6, data.time_ns),
                    data.memory,
                    data.quantity,
                    if data.quantity > 1 { "s" } else { "" },
                    if data.errored {
                        " (note: this failed!)"
                    } else {
                        ""
                    }
                );
                eprintln!("{}", renderer.render(Level::Info.title(&title)));
            }
            Self::Stats { errors_per_item } => {
                let success_items = errors_per_item.iter().filter(|(_, n)| *n == 0).count();
                let total = errors_per_item.len();
                let title = format!(
                    "hax: {}/{} items were successfully translated ({}% success rate)",
                    success_items,
                    total,
                    (success_items * 100) / total
                );
                eprintln!("{}", renderer.render(Level::Info.title(&title)));
            }
            Self::CargoBuildFailure => {
                let title =
                    "hax: running `cargo build` was not successful, continuing anyway.".to_string();
                eprintln!("{}", renderer.render(Level::Warning.title(&title)));
            }
            Self::WarnExperimentalBackend { backend } => {
                let title = format!(
                    "hax: Experimental backend \"{}\" is work in progress.",
                    backend
                );
                eprintln!("{}", renderer.render(Level::Warning.title(&title)));
            }
        }
    }
}

/// Runs `hax-engine`
fn run_engine(
    haxmeta: HaxMeta<hax_frontend_exporter::ThirBody>,
    id_table: id_table::Table,
    working_dir: Option<PathBuf>,
    manifest_dir: Option<PathBuf>,
    backend: &BackendOptions<()>,
    message_format: MessageFormat,
) -> bool {
    let engine_options = EngineOptions {
        hax_version: haxmeta.hax_version,
        backend: backend.clone(),
        input: haxmeta.items,
        impl_infos: haxmeta.impl_infos,
    };
    let mut hax_engine_command = match &engine_options.backend.backend {
        Backend::Coq | Backend::Ssprove | Backend::Easycrypt | Backend::ProVerif(_) => {
            find_hax_engine(message_format)
        }
        Backend::Fstar(_) if matches!(&engine_options.input, Items::Legacy(_)) => {
            find_hax_engine(message_format)
        }
        _ => find_rust_hax_engine(message_format),
    };
    let mut engine_subprocess = hax_engine_command
        .stdin(std::process::Stdio::piped())
        .stdout(std::process::Stdio::piped())
        .spawn()
        .inspect_err(|e| {
            if let std::io::ErrorKind::NotFound = e.kind() {
                panic!(
                    "The binary [{}] was not found in your [PATH].",
                    ENGINE_BINARY_NAME
                )
            }
        })
        .unwrap();

    let mut error = false;
    let mut output = Output {
        diagnostics: vec![],
        files: vec![],
        debug_json: vec![],
    };
    {
        let mut rctx = hax_types::diagnostics::report::ReportCtx::default();
        let mut stdin = std::io::BufWriter::new(
            engine_subprocess
                .stdin
                .as_mut()
                .expect("Could not write on stdin"),
        );

        macro_rules! send {
            ($value:expr) => {
                serde_json::to_writer(&mut stdin, $value).unwrap();
                stdin.write_all(b"\n").unwrap();
                stdin.flush().unwrap();
            };
        }

        id_table::WithTable::run(id_table, engine_options, |with_table| {
            send!(with_table);
        });

        let out_dir = backend.output_dir.clone().unwrap_or({
            let relative_path: PathBuf = [
                "proofs",
                format!("{}", backend.backend).as_str(),
                "extraction",
            ]
            .iter()
            .collect();
            manifest_dir
                .map(|manifest_dir| manifest_dir.join(&relative_path))
                .unwrap_or(relative_path)
        });

        let stdout = std::io::BufReader::new(engine_subprocess.stdout.take().unwrap());
        let mut errors_per_item: HashMap<_, usize> = HashMap::new();
        for msg in stdout.json_lines() {
            let msg = msg.expect(
                "Hax engine sent an invalid json value. \
            This might be caused by debug messages on stdout, \
            which is reserved for JSON communication with cargo-hax",
            );
            use protocol::*;
            match msg {
                FromEngine::Exit => break,
                FromEngine::Diagnostic(diagnostic) => {
                    error = true;
                    if backend.dry_run {
                        output.diagnostics.push(diagnostic.clone())
                    }
                    if let Some(owner_id) = &diagnostic.owner_id {
                        *errors_per_item.entry(owner_id.clone()).or_default() += 1;
                    }
                    HaxMessage::Diagnostic {
                        diagnostic,
                        working_dir: working_dir.clone(),
                    }
                    .report(message_format, Some(&mut rctx));
                }
                FromEngine::File(file) => {
                    if backend.dry_run {
                        output.files.push(file)
                    } else {
                        let path = out_dir.join(&file.path);
                        std::fs::create_dir_all(path.parent().unwrap()).unwrap();
                        let mut wrote = false;
                        if fs::read_to_string(&path).as_ref().ok() != Some(&file.contents) {
                            std::fs::write(&path, file.contents).unwrap();
                            wrote = true;
                        }
                        if let Some(mut sourcemap) = file.sourcemap.clone() {
                            sourcemap.sourcesContent = sourcemap
                                .sources
                                .iter()
                                .map(PathBuf::from)
                                .map(|path| {
                                    if let Some(working_dir) = working_dir.as_ref()
                                        && path.is_relative()
                                    {
                                        working_dir.join(path).to_path_buf()
                                    } else {
                                        path
                                    }
                                })
                                .map(|path| fs::read_to_string(path).ok())
                                .collect();
                            let f = std::fs::File::create(path.with_file_name(format!(
                                "{}.map",
                                path.file_name().unwrap().to_string_lossy()
                            )))
                            .unwrap();
                            serde_json::to_writer(std::io::BufWriter::new(f), &sourcemap).unwrap()
                        }
                        HaxMessage::ProducedFile { path, wrote }.report(message_format, None)
                    }
                }
                FromEngine::DebugString(debug) => output.debug_json.push(debug),
                FromEngine::PrettyPrintDiagnostic(diag) => {
                    send!(&ToEngine::PrettyPrintedDiagnostic(format!("{}", diag)));
                }
                FromEngine::PrettyPrintRust(code) => {
                    let code = match syn::parse_file(&code) {
                        Ok(file) => match std::panic::catch_unwind(|| prettyplease::unparse(&file))
                        {
                            Ok(pp) => Ok(pp),
                            Err(err) => Err(format!("prettyplease panicked with: {:#?}", err)),
                        },
                        Err(err) => Err(format!("{}", err)),
                    };
                    send!(&ToEngine::PrettyPrintedRust(code));
                }
                FromEngine::ProfilingData(profiling_data) => {
                    HaxMessage::ProfilingData(profiling_data).report(message_format, None)
                }
                FromEngine::ItemProcessed(items) => {
                    for item in items {
                        errors_per_item.insert(item, 0);
                    }
                }
                FromEngine::Ping => {
                    send!(&ToEngine::Pong);
                }
            }
        }
        if backend.stats {
            HaxMessage::Stats {
                errors_per_item: errors_per_item.into_iter().collect(),
            }
            .report(message_format, None)
        }
        drop(stdin);
    }

    let exit_status = engine_subprocess.wait().unwrap();
    if !exit_status.success() {
        HaxMessage::HaxEngineFailure {
            exit_code: exit_status.code().unwrap_or(-1),
        }
        .report(message_format, None);
        std::process::exit(1);
    }

    if backend.dry_run {
        serde_json::to_writer(std::io::BufWriter::new(std::io::stdout()), &output).unwrap()
    }
    if !output.debug_json.is_empty() {
        use DebugEngineMode;
        let debug_json = &format!("[{}]", output.debug_json.join(","));
        match &backend.debug_engine {
            Some(DebugEngineMode::Interactive) => {
                eprintln!("----------------------------------------------");
                eprintln!("----------------------------------------------");
                eprintln!("----------------------------------------------");
                eprintln!("-- Engine debug mode. Press CTRL+C to exit. --");
                eprintln!("----------------------------------------------");
                eprintln!("----------------------------------------------");
                eprintln!("----------------------------------------------");
                engine_debug_webapp::run(|| debug_json.clone())
            }
            Some(DebugEngineMode::File(file)) if !backend.dry_run => {
                let mut file = file.open_or_stdout();
                write!(file, "{debug_json}").unwrap()
            }
            _ => (),
        }
    }

    error
}

/// Uses `cargo metadata` to compute a derived target directory.
fn target_dir(suffix: &str) -> PathBuf {
    let metadata = cargo_metadata::MetadataCommand::new().exec().unwrap();
    let mut dir = metadata.target_directory;
    dir.push(suffix);
    dir.into()
}

/// Gets hax version: if hax is being compiled from a dirty git repo,
/// then this function taints the hax version with the hash of the
/// current executable. This makes sure cargo doesn't cache across
/// different versions of hax, for more information see
/// https://github.com/hacspec/hax/issues/801.
fn get_hax_version() -> String {
    let mut version = hax_types::HAX_VERSION.to_string();
    if env!("HAX_GIT_IS_DIRTY") == "true" {
        version += &std::env::current_exe()
            .ok()
            .and_then(|exe_path| std::fs::read(exe_path).ok())
            .map(|contents| {
                use std::hash::{DefaultHasher, Hash, Hasher};
                let mut s = DefaultHasher::new();
                contents.hash(&mut s);
                format!("hash-exe-{}", s.finish())
            })
            .expect("Expect read path")
    }

    version
}

/// Returns the path to the custom rustc driver used by cargo-hax.
///
/// This function retrieves the path of the current executable (i.e. `cargo-hax`), determines its
/// parent directory, and then appends the driver executable name `"driver-hax-frontend-exporter"` to it.
/// This path is used to locate the custom rustc driver that computes `haxmeta` files.
fn get_hax_rustc_driver_path() -> PathBuf {
    std::env::current_exe()
        .expect("Could not get the current executable path for `cargo-hax`.")
        .parent().expect("The executable `cargo-hax` is supposed to be a file, which is supposed to have a parent folder.")
        .join("driver-hax-frontend-exporter")
}

/// Calls `cargo` with a custom driver which computes `haxmeta` files
/// in `TARGET`. One `haxmeta` file is produced by crate. Each
/// `haxmeta` file contains the full AST of one crate.
fn compute_haxmeta_files(options: &Options) -> (Vec<EmitHaxMetaMessage>, i32) {
    let frontend_options = ExporterOptions::from(options);
    let mut cmd = {
        let mut cmd = process::Command::new("cargo");
        if let Some(toolchain) = toolchain() {
            cmd.env("RUSTUP_TOOLCHAIN", toolchain);
        }
        cmd.args(["check".into()].iter().chain(options.cargo_flags.iter()));
        const COLOR_FLAG: &str = "--color";
        let explicit_color_flag = options.cargo_flags.iter().any(|flag| flag == COLOR_FLAG);
        if !explicit_color_flag && std::io::stderr().is_terminal() {
            cmd.args([COLOR_FLAG, "always"]);
        }
        const MSG_FMT_FLAG: &str = "--message-format";
        let explicit_msg_fmt_flag = options.cargo_flags.iter().any(|flag| flag == MSG_FMT_FLAG);
        if !explicit_msg_fmt_flag && options.message_format == MessageFormat::Json {
            cmd.args([MSG_FMT_FLAG, "json"]);
        }
        cmd.stderr(std::process::Stdio::piped());
        if !options.no_custom_target_directory {
            cmd.env("CARGO_TARGET_DIR", target_dir("hax"));
        };
        cmd.env("RUSTC_WORKSPACE_WRAPPER", get_hax_rustc_driver_path())
            .env(RUST_LOG_STYLE, rust_log_style())
            .env(RUSTFLAGS, rustflags())
            .env("HAX_CARGO_CACHE_KEY", get_hax_version())
            .env(
                ENV_VAR_OPTIONS_FRONTEND,
                serde_json::to_string(&frontend_options)
                    .expect("Options could not be converted to a JSON string"),
            );
        cmd
    };

    let mut child = cmd.spawn().unwrap();
    let haxmeta_files = {
        let mut haxmeta_files = vec![];
        let stderr = child.stderr.take().unwrap();
        let stderr = std::io::BufReader::new(stderr);
        for line in std::io::BufReader::new(stderr).lines() {
            if let Ok(line) = line {
                if let Some(msg) = line.strip_prefix(HAX_DRIVER_STDERR_PREFIX) {
                    use HaxDriverMessage;
                    let msg = serde_json::from_str(msg).unwrap();
                    match msg {
                        HaxDriverMessage::EmitHaxMeta(data) => haxmeta_files.push(data),
                    }
                } else {
                    eprintln!("{}", line);
                }
            }
        }
        haxmeta_files
    };

    let status = child
        .wait()
        .expect("`driver-hax-frontend-exporter`: could not start?");

    let exit_code = if !status.success() {
        HaxMessage::CargoBuildFailure.report(options.message_format, None);
        status.code().unwrap_or(254)
    } else {
        0
    };

    (haxmeta_files, exit_code)
}

/// Run the command given by the user
fn run_command(options: &Options, haxmeta_files: Vec<EmitHaxMetaMessage>) -> bool {
    match options.command.clone() {
        Command::JSON {
            output_file,
            kind,
            include_extra,
            use_ids,
            ..
        } => {
            with_kind_type!(kind, <Body>|| {
                for EmitHaxMetaMessage { path, .. } in haxmeta_files {
                    let (haxmeta, id_table): (HaxMeta<Body>, _) = HaxMeta::read(fs::File::open(&path).unwrap());
                    let dest = output_file.open_or_stdout();

                    (if include_extra {
                        let data = WithDefIds {
                            def_ids: haxmeta.def_ids,
                            impl_infos: haxmeta.impl_infos,
                            items: haxmeta.items,
                            comments: haxmeta.comments,
                        };
                        if use_ids {
                            id_table::WithTable::run(id_table, data, |with_table| {
                                serde_json::to_writer(dest, with_table)
                            })
                        } else {
                            serde_json::to_writer(dest, &data)
                        }
                    } else {
                        if use_ids {
                            id_table::WithTable::run(id_table, haxmeta.items, |with_table| {
                                serde_json::to_writer(dest, with_table)
                            })
                        } else {
                            serde_json::to_writer(dest, &haxmeta.items)
                        }
                    })
                        .unwrap()

                }
            });
            false
        }
        Command::Backend(backend) => {
            use Backend;
            use hax_frontend_exporter::ThirBody as Body;

            if matches!(backend.backend, Backend::Easycrypt | Backend::ProVerif(..)) {
                HaxMessage::WarnExperimentalBackend {
                    backend: backend.backend.clone(),
                }
                .report(options.message_format, None);
            }

            let mut error = false;
            for EmitHaxMetaMessage {
                working_dir,
                manifest_dir,
                path,
            } in haxmeta_files
            {
                let (mut haxmeta, id_table): (HaxMeta<Body>, _) =
                    HaxMeta::read(fs::File::open(&path).unwrap());

                if let Some(root_module) = &backend.prune_haxmeta {
                    use hax_frontend_exporter::{DefPathItem, DisambiguatedDefPathItem, IsBody};

                    /// Remove every item from an `HaxMeta` whose path is not `*::<root_module>::**`, where `root_module` is a string.
                    fn prune_haxmeta<B: IsBody>(haxmeta: &mut HaxMeta<B>, root_module: &str) {
                        match &mut haxmeta.items {
                            Items::Legacy(items) => {
                                items.retain(|item| match &item.owner_id.path[..] {
                                    [] => true,
                                    [
                                        DisambiguatedDefPathItem {
                                            data: DefPathItem::TypeNs(s),
                                            disambiguator: 0,
                                        },
                                        ..,
                                    ] => s == root_module,
                                    _ => false,
                                })
                            }
                            Items::FullDef(items) => {
                                items.retain(|item| match &item.this.contents().def_id.path[..] {
                                    [] => true,
                                    [
                                        DisambiguatedDefPathItem {
                                            data: DefPathItem::TypeNs(s),
                                            disambiguator: 0,
                                        },
                                        ..,
                                    ] => s == root_module,
                                    _ => false,
                                })
                            }
                        };
                    }
                    prune_haxmeta(&mut haxmeta, root_module.as_str())
                }

                error = error
                    || run_engine(
                        haxmeta,
                        id_table,
                        working_dir,
                        manifest_dir,
                        &backend,
                        options.message_format,
                    );
            }
            error
        }
        Command::Serialize { .. } => {
            for EmitHaxMetaMessage { path, .. } in haxmeta_files {
                HaxMessage::ProducedFile { path, wrote: true }.report(options.message_format, None);
            }
            false
        }
    }
}

fn main() {
    let args: Vec<String> = get_args("hax");
    let mut options = match &args[..] {
        [_, kw] if kw == "__json" => {
            serde_json::from_str(&std::env::var(ENV_VAR_OPTIONS_FULL).unwrap_or_else(|_| {
                panic!(
                    "Cannot find environnement variable {}",
                    ENV_VAR_OPTIONS_FULL
                )
            }))
            .unwrap_or_else(|_| {
                panic!(
                    "Invalid value for the environnement variable {}",
                    ENV_VAR_OPTIONS_FULL
                )
            })
        }
        _ => Options::parse_from(args.iter()),
    };
    options.normalize_paths();

    let (haxmeta_files, exit_code) = options
        .haxmeta
        .clone()
        .map(|path| {
            (
                vec![EmitHaxMetaMessage {
                    working_dir: None,
                    manifest_dir: None,
                    path,
                }],
                0,
            )
        })
        .unwrap_or_else(|| compute_haxmeta_files(&options));
    let error = run_command(&options, haxmeta_files);

    std::process::exit(if exit_code == 0 && error {
        1
    } else {
        exit_code
    })
}


================================================
FILE: cli/subcommands/src/engine_debug_webapp/README.md
================================================
This folder implements a small webapp designed for viewing how a rust
crate is translated by the engine, step-by-step.

The engine works by phases. First, it receives a tweaked version of
Rust's internal typed representation. On this representation, the
engine then applies sequentially a certain number of phases. Each
phase transports your code from a representation to another, by
performing some translation or rewriting.

This webapp allows you to display a rust code before and after each
phase.

### How to
When running `cargo hax into BACKEND`, pass the option
`--debug-engine` (or `-d`) to the subcommand `into`. This will spawn a
small webserver with the webapp.



================================================
FILE: cli/subcommands/src/engine_debug_webapp/mod.rs
================================================
use tiny_http::{Header, Response, Server};

fn get_server() -> Server {
    let mut port = std::env::var_os("HAX_DEBUGGER_PORT")
        .and_then(|s| s.into_string().ok())
        .and_then(|s| s.parse::<u32>().ok())
        .unwrap_or(8000);
    loop {
        if let Ok(server) = Server::http(format!("0.0.0.0:{}", port)) {
            eprintln!("Hax webapp is available on http://localhost:{:?}", port);
            return server;
        }
        std::thread::sleep(std::time::Duration::from_millis(300));
        eprintln!("Could not listen to port {:?}, trying another", port);
        port += 1;
    }
}

pub fn run(get_json: impl Fn() -> String) {
    let server = get_server();
    let ct_html = Header::from_bytes(&b"Content-Type"[..], &b"text/html"[..]).unwrap();
    let ct_js = Header::from_bytes(&b"Content-Type"[..], &b"text/javascript"[..]).unwrap();
    let ct_utf8 = Header::from_bytes(&b"charset"[..], &b"utf-8"[..]).unwrap();
    for request in server.incoming_requests() {
        let response = match request.url() {
            "/" => Response::from_string(include_str!("static/index.html"))
                .with_header(ct_html.clone())
                .with_header(ct_utf8.clone()),
            "/script.js" => Response::from_string(include_str!("static/script.js"))
                .with_header(ct_js.clone())
                .with_header(ct_utf8.clone()),
            path if path.starts_with("/debug-hax-engine.json") => {
                Response::from_string(get_json()).with_header(ct_utf8.clone())
            }
            _ => Response::from_string("Unknown route".to_string()).with_status_code(404),
        };
        let _ = request.respond(response);
    }
}


================================================
FILE: cli/subcommands/src/engine_debug_webapp/static/index.html
================================================
<meta charset="UTF-8">
<script src="//unpkg.com/prismjs@1.29.0/components/prism-core.min.js"></script>
<script src="//unpkg.com/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<link href="//unpkg.com/prismjs@1.29.0/themes/prism.min.css" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300&display=swap" rel="stylesheet">
<script src="//unpkg.com/prismjs@1.29.0/components/prism-rust.min.js"></script>
<script src="//unpkg.com/prismjs@1.29.0/components/prism-json.min.js"></script>

<style>
  .header.inactive:hover { color: #444!important; }
  .header {
      white-space: nowrap!important;
  }
  header {
      padding-bottom: 10px;
  }
  code span.active { background-color: #FFFF00; }
  code span.in-range { background-color: #FFFFDD; }
  code {
      line-height: 1.2!important;
      font-size: 80%!important;
      white-space: pre-wrap!important;
  }
  dialog {
      z-index: 100;
  }
  .json-viewer div.v {
      padding-left: 10px;
  }
  .json-viewer .i {
      display: inline-block;
  }
  .json-viewer code {
      display: inline-block;
      font-size: 100%!important;
  }
  .json-viewer .constructor {
      color: blue;
      
  }
  .json-viewer .pathchunk {
      color: green;
  }
  .json-viewer .pathsep {
      color: green; opacity: 0.6;
      letter-spacing: -3px;
      position: relative;
      left: -1px;
  }
  .json-viewer ul {
      list-style-type: none;
      padding: 0px;
      padding-left: 8px;
      margin: 0;
  }
  body {
      font-family: 'Roboto', sans-serif;
  }
  #help {
      position: absolute;
      top: 0;
      left: 0;
      margin: 1em;
  }
  #help-contents {
      display: inline-block;
      opacity: 0.3;
      background: #16a085;
      color: white;
      width: 1.1em;
      height: 1.1em;
      padding: 0.2em;
      text-align: center;
      border-radius: 50%;
  }
  #help-contents:hover {
      opacity: 1;
  }
  #help dialog {
      max-width: 400px;
      text-align: justify;
  }
</style>
<body>
  <div id='help'>
    <div onclick='document.querySelector("#help > dialog").showModal()' id='help-contents'>?</div>
    <dialog>
      <h3>Help</h3>
      The screen divides in two:
      <ul>
        <li>on the upper part, there is the list of the different phases that were applied;</li>
        <li>on the lower part, the "rustish" code of the selected phase is displayed.</li>
      </ul>
      <p>
        You can click on a phase name in the upper part or press the <i>left</i> and <i>right</i> (or <i>p</i> and <i>n</i>) keys on your keyboard to display the rust code of another phase. Press <i>r</i> to refresh.
      </p>
      <p>
        On the lower part, you can click on any chunk of code to show a dialog displaying its AST representation. Then, you can browse the AST and open/collapse AST nodes by clicking on them.
      </p>

      
      <button onclick='document.querySelector("#help > dialog").close()'>Ok</button>
    </dialog>
  </div>
  <div id='app'>
  </div>
</body>
<script src="script.js" charset="UTF-8"></script>


================================================
FILE: cli/subcommands/src/engine_debug_webapp/static/script.js
================================================
/*
  This webapp is written in vanilla JS as two pure components: `json` and `phases_viewer`.
  */

// Make a DOM node
let mk = (kind, body = [], classes = []) => {
    let e = document.createElement(kind);
    classes.forEach(cl => e.classList.add(cl));
    if (typeof body == 'string') {
        e.innerText = body;
    } else if (body instanceof Array) {
        body.forEach(sub => e.appendChild(sub));
    } else if (body instanceof HTMLElement) {
        e.appendChild(body);
    } else {
        console.error('wrong type for body', body);
    }
    return e;
};

function findNode(o, search){
    let h = o => o instanceof Object ? (search(o) ? o : Object.values(o).map(h).find(x => x)) : null;
    return h(o);
}
let is_span = o => o instanceof Object && "data" in o && "id" in o;

let spanned = span_id => o  => Object.values(o).some(o => is_span(o) && o["id"] === span_id);

let rewrite = f => o => f(
    o instanceof Array
        ? o.map(rewrite(f))
        : (o instanceof Object ? Object.fromEntries(Object.entries(o).map(([k, v]) => [k, rewrite(f)(v)])) : o)
);
let loc_to_string = ({col, line}) => `${line}:${col}`;
let filename_to_string = name =>
    ((name instanceof Array && name[0] == 'Real' && name[1]?.[0] =='LocalPath') ?
     name?.[1]?.[1] : null) || JSON.stringify(name);
let span_data_to_string = ({filename, lo, hi}) => `<${filename_to_string(filename)} ${loc_to_string(lo)}→${loc_to_string(hi)}>`;
let span_to_string = ({id, data}) => data.length ? data.map(span_data_to_string).join('∪') : '<dummy>';
let clean = rewrite(o => {
    if(!(o instanceof Object))
        return o;
    if (is_span(o))
        return span_to_string(o);
    return o;
});

function json(json) {
    let o = JSON.parse(JSON.stringify(json));
    let root = mk('div', [], ['json-viewer']);
    let state = {
        open: new Map(),
        default_open: false,
    };
    function render_all() {
        root.replaceChildren(render(o, []));
        let expand_button = mk('button', state.default_open ? '🡒🡐' : '🡘', ['expand-all']);
        expand_button.style = `
            position: absolute;
            top: 1px;
            right: 1px;
            padding: 0 3px;
            margin: 0;
            line-height: 0;
            height: 16px;
        `;
        expand_button.onclick = () => {
            state.default_open = !state.default_open;
            render_all();
        };
        root.prepend(expand_button);
    }
    let key_of_path = path => JSON.stringify(path);
    let set_open = (path, v) => state.open.set(key_of_path(path), v);
    let is_open = (path, def = path.length < 6) => {
        let b = state.open.get(key_of_path(path));
        return b === undefined ? (state.default_open || def) : b;
    };
    let swap = (path, def) => {
        set_open(path, !is_open(path, def), false);
        render_all();
    };
    let is_constructor = o => {
        if (o instanceof Array && (o.length == 2 || o.length == 1)) {
            let [constructor, arg] = o;
            if(typeof constructor == 'string' && constructor[0] == constructor[0].toUpperCase()) {
                return true;
            }
        }
        return false;
    };
    let is_simple = o => {
        if (o instanceof Object) {
            if (is_constructor(o)) {
                return o[1] === undefined;
            }
            return false;
        }
        return true;
    };
    function render(o, path, add_comma = true) {
        function as_code(o) {
            let code = mk('code');
            code.innerHTML = Prism.highlight(JSON.stringify(o, null, 4), Prism.languages.json, 'json');
            return add_comma ? mk('span', [code, mk('span', ',')]) : code;
        }
        if (o instanceof Object) {
            if (is_constructor(o)) {
                
                let [constructor, arg] = o;
                let cdiv = mk('span', constructor + (arg === undefined ? '' : ' '), ['constructor']);
                if (constructor == "Concrete" && "crate" in arg && "path" in arg) {
                    let {crate, path} = arg;
                    return mk('span', [
                        ...[crate, ...path].map((chunk, i) => [...(i > 0 ? [mk('span', '::', ['pathsep'])] : []), mk('span', chunk, ['pathchunk'])]).flat(),
                        add_comma ? [mk('span', ',')] : []
                    ].flat());
                }
                let contents = arg === undefined ? [] : render(arg, path, false);
                if(arg !== undefined && is_constructor(arg))
                    contents = mk('span', [mk('span', '('), contents, mk('span', ')')]);
                
                let self_path = [...path, []];
                let elide = mk('span', '…');
                elide.onclick = () => swap(self_path);
                let open = arg === undefined || is_open(self_path);
                cdiv.onclick = () => swap(self_path);
                return mk('span', [
                    cdiv,
                    open ? contents : elide,
                    add_comma ? [mk('span', ',')] : []
                ].flat());
            }
            if (o instanceof Array) {
                let self_path = [...path, []];
                let open = is_open(self_path);
                let bracket = mk('code', '[');
                bracket.onclick = () => swap(self_path);
                let elide = mk('span', '…');
                elide.onclick = () => swap(self_path);
                return mk('span', [
                    bracket,
                    open ? mk('ul', o.map((v, i) => {
                        let new_path = [...path, i];
                        let simple_val = is_simple(v);
                        let open = simple_val || is_open(new_path);
                        return [mk('li', render(v, new_path), ['v'])];
                    }).flat()) : elide,
                    mk('code', ']'),
                    ...(add_comma ? [mk('span', ',')] : [])
                ]);
            }
            
            return mk('span', [
                mk('code', '{'),
                mk('ul', Object.entries(o).map(([k, v]) => {
                    let new_path = [...path, k];
                    let simple_val = is_simple(v);
                    let open = simple_val || is_open(new_path);
                    let elide = mk('span', '…');
                    elide.onclick = () => swap(new_path, open);
                    let contents = mk((simple_val || !open) ? 'span' : 'span', open ? render(v, new_path) : [elide, mk('span', ',')], ['v']);
                    let key = mk('span', [
                        mk('span', k+': '),
                    ].flat(), ['k']);
                    key.onclick = () => swap(new_path);
                    return [mk('li', [
                        key,
                        contents
                    ], ['p'])];
                }).flat(), ['o']),
                mk('code', '}'),
                ...(add_comma ? [mk('span', ',')] : [])
            ]);
        } else if (typeof o == "string" && o.length > 20) {
            let new_path = [...path, 'v'];
            let code = as_code(is_open(new_path, false) ? o : o.slice(0, 20)+'…');
            code.onclick = () => swap(new_path, false);
            return code;
        } else {
            return as_code(o);
        }
    };
    render_all();
    return root;
}

const SEED = Date.now();
async function phases_viewer(state = {index: 0, ast_focus: null, seed: SEED}) {
    let data = await (await fetch('debug-hax-engine.json?seed='+state.seed)).json();
    if (!data[state.index] && state.index != 0) {
        return phases_viewer({...state, index: 0});
    };
    let current = null;
    let s = '';
    let header = mk('header');
    for(let i in data) {
        let o = data[i];
        let w = 100;
        let active = state.index == i;
        let self = mk('div', o.name.toLowerCase().replace(/reject_not_in_/g, 'rej ~').replace(/_/g, ' '), ['header', active ? 'active' : 'inactive']);
        self.style = `width: ${w}px; font-variant: small-caps;
                      position: relative; top: ${w}px; left: 10px;
                      transform-origin: 0% 50%; transform: rotate(-40deg);
                      color: ${active ? 'black' : 'gray'}; user-select: none;`;
        self.onclick = () => phases_viewer({...state, index: i, ast_focus: null});
        let container = mk('div', self, []);
        container.style = `display: inline-block; width: 18px; height: ${w}px;`;
        if(active){
            current = o;
        }
        header.appendChild(container);
    }
    let last_item = null;
    let codes = [current.rustish].map(({string, map}) => {
        let src = string;
        let code = mk('code', [], ['language-rust']);
        code.innerHTML = Prism.highlight(src, Prism.languages.rust, 'rust');

        [...code.childNodes]
            .filter(o => o.nodeType === Node.TEXT_NODE)
            .forEach(o => {
                let n = mk('span');
                n.textContent = o.textContent;
                code.replaceChild(n, o);
            });

        let mappings = map.slice(0).reverse();
        let stack = [...code.childNodes].reverse();

        let highlighted = null;
        let maybe = [];
        
        while(stack.length) {
            let node = stack.pop();
            let [len, id, s] = mappings.pop();
            let text = node.textContent;
            if (len > text.length) {
                mappings.push([len - text.length, id, s.slice(text.length)]);
            } else if (len < text.length) {
                let after = node.cloneNode();
                let left = text.slice(0, len);
                let right = text.slice(len);
                src = right + src;
                after.textContent = right;
                node.textContent = left;
                node.after(after);
                stack.push(after);
            }
            let active = state.ast_focus === id && text.trim();
            node.onclick = ev => {
                phases_viewer({...state, ast_focus: id});
                ev.stopPropagation();
            };
            if (active) {
                highlighted = highlighted || [];
                highlighted.push(...maybe);
                maybe = [];
                active && node.classList.add('active');
                last_item = node;
            } else if (highlighted) {
                maybe.push(node);
            }
        }

        (highlighted||[]).map(o => o.classList.add('in-range'));
        
        return code;
    });
    let pre = mk('pre', codes);
    let main = mk('main', [header, pre]);
    if(last_item) {
        let ast = clean(findNode(current.items, spanned(state.ast_focus)));
        let dialog = mk('dialog', json(ast));
        dialog.setAttribute('open', true);
        dialog.onclick = ev => {
            ev.stopPropagation();
        };
        main.onclick = ev => phases_viewer({...state, ast_focus: null});
        last_item.after(dialog);
    }
    let app_root = document.querySelector('#app');
    app_root.childNodes.forEach(old => old.remove());
    app_root.appendChild(main);
    document.body.onkeydown = (e) => {
        let key = ({'ArrowRight': 'n', 'ArrowLeft': 'p'})[e.key] || e.key;
        (({
            'n': () => phases_viewer({...state, index: state.index + 1, ast_focus: null}),
            'p': () => phases_viewer({...state, index: state.index ? state.index - 1 : data.length - 1, ast_focus: null}),
            'r': () => phases_viewer({...state, seed: Date.now(), ast_focus: null}),
        })[key] || Function)();
    };
}
phases_viewer();


================================================
FILE: cli/subcommands/src/json_schema.rs
================================================
const JSON_SCHEMA: &str = include_str!(concat!(env!("OUT_DIR"), "/schema.json"));

fn main() {
    println!("{}", JSON_SCHEMA);
}


================================================
FILE: deny.toml
================================================
[licenses]
unused-allowed-license = "allow"
allow = [
    "Apache-2.0",
    "MIT",
    "Unicode-DFS-2016",
    "MPL-2.0",
    # Licences used in the OCaml dependencies in the engine
    "BSD-3-Clause",
    "LGPL-2.1",
    "LGPL-2.0",
    "ISC",
]


================================================
FILE: dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "cargo"
  directory: "/"
  schedule:
    interval: "weekly"
- package-ecosystem: "github-actions"
  directory: "/"
  schedule:
    interval: "weekly"


================================================
FILE: docs/.test/.gitignore
================================================
test-results/
generated.json
playwright-report


================================================
FILE: docs/.test/global-setup.ts
================================================
// Global setup: writes `generated.json`, the list of pages
import { BrowserContext, chromium, expect, FullConfig } from '@playwright/test';
import fs from 'fs';

export type CrawlPage = { url: string; has_playground: boolean, links: string[] };
const DOCS_HOST = 'localhost:8000';

const skip_url = (s: string) => s.includes("/livereload");

/// Run jobs in parallel.
/// `job` runs a new job, returns true if more jobs are to be run.
async function parallel(
    job: () => Promise<boolean>,
    maxJobs = 10
): Promise<void> {
    const workers: { promise?: Promise<void>, free: boolean }[] = (new Array(maxJobs)).fill(0).map(_ => ({ free: true }));

    let spawn = (self: { promise?: Promise<void>, free: boolean }) => {
        self.promise = (async () => { self.free = false; let cont = await job(); self.free = true; cont && control() })();
    };
    let control = () => workers.filter(w => w.free).forEach(spawn);
    control();

    let active_workers: Promise<void>[] = [];
    do {
        active_workers = workers.filter(w => !w.free).map(w => w.promise).filter(p => p !== undefined);
        await Promise.all(active_workers);
    } while (active_workers.length > 0)
}

/// Crawl the documentation
const crawl = async (baseURL: string, context: BrowserContext): Promise<CrawlPage[]> => {
    if (!baseURL) throw new Error('Base URL not configured.');

    const pages: CrawlPage[] = [];
    const visited = new Set<string>();
    const queue: string[] = [new URL('/', baseURL).toString()];

    await parallel(async () => {
        const url = queue.shift();
        if (url === undefined || visited.has(url))
            return false;
        visited.add(url);

        const page = await context.newPage();

        const res = await page.goto(url, { waitUntil: 'domcontentloaded' });
        await page.waitForLoadState('networkidle').catch(() => { });
        const status = res?.status() ?? 0;
        expect(status, `Failed to GET ${url}`).toBeGreaterThanOrEqual(200);
        expect(status, `Failed to GET ${url}`).toBeLessThan(400);

        const has_playground = (await page.content()).includes('md-hax-playground');
        const links = await page.$$eval('a[href]', as => as.map(a => (a as HTMLAnchorElement).getAttribute('href')!));

        pages.push({ url, has_playground, links });

        for (const href of links) {
            if (!href || href.startsWith('mailto:') || href.startsWith('tel:') || href.startsWith('javascript:')) continue;

            const absolute = new URL(href, url);
            const sameHost = absolute.host === DOCS_HOST;
            if (!sameHost) continue;
            absolute.hash = '';
            const absStr = absolute.toString();
            if (!visited.has(absStr) && !skip_url(absStr) && !queue.includes(absStr)) queue.push(absStr);
        }

        page.close();
        return true;
    });

    return pages;
}

async function globalSetup(config: FullConfig) {
    const browser = await chromium.launch();
    let PAGES = await crawl('http://localhost:8000', await browser.newContext());
    await browser.close();
    fs.writeFileSync('generated.json', JSON.stringify(PAGES, null, 2), 'utf-8');
}
export default globalSetup;


================================================
FILE: docs/.test/package.json
================================================
{
    "name": "docs-ci-checks",
    "private": true,
    "type": "module",
    "scripts": {
        "test": "playwright test --reporter=list"
    },
    "devDependencies": {
        "@playwright/test": "^1.56.1",
        "http-server": "^14.1.1"
    }
}


================================================
FILE: docs/.test/playwright.config.ts
================================================
import { defineConfig } from '@playwright/test';

export default defineConfig({
    globalSetup: './global-setup.ts',
    timeout: 600_000,
    expect: { timeout: 300_000 },
    reporter: [['list']],
    use: {
        baseURL: 'http://localhost:8000',
        serviceWorkers: 'block',
        trace: 'on-first-retry',
    },
    webServer: {
        command: 'nix run ../..#serve-docs',
        port: 8000,
        reuseExistingServer: !process.env.CI,
        timeout: 5 * 60 * 1000,
        stderr: 'ignore',
        stdout: 'ignore',
    }
});


================================================
FILE: docs/.test/tests/docs.spec.ts
================================================
import { test, expect, request, BrowserContext, Page } from '@playwright/test';
import { CrawlPage } from '../global-setup';
import fs from 'fs';

const cssEscape = (s: string) =>
    s.replace(/^[0-9-]|[^a-zA-Z0-9_-]/g, (ch, idx) => {
        const code = ch.codePointAt(0)!.toString(16).toUpperCase();
        return `\\${code} `;
    });

const PAGES = JSON.parse(fs.readFileSync('generated.json', 'utf-8')) as CrawlPage[];


async function tryNavigateTo(page: Page, url: string) {
    const response = await page.request.get(url, {
        headers: {
            accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
        }
    });
    const status = response.status();
    const contentType = response.headers()['content-type'] || '';

    if (!contentType.includes('text/html'))
        return { status, html: false };

    try {
        await page.goto(url, { waitUntil: 'domcontentloaded' });
        return { status, html: true };
    } catch (e) {
        return { status, html: false };
    }
}

// test.describe('Documentation consistency checks', () => {
let run_tests = () => {
    let tried = new Set();

    let links_origins: Map<string, Set<string>> = new Map();
    let links: Set<string> = new Set();
    for (let page of PAGES) {
        for (let link of page.links) {
            let absolute_link = (new URL(link, page.url)).toString();
            links.add(absolute_link);
            links_origins.has(absolute_link) || links_origins.set(absolute_link, new Set());
            links_origins.get(absolute_link)!.add(page.url);
        }
    }


    for (let link of links) {
        if (link.includes("hax-playground.cryspen.com/") || link.includes("#__codelineno"))
            continue;
        test('Check if link is live: ' + link, (async ({ page, baseURL }, testInfo) => {
            await testInfo.attach('Parent pages', {
                body: [...(links_origins.get(link) || new Set())].join('\n'),
                contentType: 'text/plain',
            });
            let other_page = await page.context().newPage();
            let { status, html } = await tryNavigateTo(other_page, link.toString());
            let anti_bot_codes = [401, 403, 429, 451, 999].includes(status);
            expect(anti_bot_codes || (status >= 200 && status < 300)).toBeTruthy()

            let hash = (new URL(link)).hash?.replace(/^#/, '');
            if (hash && !link.includes(""))
                await test.step("Try detection of fragment `" + hash + '`', async () => {
                    let el = other_page.locator('[id="' + cssEscape(hash) + '"]');
                    if (await el.count() === 0)
                        console.warn('⚠️ Could not find anchor in a page ', link);
                });
        }));
    }

    for (let p of PAGES) {
        if (!p.has_playground)
            continue;
        test('Test playgrounds in `' + p.url + '`', async ({ page, baseURL }, testInfo) => {
            await page.goto(p.url, { waitUntil: 'domcontentloaded' });
            const playableLocators = page.locator('.playable:has(.md-hax-playground .fa-check)');
            const count = await playableLocators.count();

            for (let i = 0; i < count; i++) {
                await test.step(`Try playground #${i}`, async () => {
                    const playable = playableLocators.nth(i);
                    const contents = await playable.locator(".cm-content").first().innerText();
                    await testInfo.attach('Code snippet contents', {
                        body: contents,
                        contentType: 'text/plain',
                    });

                    const checkBtn = playable.locator('.md-hax-playground .fa-check');
                    await checkBtn.first().click();

                    let classes = '';
                    let hasSuccess = false;
                    let hasFailure = false;

                    for (let i = 0; i < 60; i++) {
                        classes = (await playable.getAttribute('class')) || '';
                        hasSuccess = classes.includes('state-success');
                        hasFailure = classes.includes('state-failure');
                        if (hasSuccess || hasFailure)
                            break;
                        await new Promise(r => setTimeout(r, 1000));
                    }

                    expect(hasSuccess || hasFailure, "At least class `state-success` or `state-failure` should have been attached; none detected.").toBeTruthy();

                    const expectFailure = classes.includes('expect-failure');

                    if (expectFailure) {
                        expect(hasFailure, '`.state-failure` should be set (the snippet is tagged with a class `expect-failure`), but `.state-success` was detected').toBeTruthy();
                    } else {
                        expect(hasSuccess, '`.state-success` should be set, but `.state-failure` was detected').toBeTruthy();
                    }
                });
            }
        });
    }
};

run_tests();


================================================
FILE: docs/RFCs/.nav.yml
================================================
hide: true


================================================
FILE: docs/RFCs/0000-template.md
================================================
---
    title: 0000 template
    tags:
        - Accepted
---

```
---
tags: Draft | Proposed | Rejected | Accepted | Superseded | Deprecated
---
```

| Authors       | :material-account: Franziskus Kiefer                        |
| :------------ | :---------------------------------------------------------- |
| Last update   | :material-calendar: Jan 1 2025                              |
| Extends       | :material-directions-fork: [xxxx-other](./0000-template.md) |
| Superseded by | :material-cancel: [xxxx-other](./0000-template.md)          |
| Based on      | :material-forward: [xxxx-other](./0000-template.md)         |

## Context

What is the issue that we're seeing that is motivating this decision or change?

## Assumptions

Anything that could cause problems if untrue now or later

## Decision

What is the change that we're proposing and/or doing?

### Considered Options

What other options are there and why didn’t you pick them?

## Risks

Anything that could cause malfunction, delay, or other negative impacts

## Consequences

What becomes easier or more difficult to do because of this change?

## Additional Information

Provide additional evidence/confidence for the decision outcome Links to other decisions and resources might here appear as well.


================================================
FILE: docs/RFCs/index.md
================================================
# RFCs




================================================
FILE: docs/blog/.authors.yml
================================================
authors:
  franziskus:
    name: Franziskus Kiefer
    description: Creator
    avatar: /blog/avatars/franziskus.jpg
  lucas:
    name: Lucas Franceschino
    description: Creator
    avatar: /blog/avatars/lucas.jpg
  clement:
    name: Clement Blaudeau
    description: Engineer
    avatar: /blog/avatars/clement.jpg
  maxime:
    name: Maxime Buyse
    description: Engineer
    avatar: /blog/avatars/maxime.png
  alex:
    name: Alexander Bentkamp
    description: Engineer
    avatar: /blog/avatars/alex.jpg

================================================
FILE: docs/blog/index.md
================================================
---
weight: 4
---

# Blog

The hax blog.
Here you find announcement, development news, and more.


================================================
FILE: docs/blog/posts/announce-v0.1.md
================================================
---
authors:
  - franziskus
  - lucas
title: "A new chapter"
date: 2025-01-21
---

# Hax Takes Flight: Announcing Our First Release and New Home at Cryspen!

We're thrilled to announce that hax is entering a new era of stability and
growth with the launch of our new website, a fresh start at Cryspen,
and our first official release,
[v0.1.0](https://github.com/cryspen/hax/releases/tag/cargo-hax-v0.1.0)!

After an intense period of research and development, hax is transitioning to a
more stable phase.
To support this evolution, we've moved the repository to its new home within the
Cryspen GitHub organization.
This change streamlines our processes and clarifies project ownership while
maintaining hax's open-source nature.
Cryspen is responsible for driving hax forward, but we enthusiastically
welcome contributions from the community, and continue working closely with
the team of existing contributors!

This move also marks our shift to a release-driven development model,
culminating in our first official release, v0.1.0.
While we anticipate some breaking changes in the lead-up to v1.0, detailed
release notes will clearly outline any backward compatibility issues.

### The state of hax

Hax currently boasts three actively used backends: ([F\*](https://fstar-lang.org/),
[Rocq](https://rocq-prover.org/) and [SSProve](https://github.com/SSProve/ssprove)).
While Cryspen primarily focuses on the F\* backend, [Bas Spitters](https://www.au.dk/en/spitters@cs.au.dk)
and his team at the University of Aarhus are actively developing and utilizing
the Rocq and SSProve backends. Cryspen also supports an experimental backend for
[ProVerif](https://bblanche.gitlabpages.inria.fr/proverif/).

With this initial release, hax can process a significant subset of Rust code.
Both the frontend, which extracts a JSON AST from the Rust compiler, and the
engine, which lowers the code to the backends, have undergone major
improvements and stabilization throughout 2024.

Our new website provides a central hub for all things hax.
Users can explore the [manual](../../manual/index.md), experiment with the
interactive [hax playground](https://hax-playground.cryspen.com/),
and delve into a diverse collection of [examples](https://github.com/cryspen/hax/tree/main/examples)
showcasing hax's capabilities.

We will work on improving the manual and developer documentation over the next
few months.

#### Hax in Action

Over the past year, hax has proven its versatility in various projects:

- [Verifying Bertie](https://cryspen.com/post/hax-pv/): A TLS 1.3 implementation, verified with the ProVerif backend
- [Verifying ML-KEM](https://cryspen.com/post/ml-kem-verification): A post quantum cryptographic algorithm verified with the F\* backend
- [Verifying Smart Contracts](https://github.com/hacspec/hacspec.github.io/blob/master/coqpl24-paper9-13.pdf): Leveraging the Rocq backend for enhanced security verification.

#### The Road Ahead

While hax can handle a substantial portion of Rust code, certain limitations
remain.
Features like Generic Associated Types (GATs), some Rust nightly features, specific
loop and pattern structures, and a range of mutations are not yet supported.

??? hint "Detailed list of unsupported features"
    Here's some content.

    **GATs**

    Support for Generic Associated Types (GATs) in the frontend is under consideration
    ([Issue #915](https://github.com/cryspen/hax/issues/915))

    **Rust nightly features**

    A full list of unsupported Rust nightly features can be found with the [unsupported-rust label](https://github.com/cryspen/hax/issues?q=is%3Aissue%20state%3Aopen%20nightly%20label%3Aunsupported-rust).

    **Pattern**

    Some expressive Rust patterns are not supported yet in the hax engine.
    For example, [range patterns](https://github.com/cryspen/hax/issues/925) such as
    `0..12`, [`as` patterns](https://github.com/cryspen/hax/issues/833) such as `x @ Option(_)` or [array or slice patterns](https://github.com/cryspen/hax/issues/804) such as `[head, ..tail]` are not supported.

    **Mutation**

    - Mutations inside closures are not supported ([Issue #1060](https://github.com/cryspen/hax/issues/1060))
    - Re-borrowing mutable refferences is not allowed ([Issue #420](https://github.com/cryspen/hax/issues/420))
    - Implicit reborrowing of mutable references is not supported ([Issue #419](https://github.com/cryspen/hax/issues/419))
    - User-defined functions cannot return `&mut`s ([Issue #418](https://github.com/cryspen/hax/issues/418))
    - Calling `&mut`-returning functions is not allowed in general ([Issue #418](https://github.com/cryspen/hax/issues/418), [Issue #494](https://github.com/cryspen/hax/issues/494) and [Issue #491](https://github.com/cryspen/hax/issues/491))
    - Enum variants cannot be mutated ([Issue #493](https://github.com/cryspen/hax/issues/493))

    **Loops**

    - Unconditional loops `loop {...}` ([Issue #124](https://github.com/cryspen/hax/issues/124))
    - While let `while let .. = .. {}` ([Issue #113](https://github.com/cryspen/hax/issues/113))
    - Loops without side effect ([Issue #405](https://github.com/cryspen/hax/issues/405))

    **`const` inline blocks**

    Inline `const` blocks are not supported yet.
    [Issue #923](https://github.com/cryspen/hax/issues/923)

### Parting Thoughts

This is an exciting time for hax!
With our new home at Cryspen, a dedicated release model, and a growing community,
we're confident that hax will continue to mature and empower developers to build
secure and reliable software.

We encourage you to explore the new hax website, dive into the documentation,
and experiment with the playground.
Join us on this journey!
Contribute to the project, share your feedback, and help us shape the future of
Rust verification.


================================================
FILE: docs/blog/posts/hax-for-everyone.md
================================================
---
authors:
  - maxime
title: "Hax for everyone"
date: 2025-02-25
---

# Trying to make hax usable in more contexts
The hax toolchain has been successfully used to formally verify our cryptographic implementations for [ML-KEM](https://cryspen.com/post/ml-kem-verification/),[Bertie](https://cryspen.com/post/hax-pv/) and more. All these projects are developed with formal verification (using hax) in mind, and use a limited subset of Rust features.
However, hax is under constant development and the improvements we bring are targeted at making it more usable. With these improvements we want to bring hax to a new kind of projects that don’t have restrictions on the Rust patterns they use. We want hax to be usable in this context with minimal modifications to the code (ideally no modification at all). An example of such a project is the verification of [sandwich](https://github.com/sandbox-quantum/sandwich), a high-level cryptographic library built by [SandboxAQ](https://cryspen.com/post/hax-sandbox/). This project revealed the weaknesses of hax in this context which brought us to implement some improvements that will be presented in this blog post.
## Challenges
The projects that use hax from the beginning can limit themselves to the subset of Rust supported by hax. Applying hax to a pre-existing project means that it may use various Rust features that are probably not supported yet in hax. The challenge is then to identify which features to prioritize for support in hax (and adding support is yet another challenge), and which features have no short-term plan for support. For the latter we need to abstract out the code (if it is not relevant for proofs) or rewrite it (when possible; ideally we try to avoid this).
Having external users encourages us even more to make hax an easily-usable and well-documented tool.
## Frontend improvements
The hax frontend is mostly relying on rustc and cargo to extract intermediary representations of a Rust crate. It is supposed to produce a result for any Rust crate (restrictions on the available Rust features come later in the toolchain). However the information given by rustc is sometimes partial or lacks some parts that are needed for our translations. A crucial example of this is trait resolution as we need to know the trait derivation that is used by each call of a trait method. This is a part of the hax frontend that has proven tricky and still had many bugs a few months ago. At that time, launching it on a somehow complicated crate had big chances of resulting in a crash. As part of our effort to improve the usability of hax, many of these bugs have now been fixed (in collaboration with our colleagues at Inria). This is a big step forward, since even for a project that looks small and simple, we need to handle all of its dependencies which are usually more problematic.

According to our tests on the top 500 crates (by number of downloads on crates.io), hax frontend succeeds without crashing or timing out on more than 99%. However we are still looking for a better way to measure the coverage of the Rust features, and identifying the situations where we can still improve.
## Recursive Bundles
Rust code is organized in modules, where modules can be seen as a namespacing system. When translating modules to our backends (F*, Coq, ProVerif) we need to generate the corresponding module-like abstraction in the backend, which typically works quite differently. In particular our backends require the module dependency graph to be acyclic while Rust has no such restriction. It is quite common in Rust to make use of this and create cyclic dependencies between modules which means it is necessary for us to have a solution for this problem.
Here is an example (you can open it in the hax playground to check the code hax generates out of it):
```rust

pub struct Error();

mod private {
	pub(crate) fn f() -> Result<(), super::Error> {
    	Ok(())
	}
}

pub fn user_f() -> Result<(), Error> {
	private::f()
}
```
[Open this code snippet in the hax playground](https://hax-playground.cryspen.com/#fstar/b7fe08cccd/gist=fcb9cb9854c69ee6e2788648a380ff79)

In this example there is a dependency between the top level module and the `private` module. Our solution to break these cycles is simply to put the content of the cyclic modules in a single module (that we call bundle), and then re-exposing the items in their original modules.
This solution is not perfect because it changes the architecture of the generated code compared to the original code, and it could be improved by minimizing the content of the bundles (choosing a set of definitions to break the cycle instead of the full content of the modules). But so far it has proven very useful as it removes a big limitation on the Rust we support.
## Opaque items
Large projects usually contain code that we don’t support yet but we still want to reason about the rest of the project and have an abstract model (axiomatization) for the parts that we don’t support. We need to control which parts we want to fully extract and which parts we extract only as opaque items. The command-line options offered by the hax toolchain provide a solution to this, but they only allow to choose at the model level, which is inconvenient for large projects. To make this more practical we added another way to specify inside the source with the attribute `hax_lib::opaque` makes an item axiomatized. There is still the problem of complicated `-i` flags which will be solved in the future by having the corresponding information in configuration files.
## Control flow rewriting without monads including inside loops
Translating imperative code to functional backends for verification implies some handling of side effects and transformation of control flow. A classic solution for this is to have a monadic encoding state which results in generated code that can be hard to read (and to reason about). This is the solution that was implemented (with some bugs) in hax but we decided to replace it with a solution without monads. The code we produce is simpler to read, but the main limitation is that there is code duplication which in some cases can lead to an extracted code that is exponentially bigger than the source.

Here is a simple example of this:
```rust
fn f() -> i32{
	if true {
    	if true {
        	return 1
    	}
	}
	3
}
```
[Open this code snippet in the hax playground](https://hax-playground.cryspen.com/#fstar/b7fe08cccd/gist=078ca6da8dad17541533bb5a0724784b)

The F* code extracted from this example is the following:
```ocaml
let f (_: Prims.unit) : i32 =
 if true
 then if true then mk_i32 1 else mk_i32 3
 else mk_i32 3
```
Here the semantics is preserved, but adding the `else` branches results in a duplication of the return value `3`.
Our idea to improve in the future is to revive the monadic version, but use it only if the duplication is too big. 
Support for control flow (`return`, `break` and `continue`) in loops has been added as well. In hax, loops are translated as a functional fold in which the accumulator keeps track of the modification of the environment done by the effectful operations in the source. This extension relies on a monadic encoding of the loop result, that is passed in the accumulator to deal with the specific cases of `return`, `break` and `continue`. 
## Items sorting
A quality of life feature that we have been lacking for a long time is trying to respect, as much as possible, the same order of items in the generated code compared to the source. We need to modify the order because (as for modules), Rust allows items to be defined in any order, while our backends need items to be defined after the other items they depend on (except for mutual recursion). We rely on a graph topological sort to ensure this property, and now use a modified version of the stable topological sort provided by ocamlgraph, which produces an order that respects the dependencies, but in the absence of constraints tries respects the order of the source.
## Conclusion
Bringing hax to a new kind of project revealed the gap needed for it to be usable, but thanks to our active work, we have made great progress towards this goal. Even though there is still much more to do, this has allowed us to get results in these new applications of hax (stay tuned for more details about that!).


================================================
FILE: docs/blog/posts/lucas-departure.md
================================================
---
authors:
  - lucas
title: "My Departure from hax and Cryspen"
date: 2026-01-14
---

Today, I want to share an update on both my professional path and my role in
hax. I decided to leave Cryspen, and as a result, I will also be stepping away
from hax.

## Looking Back

Back in September 2023, while I was working at Inria, I started working with
Karthikeyan on [Hacspec](https://github.com/hacspec/hacspec). Hacspec was
a domain-specific language embedded in Rust's syntax, aimed at cryptography
specification and verification. It relied on the surface AST (abstract syntax
tree) of the Rust compiler (rustc). Using such an early representation in the
compiler pipeline gave us very limited information: no types, no name resolution
-- essentially just syntax.

Both technically and in terms of intent, Hacspec had limitations. In December
2023, we decided to take a fresh start and build a new tool from the ground
up: hax.

Designing and implementing hax has been a fun adventure. I had the constraint to
write the "compiler" part of hax in OCaml. That led me to design hax in two main
parts:

 - **The frontend**: hooks into rustc and dumps enhanced ASTs, inlining a large
   amount of semantic information about Rust programs. The frontend produces a
   comprehensive, complete, and easy-to-consume AST that other tools can build
   upon. It grew a lot, notably thanks to our collaboration with Inria (for
   Charon and Aeneas), and especially thanks to
   [Nadrieril](https://github.com/Nadrieril), with whom it has been a great
   pleasure and a lot of fun to work.

 - **The engine**: an OCaml binary that reads our frontend's Rust AST, applies a
   sequence of translation phases, and finally outputs F*, Coq, etc.

For a full year at Inria and then two years at Cryspen, I was the main developer
of hax. Throughout this time, I greatly enjoyed working with Karthik; we
discussed many aspects of hax countless times: its design, its applications, the
workflows, and more. Those were great conversations, essential to the
development of hax.

Leading the development of hax was a great and intense experience. I had to engineer a
pretty large piece of software, design interesting semantic compiler passes,
build debugging tools, do DevOps work, build a playground, and more. I also
learned how complicated human interactions can be.

## Working at Cryspen

During my time at Cryspen, the proofs and tools team grew a lot. When I arrived,
it was Karthik and me. Then [Maxime](https://cryspen.com/post/welcome_maxime/)
joined towards the end of my first year (in August 2024). In May the next year
[Clément](https://cryspen.com/post/welcome_clement/) arrived, and very recently,
in November 2025, [Alex](https://cryspen.com/post/welcome_alex/) arrived. I
really enjoyed working with everyone in the proofs and tools team at Cryspen!

Beyond the proofs and tools team, it was also great to work with others at Cryspen:
Jan, Jonas, Clara.

## The Future

After three years working on hax, I decided it was time for me to leave. Hax is
a bit my baby, so that was a very hard decision to make.

That said, the rest of the proofs and tools team at Cryspen will continue
maintaining, improving, and applying hax to cool real-world Rust projects! They
are already working on the new Lean backend, on better libraries, and on very
exciting applications!

I'm proud of what hax has become, and I hope it will have a bright future! If
hax speaks to you, consider following the project, trying it out, or
contributing.


================================================
FILE: docs/blog/posts/reworking-names/reworking-names.md
================================================
---
authors:
  - lucas
title: "Redesigning Global Identifiers in hax"
date: 2025-04-01
---

# Redesigning Global Identifiers in hax

A careful treatment of identifiers lies at the heart of all code analysis frameworks, and we hope our experience here proves useful to others.

In Rust, global identifier serves to uniquely locate uniquely an item: for instance `::serde::ser::Serialize` designates the `Serialize` trait from the Serde library. In constrat, local identifiers are relative, limited to the scope in which they are declared.

## Global Identifiers from the Rust Compiler

Initially, hax assumed that all identifiers originated exclusively from Rust. While this assumption held in the early stages, it was eventually challenged as the system grew[^1]. As hax evolved, new requirements emerged, prompting the engine to generate identifiers internally:

- **Trait pre- and post-conditions:** in hax, these are explicitly represented as concrete methods within typeclasses. Conversely, in Rust, these conditions exist only as anonymous standalone functions.
- **Explicit enum cast operations:** enum casts are primitive operations in Rust, but hax treats these casts as specialized operations, assigning distinct identifiers to them.
- **
Download .txt
gitextract_cva_42qr/

├── .cargo/
│   └── config.toml
├── .docker/
│   └── Dockerfile
├── .dockerignore
├── .envrc
├── .github/
│   ├── assets/
│   │   └── change-padding.sh
│   └── workflows/
│       ├── bertie.yml
│       ├── changelog.yml
│       ├── clippy_rust_engine.yml
│       ├── extract_and_run_coq.yml
│       ├── flake_lock.yml
│       ├── format.yml
│       ├── gh_pages.yml
│       ├── install_and_test.yml
│       ├── licenses.yml
│       ├── mldsa.yml
│       ├── mlkem.yml
│       ├── playwright-docs.yml
│       ├── release.yml
│       ├── rustc-coverage-tests.yml
│       ├── stale.yml
│       ├── test.yml
│       ├── test_installs.yml
│       └── this-month-in-hax.yml
├── .gitignore
├── .utils/
│   ├── jq_utils.jq
│   ├── rebuild.sh
│   ├── rust-by-example.js
│   └── this-month-in-hax-skeleton.sh
├── CHANGELOG.md
├── CI.md
├── CODEOWNERS
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE
├── PUBLISHING.md
├── README.md
├── cli/
│   ├── default.nix
│   ├── driver/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── callbacks_wrapper.rs
│   │       ├── driver.rs
│   │       ├── exporter.rs
│   │       └── features.rs
│   └── subcommands/
│       ├── Cargo.toml
│       ├── build.rs
│       └── src/
│           ├── cargo_hax.rs
│           ├── engine_debug_webapp/
│           │   ├── README.md
│           │   ├── mod.rs
│           │   └── static/
│           │       ├── index.html
│           │       └── script.js
│           └── json_schema.rs
├── deny.toml
├── dependabot.yml
├── docs/
│   ├── .test/
│   │   ├── .gitignore
│   │   ├── global-setup.ts
│   │   ├── package.json
│   │   ├── playwright.config.ts
│   │   └── tests/
│   │       └── docs.spec.ts
│   ├── RFCs/
│   │   ├── .nav.yml
│   │   ├── 0000-template.md
│   │   └── index.md
│   ├── blog/
│   │   ├── .authors.yml
│   │   ├── index.md
│   │   └── posts/
│   │       ├── announce-v0.1.md
│   │       ├── hax-for-everyone.md
│   │       ├── lucas-departure.md
│   │       ├── reworking-names/
│   │       │   └── reworking-names.md
│   │       ├── rust-gcd-1.md
│   │       ├── rust-gcd-2.md
│   │       └── this-month-in-hax/
│   │           ├── 2025-01.md
│   │           ├── 2025-02.md
│   │           ├── 2025-03.md
│   │           ├── 2025-04.md
│   │           ├── 2025-05.md
│   │           ├── 2025-06.md
│   │           ├── 2025-07.md
│   │           ├── 2025-08.md
│   │           ├── 2025-09.md
│   │           ├── 2025-10.md
│   │           ├── 2025-11.md
│   │           ├── 2026-01.md
│   │           ├── 2026-02.md
│   │           ├── 2026-03.md
│   │           └── 2026-04.md
│   ├── default.nix
│   ├── dev/
│   │   ├── architecture.md
│   │   ├── ast_ebnf.md
│   │   ├── docs.md
│   │   ├── index.md
│   │   └── libraries_macros.md
│   ├── engine/
│   │   ├── index.md
│   │   └── toolchain_structure/
│   │       └── index.md
│   ├── frontend/
│   │   ├── evaluation.md
│   │   └── index.md
│   ├── index.md
│   ├── javascripts/
│   │   ├── ansi_up.js
│   │   ├── fstar.js
│   │   ├── hax_playground.js
│   │   └── lz-string.js
│   ├── manual/
│   │   ├── faq/
│   │   │   ├── include-flags.md
│   │   │   ├── index.md
│   │   │   └── into.md
│   │   ├── fstar/
│   │   │   ├── .nav.yml
│   │   │   ├── index.md
│   │   │   ├── quick_start.md
│   │   │   └── tutorial/
│   │   │       ├── data-invariants.md
│   │   │       ├── index.md
│   │   │       ├── panic-freedom.md
│   │   │       ├── proofs/
│   │   │       │   └── fstar/
│   │   │       │       └── extraction/
│   │   │       │           ├── Makefile
│   │   │       │           ├── Tutorial_src.Math.Lemmas.fst
│   │   │       │           └── Tutorial_src.fst
│   │   │       └── properties.md
│   │   ├── index.md
│   │   └── lean/
│   │       ├── index.md
│   │       ├── internals.md
│   │       ├── quick_start.md
│   │       └── tutorial/
│   │           ├── index.md
│   │           ├── panic-freedom.md
│   │           └── properties.md
│   ├── overrides/
│   │   └── main.html
│   ├── publications.md
│   └── stylesheets/
│       ├── hax_playground.css
│       ├── logo.css
│       └── tags-colors.css
├── engine/
│   ├── .ocamlformat
│   ├── DEV.md
│   ├── backends/
│   │   ├── coq/
│   │   │   ├── coq/
│   │   │   │   ├── coq_backend.ml
│   │   │   │   ├── coq_backend.mli
│   │   │   │   └── dune
│   │   │   ├── coq_ast.ml
│   │   │   ├── dune
│   │   │   └── ssprove/
│   │   │       ├── dune
│   │   │       ├── ssprove_backend.ml
│   │   │       └── ssprove_backend.mli
│   │   ├── easycrypt/
│   │   │   ├── dune
│   │   │   ├── easycrypt_backend.ml
│   │   │   └── easycrypt_backend.mli
│   │   ├── fstar/
│   │   │   ├── dune
│   │   │   ├── fstar-surface-ast/
│   │   │   │   ├── .gitignore
│   │   │   │   ├── .ocamlformat-ignore
│   │   │   │   ├── FStar_BaseTypes.ml
│   │   │   │   ├── FStar_Char.ml
│   │   │   │   ├── FStar_Compiler_Effect.ml
│   │   │   │   ├── FStar_Compiler_List.ml
│   │   │   │   ├── FStar_Compiler_Range.ml
│   │   │   │   ├── FStar_Compiler_Util.ml
│   │   │   │   ├── FStar_Const.ml
│   │   │   │   ├── FStar_Errors.ml
│   │   │   │   ├── FStar_Errors_Codes.ml
│   │   │   │   ├── FStar_Getopt.ml
│   │   │   │   ├── FStar_Ident.ml
│   │   │   │   ├── FStar_ImmutableArray_Base.ml
│   │   │   │   ├── FStar_List.ml
│   │   │   │   ├── FStar_Parser_AST.ml
│   │   │   │   ├── FStar_Parser_AST_Util.ml
│   │   │   │   ├── FStar_Parser_Const.ml
│   │   │   │   ├── FStar_Parser_Driver.ml
│   │   │   │   ├── FStar_Parser_LexFStar.ml
│   │   │   │   ├── FStar_Parser_Parse.ml
│   │   │   │   ├── FStar_Parser_ParseIt.ml
│   │   │   │   ├── FStar_Parser_ToDocument.ml
│   │   │   │   ├── FStar_Parser_Utf8.ml
│   │   │   │   ├── FStar_Parser_Util.ml
│   │   │   │   ├── FStar_Pervasives.ml
│   │   │   │   ├── FStar_Pervasives_Native.ml
│   │   │   │   ├── FStar_Pprint.ml
│   │   │   │   ├── FStar_Sedlexing.ml
│   │   │   │   ├── FStar_String.ml
│   │   │   │   ├── FStar_VConfig.ml
│   │   │   │   ├── README
│   │   │   │   ├── dune
│   │   │   │   ├── prims.ml
│   │   │   │   └── z.ml
│   │   │   ├── fstar_ast.ml
│   │   │   ├── fstar_backend.ml
│   │   │   └── fstar_backend.mli
│   │   ├── lean/
│   │   │   ├── dune
│   │   │   └── lean_backend.ml
│   │   └── proverif/
│   │       ├── dune
│   │       ├── proverif_backend.ml
│   │       └── proverif_backend.mli
│   ├── bin/
│   │   ├── dune
│   │   ├── dune-js
│   │   ├── js_driver.ml
│   │   ├── js_stubs/
│   │   │   ├── mutex.js
│   │   │   ├── stdint.js
│   │   │   └── unix.js
│   │   ├── lib.ml
│   │   ├── lib.mli
│   │   └── native_driver.ml
│   ├── default.nix
│   ├── doc/
│   │   ├── dune
│   │   └── index.mld
│   ├── dune-project
│   ├── hax-engine.opam
│   ├── hax-engine.opam.template
│   ├── lib/
│   │   ├── analyses/
│   │   │   ├── function_dependency.ml
│   │   │   └── mutable_variables.ml
│   │   ├── analyses.ml
│   │   ├── ast.ml
│   │   ├── ast_builder.ml
│   │   ├── ast_destruct.ml
│   │   ├── ast_utils.ml
│   │   ├── attr_payloads.ml
│   │   ├── backend.ml
│   │   ├── concrete_ident/
│   │   │   ├── concrete_ident.ml
│   │   │   ├── concrete_ident.mli
│   │   │   ├── concrete_ident_render_sig.ml
│   │   │   ├── concrete_ident_types.ml
│   │   │   ├── concrete_ident_view.ml
│   │   │   ├── concrete_ident_view.mli
│   │   │   ├── concrete_ident_view_types.ml
│   │   │   ├── explicit_def_id.ml
│   │   │   ├── explicit_def_id.mli
│   │   │   ├── impl_infos.ml
│   │   │   └── thir_simple_types.ml
│   │   ├── dependencies.ml
│   │   ├── dependencies.mli
│   │   ├── deprecated_generic_printer/
│   │   │   ├── deprecated_generic_printer.ml
│   │   │   ├── deprecated_generic_printer.mli
│   │   │   └── deprecated_generic_printer_base.ml
│   │   ├── diagnostics.ml
│   │   ├── dune
│   │   ├── export_ast.ml
│   │   ├── feature_gate.ml
│   │   ├── features.ml
│   │   ├── generic_printer/
│   │   │   ├── generic_printer.ml
│   │   │   ├── generic_printer_template.generate.js
│   │   │   └── generic_printer_template.ml
│   │   ├── hax_io.ml
│   │   ├── import_ast.ml
│   │   ├── import_thir.ml
│   │   ├── import_thir.mli
│   │   ├── local_ident.ml
│   │   ├── local_ident.mli
│   │   ├── phase_utils.ml
│   │   ├── phases/
│   │   │   ├── phase_and_mut_defsite.ml
│   │   │   ├── phase_and_mut_defsite.mli
│   │   │   ├── phase_bundle_cycles.ml
│   │   │   ├── phase_bundle_cycles.mli
│   │   │   ├── phase_cf_into_monads.ml
│   │   │   ├── phase_cf_into_monads.mli
│   │   │   ├── phase_direct_and_mut.ml
│   │   │   ├── phase_direct_and_mut.mli
│   │   │   ├── phase_drop_blocks.ml
│   │   │   ├── phase_drop_blocks.mli
│   │   │   ├── phase_drop_match_guards.ml
│   │   │   ├── phase_drop_match_guards.mli
│   │   │   ├── phase_drop_references.ml
│   │   │   ├── phase_drop_references.mli
│   │   │   ├── phase_drop_return_break_continue.ml
│   │   │   ├── phase_drop_return_break_continue.mli
│   │   │   ├── phase_drop_sized_trait.ml
│   │   │   ├── phase_drop_sized_trait.mli
│   │   │   ├── phase_explicit_conversions.ml
│   │   │   ├── phase_explicit_conversions.mli
│   │   │   ├── phase_functionalize_loops.ml
│   │   │   ├── phase_functionalize_loops.mli
│   │   │   ├── phase_hoist_disjunctive_patterns.ml
│   │   │   ├── phase_hoist_disjunctive_patterns.mli
│   │   │   ├── phase_local_mutation.ml
│   │   │   ├── phase_local_mutation.mli
│   │   │   ├── phase_newtype_as_refinement.ml
│   │   │   ├── phase_newtype_as_refinement.mli
│   │   │   ├── phase_reconstruct_asserts.ml
│   │   │   ├── phase_reconstruct_asserts.mli
│   │   │   ├── phase_reconstruct_for_index_loops.ml
│   │   │   ├── phase_reconstruct_for_index_loops.mli
│   │   │   ├── phase_reconstruct_for_loops.ml
│   │   │   ├── phase_reconstruct_for_loops.mli
│   │   │   ├── phase_reconstruct_question_marks.ml
│   │   │   ├── phase_reconstruct_question_marks.mli
│   │   │   ├── phase_reconstruct_while_loops.ml
│   │   │   ├── phase_reconstruct_while_loops.mli
│   │   │   ├── phase_reject.ml
│   │   │   ├── phase_reject_impl_type_method.ml
│   │   │   ├── phase_reject_impl_type_method.mli
│   │   │   ├── phase_reorder_fields.ml
│   │   │   ├── phase_reorder_fields.mli
│   │   │   ├── phase_rewrite_control_flow.ml
│   │   │   ├── phase_rewrite_control_flow.mli
│   │   │   ├── phase_rewrite_local_self.ml
│   │   │   ├── phase_rewrite_local_self.mli
│   │   │   ├── phase_simplify_hoisting.ml
│   │   │   ├── phase_simplify_hoisting.mli
│   │   │   ├── phase_simplify_match_return.ml
│   │   │   ├── phase_simplify_match_return.mli
│   │   │   ├── phase_simplify_question_marks.ml
│   │   │   ├── phase_simplify_question_marks.mli
│   │   │   ├── phase_sort_items.ml
│   │   │   ├── phase_sort_items.mli
│   │   │   ├── phase_sort_items_namespace_wise.ml
│   │   │   ├── phase_sort_items_namespace_wise.mli
│   │   │   ├── phase_specialize.ml
│   │   │   ├── phase_specialize.mli
│   │   │   ├── phase_traits_specs.ml
│   │   │   ├── phase_traits_specs.mli
│   │   │   ├── phase_transform_hax_lib_inline.ml
│   │   │   ├── phase_transform_hax_lib_inline.mli
│   │   │   ├── phase_trivialize_assign_lhs.ml
│   │   │   └── phase_trivialize_assign_lhs.mli
│   │   ├── phases.ml
│   │   ├── prelude.ml
│   │   ├── print_rust.ml
│   │   ├── print_rust.mli
│   │   ├── profiling.ml
│   │   ├── rust_engine_types.ml
│   │   ├── side_effect_utils.ml
│   │   ├── span.ml
│   │   ├── span.mli
│   │   ├── subtype.ml
│   │   ├── untyped_phases/
│   │   │   ├── gen.js
│   │   │   └── untyped_phases.ml
│   │   └── utils.ml
│   ├── names/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── extract/
│   │   │   ├── Cargo.toml
│   │   │   ├── build.rs
│   │   │   └── src/
│   │   │       └── main.rs
│   │   └── src/
│   │       ├── crypto_abstractions.rs
│   │       └── lib.rs
│   └── utils/
│       ├── generate_from_ast/
│       │   ├── README.md
│       │   ├── codegen_ast_builder.ml
│       │   ├── codegen_ast_destruct.ml
│       │   ├── codegen_printer.ml
│       │   ├── codegen_visitor.ml
│       │   ├── dune
│       │   ├── errors.ml
│       │   ├── generate_from_ast.ml
│       │   ├── primitive_types.ml
│       │   ├── types.ml
│       │   ├── utils.ml
│       │   └── visitors.ml
│       ├── hacspeclib-macro-parser/
│       │   ├── dune
│       │   └── hacspeclib_macro_parser.ml
│       ├── ocaml_of_json_schema/
│       │   └── ocaml_of_json_schema.js
│       ├── ppx_functor_application/
│       │   ├── README.md
│       │   ├── dune
│       │   └── ppx_functor_application.ml
│       ├── ppx_generate_features/
│       │   ├── README.md
│       │   ├── dune
│       │   └── ppx_generate_features.ml
│       ├── ppx_inline/
│       │   ├── README.md
│       │   ├── dune
│       │   └── ppx_inline.ml
│       ├── ppx_phases_index/
│       │   ├── README.md
│       │   ├── dune
│       │   └── ppx_phases_index.ml
│       ├── sourcemaps/
│       │   ├── base64.ml
│       │   ├── dune
│       │   ├── location.ml
│       │   ├── mappings/
│       │   │   ├── dual.ml
│       │   │   ├── instruction.ml
│       │   │   ├── mappings.ml
│       │   │   ├── mappings.mli
│       │   │   ├── spanned.ml
│       │   │   └── types.ml
│       │   ├── prelude.ml
│       │   ├── source_maps.ml
│       │   ├── source_maps.mli
│       │   └── vql.ml
│       └── universe-hash.sh
├── examples/
│   ├── .envrc
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── Makefile
│   ├── README.md
│   ├── barrett/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   ├── fstar/
│   │   │   │   └── extraction/
│   │   │   │       └── Makefile
│   │   │   ├── lean/
│   │   │   │   ├── lakefile.toml
│   │   │   │   └── lean-toolchain
│   │   │   └── rust/
│   │   │       └── extraction/
│   │   │           └── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── chacha20/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   ├── coq/
│   │   │   │   └── extraction/
│   │   │   │       ├── Chacha20.Hacspec_helper.v
│   │   │   │       └── Chacha20.v
│   │   │   └── fstar/
│   │   │       └── extraction/
│   │   │           ├── Chacha20.Hacspec_helper.fst
│   │   │           ├── Chacha20.fst
│   │   │           └── Makefile
│   │   ├── src/
│   │   │   ├── hacspec_helper.rs
│   │   │   └── lib.rs
│   │   └── tests/
│   │       └── kat.rs
│   ├── commonArgs.nix
│   ├── coq-example/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── proofs/
│   │   │   └── coq/
│   │   │       └── extraction/
│   │   │           ├── Coq_example.v
│   │   │           ├── Coq_example_Dummy_core_lib.v
│   │   │           ├── Coq_proofs.v
│   │   │           ├── Makefile
│   │   │           └── dummy_core_lib.v
│   │   └── src/
│   │       ├── dummy_core_lib.rs
│   │       └── lib.rs
│   ├── coverage/
│   │   ├── Cargo.toml
│   │   ├── default.nix
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── test_arrays.rs
│   │       ├── test_closures.rs
│   │       ├── test_enum.rs
│   │       ├── test_functions.rs
│   │       ├── test_instance.rs
│   │       ├── test_primitives.rs
│   │       ├── test_sequence.rs
│   │       ├── test_struct.rs
│   │       └── test_trait.rs
│   ├── default.nix
│   ├── hax.fst.config.json
│   ├── kyber_compress/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── fstar/
│   │   │       └── extraction/
│   │   │           └── Makefile
│   │   └── src/
│   │       └── lib.rs
│   ├── lean_adc/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── lean/
│   │   │       ├── lake-manifest.json
│   │   │       ├── lakefile.toml
│   │   │       └── lean-toolchain
│   │   └── src/
│   │       └── lib.rs
│   ├── lean_barrett/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── lean/
│   │   │       ├── lake-manifest.json
│   │   │       ├── lakefile.toml
│   │   │       └── lean-toolchain
│   │   └── src/
│   │       └── lib.rs
│   ├── lean_chacha20/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── lean/
│   │   │       ├── lake-manifest.json
│   │   │       ├── lakefile.toml
│   │   │       └── lean-toolchain
│   │   └── src/
│   │       ├── hacspec_helper.rs
│   │       └── lib.rs
│   ├── lean_tutorial/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── proofs/
│   │   │   └── lean/
│   │   │       ├── lake-manifest.json
│   │   │       ├── lakefile.toml
│   │   │       └── lean-toolchain
│   │   └── src/
│   │       └── lib.rs
│   ├── limited-order-book/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── README.md
│   │   ├── lob_backend.did
│   │   ├── proofs/
│   │   │   ├── coq/
│   │   │   │   └── extraction/
│   │   │   │       └── Lob_backend.v
│   │   │   └── fstar/
│   │   │       └── extraction/
│   │   │           ├── Lob_backend.fst
│   │   │           └── Makefile
│   │   └── src/
│   │       ├── canister.rs
│   │       └── lib.rs
│   ├── proverif-psk/
│   │   ├── Cargo.toml
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── proofs/
│   │   │   └── proverif/
│   │   │       └── analysis.pv
│   │   ├── psk.pv
│   │   ├── pv_div_by_zero_fix.diff
│   │   └── src/
│   │       └── lib.rs
│   └── sha256/
│       ├── .gitignore
│       ├── Cargo.toml
│       ├── Makefile
│       ├── proofs/
│       │   ├── coq/
│       │   │   └── extraction/
│       │   │       └── Sha256.v
│       │   └── fstar/
│       │       └── extraction/
│       │           ├── Makefile
│       │           └── Sha256.fst
│       ├── src/
│       │   └── sha256.rs
│       └── tests/
│           └── test_sha256.rs
├── flake.nix
├── frontend/
│   └── exporter/
│       ├── Cargo.toml
│       ├── README.md
│       ├── adt-into/
│       │   ├── .gitignore
│       │   ├── Cargo.toml
│       │   ├── README.md
│       │   ├── src/
│       │   │   └── lib.rs
│       │   └── tests/
│       │       └── lib.rs
│       ├── default.nix
│       ├── options/
│       │   ├── Cargo.toml
│       │   └── src/
│       │       └── lib.rs
│       └── src/
│           ├── body.rs
│           ├── comments.rs
│           ├── constant_utils/
│           │   └── uneval.rs
│           ├── constant_utils.rs
│           ├── deterministic_hash.rs
│           ├── id_table.rs
│           ├── index_vec.rs
│           ├── lib.rs
│           ├── prelude.rs
│           ├── rustc_utils.rs
│           ├── sinto.rs
│           ├── state.rs
│           ├── traits/
│           │   ├── resolution.rs
│           │   └── utils.rs
│           ├── traits.rs
│           ├── types/
│           │   ├── attributes.rs
│           │   ├── def_id.rs
│           │   ├── hir.rs
│           │   ├── mir.rs
│           │   ├── mod.rs
│           │   ├── new/
│           │   │   ├── full_def.rs
│           │   │   ├── impl_infos.rs
│           │   │   ├── item_attributes.rs
│           │   │   ├── mod.rs
│           │   │   ├── predicate_id.rs
│           │   │   ├── synthetic_items.rs
│           │   │   └── variant_infos.rs
│           │   ├── serialize_int.rs
│           │   ├── span.rs
│           │   ├── thir.rs
│           │   └── ty.rs
│           └── utils/
│               ├── error_macros.rs
│               ├── mod.rs
│               └── type_map.rs
├── hax-bounded-integers/
│   ├── Cargo.toml
│   ├── proofs/
│   │   └── fstar/
│   │       └── extraction/
│   │           ├── Hax_bounded_integers.Num_traits.fst
│   │           └── Hax_bounded_integers.fst
│   └── src/
│       ├── lib.rs
│       └── num_traits.rs
├── hax-lib/
│   ├── Cargo.toml
│   ├── README.md
│   ├── build.rs
│   ├── core-models/
│   │   ├── .gitignore
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── alloc/
│   │   │   ├── Cargo.toml
│   │   │   └── src/
│   │   │       └── lib.rs
│   │   ├── hax.sh
│   │   ├── rand_core/
│   │   │   ├── Cargo.toml
│   │   │   └── src/
│   │   │       └── lib.rs
│   │   ├── rust_primitives/
│   │   │   ├── Cargo.toml
│   │   │   └── src/
│   │   │       └── lib.rs
│   │   ├── src/
│   │   │   ├── core/
│   │   │   │   ├── array.rs
│   │   │   │   ├── borrow.rs
│   │   │   │   ├── clone.rs
│   │   │   │   ├── cmp.rs
│   │   │   │   ├── convert.rs
│   │   │   │   ├── default.rs
│   │   │   │   ├── error.rs
│   │   │   │   ├── f32.rs
│   │   │   │   ├── fmt.rs
│   │   │   │   ├── hash.rs
│   │   │   │   ├── hint.rs
│   │   │   │   ├── iter.rs
│   │   │   │   ├── marker.rs
│   │   │   │   ├── mem.rs
│   │   │   │   ├── num/
│   │   │   │   │   ├── error.rs
│   │   │   │   │   └── mod.rs
│   │   │   │   ├── ops.rs
│   │   │   │   ├── option.rs
│   │   │   │   ├── panicking.rs
│   │   │   │   ├── result.rs
│   │   │   │   ├── slice.rs
│   │   │   │   └── str.rs
│   │   │   └── lib.rs
│   │   └── std/
│   │       ├── Cargo.toml
│   │       └── src/
│   │           └── lib.rs
│   ├── macros/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── src/
│   │   │   ├── dummy.rs
│   │   │   ├── hax_paths.rs
│   │   │   ├── impl_fn_decoration.rs
│   │   │   ├── implementation.rs
│   │   │   ├── lib.rs
│   │   │   ├── quote.rs
│   │   │   ├── rewrite_self.rs
│   │   │   ├── syn_ext.rs
│   │   │   └── utils.rs
│   │   └── types/
│   │       ├── Cargo.toml
│   │       ├── README.md
│   │       └── src/
│   │           └── lib.rs
│   ├── proof-libs/
│   │   ├── coq/
│   │   │   ├── coq/
│   │   │   │   ├── .gitignore
│   │   │   │   ├── default.nix
│   │   │   │   └── generated-core/
│   │   │   │       ├── _CoqProject
│   │   │   │       ├── phase_library/
│   │   │   │       │   ├── ControlFlow.v
│   │   │   │       │   ├── NumberNotation.v
│   │   │   │       │   └── TODO.v
│   │   │   │       ├── spec/
│   │   │   │       │   ├── Core_Base_Spec.v
│   │   │   │       │   ├── Core_Base_Spec_Binary.v
│   │   │   │       │   ├── Core_Base_Spec_Binary_Pos.v
│   │   │   │       │   ├── Core_Base_Spec_Binary_Positive.v
│   │   │   │       │   ├── Core_Base_Spec_Constants.v
│   │   │   │       │   ├── Core_Base_Spec_Haxint.v
│   │   │   │       │   ├── Core_Base_Spec_Seq.v
│   │   │   │       │   ├── Core_Base_Spec_Unary.v
│   │   │   │       │   └── Core_Base_Spec_Z.v
│   │   │   │       └── src/
│   │   │   │           ├── Core.v
│   │   │   │           ├── Core_Array.v
│   │   │   │           ├── Core_Array_Iter.v
│   │   │   │           ├── Core_Array_Rec_bundle_579704328.v
│   │   │   │           ├── Core_Base.v
│   │   │   │           ├── Core_Base_Binary.v
│   │   │   │           ├── Core_Base_Number_conversion.v
│   │   │   │           ├── Core_Base_Pos.v
│   │   │   │           ├── Core_Base_Seq.v
│   │   │   │           ├── Core_Base_Z.v
│   │   │   │           ├── Core_Base_interface.v
│   │   │   │           ├── Core_Base_interface_Coerce.v
│   │   │   │           ├── Core_Base_interface_Int.v
│   │   │   │           ├── Core_Base_interface_Int_I128_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_I16_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_I32_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_I64_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_I8_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U128_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U16_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U32_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U64_proofs.v
│   │   │   │           ├── Core_Base_interface_Int_U8_proofs.v
│   │   │   │           ├── Core_Clone.v
│   │   │   │           ├── Core_Cmp.v
│   │   │   │           ├── Core_Convert.v
│   │   │   │           ├── Core_Fmt.v
│   │   │   │           ├── Core_Intrinsics.v
│   │   │   │           ├── Core_Iter.v
│   │   │   │           ├── Core_Iter_Range.v
│   │   │   │           ├── Core_Iter_Traits.v
│   │   │   │           ├── Core_Iter_Traits_Collect.v
│   │   │   │           ├── Core_Iter_Traits_Exact_size.v
│   │   │   │           ├── Core_Iter_Traits_Iterator.v
│   │   │   │           ├── Core_Iter_Traits_Marker.v
│   │   │   │           ├── Core_Marker.v
│   │   │   │           ├── Core_Num.v
│   │   │   │           ├── Core_Num_Int_macros.v
│   │   │   │           ├── Core_Num_Uint_macros.v
│   │   │   │           ├── Core_Ops.v
│   │   │   │           ├── Core_Ops_Arith.v
│   │   │   │           ├── Core_Ops_Arith_Impls_for_prims.v
│   │   │   │           ├── Core_Ops_Bit.v
│   │   │   │           ├── Core_Ops_Bit_Impls_for_prims.v
│   │   │   │           ├── Core_Ops_Function.v
│   │   │   │           ├── Core_Ops_Index.v
│   │   │   │           ├── Core_Ops_Index_range.v
│   │   │   │           ├── Core_Ops_Range.v
│   │   │   │           ├── Core_Option.v
│   │   │   │           ├── Core_Panicking.v
│   │   │   │           ├── Core_Primitive.v
│   │   │   │           ├── Core_Primitive_Number_conversion.v
│   │   │   │           ├── Core_Primitive_Number_conversion_i.v
│   │   │   │           ├── Core_Result.v
│   │   │   │           ├── Core_Slice.v
│   │   │   │           ├── Core_Slice_Index.v
│   │   │   │           ├── Core_Slice_Index_Private_slice_index.v
│   │   │   │           ├── Core_Slice_Iter.v
│   │   │   │           ├── Core_Slice_Iter_Macros.v
│   │   │   │           └── _CoqProject
│   │   │   └── ssprove/
│   │   │       ├── .gitignore
│   │   │       ├── README.md
│   │   │       ├── _CoqProject
│   │   │       ├── coq-hacspec-ssprove.opam.template
│   │   │       ├── docker_build/
│   │   │       │   └── Dockerfile
│   │   │       └── src/
│   │   │           ├── ChoiceEquality.v
│   │   │           ├── ConCertLib.v
│   │   │           ├── Hacspec_Lib.v
│   │   │           ├── Hacspec_Lib_Coercions.v
│   │   │           ├── Hacspec_Lib_Comparable.v
│   │   │           ├── Hacspec_Lib_Controlflow.v
│   │   │           ├── Hacspec_Lib_Eq.v
│   │   │           ├── Hacspec_Lib_Integers.v
│   │   │           ├── Hacspec_Lib_Loops.v
│   │   │           ├── Hacspec_Lib_Ltac.v
│   │   │           ├── Hacspec_Lib_Monad.v
│   │   │           ├── Hacspec_Lib_Natmod.v
│   │   │           ├── Hacspec_Lib_Notation.v
│   │   │           ├── Hacspec_Lib_Pre.v
│   │   │           ├── Hacspec_Lib_Seq.v
│   │   │           ├── Hacspec_Lib_TODO.v
│   │   │           ├── LocationUtility.v
│   │   │           └── dune
│   │   ├── fstar/
│   │   │   ├── .envrc
│   │   │   ├── Makefile.copy
│   │   │   ├── README.md
│   │   │   ├── core/
│   │   │   │   ├── Alloc.Alloc.fst
│   │   │   │   ├── Alloc.Borrow.fst
│   │   │   │   ├── Alloc.Boxed.fst
│   │   │   │   ├── Alloc.Collections.Binary_heap.fst
│   │   │   │   ├── Alloc.Collections.Btree.Set.fsti
│   │   │   │   ├── Alloc.Collections.Vec_deque.fsti
│   │   │   │   ├── Alloc.Fmt.fst
│   │   │   │   ├── Alloc.Slice.fst
│   │   │   │   ├── Alloc.String.fst
│   │   │   │   ├── Alloc.Vec.Drain.fst
│   │   │   │   ├── Alloc.Vec.Into_iter.fsti
│   │   │   │   ├── Alloc.Vec.fst
│   │   │   │   ├── Core_models.Array.Iter.fst
│   │   │   │   ├── Core_models.Array.fst
│   │   │   │   ├── Core_models.Borrow.fsti
│   │   │   │   ├── Core_models.Bundle.fst
│   │   │   │   ├── Core_models.Clone.fst
│   │   │   │   ├── Core_models.Cmp.fst
│   │   │   │   ├── Core_models.Convert.fst
│   │   │   │   ├── Core_models.Core_arch.Arm_shared.Neon.fsti
│   │   │   │   ├── Core_models.Core_arch.X86.Pclmulqdq.fsti
│   │   │   │   ├── Core_models.Core_arch.X86.Sse2.fsti
│   │   │   │   ├── Core_models.Core_arch.X86.fsti
│   │   │   │   ├── Core_models.Core_arch.X86_64_.Sse2.fsti
│   │   │   │   ├── Core_models.Core_arch.fsti
│   │   │   │   ├── Core_models.Default.fsti
│   │   │   │   ├── Core_models.Error.fsti
│   │   │   │   ├── Core_models.F32.fst
│   │   │   │   ├── Core_models.Fmt.Rt.fsti
│   │   │   │   ├── Core_models.Fmt.fsti
│   │   │   │   ├── Core_models.Hash.fsti
│   │   │   │   ├── Core_models.Hint.fsti
│   │   │   │   ├── Core_models.Iter.Adapters.Enumerate.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Flat_map.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Flatten.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Map.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Rev.fsti
│   │   │   │   ├── Core_models.Iter.Adapters.Step_by.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Take.fst
│   │   │   │   ├── Core_models.Iter.Adapters.Zip.fst
│   │   │   │   ├── Core_models.Iter.Bundle.fst
│   │   │   │   ├── Core_models.Iter.Sources.Repeat_with.fsti
│   │   │   │   ├── Core_models.Iter.Traits.Collect.fst
│   │   │   │   ├── Core_models.Iter.Traits.Iterator.fst
│   │   │   │   ├── Core_models.Iter.Traits.fst
│   │   │   │   ├── Core_models.Marker.fst
│   │   │   │   ├── Core_models.Mem.Manually_drop.fsti
│   │   │   │   ├── Core_models.Mem.Maybe_uninit.fsti
│   │   │   │   ├── Core_models.Mem.Transmutability.fsti
│   │   │   │   ├── Core_models.Mem.fsti
│   │   │   │   ├── Core_models.Num.Error.fsti
│   │   │   │   ├── Core_models.Num.Niche_types.fsti
│   │   │   │   ├── Core_models.Num.fst
│   │   │   │   ├── Core_models.Ops.Arith.fsti
│   │   │   │   ├── Core_models.Ops.Bit.fsti
│   │   │   │   ├── Core_models.Ops.Control_flow.fst
│   │   │   │   ├── Core_models.Ops.Deref.fst
│   │   │   │   ├── Core_models.Ops.Drop.fst
│   │   │   │   ├── Core_models.Ops.Function.fst
│   │   │   │   ├── Core_models.Ops.Index.IndexMut.fst
│   │   │   │   ├── Core_models.Ops.Index.Index_mut.fst
│   │   │   │   ├── Core_models.Ops.Index.fst
│   │   │   │   ├── Core_models.Ops.Range.fst
│   │   │   │   ├── Core_models.Ops.Try_trait.fst
│   │   │   │   ├── Core_models.Option.fst
│   │   │   │   ├── Core_models.Panicking.Internal.fsti
│   │   │   │   ├── Core_models.Panicking.fst
│   │   │   │   ├── Core_models.Result.fst
│   │   │   │   ├── Core_models.Slice.Iter.fst
│   │   │   │   ├── Core_models.Slice.fst
│   │   │   │   ├── Core_models.Str.Converts.fsti
│   │   │   │   ├── Core_models.Str.Error.fsti
│   │   │   │   ├── Core_models.Str.Iter.fsti
│   │   │   │   ├── Core_models.Str.Traits.fsti
│   │   │   │   ├── Core_models.Str.fsti
│   │   │   │   ├── Core_models.Time.fsti
│   │   │   │   ├── Core_models.TypeClassPlaceHolder.fst
│   │   │   │   ├── Core_models.fst
│   │   │   │   ├── Makefile
│   │   │   │   ├── README.md
│   │   │   │   ├── Rand.Distr.Distribution.fsti
│   │   │   │   ├── Rand.Distr.Integer.fsti
│   │   │   │   ├── Rand.Distributions.Distribution.fsti
│   │   │   │   ├── Rand.Distributions.Integer.fsti
│   │   │   │   ├── Rand.Rng.fsti
│   │   │   │   ├── Rand_core.Os.fsti
│   │   │   │   ├── Rand_core.fsti
│   │   │   │   ├── Std.Collections.Hash.Map.fsti
│   │   │   │   ├── Std.F64.fsti
│   │   │   │   ├── Std.Hash.Random.fsti
│   │   │   │   ├── Std.Io.Error.fsti
│   │   │   │   ├── Std.Io.Impls.fsti
│   │   │   │   ├── Std.Io.Stdio.fsti
│   │   │   │   └── Std.Io.fsti
│   │   │   ├── hax_lib/
│   │   │   │   └── Makefile
│   │   │   └── rust_primitives/
│   │   │       ├── Makefile
│   │   │       ├── Rust_primitives.Arithmetic.fsti
│   │   │       ├── Rust_primitives.Arrays.fsti
│   │   │       ├── Rust_primitives.BitVectors.fsti
│   │   │       ├── Rust_primitives.Char.fsti
│   │   │       ├── Rust_primitives.Float.fsti
│   │   │       ├── Rust_primitives.Hax.Control_flow_monad.Mexception.fst
│   │   │       ├── Rust_primitives.Hax.Control_flow_monad.Moption.fst
│   │   │       ├── Rust_primitives.Hax.Control_flow_monad.Mresult.fst
│   │   │       ├── Rust_primitives.Hax.Folds.fsti
│   │   │       ├── Rust_primitives.Hax.Int.fst
│   │   │       ├── Rust_primitives.Hax.Monomorphized_update_at.fsti
│   │   │       ├── Rust_primitives.Hax.fst
│   │   │       ├── Rust_primitives.Integers.fsti
│   │   │       ├── Rust_primitives.Iterators.fsti
│   │   │       ├── Rust_primitives.Mem.fsti
│   │   │       ├── Rust_primitives.Notations.fsti
│   │   │       ├── Rust_primitives.Sequence.fst
│   │   │       ├── Rust_primitives.Slice.fsti
│   │   │       ├── Rust_primitives.String.fsti
│   │   │       └── Rust_primitives.fst
│   │   ├── fstar-secret-integers/
│   │   │   ├── .envrc
│   │   │   ├── Makefile.copy
│   │   │   ├── README.md
│   │   │   ├── core/
│   │   │   │   ├── Alloc.Alloc.fst
│   │   │   │   ├── Alloc.Collections.Binary_heap.fsti
│   │   │   │   ├── Alloc.Slice.fst
│   │   │   │   ├── Alloc.Vec.fst
│   │   │   │   ├── Core.Array.Iter.fsti
│   │   │   │   ├── Core.Array.fst
│   │   │   │   ├── Core.Clone.fst
│   │   │   │   ├── Core.Cmp.fsti
│   │   │   │   ├── Core.Convert.fst
│   │   │   │   ├── Core.Iter.Adapters.Enumerate.fst
│   │   │   │   ├── Core.Iter.Adapters.Step_by.fst
│   │   │   │   ├── Core.Iter.Traits.Collect.fst
│   │   │   │   ├── Core.Iter.Traits.Iterator.fst
│   │   │   │   ├── Core.Iter.fsti
│   │   │   │   ├── Core.Marker.fst
│   │   │   │   ├── Core.Num.Error.fsti
│   │   │   │   ├── Core.Num.fsti
│   │   │   │   ├── Core.Ops.Arith.Neg.fsti
│   │   │   │   ├── Core.Ops.Arith.fsti
│   │   │   │   ├── Core.Ops.Control_flow.fst
│   │   │   │   ├── Core.Ops.Deref.fst
│   │   │   │   ├── Core.Ops.Index.IndexMut.fst
│   │   │   │   ├── Core.Ops.Index.fst
│   │   │   │   ├── Core.Ops.Range.fsti
│   │   │   │   ├── Core.Ops.Try_trait.fst
│   │   │   │   ├── Core.Ops.fst
│   │   │   │   ├── Core.Option.fst
│   │   │   │   ├── Core.Panicking.fst
│   │   │   │   ├── Core.Result.fst
│   │   │   │   ├── Core.Slice.Iter.fst
│   │   │   │   ├── Core.Slice.fsti
│   │   │   │   ├── Core.Str.Converts.fsti
│   │   │   │   ├── Core.Str.Error.fsti
│   │   │   │   ├── Core.Str.fsti
│   │   │   │   ├── Core.fst
│   │   │   │   ├── Makefile
│   │   │   │   └── README.md
│   │   │   ├── hax_lib/
│   │   │   │   └── Makefile
│   │   │   └── rust_primitives/
│   │   │       ├── Makefile
│   │   │       ├── Rust_primitives.Arrays.fst
│   │   │       ├── Rust_primitives.Arrays.fsti
│   │   │       ├── Rust_primitives.BitVectors.fst
│   │   │       ├── Rust_primitives.BitVectors.fsti
│   │   │       ├── Rust_primitives.Hax.Monomorphized_update_at.fst
│   │   │       ├── Rust_primitives.Hax.Monomorphized_update_at.fsti
│   │   │       ├── Rust_primitives.Hax.fst
│   │   │       ├── Rust_primitives.Integers.fst
│   │   │       ├── Rust_primitives.Integers.fsti
│   │   │       ├── Rust_primitives.Iterators.fsti
│   │   │       └── Rust_primitives.fst
│   │   └── lean/
│   │       ├── Hax/
│   │       │   ├── MissingLean/
│   │       │   │   ├── Init/
│   │       │   │   │   ├── Data/
│   │       │   │   │   │   ├── Array/
│   │       │   │   │   │   │   └── Lemmas.lean
│   │       │   │   │   │   ├── BitVec/
│   │       │   │   │   │   │   └── Basic.lean
│   │       │   │   │   │   ├── Int/
│   │       │   │   │   │   │   └── DivMod/
│   │       │   │   │   │   │       └── Lemmas.lean
│   │       │   │   │   │   ├── Nat/
│   │       │   │   │   │   │   ├── Div/
│   │       │   │   │   │   │   │   └── Basic.lean
│   │       │   │   │   │   │   └── MinMax.lean
│   │       │   │   │   │   ├── SInt/
│   │       │   │   │   │   │   ├── Basic.lean
│   │       │   │   │   │   │   ├── Basic_Int128.lean
│   │       │   │   │   │   │   ├── Lemmas.lean
│   │       │   │   │   │   │   └── Lemmas_Int128.lean
│   │       │   │   │   │   ├── UInt/
│   │       │   │   │   │   │   ├── Basic.lean
│   │       │   │   │   │   │   ├── BasicAux.lean
│   │       │   │   │   │   │   ├── Lemmas.lean
│   │       │   │   │   │   │   └── Lemmas_UInt128.lean
│   │       │   │   │   │   └── Vector/
│   │       │   │   │   │       └── Basic.lean
│   │       │   │   │   ├── GrindInstances/
│   │       │   │   │   │   ├── Ring/
│   │       │   │   │   │   │   ├── SInt.lean
│   │       │   │   │   │   │   └── UInt.lean
│   │       │   │   │   │   └── ToInt.lean
│   │       │   │   │   ├── Prelude.lean
│   │       │   │   │   └── While.lean
│   │       │   │   ├── Lean/
│   │       │   │   │   ├── Tactic/
│   │       │   │   │   │   └── Simp/
│   │       │   │   │   │       └── BuiltinSimpProcs/
│   │       │   │   │   │           ├── SInt.lean
│   │       │   │   │   │           └── UInt.lean
│   │       │   │   │   └── ToExpr.lean
│   │       │   │   └── Std/
│   │       │   │       └── Do/
│   │       │   │           ├── PostCond.lean
│   │       │   │           └── Triple/
│   │       │   │               ├── Basic.lean
│   │       │   │               └── SpecLemmas.lean
│   │       │   ├── MissingLean.lean
│   │       │   ├── Tactic/
│   │       │   │   ├── HaxBVDecide.lean
│   │       │   │   ├── HaxConstructPure.lean
│   │       │   │   ├── HaxMvcgen.lean
│   │       │   │   ├── HaxSpec.lean
│   │       │   │   ├── HaxZify.lean
│   │       │   │   ├── Init.lean
│   │       │   │   └── SpecSet.lean
│   │       │   ├── Tactic.lean
│   │       │   ├── core_models/
│   │       │   │   ├── core_models.lean
│   │       │   │   ├── epilogue/
│   │       │   │   │   ├── alloc.lean
│   │       │   │   │   ├── convert.lean
│   │       │   │   │   ├── float.lean
│   │       │   │   │   ├── folds.lean
│   │       │   │   │   ├── function.lean
│   │       │   │   │   ├── num.lean
│   │       │   │   │   ├── ops.lean
│   │       │   │   │   ├── range.lean
│   │       │   │   │   ├── result.lean
│   │       │   │   │   ├── slice.lean
│   │       │   │   │   └── string.lean
│   │       │   │   ├── epilogue.lean
│   │       │   │   ├── prologue/
│   │       │   │   │   ├── clone.lean
│   │       │   │   │   ├── marker.lean
│   │       │   │   │   └── num.lean
│   │       │   │   └── prologue.lean
│   │       │   ├── core_models.lean
│   │       │   ├── rust_primitives/
│   │       │   │   ├── BVDecide.lean
│   │       │   │   ├── Cast.lean
│   │       │   │   ├── GetElemResult.lean
│   │       │   │   ├── RustM.lean
│   │       │   │   ├── Spec.lean
│   │       │   │   ├── USize64.lean
│   │       │   │   ├── arithmetic.lean
│   │       │   │   ├── boxed.lean
│   │       │   │   ├── hax/
│   │       │   │   │   ├── array.lean
│   │       │   │   │   ├── int.lean
│   │       │   │   │   ├── logical_op.lean
│   │       │   │   │   ├── machine_int.lean
│   │       │   │   │   ├── never.lean
│   │       │   │   │   ├── tuple.lean
│   │       │   │   │   └── while_loop.lean
│   │       │   │   ├── hax.lean
│   │       │   │   ├── hax_lib.lean
│   │       │   │   ├── mem.lean
│   │       │   │   ├── ops.lean
│   │       │   │   ├── sequence.lean
│   │       │   │   └── slice.lean
│   │       │   └── rust_primitives.lean
│   │       ├── Hax.lean
│   │       ├── README.md
│   │       ├── lake-manifest.json
│   │       ├── lakefile.toml
│   │       └── lean-toolchain
│   ├── proofs/
│   │   └── fstar/
│   │       └── extraction/
│   │           ├── Hax_lib.Abstraction.fst
│   │           ├── Hax_lib.Bundle.fst
│   │           ├── Hax_lib.Int.Bigint.fst
│   │           ├── Hax_lib.Int.fst
│   │           ├── Hax_lib.Prop.Bundle.fst
│   │           ├── Hax_lib.Prop.Constructors.fst
│   │           ├── Hax_lib.Prop.fst
│   │           ├── Hax_lib.fst
│   │           └── Makefile
│   └── src/
│       ├── abstraction.rs
│       ├── dummy.rs
│       ├── implementation.rs
│       ├── int/
│       │   ├── bigint.rs
│       │   └── mod.rs
│       ├── lib.rs
│       ├── proc_macros.rs
│       └── prop.rs
├── hax-lib-protocol/
│   ├── Cargo.toml
│   ├── README.md
│   └── src/
│       ├── crypto.rs
│       ├── lib.rs
│       └── state_machine.rs
├── hax-lib-protocol-macros/
│   ├── Cargo.toml
│   └── src/
│       └── lib.rs
├── hax-types/
│   ├── Cargo.toml
│   ├── README.md
│   ├── build.rs
│   └── src/
│       ├── cli_options/
│       │   ├── extension.rs
│       │   └── mod.rs
│       ├── diagnostics/
│       │   ├── message.rs
│       │   ├── mod.rs
│       │   └── report.rs
│       ├── driver_api.rs
│       ├── engine_api.rs
│       ├── lib.rs
│       └── prelude.rs
├── justfile
├── mkdocs.yml
├── rust-engine/
│   ├── Cargo.toml
│   ├── README.md
│   ├── macros/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── partial_application.rs
│   │       ├── replace.rs
│   │       └── struct_fields.rs
│   └── src/
│       ├── ast/
│       │   ├── diagnostics.rs
│       │   ├── fragment.rs
│       │   ├── identifiers/
│       │   │   ├── global_id/
│       │   │   │   ├── compact_serialization.rs
│       │   │   │   ├── generated.rs
│       │   │   │   ├── generated_names.rs
│       │   │   │   └── view.rs
│       │   │   └── global_id.rs
│       │   ├── identifiers.rs
│       │   ├── literals.rs
│       │   ├── resugared.rs
│       │   ├── span.rs
│       │   ├── utils.rs
│       │   └── visitors.rs
│       ├── ast.rs
│       ├── attributes.rs
│       ├── backends/
│       │   ├── fstar.rs
│       │   ├── lean.rs
│       │   ├── rust/
│       │   │   ├── renamings
│       │   │   └── renamings.rs
│       │   └── rust.rs
│       ├── backends.rs
│       ├── debugger.rs
│       ├── hax_io.rs
│       ├── import_thir.rs
│       ├── interning.rs
│       ├── lib.rs
│       ├── main.rs
│       ├── names.rs
│       ├── ocaml_engine.rs
│       ├── phase/
│       │   ├── explicit_monadic.rs
│       │   ├── filter_unprintable_items.rs
│       │   ├── legacy.rs
│       │   └── reject_not_do_lean_dsl.rs
│       ├── phase.rs
│       ├── printer/
│       │   ├── pretty_ast/
│       │   │   ├── debug_json.rs
│       │   │   └── to_document.rs
│       │   ├── pretty_ast.rs
│       │   └── render_view.rs
│       ├── printer.rs
│       ├── resugarings.rs
│       └── symbol.rs
├── rust-toolchain.toml
├── rustc-coverage-tests/
│   ├── Cargo.toml
│   ├── README.md
│   ├── proofs/
│   │   ├── fstar/
│   │   │   └── extraction/
│   │   │       └── Makefile
│   │   └── lean/
│   │       └── extraction/
│   │           └── lakefile.toml
│   ├── requirements.txt
│   ├── run-coverage-tests.py
│   ├── snapshots/
│   │   └── fstar/
│   │       ├── Coverage.Abort.fst
│   │       ├── Coverage.Assert.fst
│   │       ├── Coverage.Assert_ne.fst
│   │       ├── Coverage.Assert_not.fst
│   │       ├── Coverage.Attr.Impl_.fst
│   │       ├── Coverage.Attr.Module.Nested_a.Nested_b.fst
│   │       ├── Coverage.Attr.Module.Off.fst
│   │       ├── Coverage.Attr.Module.On.fst
│   │       ├── Coverage.Attr.Module.fst
│   │       ├── Coverage.Attr.Off_on_sandwich.fst
│   │       ├── Coverage.Attr.Trait_impl_inherit.fst
│   │       ├── Coverage.Auxiliary.Discard_all_helper.fst
│   │       ├── Coverage.Auxiliary.Used_crate.fst
│   │       ├── Coverage.Auxiliary.Used_inline_crate.fst
│   │       ├── Coverage.Closure_macro.fst
│   │       ├── Coverage.Closure_unit_return.fst
│   │       ├── Coverage.Color.fst
│   │       ├── Coverage.Condition.Conditions.fst
│   │       ├── Coverage.Conditions.fst
│   │       ├── Coverage.Continue_.fst
│   │       ├── Coverage.Dead_code.fst
│   │       ├── Coverage.Drop_trait.fst
│   │       ├── Coverage.Fn_sig_into_try.fst
│   │       ├── Coverage.Generics.fst
│   │       ├── Coverage.If_.fst
│   │       ├── Coverage.If_else.fst
│   │       ├── Coverage.If_not.fst
│   │       ├── Coverage.Ignore_map.fst
│   │       ├── Coverage.Ignore_run.fst
│   │       ├── Coverage.Inline.fst
│   │       ├── Coverage.Inline_dead.fst
│   │       ├── Coverage.Inner_items.fst
│   │       ├── Coverage.Issue_83601_.fst
│   │       ├── Coverage.Lazy_boolean.fst
│   │       ├── Coverage.Let_else_loop.fst
│   │       ├── Coverage.Long_and_wide.fst
│   │       ├── Coverage.Loop_break.fst
│   │       ├── Coverage.Loop_break_value.fst
│   │       ├── Coverage.Loops_branches.fst
│   │       ├── Coverage.Macro_in_closure.fst
│   │       ├── Coverage.Match_or_pattern.fst
│   │       ├── Coverage.Mcdc.Condition_limit.fst
│   │       ├── Coverage.Mcdc.If_.fst
│   │       ├── Coverage.Mcdc.Inlined_expressions.fst
│   │       ├── Coverage.Mcdc.Nested_if.fst
│   │       ├── Coverage.Mcdc.Non_control_flow.fst
│   │       ├── Coverage.Nested_loops.fst
│   │       ├── Coverage.No_cov_crate.Nested_fns.fst
│   │       ├── Coverage.No_cov_crate.fst
│   │       ├── Coverage.No_spans.fst
│   │       ├── Coverage.No_spans_if_not.fst
│   │       ├── Coverage.Overflow.fst
│   │       ├── Coverage.Panic_unwind.fst
│   │       ├── Coverage.Partial_eq.fst
│   │       ├── Coverage.Simple_loop.fst
│   │       ├── Coverage.Simple_match.fst
│   │       ├── Coverage.Sort_groups.fst
│   │       ├── Coverage.Test_harness.fst
│   │       ├── Coverage.Tight_inf_loop.fst
│   │       ├── Coverage.Trivial.fst
│   │       ├── Coverage.Try_error_result.fst
│   │       ├── Coverage.Unicode.fst
│   │       ├── Coverage.Unused.fst
│   │       ├── Coverage.Unused_mod.Unused_module.fst
│   │       ├── Coverage.Unused_mod.fst
│   │       ├── Coverage.While_.fst
│   │       └── Coverage.While_early_ret.fst
│   ├── src/
│   │   ├── abort.rs
│   │   ├── assert-ne.rs
│   │   ├── assert.rs
│   │   ├── assert_not.rs
│   │   ├── async.rs
│   │   ├── async2.rs
│   │   ├── async_block.rs
│   │   ├── async_closure.rs
│   │   ├── attr/
│   │   │   ├── impl.rs
│   │   │   ├── mod.rs
│   │   │   ├── module.rs
│   │   │   ├── nested.rs
│   │   │   ├── off-on-sandwich.rs
│   │   │   └── trait-impl-inherit.rs
│   │   ├── auxiliary/
│   │   │   ├── discard_all_helper.rs
│   │   │   ├── executor.rs
│   │   │   ├── inline_always_with_dead_code.rs
│   │   │   ├── inline_mixed_helper.rs
│   │   │   ├── macro_name_span_helper.rs
│   │   │   ├── mod.rs
│   │   │   ├── unused_mod_helper.rs
│   │   │   ├── used_crate.rs
│   │   │   └── used_inline_crate.rs
│   │   ├── await_ready.rs
│   │   ├── bad_counter_ids.rs
│   │   ├── bench.rs
│   │   ├── branch/
│   │   │   ├── generics.rs
│   │   │   ├── guard.rs
│   │   │   ├── if-let.rs
│   │   │   ├── if.rs
│   │   │   ├── lazy-boolean.rs
│   │   │   ├── let-else.rs
│   │   │   ├── match-arms.rs
│   │   │   ├── match-trivial.rs
│   │   │   ├── mod.rs
│   │   │   ├── no-mir-spans.rs
│   │   │   └── while.rs
│   │   ├── closure.rs
│   │   ├── closure_bug.rs
│   │   ├── closure_macro.rs
│   │   ├── closure_macro_async.rs
│   │   ├── closure_unit_return.rs
│   │   ├── color.rs
│   │   ├── condition/
│   │   │   ├── conditions.rs
│   │   │   └── mod.rs
│   │   ├── conditions.rs
│   │   ├── continue.rs
│   │   ├── coroutine.rs
│   │   ├── coverage_attr_closure.rs
│   │   ├── dead_code.rs
│   │   ├── discard-all-issue-133606.rs
│   │   ├── drop_trait.rs
│   │   ├── fn_sig_into_try.rs
│   │   ├── generic-unused-impl.rs
│   │   ├── generics.rs
│   │   ├── holes.rs
│   │   ├── if.rs
│   │   ├── if_else.rs
│   │   ├── if_not.rs
│   │   ├── ignore_map.rs
│   │   ├── ignore_run.rs
│   │   ├── inline-dead.rs
│   │   ├── inline.rs
│   │   ├── inline_mixed.rs
│   │   ├── inner_items.rs
│   │   ├── issue-83601.rs
│   │   ├── issue-84561.rs
│   │   ├── issue-85461.rs
│   │   ├── issue-93054.rs
│   │   ├── lazy_boolean.rs
│   │   ├── let_else_loop.rs
│   │   ├── lib.rs
│   │   ├── long_and_wide.rs
│   │   ├── loop-break.rs
│   │   ├── loop_break_value.rs
│   │   ├── loops_branches.rs
│   │   ├── macro_in_closure.rs
│   │   ├── macro_name_span.rs
│   │   ├── match_or_pattern.rs
│   │   ├── mcdc/
│   │   │   ├── condition-limit.rs
│   │   │   ├── if.rs
│   │   │   ├── inlined_expressions.rs
│   │   │   ├── mod.rs
│   │   │   ├── nested_if.rs
│   │   │   └── non_control_flow.rs
│   │   ├── nested_loops.rs
│   │   ├── no-core.rs
│   │   ├── no_cov_crate.rs
│   │   ├── no_spans.rs
│   │   ├── no_spans_if_not.rs
│   │   ├── overflow.rs
│   │   ├── panic_unwind.rs
│   │   ├── partial_eq.rs
│   │   ├── simple_loop.rs
│   │   ├── simple_match.rs
│   │   ├── sort_groups.rs
│   │   ├── test_harness.rs
│   │   ├── tight_inf_loop.rs
│   │   ├── trivial.rs
│   │   ├── try_error_result.rs
│   │   ├── unicode.rs
│   │   ├── unreachable.rs
│   │   ├── unused.rs
│   │   ├── unused_mod.rs
│   │   ├── uses_crate.rs
│   │   ├── uses_inline_crate.rs
│   │   ├── while.rs
│   │   ├── while_early_ret.rs
│   │   └── yield.rs
│   ├── test_config.yaml
│   └── update-test-sources.sh
├── rustfmt.toml
├── setup.sh
├── test-harness/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── README.md
│   └── src/
│       ├── command_hax_ext.rs
│       ├── harness.rs
│       ├── lib.rs
│       └── snapshots/
│           ├── toolchain__assert into-coq.snap
│           ├── toolchain__assert into-fstar.snap
│           ├── toolchain__assert into-ssprove.snap
│           ├── toolchain__attribute-opaque into-fstar.snap
│           ├── toolchain__attributes into-fstar.snap
│           ├── toolchain__constructor-as-closure into-fstar.snap
│           ├── toolchain__cyclic-modules into-fstar.snap
│           ├── toolchain__cyclic-modules into-lean.snap
│           ├── toolchain__dyn into-fstar.snap
│           ├── toolchain__enum-repr into-coq.snap
│           ├── toolchain__enum-repr into-fstar.snap
│           ├── toolchain__enum-repr into-ssprove.snap
│           ├── toolchain__functions into-coq.snap
│           ├── toolchain__functions into-fstar.snap
│           ├── toolchain__generics into-fstar.snap
│           ├── toolchain__guards into-coq.snap
│           ├── toolchain__guards into-fstar.snap
│           ├── toolchain__guards into-ssprove.snap
│           ├── toolchain__include-flag into-coq.snap
│           ├── toolchain__include-flag into-fstar.snap
│           ├── toolchain__interface-only into-fstar.snap
│           ├── toolchain__lean-core-models into-lean.snap
│           ├── toolchain__lean-tests into-lean.snap
│           ├── toolchain__let-else into-coq.snap
│           ├── toolchain__let-else into-fstar.snap
│           ├── toolchain__let-else into-ssprove.snap
│           ├── toolchain__literals into-coq.snap
│           ├── toolchain__literals into-fstar.snap
│           ├── toolchain__literals into-lean.snap
│           ├── toolchain__loops into-fstar.snap
│           ├── toolchain__mut-ref-functionalization into-fstar.snap
│           ├── toolchain__naming into-coq.snap
│           ├── toolchain__naming into-fstar.snap
│           ├── toolchain__pattern-or into-coq.snap
│           ├── toolchain__pattern-or into-fstar.snap
│           ├── toolchain__patterns into-fstar.snap
│           ├── toolchain__recursion into-fstar.snap
│           ├── toolchain__reordering into-coq.snap
│           ├── toolchain__reordering into-fstar.snap
│           ├── toolchain__reordering into-ssprove.snap
│           ├── toolchain__side-effects into-fstar.snap
│           ├── toolchain__side-effects into-ssprove.snap
│           ├── toolchain__slices into-coq.snap
│           ├── toolchain__slices into-fstar.snap
│           ├── toolchain__statics into-fstar.snap
│           ├── toolchain__traits into-fstar.snap
│           └── toolchain__unsafe into-fstar.snap
└── tests/
    ├── .gitignore
    ├── Cargo.toml
    ├── README.md
    ├── assert/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── attribute-opaque/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── attributes/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── cli/
    │   ├── include-flag/
    │   │   ├── Cargo.toml
    │   │   └── src/
    │   │       └── lib.rs
    │   └── interface-only/
    │       ├── Cargo.toml
    │       └── src/
    │           └── lib.rs
    ├── constructor-as-closure/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── cyclic-modules/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── dyn/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── enum-repr/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── enum-struct-variant/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── even/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── functions/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── generics/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── guards/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── if-let/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── lean-core-models/
    │   ├── Cargo.toml
    │   └── src/
    │       ├── default.rs
    │       ├── function.rs
    │       ├── lib.rs
    │       ├── option.rs
    │       ├── phantom.rs
    │       └── result.rs
    ├── lean-tests/
    │   ├── Cargo.toml
    │   └── src/
    │       ├── array.rs
    │       ├── associated_types.rs
    │       ├── binops.rs
    │       ├── casts.rs
    │       ├── comments.rs
    │       ├── constants.rs
    │       ├── enums.rs
    │       ├── floats.rs
    │       ├── ite.rs
    │       ├── lib.rs
    │       ├── loops.rs
    │       ├── matching.rs
    │       ├── monadic.rs
    │       ├── nested_control_flow.rs
    │       ├── opaque.rs
    │       ├── recursion.rs
    │       ├── specs.rs
    │       ├── structs.rs
    │       ├── traits.rs
    │       └── types.rs
    ├── let-else/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── literals/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── loops/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── mut-ref-functionalization/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── naming/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── nested-derefs/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── never-type/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── odd/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── pattern-or/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── patterns/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── proverif-basic-structs/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── proverif-fn-to-letfun/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── proverif-minimal/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── proverif-noise/
    │   ├── Cargo.toml
    │   └── src/
    │       ├── lib.rs
    │       ├── noise_crypto.rs
    │       ├── noise_kkpsk0.rs
    │       └── noise_lib.rs
    ├── proverif-ping-pong/
    │   ├── Cargo.toml
    │   ├── pingpong.pv
    │   └── src/
    │       ├── a.rs
    │       ├── b.rs
    │       └── lib.rs
    ├── raw-attributes/
    │   ├── Cargo.toml
    │   ├── README.md
    │   └── src/
    │       └── lib.rs
    ├── recursion/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── reordering/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── side-effects/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── slices/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── statics/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── traits/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    ├── tuples/
    │   ├── Cargo.toml
    │   └── src/
    │       └── lib.rs
    └── unsafe/
        ├── Cargo.toml
        └── src/
            └── lib.rs
Download .txt
Showing preview only (439K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5651 symbols across 349 files)

FILE: .utils/rust-by-example.js
  constant SRC_DIR (line 5) | const SRC_DIR = 'src';
  function getMarkdownFiles (line 8) | function getMarkdownFiles() {
  function extractCodeBlocks (line 14) | function extractCodeBlocks(path) {
  function codeBlocksToModules (line 44) | function codeBlocksToModules(code_blocks) {
  constant OUTPUT_CRATE (line 81) | let OUTPUT_CRATE = 'rust-by-examples-crate';
  constant OUTPUT_CRATE_SRC (line 87) | let OUTPUT_CRATE_SRC = OUTPUT_CRATE + '/src/';

FILE: cli/driver/src/callbacks_wrapper.rs
  type CallbacksWrapper (line 11) | pub struct CallbacksWrapper<'a> {
  method config (line 16) | fn config(&mut self, config: &mut interface::Config) {
  method after_crate_root_parsing (line 36) | fn after_crate_root_parsing<'tcx>(
  method after_expansion (line 43) | fn after_expansion<'tcx>(
  method after_analysis (line 50) | fn after_analysis<'tcx>(

FILE: cli/driver/src/driver.rs
  function rustc_sysroot (line 47) | fn rustc_sysroot() -> String {
  function setup_logging (line 57) | fn setup_logging() {
  constant HAX_VANILLA_RUSTC (line 73) | const HAX_VANILLA_RUSTC: &str = "HAX_VANILLA_RUSTC";
  function main (line 75) | fn main() {
  function vanilla_rustc (line 195) | fn vanilla_rustc() -> i32 {

FILE: cli/driver/src/exporter.rs
  function export_crate (line 22) | fn export_crate<'tcx, Body: hax_frontend_exporter::IsBody>(
  type ExtractionCallbacks (line 84) | pub(crate) struct ExtractionCallbacks {
  function from (line 90) | fn from(opts: ExtractionCallbacks) -> hax_frontend_exporter_options::Opt...
  method config (line 103) | fn config(&mut self, config: &mut rustc_interface::interface::Config) {
  method after_expansion (line 108) | fn after_expansion<'tcx>(&mut self, compiler: &Compiler, tcx: TyCtxt<'tc...

FILE: cli/driver/src/features.rs
  type Features (line 14) | pub struct Features {
    method from (line 24) | fn from(rfeatures: &rustc_feature::Features) -> Self {
    type Output (line 37) | type Output = Self;
    method sub (line 38) | fn sub(self, rhs: Self) -> Self {
    method into_iter (line 64) | pub fn into_iter(&self) -> impl Iterator<Item = String> {
    method detect (line 82) | pub fn detect(
    method detect_forking (line 126) | pub fn detect_forking() -> Self {
  method default (line 58) | fn default() -> Self {

FILE: cli/subcommands/build.rs
  function rustc_version_env_var (line 1) | fn rustc_version_env_var() {
  function json_schema_static_asset (line 16) | fn json_schema_static_asset() {
  function git_dirty_env_var (line 39) | fn git_dirty_env_var() {
  function main (line 55) | fn main() {

FILE: cli/subcommands/src/cargo_hax.rs
  function toolchain (line 23) | fn toolchain() -> Option<&'static str> {
  function get_args (line 46) | pub fn get_args(subcommand: &str) -> Vec<String> {
  constant RUST_LOG_STYLE (line 62) | const RUST_LOG_STYLE: &str = "RUST_LOG_STYLE";
  function rust_log_style (line 63) | fn rust_log_style() -> String {
  constant RUSTFLAGS (line 75) | const RUSTFLAGS: &str = "RUSTFLAGS";
  function rustflags (line 76) | fn rustflags() -> String {
  constant ENGINE_BINARY_NAME (line 81) | const ENGINE_BINARY_NAME: &str = "hax-engine";
  constant ENGINE_BINARY_NOT_FOUND (line 82) | const ENGINE_BINARY_NOT_FOUND: &str = "The binary [hax-engine] was not f...
  function find_hax_engine (line 90) | fn find_hax_engine(message_format: MessageFormat) -> process::Command {
  constant RUST_ENGINE_BINARY_NAME (line 128) | const RUST_ENGINE_BINARY_NAME: &str = "hax-rust-engine";
  constant RUST_ENGINE_BINARY_NOT_FOUND (line 129) | const RUST_ENGINE_BINARY_NOT_FOUND: &str =
  function find_rust_hax_engine (line 133) | fn find_rust_hax_engine(message_format: MessageFormat) -> process::Comma...
  method report (line 152) | fn report(self, message_format: MessageFormat, mut rctx: Option<&mut Rep...
  method report_styled (line 163) | fn report_styled(self, rctx: Option<&mut ReportCtx>) {
  function run_engine (line 261) | fn run_engine(
  function target_dir (line 475) | fn target_dir(suffix: &str) -> PathBuf {
  function get_hax_version (line 487) | fn get_hax_version() -> String {
  function get_hax_rustc_driver_path (line 510) | fn get_hax_rustc_driver_path() -> PathBuf {
  function compute_haxmeta_files (line 520) | fn compute_haxmeta_files(options: &Options) -> (Vec<EmitHaxMetaMessage>,...
  function run_command (line 590) | fn run_command(options: &Options, haxmeta_files: Vec<EmitHaxMetaMessage>...
  function main (line 712) | fn main() {

FILE: cli/subcommands/src/engine_debug_webapp/mod.rs
  function get_server (line 3) | fn get_server() -> Server {
  function run (line 19) | pub fn run(get_json: impl Fn() -> String) {

FILE: cli/subcommands/src/engine_debug_webapp/static/script.js
  function findNode (line 21) | function findNode(o, search){
  function json (line 48) | function json(json) {
  constant SEED (line 188) | const SEED = Date.now();
  function phases_viewer (line 189) | async function phases_viewer(state = {index: 0, ast_focus: null, seed: S...

FILE: cli/subcommands/src/json_schema.rs
  constant JSON_SCHEMA (line 1) | const JSON_SCHEMA: &str = include_str!(concat!(env!("OUT_DIR"), "/schema...
  function main (line 3) | fn main() {

FILE: docs/.test/global-setup.ts
  type CrawlPage (line 5) | type CrawlPage = { url: string; has_playground: boolean, links: string[] };
  constant DOCS_HOST (line 6) | const DOCS_HOST = 'localhost:8000';
  function parallel (line 12) | async function parallel(
  function globalSetup (line 76) | async function globalSetup(config: FullConfig) {

FILE: docs/.test/tests/docs.spec.ts
  constant PAGES (line 11) | const PAGES = JSON.parse(fs.readFileSync('generated.json', 'utf-8')) as ...
  function tryNavigateTo (line 14) | async function tryNavigateTo(page: Page, url: string) {

FILE: docs/javascripts/ansi_up.js
  class AnsiUp (line 7) | class AnsiUp{constructor(){this.VERSION="6.0.2",this.setup_palettes(),th...
    method constructor (line 7) | constructor(){this.VERSION="6.0.2",this.setup_palettes(),this._use_cla...
    method use_classes (line 7) | set use_classes(e){this._use_classes=e}
    method use_classes (line 7) | get use_classes(){return this._use_classes}
    method url_allowlist (line 7) | set url_allowlist(e){this._url_allowlist=e}
    method url_allowlist (line 7) | get url_allowlist(){return this._url_allowlist}
    method escape_html (line 7) | set escape_html(e){this._escape_html=e}
    method escape_html (line 7) | get escape_html(){return this._escape_html}
    method boldStyle (line 7) | set boldStyle(e){this._boldStyle=e}
    method boldStyle (line 7) | get boldStyle(){return this._boldStyle}
    method faintStyle (line 7) | set faintStyle(e){this._faintStyle=e}
    method faintStyle (line 7) | get faintStyle(){return this._faintStyle}
    method italicStyle (line 7) | set italicStyle(e){this._italicStyle=e}
    method italicStyle (line 7) | get italicStyle(){return this._italicStyle}
    method underlineStyle (line 7) | set underlineStyle(e){this._underlineStyle=e}
    method underlineStyle (line 7) | get underlineStyle(){return this._underlineStyle}
    method setup_palettes (line 7) | setup_palettes(){this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-blac...
    method escape_txt_for_html (line 7) | escape_txt_for_html(e){return this._escape_html?e.replace(/[&<>"']/gm,...
    method append_buffer (line 7) | append_buffer(e){var t=this._buffer+e;this._buffer=t}
    method get_next_packet (line 7) | get_next_packet(){var e={kind:PacketKind.EOS,text:"",url:""},t=this._b...
    method ansi_to_html (line 7) | ansi_to_html(e){this.append_buffer(e);for(var t=[];;){var n=this.get_n...
    method with_state (line 7) | with_state(e){return{bold:this.bold,faint:this.faint,italic:this.itali...
    method process_ansi (line 7) | process_ansi(e){let t=e.text.split(";");for(;t.length>0;){let e=t.shif...
    method transform_to_html (line 7) | transform_to_html(e){let t=e.text;if(0===t.length)return t;if(t=this.e...
    method process_hyperlink (line 7) | process_hyperlink(e){let t=e.url.split(":");return t.length<1?"":this....
  function rgx (line 7) | function rgx(e,...t){let n=e.raw[0].replace(/^\s+|\s+\n|\s*#[\s\S]*?\n|\...
  function rgxG (line 7) | function rgxG(e,...t){let n=e.raw[0].replace(/^\s+|\s+\n|\s*#[\s\S]*?\n|...

FILE: docs/javascripts/fstar.js
  function fstar (line 6) | function fstar(hljs) {

FILE: docs/javascripts/hax_playground.js
  constant PLAYGROUND_URL (line 1) | const PLAYGROUND_URL = 'https://hax-playground.cryspen.com';
  function get_latest_hax_main (line 4) | async function get_latest_hax_main() {
  constant HAX_PLAYGROUND_FORCED_VERSION (line 10) | const HAX_PLAYGROUND_FORCED_VERSION = false;
  function call_playground (line 13) | async function call_playground(result_block, query, text, parent_node) {
  function setup_hax_playground (line 97) | function setup_hax_playground() {

FILE: docs/javascripts/lz-string.js
  function t (line 1) | function t(r,o){if(!e[r]){e[r]={};for(var n=0;n<r.length;n++)e[r][r.char...

FILE: engine/bin/js_stubs/mutex.js
  function ll (line 3) | function ll(s) { if (v_log) console.log(s); }
  function caml_condition_broadcast (line 6) | function caml_condition_broadcast() {
  function caml_condition_new (line 11) | function caml_condition_new() {
  function caml_condition_signal (line 16) | function caml_condition_signal() {
  function caml_condition_wait (line 21) | function caml_condition_wait() {
  function caml_thread_initialize (line 26) | function caml_thread_initialize() {
  function caml_thread_new (line 31) | function caml_thread_new() {
  function caml_thread_self (line 36) | function caml_thread_self() {
  function caml_thread_uncaught_exception (line 41) | function caml_thread_uncaught_exception() {
  function caml_thread_yield (line 46) | function caml_thread_yield() {
  function caml_mutex_lock (line 51) | function caml_mutex_lock() {
  function caml_mutex_new (line 56) | function caml_mutex_new() {
  function caml_mutex_unlock (line 61) | function caml_mutex_unlock() {
  function caml_thread_cleanup (line 66) | function caml_thread_cleanup() {
  function caml_thread_exit (line 71) | function caml_thread_exit() {
  function caml_thread_id (line 76) | function caml_thread_id() {

FILE: engine/bin/js_stubs/stdint.js
  function int8_of_nativeint (line 3) | function int8_of_nativeint(){}
  function int8_of_float (line 5) | function int8_of_float(){}
  function int8_of_int16 (line 7) | function int8_of_int16(){}
  function int8_of_int24 (line 9) | function int8_of_int24(){}
  function int8_of_int32 (line 11) | function int8_of_int32(){}
  function int8_of_int40 (line 13) | function int8_of_int40(){}
  function int8_of_int48 (line 15) | function int8_of_int48(){}
  function int8_of_int56 (line 17) | function int8_of_int56(){}
  function int8_of_int64 (line 19) | function int8_of_int64(){}
  function int8_of_int128 (line 21) | function int8_of_int128(){}
  function int8_of_uint8 (line 23) | function int8_of_uint8(){}
  function int8_of_uint16 (line 25) | function int8_of_uint16(){}
  function int8_of_uint24 (line 27) | function int8_of_uint24(){}
  function int8_of_uint32 (line 29) | function int8_of_uint32(){}
  function int8_of_uint40 (line 31) | function int8_of_uint40(){}
  function int8_of_uint48 (line 33) | function int8_of_uint48(){}
  function int8_of_uint56 (line 35) | function int8_of_uint56(){}
  function int8_of_uint64 (line 37) | function int8_of_uint64(){}
  function int8_of_uint128 (line 39) | function int8_of_uint128(){}
  function nativeint_of_int8 (line 41) | function nativeint_of_int8(){}
  function float_of_int8 (line 43) | function float_of_int8(){}
  function int16_of_int8 (line 45) | function int16_of_int8(){}
  function int24_of_int8 (line 47) | function int24_of_int8(){}
  function int32_of_int8 (line 49) | function int32_of_int8(){}
  function int40_of_int8 (line 51) | function int40_of_int8(){}
  function int48_of_int8 (line 53) | function int48_of_int8(){}
  function int56_of_int8 (line 55) | function int56_of_int8(){}
  function int64_of_int8 (line 57) | function int64_of_int8(){}
  function int128_of_int8 (line 59) | function int128_of_int8(){}
  function uint8_of_int8 (line 61) | function uint8_of_int8(){}
  function uint16_of_int8 (line 63) | function uint16_of_int8(){}
  function uint24_of_int8 (line 65) | function uint24_of_int8(){}
  function uint32_of_int8 (line 67) | function uint32_of_int8(){}
  function uint40_of_int8 (line 69) | function uint40_of_int8(){}
  function uint48_of_int8 (line 71) | function uint48_of_int8(){}
  function uint56_of_int8 (line 73) | function uint56_of_int8(){}
  function uint64_of_int8 (line 75) | function uint64_of_int8(){}
  function uint128_of_int8 (line 77) | function uint128_of_int8(){}
  function int8_bits_of_float (line 79) | function int8_bits_of_float(){}
  function int8_float_of_bits (line 81) | function int8_float_of_bits(){}
  function int16_of_nativeint (line 83) | function int16_of_nativeint(){}
  function int16_of_float (line 85) | function int16_of_float(){}
  function int16_of_int24 (line 87) | function int16_of_int24(){}
  function int16_of_int32 (line 89) | function int16_of_int32(){}
  function int16_of_int40 (line 91) | function int16_of_int40(){}
  function int16_of_int48 (line 93) | function int16_of_int48(){}
  function int16_of_int56 (line 95) | function int16_of_int56(){}
  function int16_of_int64 (line 97) | function int16_of_int64(){}
  function int16_of_int128 (line 99) | function int16_of_int128(){}
  function int16_of_uint8 (line 101) | function int16_of_uint8(){}
  function int16_of_uint16 (line 103) | function int16_of_uint16(){}
  function int16_of_uint24 (line 105) | function int16_of_uint24(){}
  function int16_of_uint32 (line 107) | function int16_of_uint32(){}
  function int16_of_uint40 (line 109) | function int16_of_uint40(){}
  function int16_of_uint48 (line 111) | function int16_of_uint48(){}
  function int16_of_uint56 (line 113) | function int16_of_uint56(){}
  function int16_of_uint64 (line 115) | function int16_of_uint64(){}
  function int16_of_uint128 (line 117) | function int16_of_uint128(){}
  function nativeint_of_int16 (line 119) | function nativeint_of_int16(){}
  function float_of_int16 (line 121) | function float_of_int16(){}
  function int24_of_int16 (line 123) | function int24_of_int16(){}
  function int32_of_int16 (line 125) | function int32_of_int16(){}
  function int40_of_int16 (line 127) | function int40_of_int16(){}
  function int48_of_int16 (line 129) | function int48_of_int16(){}
  function int56_of_int16 (line 131) | function int56_of_int16(){}
  function int64_of_int16 (line 133) | function int64_of_int16(){}
  function int128_of_int16 (line 135) | function int128_of_int16(){}
  function uint8_of_int16 (line 137) | function uint8_of_int16(){}
  function uint16_of_int16 (line 139) | function uint16_of_int16(){}
  function uint24_of_int16 (line 141) | function uint24_of_int16(){}
  function uint32_of_int16 (line 143) | function uint32_of_int16(){}
  function uint40_of_int16 (line 145) | function uint40_of_int16(){}
  function uint48_of_int16 (line 147) | function uint48_of_int16(){}
  function uint56_of_int16 (line 149) | function uint56_of_int16(){}
  function uint64_of_int16 (line 151) | function uint64_of_int16(){}
  function uint128_of_int16 (line 153) | function uint128_of_int16(){}
  function int16_bits_of_float (line 155) | function int16_bits_of_float(){}
  function int16_float_of_bits (line 157) | function int16_float_of_bits(){}
  function int24_of_nativeint (line 159) | function int24_of_nativeint(){}
  function int24_of_float (line 161) | function int24_of_float(){}
  function int24_of_int32 (line 163) | function int24_of_int32(){}
  function int24_of_int40 (line 165) | function int24_of_int40(){}
  function int24_of_int48 (line 167) | function int24_of_int48(){}
  function int24_of_int56 (line 169) | function int24_of_int56(){}
  function int24_of_int64 (line 171) | function int24_of_int64(){}
  function int24_of_int128 (line 173) | function int24_of_int128(){}
  function int24_of_uint8 (line 175) | function int24_of_uint8(){}
  function int24_of_uint16 (line 177) | function int24_of_uint16(){}
  function int24_of_uint24 (line 179) | function int24_of_uint24(){}
  function int24_of_uint32 (line 181) | function int24_of_uint32(){}
  function int24_of_uint40 (line 183) | function int24_of_uint40(){}
  function int24_of_uint48 (line 185) | function int24_of_uint48(){}
  function int24_of_uint56 (line 187) | function int24_of_uint56(){}
  function int24_of_uint64 (line 189) | function int24_of_uint64(){}
  function int24_of_uint128 (line 191) | function int24_of_uint128(){}
  function nativeint_of_int24 (line 193) | function nativeint_of_int24(){}
  function float_of_int24 (line 195) | function float_of_int24(){}
  function int32_of_int24 (line 197) | function int32_of_int24(){}
  function int40_of_int24 (line 199) | function int40_of_int24(){}
  function int48_of_int24 (line 201) | function int48_of_int24(){}
  function int56_of_int24 (line 203) | function int56_of_int24(){}
  function int64_of_int24 (line 205) | function int64_of_int24(){}
  function int128_of_int24 (line 207) | function int128_of_int24(){}
  function uint8_of_int24 (line 209) | function uint8_of_int24(){}
  function uint16_of_int24 (line 211) | function uint16_of_int24(){}
  function uint24_of_int24 (line 213) | function uint24_of_int24(){}
  function uint32_of_int24 (line 215) | function uint32_of_int24(){}
  function uint40_of_int24 (line 217) | function uint40_of_int24(){}
  function uint48_of_int24 (line 219) | function uint48_of_int24(){}
  function uint56_of_int24 (line 221) | function uint56_of_int24(){}
  function uint64_of_int24 (line 223) | function uint64_of_int24(){}
  function uint128_of_int24 (line 225) | function uint128_of_int24(){}
  function int32_of_int40 (line 227) | function int32_of_int40(){}
  function int32_of_int48 (line 229) | function int32_of_int48(){}
  function int32_of_int56 (line 231) | function int32_of_int56(){}
  function int32_of_int64 (line 233) | function int32_of_int64(){}
  function int32_of_int128 (line 235) | function int32_of_int128(){}
  function int32_of_uint8 (line 237) | function int32_of_uint8(){}
  function int32_of_uint16 (line 239) | function int32_of_uint16(){}
  function int32_of_uint24 (line 241) | function int32_of_uint24(){}
  function int32_of_uint32 (line 243) | function int32_of_uint32(){}
  function int32_of_uint40 (line 245) | function int32_of_uint40(){}
  function int32_of_uint48 (line 247) | function int32_of_uint48(){}
  function int32_of_uint56 (line 249) | function int32_of_uint56(){}
  function int32_of_uint64 (line 251) | function int32_of_uint64(){}
  function int32_of_uint128 (line 253) | function int32_of_uint128(){}
  function int40_of_int32 (line 255) | function int40_of_int32(){}
  function int48_of_int32 (line 257) | function int48_of_int32(){}
  function int56_of_int32 (line 259) | function int56_of_int32(){}
  function int64_of_int32 (line 261) | function int64_of_int32(){}
  function int128_of_int32 (line 263) | function int128_of_int32(){}
  function uint8_of_int32 (line 265) | function uint8_of_int32(){}
  function uint16_of_int32 (line 267) | function uint16_of_int32(){}
  function uint24_of_int32 (line 269) | function uint24_of_int32(){}
  function uint32_of_int32 (line 271) | function uint32_of_int32(){}
  function uint40_of_int32 (line 273) | function uint40_of_int32(){}
  function uint48_of_int32 (line 275) | function uint48_of_int32(){}
  function uint56_of_int32 (line 277) | function uint56_of_int32(){}
  function uint64_of_int32 (line 279) | function uint64_of_int32(){}
  function uint128_of_int32 (line 281) | function uint128_of_int32(){}
  function int64_of_int40 (line 283) | function int64_of_int40(){}
  function int64_of_int48 (line 285) | function int64_of_int48(){}
  function int64_of_int56 (line 287) | function int64_of_int56(){}
  function int64_of_int128 (line 289) | function int64_of_int128(){}
  function int64_of_uint8 (line 291) | function int64_of_uint8(){}
  function int64_of_uint16 (line 293) | function int64_of_uint16(){}
  function int64_of_uint24 (line 295) | function int64_of_uint24(){}
  function int64_of_uint32 (line 297) | function int64_of_uint32(){}
  function int64_of_uint40 (line 299) | function int64_of_uint40(){}
  function int64_of_uint48 (line 301) | function int64_of_uint48(){}
  function int64_of_uint56 (line 303) | function int64_of_uint56(){}
  function int64_of_uint64 (line 305) | function int64_of_uint64(){}
  function int64_of_uint128 (line 307) | function int64_of_uint128(){}
  function int40_of_int64 (line 309) | function int40_of_int64(){}
  function int48_of_int64 (line 311) | function int48_of_int64(){}
  function int56_of_int64 (line 313) | function int56_of_int64(){}
  function int128_of_int64 (line 315) | function int128_of_int64(){}
  function uint8_of_int64 (line 317) | function uint8_of_int64(){}
  function uint16_of_int64 (line 319) | function uint16_of_int64(){}
  function uint24_of_int64 (line 321) | function uint24_of_int64(){}
  function uint32_of_int64 (line 323) | function uint32_of_int64(){}
  function uint40_of_int64 (line 325) | function uint40_of_int64(){}
  function uint48_of_int64 (line 327) | function uint48_of_int64(){}
  function uint56_of_int64 (line 329) | function uint56_of_int64(){}
  function uint64_of_int64 (line 331) | function uint64_of_int64(){}
  function uint128_of_int64 (line 333) | function uint128_of_int64(){}
  function int40_mul (line 335) | function int40_mul(){}
  function int40_div (line 337) | function int40_div(){}
  function uint40_xor (line 339) | function uint40_xor(){}
  function int40_shift_right (line 341) | function int40_shift_right(){}
  function uint40_shift_right (line 343) | function uint40_shift_right(){}
  function int40_of_int (line 345) | function int40_of_int(){}
  function int40_of_nativeint (line 347) | function int40_of_nativeint(){}
  function int40_of_float (line 349) | function int40_of_float(){}
  function int40_of_int48 (line 351) | function int40_of_int48(){}
  function int40_of_int56 (line 353) | function int40_of_int56(){}
  function int40_of_int128 (line 355) | function int40_of_int128(){}
  function int40_of_uint8 (line 357) | function int40_of_uint8(){}
  function int40_of_uint16 (line 359) | function int40_of_uint16(){}
  function int40_of_uint24 (line 361) | function int40_of_uint24(){}
  function int40_of_uint32 (line 363) | function int40_of_uint32(){}
  function int40_of_uint40 (line 365) | function int40_of_uint40(){}
  function int40_of_uint48 (line 367) | function int40_of_uint48(){}
  function int40_of_uint56 (line 369) | function int40_of_uint56(){}
  function int40_of_uint64 (line 371) | function int40_of_uint64(){}
  function int40_of_uint128 (line 373) | function int40_of_uint128(){}
  function int_of_int40 (line 375) | function int_of_int40(){}
  function nativeint_of_int40 (line 377) | function nativeint_of_int40(){}
  function float_of_int40 (line 379) | function float_of_int40(){}
  function int48_of_int40 (line 381) | function int48_of_int40(){}
  function int56_of_int40 (line 383) | function int56_of_int40(){}
  function int128_of_int40 (line 385) | function int128_of_int40(){}
  function uint8_of_int40 (line 387) | function uint8_of_int40(){}
  function uint16_of_int40 (line 389) | function uint16_of_int40(){}
  function uint24_of_int40 (line 391) | function uint24_of_int40(){}
  function uint32_of_int40 (line 393) | function uint32_of_int40(){}
  function uint40_of_int40 (line 395) | function uint40_of_int40(){}
  function uint48_of_int40 (line 397) | function uint48_of_int40(){}
  function uint56_of_int40 (line 399) | function uint56_of_int40(){}
  function uint64_of_int40 (line 401) | function uint64_of_int40(){}
  function uint128_of_int40 (line 403) | function uint128_of_int40(){}
  function int40_max_int (line 405) | function int40_max_int(){}
  function int40_min_int (line 407) | function int40_min_int(){}
  function int48_mul (line 409) | function int48_mul(){}
  function int48_div (line 411) | function int48_div(){}
  function uint48_xor (line 413) | function uint48_xor(){}
  function int48_shift_right (line 415) | function int48_shift_right(){}
  function uint48_shift_right (line 417) | function uint48_shift_right(){}
  function int48_of_int (line 419) | function int48_of_int(){}
  function int48_of_nativeint (line 421) | function int48_of_nativeint(){}
  function int48_of_float (line 423) | function int48_of_float(){}
  function int48_of_int56 (line 425) | function int48_of_int56(){}
  function int48_of_int128 (line 427) | function int48_of_int128(){}
  function int48_of_uint8 (line 429) | function int48_of_uint8(){}
  function int48_of_uint16 (line 431) | function int48_of_uint16(){}
  function int48_of_uint24 (line 433) | function int48_of_uint24(){}
  function int48_of_uint32 (line 435) | function int48_of_uint32(){}
  function int48_of_uint40 (line 437) | function int48_of_uint40(){}
  function int48_of_uint48 (line 439) | function int48_of_uint48(){}
  function int48_of_uint56 (line 441) | function int48_of_uint56(){}
  function int48_of_uint64 (line 443) | function int48_of_uint64(){}
  function int48_of_uint128 (line 445) | function int48_of_uint128(){}
  function int_of_int48 (line 447) | function int_of_int48(){}
  function nativeint_of_int48 (line 449) | function nativeint_of_int48(){}
  function float_of_int48 (line 451) | function float_of_int48(){}
  function int56_of_int48 (line 453) | function int56_of_int48(){}
  function int128_of_int48 (line 455) | function int128_of_int48(){}
  function uint8_of_int48 (line 457) | function uint8_of_int48(){}
  function uint16_of_int48 (line 459) | function uint16_of_int48(){}
  function uint24_of_int48 (line 461) | function uint24_of_int48(){}
  function uint32_of_int48 (line 463) | function uint32_of_int48(){}
  function uint40_of_int48 (line 465) | function uint40_of_int48(){}
  function uint48_of_int48 (line 467) | function uint48_of_int48(){}
  function uint56_of_int48 (line 469) | function uint56_of_int48(){}
  function uint64_of_int48 (line 471) | function uint64_of_int48(){}
  function uint128_of_int48 (line 473) | function uint128_of_int48(){}
  function int48_max_int (line 475) | function int48_max_int(){}
  function int48_min_int (line 477) | function int48_min_int(){}
  function int56_mul (line 479) | function int56_mul(){}
  function int56_div (line 481) | function int56_div(){}
  function uint56_xor (line 483) | function uint56_xor(){}
  function int56_shift_right (line 485) | function int56_shift_right(){}
  function uint56_shift_right (line 487) | function uint56_shift_right(){}
  function int56_of_int (line 489) | function int56_of_int(){}
  function int56_of_nativeint (line 491) | function int56_of_nativeint(){}
  function int56_of_float (line 493) | function int56_of_float(){}
  function int56_of_int128 (line 495) | function int56_of_int128(){}
  function int56_of_uint8 (line 497) | function int56_of_uint8(){}
  function int56_of_uint16 (line 499) | function int56_of_uint16(){}
  function int56_of_uint24 (line 501) | function int56_of_uint24(){}
  function int56_of_uint32 (line 503) | function int56_of_uint32(){}
  function int56_of_uint40 (line 505) | function int56_of_uint40(){}
  function int56_of_uint48 (line 507) | function int56_of_uint48(){}
  function int56_of_uint56 (line 509) | function int56_of_uint56(){}
  function int56_of_uint64 (line 511) | function int56_of_uint64(){}
  function int56_of_uint128 (line 513) | function int56_of_uint128(){}
  function int_of_int56 (line 515) | function int_of_int56(){}
  function nativeint_of_int56 (line 517) | function nativeint_of_int56(){}
  function float_of_int56 (line 519) | function float_of_int56(){}
  function int128_of_int56 (line 521) | function int128_of_int56(){}
  function uint8_of_int56 (line 523) | function uint8_of_int56(){}
  function uint16_of_int56 (line 525) | function uint16_of_int56(){}
  function uint24_of_int56 (line 527) | function uint24_of_int56(){}
  function uint32_of_int56 (line 529) | function uint32_of_int56(){}
  function uint40_of_int56 (line 531) | function uint40_of_int56(){}
  function uint48_of_int56 (line 533) | function uint48_of_int56(){}
  function uint56_of_int56 (line 535) | function uint56_of_int56(){}
  function uint64_of_int56 (line 537) | function uint64_of_int56(){}
  function uint128_of_int56 (line 539) | function uint128_of_int56(){}
  function int56_max_int (line 541) | function int56_max_int(){}
  function int56_min_int (line 543) | function int56_min_int(){}
  function int128_add (line 545) | function int128_add(){}
  function int128_sub (line 547) | function int128_sub(){}
  function int128_mul (line 549) | function int128_mul(){}
  function int128_div (line 551) | function int128_div(){}
  function int128_mod (line 553) | function int128_mod(){}
  function int128_and (line 555) | function int128_and(){}
  function int128_or (line 557) | function int128_or(){}
  function int128_xor (line 559) | function int128_xor(){}
  function int128_shift_left (line 561) | function int128_shift_left(){}
  function int128_shift_right (line 563) | function int128_shift_right(){}
  function int128_abs (line 565) | function int128_abs(){}
  function int128_neg (line 567) | function int128_neg(){}
  function int128_of_int (line 569) | function int128_of_int(){}
  function int128_of_nativeint (line 571) | function int128_of_nativeint(){}
  function int128_of_float (line 573) | function int128_of_float(){}
  function int128_of_uint8 (line 575) | function int128_of_uint8(){}
  function int128_of_uint16 (line 577) | function int128_of_uint16(){}
  function int128_of_uint24 (line 579) | function int128_of_uint24(){}
  function int128_of_uint32 (line 581) | function int128_of_uint32(){}
  function int128_of_uint40 (line 583) | function int128_of_uint40(){}
  function int128_of_uint48 (line 585) | function int128_of_uint48(){}
  function int128_of_uint56 (line 587) | function int128_of_uint56(){}
  function int128_of_uint64 (line 589) | function int128_of_uint64(){}
  function int128_of_uint128 (line 591) | function int128_of_uint128(){}
  function int_of_int128 (line 593) | function int_of_int128(){}
  function nativeint_of_int128 (line 595) | function nativeint_of_int128(){}
  function float_of_int128 (line 597) | function float_of_int128(){}
  function uint8_of_int128 (line 599) | function uint8_of_int128(){}
  function uint16_of_int128 (line 601) | function uint16_of_int128(){}
  function uint24_of_int128 (line 603) | function uint24_of_int128(){}
  function uint32_of_int128 (line 605) | function uint32_of_int128(){}
  function uint40_of_int128 (line 607) | function uint40_of_int128(){}
  function uint48_of_int128 (line 609) | function uint48_of_int128(){}
  function uint56_of_int128 (line 611) | function uint56_of_int128(){}
  function uint64_of_int128 (line 613) | function uint64_of_int128(){}
  function uint128_of_int128 (line 615) | function uint128_of_int128(){}
  function int128_max_int (line 617) | function int128_max_int(){}
  function int128_min_int (line 619) | function int128_min_int(){}
  function int128_init_custom_ops (line 621) | function int128_init_custom_ops(){}
  function uint8_of_nativeint (line 623) | function uint8_of_nativeint(){}
  function uint8_of_float (line 625) | function uint8_of_float(){}
  function uint8_of_uint16 (line 627) | function uint8_of_uint16(){}
  function uint8_of_uint24 (line 629) | function uint8_of_uint24(){}
  function uint8_of_uint32 (line 631) | function uint8_of_uint32(){}
  function uint8_of_uint40 (line 633) | function uint8_of_uint40(){}
  function uint8_of_uint48 (line 635) | function uint8_of_uint48(){}
  function uint8_of_uint56 (line 637) | function uint8_of_uint56(){}
  function uint8_of_uint64 (line 639) | function uint8_of_uint64(){}
  function uint8_of_uint128 (line 641) | function uint8_of_uint128(){}
  function nativeint_of_uint8 (line 643) | function nativeint_of_uint8(){}
  function float_of_uint8 (line 645) | function float_of_uint8(){}
  function uint16_of_uint8 (line 647) | function uint16_of_uint8(){}
  function uint24_of_uint8 (line 649) | function uint24_of_uint8(){}
  function uint32_of_uint8 (line 651) | function uint32_of_uint8(){}
  function uint40_of_uint8 (line 653) | function uint40_of_uint8(){}
  function uint48_of_uint8 (line 655) | function uint48_of_uint8(){}
  function uint56_of_uint8 (line 657) | function uint56_of_uint8(){}
  function uint64_of_uint8 (line 659) | function uint64_of_uint8(){}
  function uint128_of_uint8 (line 661) | function uint128_of_uint8(){}
  function uint16_of_nativeint (line 663) | function uint16_of_nativeint(){}
  function uint16_of_float (line 665) | function uint16_of_float(){}
  function uint16_of_uint24 (line 667) | function uint16_of_uint24(){}
  function uint16_of_uint32 (line 669) | function uint16_of_uint32(){}
  function uint16_of_uint40 (line 671) | function uint16_of_uint40(){}
  function uint16_of_uint48 (line 673) | function uint16_of_uint48(){}
  function uint16_of_uint56 (line 675) | function uint16_of_uint56(){}
  function uint16_of_uint64 (line 677) | function uint16_of_uint64(){}
  function uint16_of_uint128 (line 679) | function uint16_of_uint128(){}
  function nativeint_of_uint16 (line 681) | function nativeint_of_uint16(){}
  function float_of_uint16 (line 683) | function float_of_uint16(){}
  function uint24_of_uint16 (line 685) | function uint24_of_uint16(){}
  function uint32_of_uint16 (line 687) | function uint32_of_uint16(){}
  function uint40_of_uint16 (line 689) | function uint40_of_uint16(){}
  function uint48_of_uint16 (line 691) | function uint48_of_uint16(){}
  function uint56_of_uint16 (line 693) | function uint56_of_uint16(){}
  function uint64_of_uint16 (line 695) | function uint64_of_uint16(){}
  function uint128_of_uint16 (line 697) | function uint128_of_uint16(){}
  function uint24_of_nativeint (line 699) | function uint24_of_nativeint(){}
  function uint24_of_float (line 701) | function uint24_of_float(){}
  function uint24_of_uint32 (line 703) | function uint24_of_uint32(){}
  function uint24_of_uint40 (line 705) | function uint24_of_uint40(){}
  function uint24_of_uint48 (line 707) | function uint24_of_uint48(){}
  function uint24_of_uint56 (line 709) | function uint24_of_uint56(){}
  function uint24_of_uint64 (line 711) | function uint24_of_uint64(){}
  function uint24_of_uint128 (line 713) | function uint24_of_uint128(){}
  function nativeint_of_uint24 (line 715) | function nativeint_of_uint24(){}
  function float_of_uint24 (line 717) | function float_of_uint24(){}
  function uint32_of_uint24 (line 719) | function uint32_of_uint24(){}
  function uint40_of_uint24 (line 721) | function uint40_of_uint24(){}
  function uint48_of_uint24 (line 723) | function uint48_of_uint24(){}
  function uint56_of_uint24 (line 725) | function uint56_of_uint24(){}
  function uint64_of_uint24 (line 727) | function uint64_of_uint24(){}
  function uint128_of_uint24 (line 729) | function uint128_of_uint24(){}
  function uint32_add (line 731) | function uint32_add(){}
  function uint32_sub (line 733) | function uint32_sub(){}
  function uint32_mul (line 735) | function uint32_mul(){}
  function uint32_div (line 737) | function uint32_div(){}
  function uint32_mod (line 739) | function uint32_mod(){}
  function uint32_and (line 741) | function uint32_and(){}
  function uint32_or (line 743) | function uint32_or(){}
  function uint32_xor (line 745) | function uint32_xor(){}
  function uint32_shift_left (line 747) | function uint32_shift_left(){}
  function uint32_shift_right (line 749) | function uint32_shift_right(){}
  function uint32_neg (line 751) | function uint32_neg(){}
  function uint32_of_int (line 753) | function uint32_of_int(){}
  function uint32_of_nativeint (line 755) | function uint32_of_nativeint(){}
  function uint32_of_float (line 757) | function uint32_of_float(){}
  function uint32_of_uint40 (line 759) | function uint32_of_uint40(){}
  function uint32_of_uint48 (line 761) | function uint32_of_uint48(){}
  function uint32_of_uint56 (line 763) | function uint32_of_uint56(){}
  function uint32_of_uint64 (line 765) | function uint32_of_uint64(){}
  function uint32_of_uint128 (line 767) | function uint32_of_uint128(){}
  function int_of_uint32 (line 769) | function int_of_uint32(){}
  function nativeint_of_uint32 (line 771) | function nativeint_of_uint32(){}
  function float_of_uint32 (line 773) | function float_of_uint32(){}
  function uint40_of_uint32 (line 775) | function uint40_of_uint32(){}
  function uint48_of_uint32 (line 777) | function uint48_of_uint32(){}
  function uint56_of_uint32 (line 779) | function uint56_of_uint32(){}
  function uint64_of_uint32 (line 781) | function uint64_of_uint32(){}
  function uint128_of_uint32 (line 783) | function uint128_of_uint32(){}
  function uint32_max_int (line 785) | function uint32_max_int(){}
  function uint32_init_custom_ops (line 787) | function uint32_init_custom_ops(){}
  function uint64_add (line 789) | function uint64_add(){}
  function uint64_sub (line 791) | function uint64_sub(){}
  function uint64_mul (line 793) | function uint64_mul(){}
  function uint64_div (line 795) | function uint64_div(){}
  function uint64_mod (line 797) | function uint64_mod(){}
  function uint64_and (line 799) | function uint64_and(){}
  function uint64_or (line 801) | function uint64_or(){}
  function uint64_xor (line 803) | function uint64_xor(){}
  function uint64_shift_left (line 805) | function uint64_shift_left(){}
  function uint64_shift_right (line 807) | function uint64_shift_right(){}
  function uint64_neg (line 809) | function uint64_neg(){}
  function uint64_of_int (line 811) | function uint64_of_int(){}
  function uint64_of_nativeint (line 813) | function uint64_of_nativeint(){}
  function uint64_of_float (line 815) | function uint64_of_float(){}
  function uint64_of_uint40 (line 817) | function uint64_of_uint40(){}
  function uint64_of_uint48 (line 819) | function uint64_of_uint48(){}
  function uint64_of_uint56 (line 821) | function uint64_of_uint56(){}
  function uint64_of_uint128 (line 823) | function uint64_of_uint128(){}
  function int_of_uint64 (line 825) | function int_of_uint64(){}
  function nativeint_of_uint64 (line 827) | function nativeint_of_uint64(){}
  function float_of_uint64 (line 829) | function float_of_uint64(){}
  function uint40_of_uint64 (line 831) | function uint40_of_uint64(){}
  function uint48_of_uint64 (line 833) | function uint48_of_uint64(){}
  function uint56_of_uint64 (line 835) | function uint56_of_uint64(){}
  function uint128_of_uint64 (line 837) | function uint128_of_uint64(){}
  function uint64_max_int (line 839) | function uint64_max_int(){}
  function uint64_init_custom_ops (line 841) | function uint64_init_custom_ops(){}
  function uint40_mul (line 843) | function uint40_mul(){}
  function uint40_div (line 845) | function uint40_div(){}
  function uint40_neg (line 847) | function uint40_neg(){}
  function uint40_of_int (line 849) | function uint40_of_int(){}
  function uint40_of_nativeint (line 851) | function uint40_of_nativeint(){}
  function uint40_of_float (line 853) | function uint40_of_float(){}
  function uint40_of_uint48 (line 855) | function uint40_of_uint48(){}
  function uint40_of_uint56 (line 857) | function uint40_of_uint56(){}
  function uint40_of_uint128 (line 859) | function uint40_of_uint128(){}
  function int_of_uint40 (line 861) | function int_of_uint40(){}
  function nativeint_of_uint40 (line 863) | function nativeint_of_uint40(){}
  function float_of_uint40 (line 865) | function float_of_uint40(){}
  function uint48_of_uint40 (line 867) | function uint48_of_uint40(){}
  function uint56_of_uint40 (line 869) | function uint56_of_uint40(){}
  function uint128_of_uint40 (line 871) | function uint128_of_uint40(){}
  function uint48_mul (line 873) | function uint48_mul(){}
  function uint48_div (line 875) | function uint48_div(){}
  function uint48_neg (line 877) | function uint48_neg(){}
  function uint48_of_int (line 879) | function uint48_of_int(){}
  function uint48_of_nativeint (line 881) | function uint48_of_nativeint(){}
  function uint48_of_float (line 883) | function uint48_of_float(){}
  function uint48_of_uint56 (line 885) | function uint48_of_uint56(){}
  function uint48_of_uint128 (line 887) | function uint48_of_uint128(){}
  function int_of_uint48 (line 889) | function int_of_uint48(){}
  function nativeint_of_uint48 (line 891) | function nativeint_of_uint48(){}
  function float_of_uint48 (line 893) | function float_of_uint48(){}
  function uint56_of_uint48 (line 895) | function uint56_of_uint48(){}
  function uint128_of_uint48 (line 897) | function uint128_of_uint48(){}
  function uint56_mul (line 899) | function uint56_mul(){}
  function uint56_div (line 901) | function uint56_div(){}
  function uint56_neg (line 903) | function uint56_neg(){}
  function uint56_of_int (line 905) | function uint56_of_int(){}
  function uint56_of_nativeint (line 907) | function uint56_of_nativeint(){}
  function uint56_of_float (line 909) | function uint56_of_float(){}
  function uint56_of_uint128 (line 911) | function uint56_of_uint128(){}
  function int_of_uint56 (line 913) | function int_of_uint56(){}
  function nativeint_of_uint56 (line 915) | function nativeint_of_uint56(){}
  function float_of_uint56 (line 917) | function float_of_uint56(){}
  function uint128_of_uint56 (line 919) | function uint128_of_uint56(){}
  function uint128_add (line 921) | function uint128_add(){}
  function uint128_sub (line 923) | function uint128_sub(){}
  function uint128_mul (line 925) | function uint128_mul(){}
  function uint128_div (line 927) | function uint128_div(){}
  function uint128_mod (line 929) | function uint128_mod(){}
  function uint128_and (line 931) | function uint128_and(){}
  function uint128_or (line 933) | function uint128_or(){}
  function uint128_xor (line 935) | function uint128_xor(){}
  function uint128_shift_left (line 937) | function uint128_shift_left(){}
  function uint128_shift_right (line 939) | function uint128_shift_right(){}
  function uint128_of_int (line 941) | function uint128_of_int(){}
  function uint128_of_nativeint (line 943) | function uint128_of_nativeint(){}
  function uint128_of_float (line 945) | function uint128_of_float(){}
  function int_of_uint128 (line 947) | function int_of_uint128(){}
  function nativeint_of_uint128 (line 949) | function nativeint_of_uint128(){}
  function float_of_uint128 (line 951) | function float_of_uint128(){}
  function uint128_max_int (line 953) | function uint128_max_int(){}
  function uint128_init_custom_ops (line 955) | function uint128_init_custom_ops(){}

FILE: engine/bin/js_stubs/unix.js
  function caml_mutex_try_lock (line 490) | function caml_mutex_try_lock()       {  }
  function caml_thread_join (line 492) | function caml_thread_join()          {  }
  function caml_thread_sigmask (line 494) | function caml_thread_sigmask()       {  }
  function caml_unix_map_file_bytecode (line 496) | function caml_unix_map_file_bytecode() {  }
  function caml_wait_signal (line 498) | function caml_wait_signal()          {  }

FILE: engine/lib/generic_printer/generic_printer_template.generate.js
  constant GENERIC_PRINTER_DIR (line 8) | const GENERIC_PRINTER_DIR = `lib/generic_printer`;
  constant GENERIC_PRINTER (line 9) | const GENERIC_PRINTER = `${GENERIC_PRINTER_DIR}/generic_printer.ml`;
  constant TEMPLATE (line 10) | const TEMPLATE = `${GENERIC_PRINTER_DIR}/generic_printer_template.ml`;

FILE: engine/names/extract/build.rs
  type Node (line 19) | pub struct Node<T> {
  type Target (line 25) | type Target = T;
  function deref (line 26) | fn deref(&self) -> &Self::Target {
  constant HAX_ENGINE_NAMES_CRATE (line 33) | const HAX_ENGINE_NAMES_CRATE: &str = "hax_engine_names";
  constant SEPARATOR (line 36) | const SEPARATOR: &str = "__";
  constant ESCAPE_KEY (line 38) | const ESCAPE_KEY: &str = "hax_escape_ocaml_json";
  function uppercase_first_letter (line 40) | fn uppercase_first_letter(s: &str) -> String {
  function disambiguator_to_str (line 48) | fn disambiguator_to_str(disambiguator: u32) -> String {
  function def_path_item_to_str (line 56) | fn def_path_item_to_str(path_item: DefPathItem) -> String {
  function disambiguated_def_path_item_to_str (line 81) | fn disambiguated_def_path_item_to_str(defpath: &DisambiguatedDefPathItem...
  function rename_krate (line 88) | fn rename_krate(value: &mut Value) {
  function def_id_to_str (line 106) | fn def_id_to_str(def_id: &DefId) -> (Value, String) {
  function is_macro (line 128) | fn is_macro(did: &DefId) -> bool {
  function is_synthetic (line 136) | fn is_synthetic(did: &DefId) -> bool {
  function reader_to_str (line 140) | fn reader_to_str(s: String) -> String {
  function get_json (line 203) | fn get_json() -> String {
  function main (line 228) | fn main() {

FILE: engine/names/extract/src/main.rs
  constant OCAML_MODULE (line 1) | const OCAML_MODULE: &str = include_str!(concat!(env!("OUT_DIR"), "/modul...
  function main (line 3) | fn main() {

FILE: engine/names/src/crypto_abstractions.rs
  function crypto_abstractions (line 3) | fn crypto_abstractions() {

FILE: engine/names/src/lib.rs
  function dummy_hax_concrete_ident_wrapper (line 11) | fn dummy_hax_concrete_ident_wrapper<I: core::iter::Iterator<Item = u8>>(...
  function offset (line 199) | fn offset() {}
  function unsize (line 201) | fn unsize() {}
  function failure (line 205) | fn failure() {}
  type Failure (line 206) | struct Failure;
  type Never (line 207) | enum Never {}
  type MutRef (line 210) | enum MutRef {}
  type Tuple2 (line 212) | struct Tuple2(u8, u8);
  function deref_op (line 213) | fn deref_op() {}
  function cast_op (line 214) | fn cast_op() {}
  function logical_op_and (line 215) | fn logical_op_and() {}
  function logical_op_or (line 216) | fn logical_op_or() {}
  function while_loop (line 218) | fn while_loop() {}
  function while_loop_cf (line 219) | fn while_loop_cf() {}
  function while_loop_return (line 220) | fn while_loop_return() {}
  function repeat (line 221) | fn repeat() {}
  function update_at (line 222) | fn update_at() {}
  function update_at_usize (line 224) | fn update_at_usize() {}
  function update_at_range (line 225) | fn update_at_range() {}
  function update_at_range_from (line 226) | fn update_at_range_from() {}
  function update_at_range_to (line 227) | fn update_at_range_to() {}
  function update_at_range_full (line 228) | fn update_at_range_full() {}
  function array_of_list (line 231) | fn array_of_list() {}
  function never_to_any (line 232) | fn never_to_any() {}
  function fold_range (line 235) | fn fold_range() {}
  function fold_range_cf (line 236) | fn fold_range_cf() {}
  function fold_range_return (line 237) | fn fold_range_return() {}
  function fold_range_step_by (line 238) | fn fold_range_step_by() {}
  function fold_range_step_by_cf (line 239) | fn fold_range_step_by_cf() {}
  function fold_range_step_by_return (line 240) | fn fold_range_step_by_return() {}
  function fold_enumerated_slice (line 241) | fn fold_enumerated_slice() {}
  function fold_enumerated_slice_cf (line 242) | fn fold_enumerated_slice_cf() {}
  function fold_enumerated_slice_return (line 243) | fn fold_enumerated_slice_return() {}
  function fold_enumerated_chunked_slice (line 244) | fn fold_enumerated_chunked_slice() {}
  function fold_enumerated_chunked_slice_cf (line 245) | fn fold_enumerated_chunked_slice_cf() {}
  function fold_enumerated_chunked_slice_return (line 246) | fn fold_enumerated_chunked_slice_return() {}
  function fold_chunked_slice (line 247) | fn fold_chunked_slice() {}
  function fold_chunked_slice_cf (line 248) | fn fold_chunked_slice_cf() {}
  function fold_chunked_slice_return (line 249) | fn fold_chunked_slice_return() {}
  function fold_cf (line 250) | fn fold_cf() {}
  function fold_return (line 251) | fn fold_return() {}
  function dropped_body (line 256) | fn dropped_body() {}
  function add (line 259) | fn add() {}
  function sub (line 260) | fn sub() {}
  function div (line 261) | fn div() {}
  function mul (line 262) | fn mul() {}
  function rem (line 263) | fn rem() {}
  function neg (line 264) | fn neg() {}
  function le (line 266) | fn le() {}
  function lt (line 267) | fn lt() {}
  function ge (line 268) | fn ge() {}
  function gt (line 269) | fn gt() {}
  function eq (line 271) | fn eq() {}
  function ne (line 272) | fn ne() {}
  function from_machine (line 274) | fn from_machine() {}
  function into_machine (line 275) | fn into_machine() {}
  function add (line 279) | fn add() {}
  function sub (line 280) | fn sub() {}
  function div (line 281) | fn div() {}
  function mul (line 282) | fn mul() {}
  function rem (line 283) | fn rem() {}
  function not (line 285) | fn not() {}
  function bitxor (line 286) | fn bitxor() {}
  function bitor (line 287) | fn bitor() {}
  function bitand (line 288) | fn bitand() {}
  function shl (line 289) | fn shl() {}
  function shr (line 290) | fn shr() {}
  function eq (line 292) | fn eq() {}
  function ne (line 293) | fn ne() {}
  function le (line 294) | fn le() {}
  function lt (line 295) | fn lt() {}
  function ge (line 296) | fn ge() {}
  function gt (line 297) | fn gt() {}
  function add_with_overflow (line 299) | fn add_with_overflow() {}
  function sub_with_overflow (line 300) | fn sub_with_overflow() {}
  function mul_with_overflow (line 301) | fn mul_with_overflow() {}
  function cmp (line 302) | fn cmp() {}
  type ControlFlowMonad (line 306) | trait ControlFlowMonad {
    method lift (line 307) | fn lift() {}
  function run (line 310) | fn run() {}
  function run (line 313) | fn run() {}
  function run (line 316) | fn run() {}
  function box_new (line 319) | fn box_new() {}
  function lift (line 322) | fn lift() {}
  function pure (line 323) | fn pure() {}
  function neg (line 328) | fn neg() {}

FILE: engine/utils/ocaml_of_json_schema/ocaml_of_json_schema.js
  function run (line 548) | function run(str) {
  function parse_args (line 745) | function parse_args() {
  function read (line 758) | async function read(stream) {
  function main (line 764) | async function main() {

FILE: examples/barrett/src/lib.rs
  type FieldElement (line 5) | pub(crate) type FieldElement = i32;
  constant BARRETT_SHIFT (line 7) | const BARRETT_SHIFT: i64 = 26;
  constant BARRETT_R (line 8) | const BARRETT_R: i64 = 0x4000000;
  constant BARRETT_MULTIPLIER (line 11) | const BARRETT_MULTIPLIER: i64 = 20159;
  constant FIELD_MODULUS (line 13) | pub(crate) const FIELD_MODULUS: i32 = 3329;
  function barrett_reduce (line 30) | pub fn barrett_reduce(value: FieldElement) -> FieldElement {
  function it_works (line 52) | fn it_works() {

FILE: examples/chacha20/src/hacspec_helper.rs
  function u32s_to_le_bytes (line 29) | pub(super) fn u32s_to_le_bytes(state: &[u32; 16]) -> [u8; 64] {
  function xor_state (line 41) | pub(super) fn xor_state(mut state: State, other: State) -> State {
  function add_state (line 48) | pub(super) fn add_state(mut state: State, other: State) -> State {
  function update_array (line 55) | pub(super) fn update_array(mut array: [u8; 64], val: &[u8]) -> [u8; 64] {

FILE: examples/chacha20/src/lib.rs
  type State (line 6) | type State = [u32; 16];
  type Block (line 7) | type Block = [u8; 64];
  type ChaChaIV (line 8) | type ChaChaIV = [u8; 12];
  type ChaChaKey (line 9) | type ChaChaKey = [u8; 32];
  type StateIdx (line 11) | type StateIdx = hax_bounded_integers::BoundedUsize<0, 15>;
  function chacha20_line (line 13) | fn chacha20_line(a: StateIdx, b: StateIdx, d: StateIdx, s: u32, m: State...
  function chacha20_quarter_round (line 21) | pub fn chacha20_quarter_round(
  function chacha20_double_round (line 36) | fn chacha20_double_round(state: State) -> State {
  function chacha20_rounds (line 96) | pub fn chacha20_rounds(state: State) -> State {
  function chacha20_core (line 104) | pub fn chacha20_core(ctr: u32, st0: State) -> State {
  function chacha20_init (line 111) | pub fn chacha20_init(key: &ChaChaKey, iv: &ChaChaIV, ctr: u32) -> State {
  function chacha20_key_block (line 134) | pub fn chacha20_key_block(state: State) -> Block {
  function chacha20_key_block0 (line 139) | pub fn chacha20_key_block0(key: &ChaChaKey, iv: &ChaChaIV) -> Block {
  function chacha20_encrypt_block (line 144) | pub fn chacha20_encrypt_block(st0: State, ctr: u32, plain: &Block) -> Bl...
  function chacha20_encrypt_last (line 152) | pub fn chacha20_encrypt_last(st0: State, ctr: u32, plain: &[u8]) -> Vec<...
  function chacha20_update (line 159) | pub fn chacha20_update(st0: State, m: &[u8]) -> Vec<u8> {
  function chacha20 (line 179) | pub fn chacha20(m: &[u8], key: &ChaChaKey, iv: &ChaChaIV, ctr: u32) -> V...

FILE: examples/chacha20/tests/kat.rs
  type ChaChaIV (line 3) | pub type ChaChaIV = [u8; 12];
  type ChaChaKey (line 4) | pub type ChaChaKey = [u8; 32];
  function kat_test (line 6) | fn kat_test(m: Vec<u8>, key: ChaChaKey, iv: ChaChaIV, exp_cipher: Vec<u8...
  function test_kat (line 15) | fn test_kat() {

FILE: examples/coq-example/src/lib.rs
  type Instruction (line 4) | enum Instruction {
    method interpret (line 15) | pub fn interpret(self, stack: &mut Vec<isize>) {
  function example (line 48) | fn example() -> Vec<isize> {

FILE: examples/coverage/src/test_enum.rs
  function test (line 1) | fn test() {

FILE: examples/coverage/src/test_functions.rs
  function first (line 1) | fn first<A, B>((value, _): (A, i32), y: B) -> A
  function foo1 (line 10) | fn foo1<A, B>(x: A, y: B) {}
  function foo2 (line 12) | fn foo2<T>(x: &[T], y: &[T; 1])
  function test (line 19) | fn test() {
  function foo3 (line 25) | extern "Rust" fn foo3() {}

FILE: examples/coverage/src/test_primitives.rs
  function test_primtives (line 1) | fn test_primtives() {

FILE: examples/coverage/src/test_sequence.rs
  function test (line 1) | fn test() {

FILE: examples/coverage/src/test_struct.rs
  type foo (line 1) | struct foo<'a, T, const N: usize> {
  function test (line 14) | fn test() {

FILE: examples/kyber_compress/src/lib.rs
  constant FIELD_MODULUS (line 3) | const FIELD_MODULUS: i32 = 3329;
  constant UNSIGNED_FIELD_MODULUS (line 4) | const UNSIGNED_FIELD_MODULUS: u32 = FIELD_MODULUS as u32;
  function get_n_least_significant_bits (line 8) | fn get_n_least_significant_bits(n: u8, value: u32) -> u32 {
  function compress_unsafe (line 24) | pub fn compress_unsafe(coefficient_bits: u8, fe: u16) -> i32 {
  function compress (line 42) | pub fn compress(coefficient_bits: u8, fe: u16) -> i32 {
  function it_works (line 58) | fn it_works() {

FILE: examples/lean_adc/src/lib.rs
  function adc_precondition (line 52) | fn adc_precondition(carry_in: u32) -> bool {
  function adc_postcondition (line 65) | fn adc_postcondition(a: u32, b: u32, carry_in: u32, sum: u32, carry_out:...
  function adc_u32 (line 113) | pub fn adc_u32(a: u32, b: u32, carry_in: u32) -> (u32, u32) {

FILE: examples/lean_barrett/src/lib.rs
  type FieldElement (line 3) | pub(crate) type FieldElement = i32;
  constant BARRETT_R (line 5) | const BARRETT_R: i64 = 0x400000;
  constant BARRETT_SHIFT (line 7) | const BARRETT_SHIFT: i64 = 26;
  constant BARRETT_MULTIPLIER (line 9) | const BARRETT_MULTIPLIER: i64 = 20159;
  constant FIELD_MODULUS (line 11) | pub(crate) const FIELD_MODULUS: i32 = 3329;
  function barrett_reduce_precondition (line 25) | fn barrett_reduce_precondition(value: FieldElement) -> bool {
  function barrett_reduce_postcondition (line 29) | fn barrett_reduce_postcondition(value: FieldElement, result: FieldElemen...
  function barrett_reduce (line 38) | pub fn barrett_reduce(value: FieldElement) -> FieldElement {
  function theorem (line 68) | pub fn theorem() {}

FILE: examples/lean_chacha20/src/hacspec_helper.rs
  function to_le_u32s_3 (line 6) | pub(super) fn to_le_u32s_3(bytes: &[u8]) -> [u32; 3] {
  function to_le_u32s_8 (line 19) | pub(super) fn to_le_u32s_8(bytes: &[u8]) -> [u32; 8] {
  function to_le_u32s_16 (line 32) | pub(super) fn to_le_u32s_16(bytes: &[u8]) -> [u32; 16] {
  function u32s_to_le_bytes (line 44) | pub(super) fn u32s_to_le_bytes(state: &[u32; 16]) -> [u8; 64] {
  function xor_state (line 58) | pub(super) fn xor_state(mut state: State, other: State) -> State {
  function add_state (line 67) | pub(super) fn add_state(mut state: State, other: State) -> State {
  function update_array (line 77) | pub(super) fn update_array(mut array: [u8; 64], val: &[u8]) -> [u8; 64] {

FILE: examples/lean_chacha20/src/lib.rs
  type State (line 8) | type State = [u32; 16];
  type Block (line 9) | type Block = [u8; 64];
  type ChaChaIV (line 10) | type ChaChaIV = [u8; 12];
  type ChaChaKey (line 11) | type ChaChaKey = [u8; 32];
  type StateIdx (line 13) | type StateIdx = usize;
  function chacha20_line (line 18) | fn chacha20_line(a: StateIdx, b: StateIdx, d: StateIdx, s: u32, m: State...
  function chacha20_quarter_round (line 29) | pub fn chacha20_quarter_round(
  function chacha20_double_round (line 44) | fn chacha20_double_round(state: State) -> State {
  function chacha20_rounds (line 56) | pub fn chacha20_rounds(state: State) -> State {
  function chacha20_core (line 65) | pub fn chacha20_core(ctr: u32, st0: State) -> State {
  function chacha20_init (line 72) | pub fn chacha20_init(key: &ChaChaKey, iv: &ChaChaIV, ctr: u32) -> State {
  function chacha20_key_block (line 95) | pub fn chacha20_key_block(state: State) -> Block {
  function chacha20_key_block0 (line 100) | pub fn chacha20_key_block0(key: &ChaChaKey, iv: &ChaChaIV) -> Block {
  function chacha20_encrypt_block (line 107) | pub fn chacha20_encrypt_block(st0: State, ctr: u32, plain: &Block) -> Bl...
  function chacha20_encrypt_last (line 117) | pub fn chacha20_encrypt_last(st0: State, ctr: u32, plain: &[u8]) -> Vec<...
  function chacha20_update (line 134) | pub fn chacha20_update(st0: State, m: &[u8]) -> Vec<u8> {
  function chacha20 (line 159) | pub fn chacha20(m: &[u8], key: &ChaChaKey, iv: &ChaChaIV, ctr: u32) -> V...

FILE: examples/lean_tutorial/src/lib.rs
  function square (line 4) | fn square(x: u8) -> u8 {

FILE: examples/limited-order-book/src/canister.rs
  function init (line 15) | fn init(order_admin: Option<Principal>) {
  function add_order (line 25) | pub fn add_order(order: Order) -> Vec<Match> {
  type GetBookResult (line 41) | pub struct GetBookResult {
  function get_book (line 47) | pub fn get_book() -> GetBookResult {

FILE: examples/limited-order-book/src/lib.rs
  type OrderId (line 4) | pub type OrderId = u64;
  type Side (line 7) | pub enum Side {
  type Price (line 12) | pub type Price = u64;
  type Quantity (line 13) | pub type Quantity = u64;
  type Order (line 16) | pub struct Order {
    method try_match (line 40) | pub fn try_match(&self, other: &Self) -> Option<Match> {
    method from (line 75) | fn from(other: Reverse<Order>) -> Self {
  type Match (line 24) | pub struct Match {
  function is_match (line 31) | fn is_match(order: &Order, other: &Order) -> bool {
  method partial_cmp (line 63) | fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
  method cmp (line 69) | fn cmp(&self, other: &Self) -> std::cmp::Ordering {
  function from (line 81) | fn from(value: Order) -> Self {
  type OrderBook (line 86) | pub struct OrderBook {
    method new (line 92) | pub fn new() -> Self {
    method add_order (line 101) | pub fn add_order(&mut self, order: Order) -> Vec<Match> {
    method list_bids (line 122) | pub fn list_bids(&self) -> Vec<Order> {
    method list_asks (line 126) | pub fn list_asks(&self) -> Vec<Order> {
  function process_order (line 135) | fn process_order<T>(mut order: Order, other_side: &mut BinaryHeap<T>) ->...

FILE: examples/proverif-psk/src/lib.rs
  constant AEAD_KEY_NONCE (line 4) | const AEAD_KEY_NONCE: usize = Algorithm::key_size(Algorithm::Chacha20Pol...
  constant AEAD_KEY_LENGTH (line 7) | const AEAD_KEY_LENGTH: usize = Algorithm::key_size(Algorithm::Chacha20Po...
  constant EMPTY_AAD (line 9) | const EMPTY_AAD: &[u8; 0] = b"";
  constant RESPONSE_KEY_CONTEXT (line 10) | const RESPONSE_KEY_CONTEXT: &[u8; 12] = b"response-key";
  type Error (line 14) | pub enum Error {
    method from (line 20) | fn from(_value: libcrux::aead::Error) -> Error {
    method from (line 26) | fn from(_value: libcrux::hkdf::Error) -> Error {
    method from (line 32) | fn from(_value: std::array::TryFromSliceError) -> Error {
  type Message (line 38) | pub struct Message(aead::Tag, Vec<u8>);
  type KeyIv (line 41) | pub struct KeyIv(libcrux::aead::Key, libcrux::aead::Iv);
  function serialize_key_iv (line 45) | fn serialize_key_iv(key_iv: &KeyIv) -> Vec<u8> {
  function deserialize_key_iv (line 58) | fn deserialize_key_iv(bytes: &[u8]) -> Result<KeyIv, Error> {
  function derive_key_iv (line 66) | fn derive_key_iv(ikm: &[u8], info: &[u8]) -> Result<KeyIv, Error> {
  function encrypt (line 79) | pub fn encrypt(key_iv: &KeyIv, message: &[u8]) -> Result<Message, Error> {
  function decrypt (line 88) | fn decrypt(key_iv: &KeyIv, message: Message) -> Result<Vec<u8>, Error> {
  function initiate (line 100) | pub fn initiate(ikm: &[u8], psk: &KeyIv) -> Result<(Message, KeyIv), Err...
  function respond (line 110) | pub fn respond(psk: &KeyIv, payload: &[u8], message: Message) -> Result<...
  function finish (line 120) | pub fn finish(message: Message, response_key_iv: &KeyIv) -> Result<Vec<u...
  function it_works (line 131) | fn it_works() {

FILE: examples/sha256/src/sha256.rs
  constant BLOCK_SIZE (line 3) | const BLOCK_SIZE: usize = 64;
  constant LEN_SIZE (line 4) | const LEN_SIZE: usize = 8;
  constant K_SIZE (line 5) | pub const K_SIZE: usize = 64;
  constant HASH_SIZE (line 6) | pub const HASH_SIZE: usize = 256 / 8;
  type Block (line 8) | pub type Block = [u8; BLOCK_SIZE];
  type OpTableType (line 9) | pub type OpTableType = [u8; 12];
  type Sha256Digest (line 10) | pub type Sha256Digest = [u8; HASH_SIZE];
  type RoundConstantsTable (line 11) | pub type RoundConstantsTable = [u32; K_SIZE];
  type Hash (line 12) | pub type Hash = [u32; LEN_SIZE];
  function ch (line 14) | pub fn ch(x: u32, y: u32, z: u32) -> u32 {
  function maj (line 18) | pub fn maj(x: u32, y: u32, z: u32) -> u32 {
  constant OP_TABLE (line 22) | const OP_TABLE: OpTableType = [2, 13, 22, 6, 11, 25, 7, 18, 3, 17, 19, 10];
  constant K_TABLE (line 25) | const K_TABLE: RoundConstantsTable = [
  constant HASH_INIT (line 41) | const HASH_INIT: Hash = [
  function sigma (line 53) | pub fn sigma(x: u32, i: usize, op: usize) -> u32 {
  function to_be_u32s (line 64) | fn to_be_u32s(block: Block) -> [u32; 16] {
  function schedule (line 73) | pub fn schedule(block: Block) -> RoundConstantsTable {
  function shuffle (line 93) | pub fn shuffle(ws: RoundConstantsTable, hash: &mut Hash) {
  function compress (line 122) | pub fn compress(block: Block, hash: &mut Hash) {
  function u32s_to_be_bytes (line 131) | fn u32s_to_be_bytes(state: Hash) -> Sha256Digest {
  function hash (line 144) | pub fn hash(msg: &[u8]) -> Sha256Digest {
  function sha256 (line 181) | pub fn sha256(msg: &[u8]) -> Sha256Digest {

FILE: examples/sha256/tests/test_sha256.rs
  function hex_string_to_vec (line 5) | fn hex_string_to_vec(s: &str) -> Vec<u8> {
  function test_sha256_kat (line 15) | fn test_sha256_kat() {
  function empty_input (line 34) | fn empty_input() {

FILE: frontend/exporter/adt-into/src/lib.rs
  function strip_parenthesis (line 8) | fn strip_parenthesis(tokens: proc_macro::TokenStream) -> Option<proc_mac...
  type Options (line 16) | struct Options {
    method parse (line 30) | fn parse(input: ParseStream) -> syn::Result<Self> {
  function tokens_of_attrs (line 64) | fn tokens_of_attrs<'a>(
  function parse_attrs (line 76) | fn parse_attrs<'a, T: syn::parse::Parse>(
  function parse_attr (line 87) | fn parse_attr<T: syn::parse::Parse>(attr_name: &str, attrs: &Vec<syn::At...
  function fields_to_arm (line 102) | fn fields_to_arm(
  function field_vec_of_fields (line 179) | fn field_vec_of_fields(fields: syn::Fields) -> Vec<syn::Field> {
  function variant_to_arm (line 190) | fn variant_to_arm(
  function adt_into (line 290) | pub fn adt_into(input: proc_macro::TokenStream) -> proc_macro::TokenStre...
  function merge_generic_params (line 418) | fn merge_generic_params(
  function drop_generics (line 433) | fn drop_generics(type_path: syn::TypePath) -> syn::TypePath {
  function derive_group (line 460) | pub fn derive_group(

FILE: frontend/exporter/adt-into/tests/lib.rs
  type State (line 7) | pub struct State(pub HashMap<StringId, String>);
  type StringId (line 10) | pub struct StringId(u32);
  type Literal (line 13) | pub enum Literal {
  type Literal (line 32) | pub enum Literal {
  function sinto (line 38) | fn sinto(&self, s: &source::State) -> String {
  type SInto (line 46) | pub trait SInto<S, To> {
    method sinto (line 47) | fn sinto(&self, s: &S) -> To;
  method sinto (line 52) | fn sinto(&self, _s: &S) -> T {

FILE: frontend/exporter/options/src/lib.rs
  type Glob (line 6) | pub enum Glob {
  method to_string (line 12) | fn to_string(&self) -> String {
  type NamespaceChunk (line 23) | pub enum NamespaceChunk {
    method from (line 38) | fn from(s: &str) -> Self {
  method to_string (line 29) | fn to_string(&self) -> String {
  type Namespace (line 49) | pub struct Namespace {
    method from (line 65) | fn from(s: String) -> Self {
    method matches (line 77) | pub fn matches(&self, path: &Vec<String>) -> bool {
  method to_string (line 54) | fn to_string(&self) -> String {
  type Options (line 99) | pub struct Options {
  type BoundsOptions (line 111) | pub struct BoundsOptions {

FILE: frontend/exporter/src/body.rs
  type IsBody (line 5) | pub trait IsBody: Sized + Clone + 'static {}
    method body (line 128) | fn body<'tcx, S: UnderOwnerState<'tcx>>(
    method from_mir (line 135) | fn from_mir<'tcx, S: UnderOwnerState<'tcx>>(
    method body (line 177) | fn body<'tcx, S: UnderOwnerState<'tcx>>(
    method from_mir (line 184) | fn from_mir<'tcx, S: UnderOwnerState<'tcx>>(
    method body (line 192) | fn body<'tcx, S: BaseState<'tcx>>(
    method body (line 221) | fn body<'tcx, S: UnderOwnerState<'tcx>>(
    method body (line 231) | fn body<'tcx, S: UnderOwnerState<'tcx>>(
    method from_mir (line 244) | fn from_mir<'tcx, S: UnderOwnerState<'tcx>>(
  function override_queries_store_body (line 38) | pub fn override_queries_store_body(providers: &mut rustc_middle::query::...
  function thir_body_safe (line 60) | fn thir_body_safe(
  function mir_built_safe (line 79) | fn mir_built_safe(
  function get_thir (line 101) | pub fn get_thir<'tcx, S: BaseState<'tcx>>(
  type IsBody (line 125) | pub trait IsBody:
    method body (line 128) | fn body<'tcx, S: UnderOwnerState<'tcx>>(
    method from_mir (line 135) | fn from_mir<'tcx, S: UnderOwnerState<'tcx>>(
    method body (line 177) | fn body<'tcx, S: UnderOwnerState<'tcx>>(
    method from_mir (line 184) | fn from_mir<'tcx, S: UnderOwnerState<'tcx>>(
    method body (line 192) | fn body<'tcx, S: BaseState<'tcx>>(
    method body (line 221) | fn body<'tcx, S: UnderOwnerState<'tcx>>(
    method body (line 231) | fn body<'tcx, S: UnderOwnerState<'tcx>>(
    method from_mir (line 244) | fn from_mir<'tcx, S: UnderOwnerState<'tcx>>(
  function make_fn_def (line 143) | pub fn make_fn_def<'tcx, Body: IsBody, S: BaseState<'tcx>>(
  function body_from_id (line 162) | pub fn body_from_id<'tcx, Body: IsBody, S: UnderOwnerState<'tcx>>(
  function sinto (line 256) | fn sinto(&self, s: &S) -> Body {

FILE: frontend/exporter/src/comments.rs
  function comments_of_file (line 7) | pub fn comments_of_file(path: PathBuf) -> std::io::Result<Vec<(Span, Str...

FILE: frontend/exporter/src/constant_utils.rs
  type ConstantInt (line 5) | pub enum ConstantInt {
  type ConstantLiteral (line 22) | pub enum ConstantLiteral {
  type ConstantExprKind (line 35) | pub enum ConstantExprKind {
  type ConstantFieldExpr (line 104) | pub struct ConstantFieldExpr {
  type ConstantExpr (line 113) | pub type ConstantExpr = Decorated<ConstantExprKind>;
  type ConstantKind (line 116) | pub type ConstantKind = ConstantExpr;
  method from (line 119) | fn from(c: ConstantFieldExpr) -> FieldExpr {
  method from (line 128) | fn from(c: ConstantExpr) -> Expr {

FILE: frontend/exporter/src/constant_utils/uneval.rs
  method byte_str (line 11) | fn byte_str(bytes: Vec<u8>) -> Self {
  function scalar_int_to_constant_literal (line 20) | pub(crate) fn scalar_int_to_constant_literal<'tcx, S: UnderOwnerState<'t...
  function bits_and_type_to_float_constant_literal (line 57) | fn bits_and_type_to_float_constant_literal(bits: u128, ty: FloatTy) -> C...
  method decorate (line 69) | pub fn decorate(self, ty: Ty, span: Span) -> Decorated<Self> {
  function is_anon_const (line 86) | pub(crate) fn is_anon_const(
  function translate_constant_reference (line 99) | pub fn translate_constant_reference<'tcx>(
  function eval_ty_constant (line 131) | pub fn eval_ty_constant<'tcx, S: UnderOwnerState<'tcx>>(
  function eval_mir_constant (line 152) | pub fn eval_mir_constant<'tcx, S: UnderOwnerState<'tcx>>(
  function sinto (line 165) | fn sinto(&self, s: &S) -> ConstantExpr {
  function sinto (line 201) | fn sinto(&self, s: &S) -> ConstantExpr {
  function valtree_to_constant_expr (line 207) | pub(crate) fn valtree_to_constant_expr<'tcx, S: UnderOwnerState<'tcx>>(
  function op_to_const (line 311) | fn op_to_const<'tcx, S: UnderOwnerState<'tcx>>(
  function const_value_to_constant_expr (line 454) | pub fn const_value_to_constant_expr<'tcx, S: UnderOwnerState<'tcx>>(

FILE: frontend/exporter/src/deterministic_hash.rs
  type DeterministicHasher (line 6) | pub struct DeterministicHasher<T: Hasher>(T);
  function finish (line 10) | fn finish(&self) -> u64 {
  function write (line 14) | fn write(&mut self, bytes: &[u8]) {
  function write_u8 (line 18) | fn write_u8(&mut self, i: u8) {
  function write_u16 (line 22) | fn write_u16(&mut self, i: u16) {
  function write_u32 (line 26) | fn write_u32(&mut self, i: u32) {
  function write_u64 (line 30) | fn write_u64(&mut self, i: u64) {
  function write_u128 (line 34) | fn write_u128(&mut self, i: u128) {
  function write_usize (line 38) | fn write_usize(&mut self, i: usize) {
  function write_i8 (line 42) | fn write_i8(&mut self, i: i8) {
  function write_i16 (line 46) | fn write_i16(&mut self, i: i16) {
  function write_i32 (line 50) | fn write_i32(&mut self, i: i32) {
  function write_i64 (line 54) | fn write_i64(&mut self, i: i64) {
  function write_i128 (line 58) | fn write_i128(&mut self, i: i128) {
  function write_isize (line 62) | fn write_isize(&mut self, i: isize) {

FILE: frontend/exporter/src/id_table.rs
  type Id (line 29) | pub struct Id {
  type Session (line 35) | pub struct Session {
    method table (line 41) | pub fn table(&self) -> &Table {
    method fresh_id (line 194) | fn fresh_id(&mut self) -> Id {
  type Value (line 48) | pub enum Value {
  method to_types (line 55) | fn to_types(value: Arc<Self>) -> Value {
  method from_types (line 58) | fn from_types(t: &Value) -> Option<Arc<Self>> {
  method to_types (line 67) | fn to_types(value: Arc<Self>) -> Value {
  method from_types (line 70) | fn from_types(t: &Value) -> Option<Arc<Self>> {
  method to_types (line 79) | fn to_types(value: Arc<Self>) -> Value {
  method from_types (line 82) | fn from_types(t: &Value) -> Option<Arc<Self>> {
  type Node (line 94) | pub struct Node<T: 'static + SupportedType<Value>> {
  type Target (line 100) | type Target = T;
  function deref (line 101) | fn deref(&self) -> &Self::Target {
  method hash (line 110) | fn hash<H: Hasher>(&self, state: &mut H) {
  method eq (line 116) | fn eq(&self, other: &Self) -> bool {
  method clone (line 124) | fn clone(&self) -> Self {
  type Table (line 139) | pub struct Table(HeterogeneousMap<Id, Value>);
    method into (line 369) | fn into(self) -> SortedIdValuePairs {
    method from (line 377) | fn from(t: SortedIdValuePairs) -> Self {
  type HeterogeneousMap (line 152) | pub struct HeterogeneousMap<Key, Value>(HashMap<Key, Value>);
  method default (line 155) | fn default() -> Self {
  function insert (line 161) | pub(super) fn insert<T>(&mut self, key: Key, value: Arc<T>)
  function insert_raw_value (line 167) | pub(super) fn insert_raw_value(&mut self, key: Key, value: Value) {
  function from_iter (line 170) | pub(super) fn from_iter(it: impl Iterator<Item = (Key, Value)>) -> Self {
  function into_iter (line 173) | pub(super) fn into_iter(self) -> impl Iterator<Item = (Key, Value)> {
  function get (line 176) | pub(super) fn get<T>(&self, key: &Key) -> Option<Option<Arc<T>>>
  type SupportedType (line 186) | pub trait SupportedType<Value>: std::fmt::Debug {
    method to_types (line 187) | fn to_types(value: Arc<Self>) -> Value;
    method from_types (line 188) | fn from_types(t: &Value) -> Option<Arc<Self>>;
  function new (line 202) | pub fn new(value: T, session: &mut Session) -> Self {
  function inner (line 209) | pub fn inner(&self) -> &Arc<T> {
  function id (line 213) | pub fn id(&self) -> Id {
  type WithTable (line 224) | pub struct WithTable<T> {
  function serialize_use_id (line 238) | fn serialize_use_id() -> bool {
  function run (line 246) | pub fn run<R>(map: Table, value: T, f: impl FnOnce(&Self) -> R) -> R {
  function destruct (line 257) | pub fn destruct(self) -> (T, Table) {
  method serialize (line 264) | fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok...
  function deserialize (line 279) | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
  type NodeRepr (line 299) | pub(super) struct NodeRepr<T> {
  type Pair (line 305) | pub(super) struct Pair(Id, Value);
    method deserialize (line 354) | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
  type SortedIdValuePairs (line 306) | pub(super) type SortedIdValuePairs = Vec<Pair>;
  type WithTableRepr (line 309) | pub(super) struct WithTableRepr<T>(pub(super) Table, pub(super) T);
  function into (line 312) | fn into(self) -> NodeRepr<T> {
  type Error (line 324) | type Error = serde::de::value::Error;
  function try_from (line 326) | fn try_from(cached: NodeRepr<T>) -> Result<Self, Self::Error> {

FILE: frontend/exporter/src/index_vec.rs
  type IndexVec (line 5) | pub struct IndexVec<I: 'static, T: 'static> {
  function into_iter (line 11) | pub fn into_iter(self) -> impl DoubleEndedIterator<Item = T> + ExactSize...
  function into_iter_enumerated (line 18) | pub fn into_iter_enumerated(
  type Target (line 27) | type Target = rustc_index::IndexSlice<I, T>;
  function deref (line 28) | fn deref(&self) -> &Self::Target {
  function deref_mut (line 35) | fn deref_mut(&mut self) -> &mut Self::Target {
  function from (line 42) | fn from(val: rustc_index::IndexVec<I, T>) -> Self {
  function sinto (line 54) | fn sinto(&self, s: &S) -> IndexVec<J, U> {
  function from_iter (line 68) | fn from_iter<It: IntoIterator<Item = T>>(iter: It) -> Self {

FILE: frontend/exporter/src/rustc_utils.rs
  function inst_binder (line 5) | pub fn inst_binder<'tcx, T>(
  function substitute (line 20) | pub fn substitute<'tcx, T>(
  function subst (line 34) | fn subst(
  function can_have_generics (line 44) | pub(crate) fn can_have_generics<'tcx>(tcx: ty::TyCtxt<'tcx>, def_id: RDe...
  function get_variant_information (line 54) | pub(crate) fn get_variant_information<'s, S: UnderOwnerState<'s>>(
  function translate_span (line 95) | pub fn translate_span(span: rustc_span::Span, sess: &rustc_session::Sess...
  type HasParamEnv (line 110) | pub trait HasParamEnv<'tcx> {
    method param_env (line 111) | fn param_env(&self) -> ty::ParamEnv<'tcx>;
    method typing_env (line 112) | fn typing_env(&self) -> ty::TypingEnv<'tcx>;
  method param_env (line 116) | fn param_env(&self) -> ty::ParamEnv<'tcx> {
  method typing_env (line 125) | fn typing_env(&self) -> ty::TypingEnv<'tcx> {
  function attribute_from_scope (line 134) | pub(crate) fn attribute_from_scope<'tcx, S: ExprState<'tcx>>(
  function get_closest_parent_type (line 150) | pub fn get_closest_parent_type(
  function get_def_visibility (line 164) | pub fn get_def_visibility<'tcx>(
  function get_def_attrs (line 207) | pub fn get_def_attrs<'tcx>(
  function get_mod_children (line 224) | pub fn get_mod_children<'tcx>(
  function get_foreign_mod_children (line 254) | pub fn get_foreign_mod_children<'tcx>(tcx: ty::TyCtxt<'tcx>, def_id: RDe...
  function get_method_sig (line 289) | pub fn get_method_sig<'tcx>(
  function assoc_tys_for_trait (line 330) | pub fn assoc_tys_for_trait<'tcx>(
  function dyn_self_ty (line 365) | pub fn dyn_self_ty<'tcx>(
  function closure_once_shim (line 405) | pub fn closure_once_shim<'tcx>(
  function drop_glue_shim (line 423) | pub fn drop_glue_shim<'tcx>(

FILE: frontend/exporter/src/sinto.rs
  type SInto (line 2) | pub trait SInto<S, To> {
    method sinto (line 3) | fn sinto(&self, s: &S) -> To;
    method sinto (line 8) | fn sinto(&self, s: &S) -> To;
  type SInto (line 7) | pub trait SInto<S, To>: std::marker::PointeeSized {
    method sinto (line 3) | fn sinto(&self, s: &S) -> To;
    method sinto (line 8) | fn sinto(&self, s: &S) -> To;
  function sinto (line 47) | fn sinto(&self, s: &S) -> (LL, RR) {
  function sinto (line 55) | fn sinto(&self, s: &S) -> (AA, BB, CC) {
  function sinto (line 61) | fn sinto(&self, s: &S) -> Option<D> {
  function sinto (line 66) | fn sinto(&self, s: &S) -> D {
  function sinto (line 71) | fn sinto(&self, s: &S) -> D {
  function sinto (line 76) | fn sinto(&self, s: &S) -> Vec<D> {
  function sinto (line 81) | fn sinto(&self, s: &S) -> Vec<D> {
  function sinto (line 87) | fn sinto(&self, s: &S) -> Vec<D> {

FILE: frontend/exporter/src/state.rs
  type LocalContextS (line 64) | pub struct LocalContextS {
    method new (line 75) | pub fn new() -> LocalContextS {
  method default (line 69) | fn default() -> Self {
  type GlobalCache (line 84) | pub struct GlobalCache<'tcx> {
  type FullDefMapper (line 100) | pub struct FullDefMapper;
  type Value (line 102) | type Value<Body: TypeMappable> = Arc<FullDef<Body>>;
  type ItemCache (line 107) | pub struct ItemCache<'tcx> {
  type Base (line 127) | pub struct Base<'tcx> {
  function new (line 138) | pub fn new(
  type MacroCalls (line 155) | pub type MacroCalls = Rc<HashMap<Span, Span>>;
  type RcThir (line 156) | pub type RcThir<'tcx> = Rc<rustc_middle::thir::Thir<'tcx>>;
  type RcMir (line 157) | pub type RcMir<'tcx> = Rc<rustc_middle::mir::Body<'tcx>>;
  type UnitBinder (line 158) | pub type UnitBinder<'tcx> = rustc_middle::ty::Binder<'tcx, ()>;
  type StateWithBase (line 174) | pub type StateWithBase<'tcx> = State<Base<'tcx>, (), (), (), (), ()>;
  type StateWithOwner (line 175) | pub type StateWithOwner<'tcx> = State<Base<'tcx>, rustc_hir::def_id::Def...
  type StateWithBinder (line 176) | pub type StateWithBinder<'tcx> =
  type StateWithThir (line 178) | pub type StateWithThir<'tcx> =
  type StateWithThirAndTy (line 180) | pub type StateWithThirAndTy<'tcx> = State<
  type StateWithMir (line 188) | pub type StateWithMir<'tcx> =
  function new (line 192) | pub fn new(
  type BaseState (line 207) | pub trait BaseState<'tcx>: HasBase<'tcx> + Clone {
    method with_owner_id (line 209) | fn with_owner_id(&self, owner_id: rustc_hir::def_id::DefId) -> StateWi...
  type UnderOwnerState (line 225) | pub trait UnderOwnerState<'tcx>: BaseState<'tcx> + HasOwnerId {
    method with_base (line 226) | fn with_base(&self, base: types::Base<'tcx>) -> StateWithOwner<'tcx> {
    method with_binder (line 236) | fn with_binder(&self, binder: types::UnitBinder<'tcx>) -> StateWithBin...
    method with_thir (line 246) | fn with_thir(&self, thir: types::RcThir<'tcx>) -> StateWithThir<'tcx> {
    method with_mir (line 256) | fn with_mir(&self, mir: types::RcMir<'tcx>) -> StateWithMir<'tcx> {
  type ExprState (line 270) | pub trait UnderBinderState<'tcx> = UnderOwnerState<'tcx> + HasBinder<'tcx>;
    method with_ty (line 275) | fn with_ty(&self, ty: rustc_middle::ty::Ty<'tcx>) -> StateWithThirAndT...
  type WithGlobalCacheExt (line 288) | pub trait WithGlobalCacheExt<'tcx>: BaseState<'tcx> {
    method with_global_cache (line 291) | fn with_global_cache<T>(&self, f: impl FnOnce(&mut GlobalCache<'tcx>) ...
    method with_item_cache (line 298) | fn with_item_cache<T>(&self, def_id: RDefId, f: impl FnOnce(&mut ItemC...
  type WithItemCacheExt (line 304) | pub trait WithItemCacheExt<'tcx>: UnderOwnerState<'tcx> {
    method with_cache (line 307) | fn with_cache<T>(&self, f: impl FnOnce(&mut ItemCache<'tcx>) -> T) -> T {
    method with_predicate_searcher (line 310) | fn with_predicate_searcher<T>(&self, f: impl FnOnce(&mut PredicateSear...
  method from (line 325) | fn from<'tcx, S: BaseState<'tcx>>(s: &S, did: rustc_hir::def_id::DefId) ...
  function impl_def_ids_to_impled_types_and_bounds (line 345) | pub fn impl_def_ids_to_impled_types_and_bounds<'tcx, S: BaseState<'tcx>>(

FILE: frontend/exporter/src/traits.rs
  type ImplExprPathChunk (line 25) | pub enum ImplExprPathChunk {
  function sinto (line 53) | fn sinto(&self, s: &S) -> ImplExprPathChunk {
  type ImplExprAtom (line 85) | pub enum ImplExprAtom {
  type BuiltinTraitData (line 139) | pub enum BuiltinTraitData {
  type DestructData (line 153) | pub enum DestructData {
  type ImplExpr (line 175) | pub struct ImplExpr {
  function super_clause_to_clause_and_impl_expr (line 185) | pub fn super_clause_to_clause_and_impl_expr<'tcx, S: UnderOwnerState<'tc...
  function solve_trait (line 222) | pub fn solve_trait<'tcx, S: UnderOwnerState<'tcx>>(
  function translate_item_ref (line 247) | pub fn translate_item_ref<'tcx, S: UnderOwnerState<'tcx>>(
  function solve_item_required_traits (line 260) | pub fn solve_item_required_traits<'tcx, S: UnderOwnerState<'tcx>>(
  function solve_item_implied_traits (line 292) | pub fn solve_item_implied_traits<'tcx, S: UnderOwnerState<'tcx>>(
  function solve_item_traits_inner (line 304) | fn solve_item_traits_inner<'tcx, S: UnderOwnerState<'tcx>>(
  function self_clause_for_item (line 330) | pub fn self_clause_for_item<'tcx, S: UnderOwnerState<'tcx>>(
  function solve_sized (line 350) | pub fn solve_sized<'tcx, S: UnderOwnerState<'tcx>>(s: &S, ty: ty::Ty<'tc...

FILE: frontend/exporter/src/traits/resolution.rs
  type PathChunk (line 21) | pub enum PathChunk<'tcx> {
  type Path (line 38) | pub type Path<'tcx> = Vec<PathChunk<'tcx>>;
  type ImplExprAtom (line 41) | pub enum ImplExprAtom<'tcx> {
  type BuiltinTraitData (line 86) | pub enum BuiltinTraitData<'tcx> {
  type DestructData (line 97) | pub enum DestructData<'tcx> {
  type ImplExpr (line 113) | pub struct ImplExpr<'tcx> {
  type BoundPredicateOrigin (line 123) | pub enum BoundPredicateOrigin {
  type AnnotatedTraitPred (line 133) | pub struct AnnotatedTraitPred<'tcx> {
  function initial_self_pred (line 140) | fn initial_self_pred<'tcx>(
  function local_bound_predicates (line 159) | fn local_bound_predicates<'tcx>(
  function parents_trait_predicates (line 193) | fn parents_trait_predicates<'tcx>(
  type Candidate (line 212) | struct Candidate<'tcx> {
  function into_impl_expr (line 219) | fn into_impl_expr(self, tcx: TyCtxt<'tcx>) -> ImplExprAtom<'tcx> {
  type PredicateSearcher (line 236) | pub struct PredicateSearcher<'tcx> {
  function new_for_owner (line 249) | pub fn new_for_owner(tcx: TyCtxt<'tcx>, owner_id: DefId, options: Bounds...
  function insert_bound_predicates (line 273) | pub fn insert_bound_predicates(
  function set_param_env (line 293) | pub fn set_param_env(&mut self, param_env: ParamEnv<'tcx>) {
  function insert_predicates (line 299) | fn insert_predicates(&mut self, preds: impl IntoIterator<Item = Annotate...
  function insert_candidates (line 309) | fn insert_candidates(&mut self, candidates: impl IntoIterator<Item = Can...
  function insert_candidate_parents (line 330) | fn insert_candidate_parents(&mut self, new_candidates: Vec<Candidate<'tc...
  function add_associated_type_refs (line 355) | fn add_associated_type_refs(
  function resolve_local (line 405) | fn resolve_local(
  function resolve (line 437) | pub fn resolve(
  function resolve_item_required_predicates (line 610) | pub fn resolve_item_required_predicates(
  function resolve_item_implied_predicates (line 626) | pub fn resolve_item_implied_predicates(
  function resolve_predicates (line 643) | pub fn resolve_predicates(
  function shallow_resolve_trait_ref (line 671) | pub fn shallow_resolve_trait_ref<'tcx>(

FILE: frontend/exporter/src/traits/utils.rs
  type Predicates (line 37) | pub type Predicates<'tcx> = Cow<'tcx, [(Clause<'tcx>, Span)]>;
  function predicates_defined_on (line 41) | pub fn predicates_defined_on(tcx: TyCtxt<'_>, def_id: DefId) -> Predicat...
  function add_destruct_bounds (line 55) | fn add_destruct_bounds<'tcx>(
  function required_predicates (line 91) | pub fn required_predicates<'tcx>(
  function self_predicate (line 137) | pub fn self_predicate<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> PolyTra...
  function implied_predicates (line 155) | pub fn implied_predicates<'tcx>(
  function normalize (line 208) | pub fn normalize<'tcx, T>(tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>...
  function erase_free_regions (line 227) | pub fn erase_free_regions<'tcx, T>(tcx: TyCtxt<'tcx>, value: T) -> T
  function erase_and_norm (line 271) | pub fn erase_and_norm<'tcx, T>(tcx: TyCtxt<'tcx>, typing_env: TypingEnv<...
  function normalize_bound_val (line 286) | pub fn normalize_bound_val<'tcx, T>(
  function is_sized_related_trait (line 298) | pub fn is_sized_related_trait<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) ->...
  function prune_sized_predicates (line 309) | fn prune_sized_predicates<'tcx>(tcx: TyCtxt<'tcx>, generic_predicates: &...
  type ToPolyTraitRef (line 324) | pub trait ToPolyTraitRef<'tcx> {
    method to_poly_trait_ref (line 325) | fn to_poly_trait_ref(&self) -> PolyTraitRef<'tcx>;
  function to_poly_trait_ref (line 329) | fn to_poly_trait_ref(&self) -> PolyTraitRef<'tcx> {

FILE: frontend/exporter/src/types/attributes.rs
  type AttributeKind (line 11) | pub enum AttributeKind {
  type Deprecation (line 46) | pub struct Deprecation {
  type DeprecatedSince (line 56) | pub enum DeprecatedSince {
  type RustcVersion (line 68) | pub struct RustcVersion {
  type InlineAttr (line 78) | pub enum InlineAttr {

FILE: frontend/exporter/src/types/def_id.rs
  type Symbol (line 23) | pub type Symbol = String;
  type ByteSymbol (line 25) | pub type ByteSymbol = Vec<u8>;
  function sinto (line 29) | fn sinto(&self, _s: &S) -> Symbol {
  function sinto (line 36) | fn sinto(&self, _s: &S) -> ByteSymbol {
  type Safety (line 46) | pub enum Safety {
  type Mutability (line 51) | pub type Mutability = bool;
  type Pinnedness (line 53) | pub type Pinnedness = bool;
  type CtorKind (line 60) | pub enum CtorKind {
  type CtorOf (line 70) | pub enum CtorOf {
  type PromotedId (line 82) | pub struct PromotedId {
    method as_rust_promoted_id (line 89) | pub fn as_rust_promoted_id(&self) -> rustc_middle::mir::Promoted {
  type DefKind (line 99) | pub enum DefKind {
  type MacroKinds (line 145) | pub struct MacroKinds {
  function sinto (line 153) | fn sinto(&self, _s: &S) -> MacroKinds {
  type DefId (line 167) | pub struct DefId {
    method as_rust_def_id (line 214) | pub fn as_rust_def_id(&self) -> Option<RDefId> {
    method underlying_rust_def_id (line 222) | pub fn underlying_rust_def_id(&self) -> RDefId {
    method as_synthetic (line 235) | pub fn as_synthetic<'tcx>(&self, s: &impl BaseState<'tcx>) -> Option<S...
    method ancestry (line 240) | pub fn ancestry(&self) -> impl Iterator<Item = &Self> {
    method path_item (line 245) | pub fn path_item(&self) -> DisambiguatedDefPathItem {
    method make_promoted_child (line 259) | pub fn make_promoted_child<'tcx, S: BaseState<'tcx>>(
    method promoted_id (line 284) | pub fn promoted_id(&self) -> Option<PromotedId> {
    type Target (line 291) | type Target = DefIdContents;
    method deref (line 292) | fn deref(&self) -> &Self::Target {
    method fmt (line 299) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    method fmt (line 309) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    method hash (line 320) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
  type DefIdContents (line 174) | pub struct DefIdContents {
    method make_def_id (line 194) | pub fn make_def_id<'tcx, S: BaseState<'tcx>>(self, s: &S) -> DefId {
  function def_id_as_synthetic (line 203) | pub fn def_id_as_synthetic<'tcx>(
  function get_def_kind (line 332) | pub(crate) fn get_def_kind<'tcx>(tcx: ty::TyCtxt<'tcx>, def_id: RDefId) ...
  constant SYNTHETIC_CRATE_NAME (line 343) | pub(super) const SYNTHETIC_CRATE_NAME: &str = "<synthetic>";
  function translate_def_id (line 346) | fn translate_def_id<'tcx, S: BaseState<'tcx>>(s: &S, def_id: RDefId) -> ...
  method sinto (line 378) | fn sinto(&self, s: &S) -> DefId {
  type Path (line 389) | pub type Path = Vec<String>;
    method from (line 393) | fn from(v: DefId) -> Vec<String> {
  type GlobalIdent (line 408) | pub type GlobalIdent = DefId;
  function sinto (line 412) | fn sinto(&self, st: &S) -> DefId {
  type DefPathItem (line 422) | pub enum DefPathItem {
  type DisambiguatedDefPathItem (line 454) | pub struct DisambiguatedDefPathItem {

FILE: frontend/exporter/src/types/hir.rs
  type HirId (line 19) | pub struct HirId {
  function sinto (line 28) | fn sinto(&self, s: &S) -> DefId {
  type LitFloatType (line 37) | pub enum LitFloatType {
  type Movability (line 46) | pub enum Movability {
  function sinto (line 53) | fn sinto(&self, _s: &S) -> Mutability {
  function sinto (line 63) | fn sinto(&self, _s: &S) -> Pinnedness {
  type RangeEnd (line 76) | pub enum RangeEnd {
  type ImplicitSelfKind (line 86) | pub enum ImplicitSelfKind {
  type FnDecl (line 98) | pub struct FnDecl {
  type FnSig (line 110) | pub struct FnSig {
  type HeaderSafety (line 120) | pub enum HeaderSafety {
  type FnHeader (line 129) | pub struct FnHeader {
  type ExternAbi (line 140) | pub enum ExternAbi {
  type FnDef (line 152) | pub struct FnDef<Body: IsBody> {
  function sinto (line 162) | fn sinto(self: &hir::Ty<'x>, s: &S) -> Ty {
  type UseKind (line 177) | pub enum UseKind {
  type IsAuto (line 188) | pub enum IsAuto {
  type Defaultness (line 198) | pub enum Defaultness {
  type ImplPolarity (line 208) | pub enum ImplPolarity {
  type Constness (line 218) | pub enum Constness {
  type Generics (line 228) | pub struct Generics<Body: IsBody> {
  function sinto (line 239) | fn sinto(&self, s: &S) -> ImplItem<Body> {
  type ParamName (line 250) | pub enum ParamName {
  type LifetimeParamKind (line 261) | pub enum LifetimeParamKind {
  type AnonConst (line 271) | pub struct AnonConst<Body: IsBody> {
  type ConstArg (line 284) | pub struct ConstArg<Body: IsBody> {
  type ConstArgKind (line 293) | pub enum ConstArgKind<Body: IsBody> {
  type GenericParamKind (line 304) | pub enum GenericParamKind<Body: IsBody> {
  type GenericParam (line 331) | pub struct GenericParam<Body: IsBody> {
  type ImplItem (line 358) | pub struct ImplItem<Body: IsBody> {
  type ImplItemKind (line 377) | pub enum ImplItemKind<Body: IsBody> {
  type Impl (line 415) | pub struct Impl<Body: IsBody> {
  type IsAsync (line 458) | pub enum IsAsync {
  type FnRetTy (line 468) | pub enum FnRetTy {
  type VariantData (line 477) | pub enum VariantData {
  function sinto (line 488) | fn sinto(&self, _s: &S) -> bool {
  type HirFieldDef (line 501) | pub struct HirFieldDef {
  type Variant (line 517) | pub struct Variant<Body: IsBody> {
  type UsePath (line 544) | pub struct UsePath {
  type Res (line 566) | pub enum Res {
  type PrimTy (line 589) | pub enum PrimTy {
  type NonMacroAttrKind (line 603) | pub enum NonMacroAttrKind {
  type PathSegment (line 615) | pub struct PathSegment {
  type ItemKind (line 629) | pub enum ItemKind<Body: IsBody> {
  type EnumDef (line 695) | pub type EnumDef<Body> = Vec<Variant<Body>>;
  type TraitItemKind (line 702) | pub enum TraitItemKind<Body: IsBody> {
  type TraitItem (line 731) | pub struct TraitItem<Body: IsBody> {
  function sinto (line 745) | fn sinto(&self, s: &S) -> EnumDef<Body> {
  function sinto (line 752) | fn sinto(&self, s: &S) -> TraitItem<Body> {
  function sinto (line 761) | fn sinto(&self, s: &S) -> Vec<Item<Body>> {
  type ForeignItemKind (line 775) | pub enum ForeignItemKind<Body: IsBody> {
  type ForeignItem (line 786) | pub struct ForeignItem<Body: IsBody> {
  function sinto (line 796) | fn sinto(&self, s: &S) -> ForeignItem<Body> {
  type GenericBounds (line 803) | type GenericBounds = Vec<Clause>;
  function region_bounds_at_current_owner (line 807) | fn region_bounds_at_current_owner<'tcx, S: UnderOwnerState<'tcx>>(s: &S)...
  function sinto (line 858) | fn sinto(&self, s: &S) -> GenericBounds {
  type TokenStream (line 866) | pub type TokenStream = String;
  function sinto (line 870) | fn sinto(&self, _: &S) -> String {
  type Delimiter (line 880) | pub enum Delimiter {
  type DelimArgs (line 894) | pub struct DelimArgs {
  type MacroDef (line 907) | pub struct MacroDef {
  type Item (line 915) | pub struct Item<Body: IsBody> {
  function sinto (line 927) | fn sinto(&self, s: &S) -> Item<Body> {
  function sinto (line 967) | fn sinto(&self, s: &S) -> Item<Body> {
  type Ident (line 974) | pub type Ident = (Symbol, Span);
  function sinto (line 978) | fn sinto(&self, s: &S) -> Ident {
  type AttrStyle (line 987) | pub enum AttrStyle {
  type Attribute (line 996) | pub enum Attribute {
  type BindingMode (line 1005) | pub struct BindingMode {
  type ByRef (line 1017) | pub enum ByRef {
  type StrStyle (line 1027) | pub enum StrStyle {
  type LitKind (line 1037) | pub enum LitKind {
  function sinto (line 1056) | fn sinto(&self, _s: &S) -> u128 {
  type CommentKind (line 1066) | pub enum CommentKind {
  type AttrArgs (line 1076) | pub enum AttrArgs {
  type MetaItemLit (line 1087) | pub struct MetaItemLit {
  type AttrItem (line 1098) | pub struct AttrItem {
  function sinto (line 1107) | fn sinto(&self, st: &S) -> String {

FILE: frontend/exporter/src/types/mir.rs
  type SourceInfo (line 12) | pub struct SourceInfo {
  type LocalDecl (line 20) | pub struct LocalDecl {
  type BasicBlocks (line 28) | pub type BasicBlocks = IndexVec<BasicBlock, BasicBlockData>;
  function name_of_local (line 31) | fn name_of_local(
  type Built (line 54) | pub struct Built;
  type Promoted (line 58) | pub struct Promoted;
  type Elaborated (line 62) | pub struct Elaborated;
  type Optimized (line 66) | pub struct Optimized;
  type CTFE (line 70) | pub struct CTFE;
  type Unknown (line 76) | pub struct Unknown;
  type IsMirKind (line 87) | pub trait IsMirKind: Clone + std::fmt::Debug + std::any::Any + Send + Sy...
    method get_mir (line 89) | fn get_mir<'tcx, T>(
    method get_mir (line 97) | fn get_mir<'tcx, T>(
    method get_mir (line 113) | fn get_mir<'tcx, T>(
    method get_mir (line 129) | fn get_mir<'tcx, T>(
    method get_mir (line 145) | fn get_mir<'tcx, T>(
    method get_mir (line 155) | fn get_mir<'tcx, T>(
    method get_mir (line 165) | fn get_mir<'tcx, T>(
  type ConstOperand (line 182) | pub struct ConstOperand {
  type ConstOperandKind (line 190) | pub enum ConstOperandKind {
  function sinto (line 202) | fn sinto(&self, s: &S) -> ConstOperand {
  function get_promoted_mir (line 214) | pub fn get_promoted_mir<'tcx>(
  function translate_mir_const (line 233) | fn translate_mir_const<'tcx, S: UnderOwnerState<'tcx>>(
  type MirBody (line 294) | pub struct MirBody<KIND> {
  type SourceScopeData (line 315) | pub struct SourceScopeData {
  type Operand (line 324) | pub enum Operand {
    method ty (line 332) | pub(crate) fn ty(&self) -> &Ty {
  type Terminator (line 343) | pub struct Terminator {
  function translate_terminator_kind_call (line 349) | fn translate_terminator_kind_call<'tcx, S: UnderOwnerState<'tcx> + HasMi...
  function translate_terminator_kind_drop (line 432) | fn translate_terminator_kind_drop<'tcx, S: UnderOwnerState<'tcx> + HasMi...
  type ScalarTy (line 466) | pub enum ScalarTy {
  type ScalarInt (line 475) | pub struct ScalarInt {
  function translate_switchint (line 483) | fn translate_switchint<'tcx, S: UnderOwnerState<'tcx> + HasMir<'tcx>>(
  type FunOperand (line 521) | pub enum FunOperand {
  type UnwindAction (line 531) | pub enum UnwindAction {
  type TerminatorKind (line 541) | pub enum TerminatorKind {
  type Statement (line 634) | pub struct Statement {
  type StatementKind (line 643) | pub enum StatementKind {
  type NonDivergingIntrinsic (line 667) | pub enum NonDivergingIntrinsic {
  type CopyNonOverlapping (line 675) | pub struct CopyNonOverlapping {
  type Place (line 683) | pub struct Place {
  type PlaceKind (line 691) | pub enum PlaceKind {
  type ProjectionElemFieldKind (line 701) | pub enum ProjectionElemFieldKind {
  type ProjectionElem (line 714) | pub enum ProjectionElem {
  function sinto (line 738) | fn sinto(&self, s: &S) -> Place {
  type AggregateKind (line 821) | pub enum AggregateKind {
  type CastKind (line 857) | pub enum CastKind {
    method sfrom (line 873) | fn sfrom<'tcx, S: UnderOwnerState<'tcx>>(
  type CoercionSource (line 901) | pub enum CoercionSource {
  type NullOp (line 909) | pub enum NullOp {
  type Rvalue (line 918) | pub enum Rvalue {
  type RawPtrKind (line 945) | pub enum RawPtrKind {
  type BasicBlockData (line 954) | pub struct BasicBlockData {
  type UnOp (line 970) | pub enum UnOp {
  type BinOp (line 980) | pub enum BinOp {
  type AssignOp (line 1013) | pub enum AssignOp {
  type BorrowKind (line 1031) | pub enum BorrowKind {
  type MutBorrowKind (line 1042) | pub enum MutBorrowKind {
  type FakeBorrowKind (line 1053) | pub enum FakeBorrowKind {

FILE: frontend/exporter/src/types/new/full_def.rs
  type DefaultFullDefBody (line 14) | type DefaultFullDefBody = MirBody<mir_kinds::Unknown>;
  type FullDef (line 19) | pub struct FullDef<Body = DefaultFullDefBody> {
  function translate_full_def (line 43) | fn translate_full_def<'tcx, S, Body>(
  method def_span (line 184) | pub fn def_span<'tcx>(&self, s: &impl BaseState<'tcx>) -> Span {
  method full_def (line 207) | pub fn full_def<'tcx, S, Body>(&self, s: &S) -> Arc<FullDef<Body>>
  method full_def_maybe_instantiated (line 216) | pub fn full_def_maybe_instantiated<'tcx, S, Body>(
  method instantiated_full_def (line 248) | pub fn instantiated_full_def<'tcx, S, Body>(&self, s: &S) -> Arc<FullDef...
  type ParamEnv (line 261) | pub struct ParamEnv {
  type ConstKind (line 273) | pub enum ConstKind {
  type FullDefKind (line 287) | pub enum FullDefKind<Body> {
  function gen_vtable_sig (line 484) | fn gen_vtable_sig<'tcx>(
  function translate_full_def_kind (line 559) | fn translate_full_def_kind<'tcx, S, Body>(
  type ImplAssocItem (line 935) | pub struct ImplAssocItem {
    method def_id (line 1150) | pub fn def_id(&self) -> &DefId {
  type ImplAssocItemValue (line 958) | pub enum ImplAssocItemValue {
  type VirtualTraitImpl (line 990) | pub struct VirtualTraitImpl {
  function def_id (line 1000) | pub fn def_id(&self) -> &DefId {
  function this (line 1005) | pub fn this(&self) -> &ItemRef {
  function kind (line 1009) | pub fn kind(&self) -> &FullDefKind<Body> {
  function param_env (line 1014) | pub fn param_env(&self) -> Option<&ParamEnv> {
  function typing_parent (line 1035) | pub fn typing_parent<'tcx>(&self, s: &impl BaseState<'tcx>) -> Option<It...
  function has_any_generics (line 1055) | pub fn has_any_generics(&self) -> bool {
  function has_own_generics (line 1063) | pub fn has_own_generics(&self) -> bool {
  function has_own_generics_or_predicates (line 1072) | pub fn has_own_generics_or_predicates(&self) -> bool {
  function nameable_children (line 1093) | pub fn nameable_children<'tcx>(&self, s: &impl BaseState<'tcx>) -> Vec<(...
  function associated_def_ids (line 1134) | pub fn associated_def_ids(&self) -> Vec<DefId> {
  function get_self_predicate (line 1159) | fn get_self_predicate<'tcx, S: UnderOwnerState<'tcx>>(
  function get_trait_decl_dyn_self_ty (line 1176) | fn get_trait_decl_dyn_self_ty<'tcx, S: UnderOwnerState<'tcx>>(
  function virtual_impl_for (line 1202) | fn virtual_impl_for<'tcx, S>(s: &S, trait_ref: ty::TraitRef<'tcx>) -> Bo...
  function get_body (line 1234) | fn get_body<'tcx, S, Body>(s: &S, args: Option<ty::GenericArgsRef<'tcx>>...
  function get_closure_once_shim (line 1244) | fn get_closure_once_shim<'tcx, S, Body>(s: &S, closure_ty: ty::Ty<'tcx>)...
  function get_drop_glue_shim (line 1256) | fn get_drop_glue_shim<'tcx, S, Body>(s: &S, args: Option<ty::GenericArgs...
  function get_param_env (line 1268) | fn get_param_env<'tcx, S: UnderOwnerState<'tcx>>(
  function get_implied_predicates (line 1302) | fn get_implied_predicates<'tcx, S: UnderOwnerState<'tcx>>(
  function const_value (line 1327) | fn const_value<'tcx, S: UnderOwnerState<'tcx>>(

FILE: frontend/exporter/src/types/new/impl_infos.rs
  type ImplInfos (line 7) | pub struct ImplInfos {

FILE: frontend/exporter/src/types/new/item_attributes.rs
  type ItemAttributes (line 5) | pub struct ItemAttributes {
    method new (line 17) | pub fn new() -> Self {
    method from_owner_id (line 33) | pub fn from_owner_id<'tcx, S: BaseState<'tcx>>(
    method from_def_id (line 52) | pub fn from_def_id<'tcx, S: BaseState<'tcx>>(
  method default (line 11) | fn default() -> Self {

FILE: frontend/exporter/src/types/new/predicate_id.rs
  type PredicateId (line 9) | pub struct PredicateId(pub u64);
    method sinto (line 28) | fn sinto(&self, _s: &S) -> PredicateId {
  function predicate_id (line 16) | pub fn predicate_id(&self) -> PredicateId {
  function deterministic_hash (line 39) | fn deterministic_hash<T: std::hash::Hash>(x: &T) -> u64 {

FILE: frontend/exporter/src/types/new/synthetic_items.rs
  type SyntheticItem (line 18) | pub enum SyntheticItem {
  function get_synthetic_def_id (line 29) | pub fn get_synthetic_def_id(

FILE: frontend/exporter/src/types/new/variant_infos.rs
  type VariantKind (line 7) | pub enum VariantKind {
  type VariantInformations (line 29) | pub struct VariantInformations {

FILE: frontend/exporter/src/types/serialize_int.rs
  function serialize (line 9) | pub fn serialize<S>(value: &u128, serializer: S) -> Result<S::Ok, S::Error>
  function deserialize (line 16) | pub fn deserialize<'de, D>(deserializer: D) -> Result<u128, D::Error>
  type IntScalarVisitor (line 24) | struct IntScalarVisitor;
    type Value (line 26) | type Value = u128;
    method expecting (line 28) | fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::...
    method visit_str (line 33) | fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
    method visit_u64 (line 40) | fn visit_u64<E>(self, v: u64) -> Result<Self::Value, E>
    type Value (line 67) | type Value = i128;
    method expecting (line 69) | fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::...
    method visit_str (line 74) | fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
    method visit_u64 (line 81) | fn visit_u64<E>(self, v: u64) -> Result<Self::Value, E>
    method visit_i64 (line 88) | fn visit_i64<E>(self, v: i64) -> Result<Self::Value, E>
  function serialize (line 50) | pub fn serialize<S>(value: &i128, serializer: S) -> Result<S::Ok, S::Error>
  function deserialize (line 57) | pub fn deserialize<'de, D>(deserializer: D) -> Result<i128, D::Error>
  type IntScalarVisitor (line 65) | struct IntScalarVisitor;
    type Value (line 26) | type Value = u128;
    method expecting (line 28) | fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::...
    method visit_str (line 33) | fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
    method visit_u64 (line 40) | fn visit_u64<E>(self, v: u64) -> Result<Self::Value, E>
    type Value (line 67) | type Value = i128;
    method expecting (line 69) | fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::...
    method visit_str (line 74) | fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
    method visit_u64 (line 81) | fn visit_u64<E>(self, v: u64) -> Result<Self::Value, E>
    method visit_i64 (line 88) | fn visit_i64<E>(self, v: i64) -> Result<Self::Value, E>

FILE: frontend/exporter/src/types/span.rs
  type Loc (line 7) | pub struct Loc {
    method from (line 60) | fn from(val: rustc_span::Loc) -> Self {
  type Span (line 14) | pub struct Span {
  constant _ (line 28) | const _: () = {
  function sinto (line 70) | fn sinto(&self, s: &S) -> Span {
  type Spanned (line 83) | pub struct Spanned<T> {
  function sinto (line 91) | fn sinto<'a>(&self, s: &S) -> Spanned<U> {
  method sinto (line 100) | fn sinto(&self, _: &S) -> PathBuf {
  type RealFileName (line 109) | pub enum RealFileName {
  function sinto (line 119) | fn sinto(&self, _: &S) -> u64 {
  type FileName (line 129) | pub enum FileName {
    method to_string (line 144) | pub fn to_string(&self) -> String {
    method to_path (line 157) | pub fn to_path(&self) -> Option<&std::path::Path> {

FILE: frontend/exporter/src/types/thir.rs
  type LogicalOp (line 12) | pub enum LogicalOp {
  type LintLevel (line 21) | pub enum LintLevel {
  type FruInfo (line 30) | pub struct FruInfo {
  type AdtExprBase (line 39) | pub enum AdtExprBase {
  type FieldExpr (line 48) | pub struct FieldExpr {
  type AdtExpr (line 56) | pub struct AdtExpr {
  function sinto (line 65) | fn sinto(&self, s: &S) -> AdtExpr {
  type LocalIdent (line 87) | pub struct LocalIdent {
  function sinto (line 94) | fn sinto(&self, s: &S) -> LocalIdent {
  function sinto (line 111) | fn sinto(&self, _: &S) -> u64 {
  type BlockSafety (line 120) | pub enum BlockSafety {
  type ScopeData (line 131) | pub enum ScopeData {
  type Scope (line 148) | pub struct Scope {
  type Block (line 159) | pub struct Block {
  type Stmt (line 173) | pub struct Stmt {
  function sinto (line 179) | fn sinto(&self, s: &S) -> Block {
  function sinto (line 186) | fn sinto(&self, s: &S) -> Stmt {
  function sinto (line 193) | fn sinto(&self, s: &S) -> Expr {
  function sinto (line 346) | fn sinto(&self, s: &S) -> Expr {
  function sinto (line 353) | fn sinto(&self, s: &S) -> Pat {
  function sinto (line 404) | fn sinto(&self, s: &S) -> Arm {
  type StmtKind (line 414) | pub enum StmtKind {
  type Ascription (line 437) | pub struct Ascription {
  type PatRange (line 445) | pub struct PatRange {
  function sinto (line 453) | fn sinto(&self, s: &S) -> PatRange {
  type PatRangeBoundary (line 472) | pub enum PatRangeBoundary {
  type FieldPat (line 481) | pub struct FieldPat {
  type Pat (line 486) | pub type Pat = Decorated<PatKind>;
  type PatKind (line 494) | pub enum PatKind {
  type Arm (line 606) | pub struct Arm {
  type Param (line 622) | pub struct Param {
  type ThirBody (line 637) | pub struct ThirBody {
  type Expr (line 642) | pub type Expr = Decorated<ExprKind>;
  type ExprKind (line 660) | pub enum ExprKind {
  type ExprKindExt (line 921) | pub trait ExprKindExt<'tcx> {
    method hir_id_and_attributes (line 922) | fn hir_id_and_attributes<S: ExprState<'tcx>>(
    method unroll_scope (line 926) | fn unroll_scope<S: BaseState<'tcx> + HasThir<'tcx>>(&self, s: &S) -> t...
  function hir_id_and_attributes (line 931) | fn hir_id_and_attributes<S: ExprState<'tcx>>(
  function unroll_scope (line 943) | fn unroll_scope<S: BaseState<'tcx> + HasThir<'tcx>>(&self, s: &S) -> thi...
  type HirIdExt (line 954) | pub trait HirIdExt {
    method index (line 955) | fn index(&self) -> (usize, usize);
    method index (line 960) | fn index(&self) -> (usize, usize) {

FILE: frontend/exporter/src/types/ty.rs
  type Decorated (line 15) | pub struct Decorated<T> {
  type ParamTy (line 27) | pub struct ParamTy {
  type ParamConst (line 36) | pub struct ParamConst {
  type ExistentialPredicate (line 48) | pub enum ExistentialPredicate {
  type ExistentialTraitRef (line 63) | pub struct ExistentialTraitRef {
  type ExistentialProjection (line 73) | pub struct ExistentialProjection {
  type BoundTyKind (line 83) | pub enum BoundTyKind {
  type BoundTy (line 93) | pub struct BoundTy {
  type BoundRegionKind (line 104) | pub enum BoundRegionKind {
  type BoundRegion (line 129) | pub struct BoundRegion {
  type PlaceholderRegion (line 135) | pub type PlaceholderRegion = Placeholder<BoundRegion>;
  type PlaceholderConst (line 137) | pub type PlaceholderConst = Placeholder<BoundVar>;
  type PlaceholderType (line 139) | pub type PlaceholderType = Placeholder<BoundTy>;
  type Placeholder (line 144) | pub struct Placeholder<T> {
  function sinto (line 152) | fn sinto(&self, s: &S) -> Placeholder<U> {
  type Canonical (line 162) | pub struct Canonical<T> {
  type CanonicalUserType (line 166) | pub type CanonicalUserType = Canonical<UserType>;
  function sinto (line 172) | fn sinto(&self, s: &S) -> Canonical<U> {
  type UserSelfTy (line 183) | pub struct UserSelfTy {
  type UserArgs (line 192) | pub struct UserArgs {
  type UserType (line 203) | pub enum UserType {
  type DiscriminantDefinition (line 234) | pub enum DiscriminantDefinition {
  type DiscriminantValue (line 247) | pub struct DiscriminantValue {
  type Visibility (line 255) | pub enum Visibility<Id> {
  function sinto (line 262) | fn sinto(&self, s: &S) -> Visibility<U> {
  type FieldDef (line 274) | pub struct FieldDef {
    method sfrom (line 288) | pub fn sfrom<'tcx, S: UnderOwnerState<'tcx>>(
  type VariantDef (line 320) | pub struct VariantDef {
    method sfrom (line 337) | pub(crate) fn sfrom<'tcx, S: UnderOwnerState<'tcx>>(
  type EarlyParamRegion (line 367) | pub struct EarlyParamRegion {
  type LateParamRegion (line 376) | pub struct LateParamRegion {
  type LateParamRegionKind (line 385) | pub enum LateParamRegionKind {
  type RegionKind (line 397) | pub enum RegionKind {
  type BoundVarIndexKind (line 412) | pub enum BoundVarIndexKind {
  type Region (line 424) | pub struct Region {
  type GenericArg (line 433) | pub enum GenericArg {
  type ItemRefContents (line 442) | pub struct ItemRefContents {
    method intern (line 502) | fn intern<'tcx, S: BaseState<'tcx>>(self, s: &S) -> ItemRef {
  type ItemRef (line 496) | pub struct ItemRef {
    method translate (line 514) | pub fn translate<'tcx, S: UnderOwnerState<'tcx>>(
    method translate_maybe_resolve_impl (line 537) | fn translate_maybe_resolve_impl<'tcx, S: UnderOwnerState<'tcx>>(
    method dummy_without_generics (line 626) | pub fn dummy_without_generics<'tcx, S: BaseState<'tcx>>(s: &S, def_id:...
    method trait_associated_types (line 647) | pub fn trait_associated_types<'tcx, S: UnderOwnerState<'tcx>>(&self, s...
    method erase (line 666) | pub fn erase<'tcx, S: UnderOwnerState<'tcx>>(&self, s: &S) -> Self {
    method contents (line 673) | pub fn contents(&self) -> &ItemRefContents {
    method id (line 678) | pub fn id(&self) -> id_table::Id {
    method rustc_args (line 685) | pub fn rustc_args<'tcx, S: BaseState<'tcx>>(&self, s: &S) -> ty::Gener...
    method mutate_def_id (line 691) | pub fn mutate_def_id<'tcx, S: BaseState<'tcx>>(
    method with_def_id (line 708) | pub fn with_def_id<'tcx, S: BaseState<'tcx>>(&self, s: &S, def_id: &De...
    type Target (line 714) | type Target = ItemRefContents;
    method deref (line 715) | fn deref(&self) -> &Self::Target {
  function sinto (line 722) | fn sinto(&self, s: &S) -> GenericArg {
  function sinto (line 729) | fn sinto(&self, s: &S) -> Vec<GenericArg> {
  type LitIntType (line 739) | pub enum LitIntType {
  type InferTy (line 749) | pub enum InferTy {
  type IntTy (line 766) | pub enum IntTy {
  type FloatTy (line 780) | pub enum FloatTy {
  type UintTy (line 792) | pub enum UintTy {
  method to_string (line 802) | fn to_string(&self) -> String {
  method to_string (line 816) | fn to_string(&self) -> String {
  type TypeAndMut (line 834) | pub struct TypeAndMut {
  function sinto (line 841) | fn sinto(&self, s: &S) -> Vec<U> {
  type Variance (line 851) | pub enum Variance {
  type GenericParamDef (line 863) | pub struct GenericParamDef {
  type GenericParamDefKind (line 904) | pub enum GenericParamDefKind {
  type TyGenerics (line 915) | pub struct TyGenerics {
    method count_total_params (line 927) | pub(crate) fn count_total_params(&self) -> usize {
  type Alias (line 936) | pub struct Alias {
    method from (line 967) | fn from<'tcx, S: UnderOwnerState<'tcx>>(
  type AliasKind (line 945) | pub enum AliasKind {
  function sinto (line 1026) | fn sinto(&self, s: &S) -> Box<Ty> {
  type Ty (line 1035) | pub struct Ty {
    method new (line 1041) | pub fn new<'tcx, S: BaseState<'tcx>>(s: &S, kind: TyKind) -> Self {
    method inner (line 1049) | pub fn inner(&self) -> &Arc<TyKind> {
    method kind (line 1053) | pub fn kind(&self) -> &TyKind {
  function sinto (line 1060) | fn sinto(&self, s: &S) -> Ty {
  type TyKind (line 1078) | pub enum TyKind {
  function make_dyn (line 1176) | fn make_dyn<'tcx, S: UnderOwnerState<'tcx>>(
  type CanonicalUserTypeAnnotation (line 1271) | pub struct CanonicalUserTypeAnnotation {
  type AdtKind (line 1280) | pub enum AdtKind {
  function sinto (line 1294) | fn sinto(&self, _s: &S) -> AdtKind {
  type ReprOptions (line 1309) | pub struct ReprOptions {
  type ReprFlags (line 1328) | pub struct ReprFlags {
  type Align (line 1338) | pub struct Align {
  type PointerCoercion (line 1348) | pub enum PointerCoercion {
    method sfrom (line 1368) | pub fn sfrom<'tcx, S: UnderOwnerState<'tcx>>(
  type UnsizingMetadata (line 1360) | pub enum UnsizingMetadata {
  type TyFnSig (line 1427) | pub struct TyFnSig {
  type PolyFnSig (line 1438) | pub type PolyFnSig = Binder<TyFnSig>;
  type TraitRef (line 1445) | pub type TraitRef = ItemRef;
  function sinto (line 1449) | fn sinto(&self, s: &S) -> TraitRef {
  type TraitPredicate (line 1459) | pub struct TraitPredicate {
  type OutlivesPredicate (line 1472) | pub struct OutlivesPredicate<T> {
  function sinto (line 1483) | fn sinto(&self, s: &S) -> OutlivesPredicate<U> where {
  type RegionOutlivesPredicate (line 1492) | pub type RegionOutlivesPredicate = OutlivesPredicate<Region>;
  type TypeOutlivesPredicate (line 1494) | pub type TypeOutlivesPredicate = OutlivesPredicate<Ty>;
  type Term (line 1499) | pub enum Term {
  function sinto (line 1506) | fn sinto(&self, s: &S) -> Term {
  type ProjectionPredicate (line 1525) | pub struct ProjectionPredicate {
  function sinto (line 1538) | fn sinto(&self, s: &S) -> ProjectionPredicate {
  type ClauseKind (line 1559) | pub enum ClauseKind {
  type Clause (line 1576) | pub struct Clause {
  function sinto (line 1583) | fn sinto(&self, s: &S) -> Clause {
  function sinto (line 1592) | fn sinto(&self, s: &S) -> Clause {
  type Predicate (line 1603) | pub struct Predicate {
  function sinto (line 1610) | fn sinto(&self, s: &S) -> Predicate {
  type BoundVariableKind (line 1622) | pub enum BoundVariableKind {
  type Binder (line 1631) | pub struct Binder<T> {
  function as_ref (line 1637) | pub fn as_ref(&self) -> Binder<&T> {
  function hax_skip_binder (line 1644) | pub fn hax_skip_binder(self) -> T {
  function hax_skip_binder_ref (line 1648) | pub fn hax_skip_binder_ref(&self) -> &T {
  function map (line 1652) | pub fn map<U>(self, f: impl FnOnce(T) -> U) -> Binder<U> {
  function inner_mut (line 1659) | pub fn inner_mut(&mut self) -> &mut T {
  function rebind (line 1663) | pub fn rebind<U>(&self, value: U) -> Binder<U> {
  type GenericPredicates (line 1673) | pub struct GenericPredicates {
  function sinto (line 1682) | fn sinto(&self, s: &S) -> GenericPredicates {
  function sinto (line 1694) | fn sinto(&self, s: &S) -> Binder<T2> {
  type SubtypePredicate (line 1709) | pub struct SubtypePredicate {
  type CoercePredicate (line 1720) | pub struct CoercePredicate {
  type AliasRelationDirection (line 1730) | pub enum AliasRelationDirection {
  type ClosureArgs (line 1738) | pub struct ClosureArgs {
    method iter_upvar_borrows (line 1752) | pub fn iter_upvar_borrows(&self) -> impl Iterator<Item = &Ty> {
    method sfrom (line 1770) | pub(crate) fn sfrom<'tcx, S>(
  type ClosureKind (line 1802) | pub enum ClosureKind {
  type PredicateKind (line 1815) | pub enum PredicateKind {
  type AssocItem (line 1829) | pub struct AssocItem {
    method sfrom (line 1842) | pub fn sfrom<'tcx, S: BaseState<'tcx>>(s: &S, item: &ty::AssocItem) ->...
    method sfrom_instantiated (line 1847) | pub fn sfrom_instantiated<'tcx, S: BaseState<'tcx>>(
  type AssocKind (line 1902) | pub enum AssocKind {
  type AssocTypeData (line 1913) | pub enum AssocTypeData {
  type AssocItemContainer (line 1920) | pub enum AssocItemContainer {
  type ImplTraitInTraitData (line 1945) | pub enum ImplTraitInTraitData {

FILE: frontend/exporter/src/utils/error_macros.rs
  type SExpect (line 103) | pub trait SExpect: Sized {
    method s_expect (line 105) | fn s_expect<'tcx, S: crate::BaseState<'tcx>>(self, s: &S, message: &st...
    method s_unwrap (line 107) | fn s_unwrap<'tcx, S: crate::BaseState<'tcx>>(self, s: &S) -> Self::Out...
    type Output (line 137) | type Output = T;
    method s_expect (line 138) | fn s_expect<'tcx, S: crate::BaseState<'tcx>>(self, s: &S, message: &st...
    type Output (line 144) | type Output = T;
    method s_expect (line 145) | fn s_expect<'tcx, S: crate::BaseState<'tcx>>(self, s: &S, message: &st...
  type Dummy (line 114) | struct Dummy;
    method fmt (line 116) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
  function s_expect_error (line 121) | fn s_expect_error<'tcx>(

FILE: frontend/exporter/src/utils/type_map.rs
  type TypeMapper (line 10) | pub trait TypeMapper {
  type TypeMap (line 16) | pub struct TypeMap<M> {
  function get (line 22) | pub fn get<T: TypeMappable>(&self) -> Option<&M::Value<T>> {
  function get_mut (line 30) | pub fn get_mut<T: TypeMappable>(&mut self) -> Option<&mut M::Value<T>> {
  function or_default (line 37) | pub fn or_default<T: TypeMappable>(&mut self) -> &mut M::Value<T>
  function insert (line 47) | pub fn insert<T: TypeMappable>(&mut self, val: M::Value<T>) -> Option<Bo...
  method default (line 55) | fn default() -> Self {

FILE: hax-bounded-integers/src/lib.rs
  constant _ (line 351) | const _: () = {
  function tests (line 369) | fn tests() {

FILE: hax-bounded-integers/src/num_traits.rs
  type Zero (line 17) | pub trait Zero: Sized {
    method zero (line 18) | fn zero() -> Self;
  type One (line 21) | pub trait One: Sized {
    method one (line 22) | fn one() -> Self;
  type NumOps (line 25) | pub trait NumOps<Rhs = Self, Output = Self>:
  type WrappingAdd (line 39) | pub trait WrappingAdd<Rhs = Self> {
    method wrapping_add (line 41) | fn wrapping_add(self, v: Rhs) -> Self::Output;
  type WrappingSub (line 44) | pub trait WrappingSub<Rhs = Self> {
    method wrapping_sub (line 46) | fn wrapping_sub(self, v: Rhs) -> Self::Output;
  type WrappingMul (line 49) | pub trait WrappingMul<Rhs = Self> {
    method wrapping_mul (line 51) | fn wrapping_mul(self, v: Rhs) -> Self::Output;
  type WrappingDiv (line 54) | pub trait WrappingDiv<Rhs = Self> {
    method wrapping_div (line 56) | fn wrapping_div(self, v: Rhs) -> Self::Output;
  type CheckedAdd (line 59) | pub trait CheckedAdd<Rhs = Self> {
    method checked_add (line 61) | fn checked_add(self, v: Rhs) -> Option<Self::Output>;
  type CheckedSub (line 64) | pub trait CheckedSub<Rhs = Self> {
    method checked_sub (line 66) | fn checked_sub(self, v: Rhs) -> Option<Self::Output>;
  type CheckedMul (line 69) | pub trait CheckedMul<Rhs = Self> {
    method checked_mul (line 71) | fn checked_mul(self, v: Rhs) -> Option<Self::Output>;
  type CheckedDiv (line 74) | pub trait CheckedDiv<Rhs = Self> {
    method checked_div (line 76) | fn checked_div(self, v: Rhs) -> Option<Self::Output>;
  type CheckedNeg (line 79) | pub trait CheckedNeg {
    method checked_neg (line 81) | fn checked_neg(&self) -> Option<Self::Output>;
  type FromBytes (line 84) | pub trait FromBytes {
    method from_le_bytes (line 87) | fn from_le_bytes(bytes: Self::BYTES) -> Self;
    method from_be_bytes (line 88) | fn from_be_bytes(bytes: Self::BYTES) -> Self;
  type ToBytes (line 91) | pub trait ToBytes: FromBytes {
    method to_le_bytes (line 92) | fn to_le_bytes(self) -> Self::BYTES;
    method to_be_bytes (line 93) | fn to_be_bytes(self) -> Self::BYTES;
  type MachineInt (line 96) | pub trait MachineInt<Output>:
  type BitOps (line 124) | pub trait BitOps {
    method count_ones (line 127) | fn count_ones(self) -> u32;
    method count_zeros (line 128) | fn count_zeros(self) -> u32;
    method leading_ones (line 129) | fn leading_ones(self) -> u32;
    method leading_zeros (line 130) | fn leading_zeros(self) -> u32;
    method trailing_ones (line 131) | fn trailing_ones(self) -> u32;
    method trailing_zeros (line 132) | fn trailing_zeros(self) -> u32;
    method rotate_left (line 133) | fn rotate_left(self, n: u32) -> Self::Output;
    method rotate_right (line 134) | fn rotate_right(self, n: u32) -> Self::Output;
    method from_be (line 135) | fn from_be(x: Self) -> Self::Output;
    method from_le (line 136) | fn from_le(x: Self) -> Self::Output;
    method to_be (line 137) | fn to_be(self) -> Self::Output;
    method to_le (line 138) | fn to_le(self) -> Self::Output;
    method pow (line 140) | fn pow(self, exp: u32) -> Self::Output;

FILE: hax-lib-protocol-macros/src/lib.rs
  function init (line 45) | pub fn init(
  function init_empty (line 110) | pub fn init_empty(
  type Transition (line 139) | struct Transition {
    method parse (line 149) | fn parse(input: parse::ParseStream) -> syn::Result<Self> {
  function write (line 201) | pub fn write(
  function read (line 272) | pub fn read(

FILE: hax-lib-protocol/src/crypto.rs
  type DHScalar (line 8) | pub struct DHScalar(Vec<u8>);
    method from_bytes (line 13) | pub fn from_bytes(bytes: &[u8]) -> Self {
  type DHElement (line 19) | pub struct DHElement(Vec<u8>);
    method from_bytes (line 24) | pub fn from_bytes(bytes: &[u8]) -> Self {
  type DHGroup (line 30) | pub enum DHGroup {
  function from (line 40) | fn from(value: DHGroup) -> Self {
  function dh_scalar_multiply (line 52) | pub fn dh_scalar_multiply(group: DHGroup, scalar: DHScalar, element: DHE...
  function dh_scalar_multiply_base (line 57) | pub fn dh_scalar_multiply_base(group: DHGroup, scalar: DHScalar) -> Vec<...
  type AEADKey (line 62) | pub struct AEADKey(libcrux::aead::Key);
    method from_bytes (line 85) | pub fn from_bytes(algorithm: AEADAlgorithm, bytes: &[u8]) -> Self {
  type AEADAlgorithm (line 65) | pub enum AEADAlgorithm {
  function from (line 73) | fn from(value: AEADAlgorithm) -> Self {
  type AEADIV (line 91) | pub struct AEADIV(libcrux::aead::Iv);
    method from_bytes (line 96) | pub fn from_bytes(bytes: &[u8]) -> Self {
  type AEADTag (line 102) | pub struct AEADTag(libcrux::aead::Tag);
    method from_bytes (line 106) | pub fn from_bytes(bytes: &[u8]) -> Self {
  function aead_encrypt (line 114) | pub fn aead_encrypt(key: AEADKey, iv: AEADIV, aad: &[u8], plain: &[u8]) ...
  function aead_decrypt (line 121) | pub fn aead_decrypt(
  type HashAlgorithm (line 133) | pub enum HashAlgorithm {
  function from (line 149) | fn from(value: HashAlgorithm) -> Self {
  function hash (line 167) | pub fn hash(algorithm: HashAlgorithm, input: &[u8]) -> Vec<u8> {
  type HMACAlgorithm (line 172) | pub enum HMACAlgorithm {
  function from (line 181) | fn from(value: HMACAlgorithm) -> Self {
  function hmac (line 192) | pub fn hmac(algorithm: HMACAlgorithm, key: &[u8], input: &[u8]) -> Vec<u...

FILE: hax-lib-protocol/src/lib.rs
  type ProtocolError (line 13) | pub enum ProtocolError {
  type ProtocolResult (line 23) | pub type ProtocolResult<T> = Result<T, ProtocolError>;

FILE: hax-lib-protocol/src/state_machine.rs
  type InitialState (line 12) | pub trait InitialState {
    method init (line 16) | fn init(prologue: Option<Vec<u8>>) -> ProtocolResult<Self>
  type WriteState (line 26) | pub trait WriteState {
    method write (line 32) | fn write(self) -> ProtocolResult<(Self::NextState, Self::Message)>;
  type ReadState (line 40) | pub trait ReadState<NextState> {
    method read (line 46) | fn read(self, msg: Self::Message) -> ProtocolResult<NextState>;

FILE: hax-lib/build.rs
  constant FSTAR_EXTRA (line 5) | const FSTAR_EXTRA: &str = r"
  constant LEAN_EXTRA (line 12) | const LEAN_EXTRA: &str = r"
  function main (line 22) | fn main() {

FILE: hax-lib/core-models/alloc/src/lib.rs
  type Global (line 2) | pub struct Global;
  type Cow (line 6) | struct Cow<T>(T);
  type ToOwned (line 8) | pub trait ToOwned {
    method to_owned (line 9) | fn to_owned(self) -> Self;
    method to_owned (line 12) | fn to_owned(self) -> Self {
  type Box (line 19) | pub struct Box<T>(pub T);
  function new (line 22) | fn new(v: T) -> T {
  type BinaryHeap (line 34) | struct BinaryHeap<T, A>(Vec<T, A>);
  function new (line 49) | fn new() -> BinaryHeap<T, A> {
  function push (line 56) | fn push(&mut self, v: T) {
  function pop (line 60) | fn pop(&mut self) -> Option<T> {
  function len (line 80) | fn len(&self) -> usize {
  function peek (line 85) | fn peek(&self) -> Option<&T> {
  type BTreeSet (line 107) | struct BTreeSet<T, U>(Option<T>, Option<U>);
  function new (line 122) | fn new() -> BTreeSet<T, U> {
  type VecDeque (line 130) | pub struct VecDeque<T, A>(pub Seq<T>, std::marker::PhantomData<A>);
  function push_back (line 140) | fn push_back(&mut self, x: T) {}
  function len (line 141) | fn len(&self) -> usize {
  function pop_front (line 144) | fn pop_front(&mut self) -> Option<T> {
  type Output (line 154) | type Output = T;
  function index (line 155) | fn index(&self, i: usize) -> &T {
  function format (line 164) | fn format(args: core::fmt::Arguments) -> String {
  type Dummy (line 171) | struct Dummy<T>(T);
  function to_vec (line 177) | fn to_vec(s: &[T]) -> Vec<T, crate::alloc::Global> {
  function into_vec (line 183) | fn into_vec<A>(s: Box<&[T]>) -> Vec<T, A> {
  function sort_by (line 187) | fn sort_by<F: Fn(&T, &T) -> core::cmp::Ordering>(s: &mut [T], compare: F...
  type String (line 194) | struct String(&'static str);
    method new (line 196) | fn new() -> Self {
    method push_str (line 199) | fn push_str(&mut self, other: &'static str) {
    method push (line 202) | fn push(&mut self, c: char) {
    method pop (line 205) | fn pop(&mut self) -> Option<char> {
  type Vec (line 222) | pub struct Vec<T, A>(pub Seq<T>, pub std::marker::PhantomData<A>);
  function from_elem (line 224) | fn from_elem<T: Clone>(item: T, len: usize) -> Vec<T, crate::alloc::Glob...
  function new (line 233) | pub fn new() -> Vec<T, crate::alloc::Global> {
  function with_capacity (line 239) | pub fn with_capacity(_c: usize) -> Vec<T, crate::alloc::Global> {
  function len (line 246) | pub fn len(&self) -> usize {
  function push (line 250) | pub fn push(&mut self, x: T) {
  function pop (line 253) | pub fn pop(&mut self) -> Option<T> {
  function is_empty (line 262) | pub fn is_empty(&self) -> bool {
  function insert (line 266) | pub fn insert(&mut self, index: usize, element: T) {
  function as_slice (line 273) | pub fn as_slice(&self) -> &[T] {
  function truncate (line 277) | pub fn truncate(&mut self, n: usize) {}
  function swap_remove (line 279) | pub fn swap_remove(&mut self, n: usize) -> T {
  function resize (line 284) | pub fn resize(&mut self, new_size: usize, value: &T) {}
  function remove (line 286) | pub fn remove(&mut self, index: usize) -> T {
  function clear (line 290) | pub fn clear(&mut self) {}
  function append (line 292) | pub fn append(&mut self, other: &mut Vec<T, A>) {
  function drain (line 297) | pub fn drain<R /* : RangeBounds<usize> */>(&mut self, _range: R) -> drai...
  type Drain (line 306) | pub struct Drain<T, A>(pub Seq<T>, pub std::marker::PhantomData<A>);
  type Item (line 308) | type Item = T;
  method next (line 309) | fn next(&mut self) -> Option<Self::Item> {
  function extend_from_slice (line 324) | fn extend_from_slice(s: &mut Vec<T, A>, other: &[T]) {
  type Output (line 331) | type Output = T;
  function index (line 333) | fn index(&self, i: usize) -> &T {
  type Target (line 340) | type Target = [T];
  function deref (line 342) | fn deref(&self) -> &[T] {
  function from_iter (line 350) | fn from_iter<I>(iter: I) -> Self

FILE: hax-lib/core-models/rand_core/src/lib.rs
  type RngCore (line 1) | pub trait RngCore {
    method next_u32 (line 3) | fn next_u32(&mut self) -> u32;
    method next_u64 (line 4) | fn next_u64(&mut self) -> u64;
    method fill_bytes (line 5) | fn fill_bytes(&mut self, dst: &mut [u8]);
  type CryptoRng (line 8) | pub trait CryptoRng: RngCore {}
  type OsRng (line 11) | pub struct OsRng;
    method next_u32 (line 14) | fn next_u32(&mut self) -> u32 {
    method next_u64 (line 17) | fn next_u64(&mut self) -> u64 {
    method fill_bytes (line 20) | fn fill_bytes(&mut self, dst: &mut [u8]) {}

FILE: hax-lib/core-models/rust_primitives/src/lib.rs
  function slice_length (line 4) | pub fn slice_length<T>(s: &[T]) -> usize {
  function slice_split_at (line 8) | pub fn slice_split_at<T>(s: &[T], mid: usize) -> (&[T], &[T]) {
  function slice_contains (line 11) | pub fn slice_contains<T>(s: &[T], v: T) -> bool {
  function slice_index (line 15) | pub fn slice_index<T>(s: &[T], i: usize) -> &T {
  function slice_slice (line 18) | pub fn slice_slice<T>(s: &[T], b: usize, e: usize) -> &[T] {
  function array_from_fn (line 25) | pub fn array_from_fn<T, const N: usize, F>(f: F) -> [T; N] {
  function array_map (line 28) | pub fn array_map<T, U, const N: usize, F>(s: [T; N], f: F) -> [U; N] {
  function array_as_slice (line 31) | pub fn array_as_slice<T, const N: usize>(s: &[T; N]) -> &[T] {
  function array_slice (line 34) | pub fn array_slice<T, const N: usize>(a: &[T; N], b: usize, e: usize) ->...
  function array_index (line 37) | pub fn array_index<T, const N: usize>(a: &[T; N], i: usize) -> &T {
  type Seq (line 43) | pub struct Seq<T>(Option<T>);
  function seq_empty (line 44) | pub fn seq_empty<T>() -> Seq<T> {
  function seq_from_slice (line 47) | pub fn seq_from_slice<T>(_s: &[T]) -> Seq<T> {
  function seq_from_array (line 50) | pub fn seq_from_array<T, const N: usize>(_s: [T; N]) -> Seq<T> {
  function seq_to_slice (line 53) | pub fn seq_to_slice<T>(_s: &Seq<T>) -> &[T] {
  function seq_concat (line 56) | pub fn seq_concat<T>(s1: &mut Seq<T>, s2: &Seq<T>) {
  function seq_one (line 59) | pub fn seq_one<T>(x: T) -> Seq<T> {
  function seq_create (line 62) | pub fn seq_create<T>(x: T, n: usize) -> Seq<T> {
  function seq_len (line 65) | pub fn seq_len<T>(s: &Seq<T>) -> usize {
  function seq_slice (line 68) | pub fn seq_slice<T>(s: &Seq<T>, b: usize, e: usize) -> Seq<T> {
  function seq_last (line 71) | pub fn seq_last<T>(s: &Seq<T>) -> T {
  function seq_first (line 74) | pub fn seq_first<T>(s: &Seq<T>) -> T {
  function seq_index (line 77) | pub fn seq_index<T>(s: &Seq<T>, i: usize) -> &T {
  function str_concat (line 83) | pub fn str_concat(s1: &'static str, s2: &'static str) -> &'static str {
  function str_of_char (line 86) | pub fn str_of_char(c: char) -> &'static str {
  function str_sub (line 89) | pub fn str_sub(s: &'static str, b: usize, e: usize) -> &'static str {
  function str_index (line 92) | pub fn str_index(s: &'static str, i: usize) -> char {
  function replace (line 98) | pub fn replace<'a, T: ?Sized>(dest: &'a mut T, src: &'a T) -> &'a T {
  function copy (line 101) | pub fn copy<T>(x: &T) -> T {
  constant SIZE_BYTES (line 191) | pub const SIZE_BYTES: usize = 8;
  constant SIZE_BITS (line 192) | pub const SIZE_BITS: u32 = 64;
  constant USIZE_MAX (line 193) | pub const USIZE_MAX: usize = u64::MAX as usize;
  constant ISIZE_MAX (line 194) | pub const ISIZE_MAX: isize = i64::MAX as isize;
  constant ISIZE_MIN (line 195) | pub const ISIZE_MIN: isize = i64::MIN as isize;

FILE: hax-lib/core-models/src/core/array.rs
  type TryFromSliceError (line 3) | pub struct TryFromSliceError;
  type Dummy (line 7) | struct Dummy<T, const N: usize>([T; N]);
  function map (line 35) | pub fn map<F: crate::ops::function::FnOnce<T, Output = U>, U>(
  function as_slice (line 41) | pub fn as_slice(s: &[T; N]) -> &[T] {
  function from_fn (line 46) | pub fn from_fn<T, const N: usize, F: crate::ops::function::FnOnce<usize,...
  type IntoIter (line 54) | type IntoIter = iter::IntoIter<T, N>;
  function into_iter (line 55) | fn into_iter(self) -> iter::IntoIter<T, N> {
  type Output (line 68) | type Output = T;
  function index (line 70) | fn index(&self, i: usize) -> &T {
  type Output (line 78) | type Output = [T];
  function index (line 80) | fn index(&self, i: Range<usize>) -> &[T] {
  type Output (line 87) | type Output = [T];
  function index (line 89) | fn index(&self, i: RangeTo<usize>) -> &[T] {
  type Output (line 96) | type Output = [T];
  function index (line 98) | fn index(&self, i: RangeFrom<usize>) -> &[T] {
  type Output (line 105) | type Output = [T];
  function index (line 106) | fn index(&self, i: RangeFull) -> &[T] {
  type IntoIter (line 114) | pub struct IntoIter<T, const N: usize>(pub Seq<T>);
  type Item (line 117) | type Item = T;
  function next (line 118) | fn next(&mut self) -> Option<T> {

FILE: hax-lib/core-models/src/core/borrow.rs
  type Borrow (line 1) | trait Borrow<Borrowed> {
    method borrow (line 2) | fn borrow(&self) -> Borrowed;

FILE: hax-lib/core-models/src/core/clone.rs
  type Clone (line 12) | pub trait Clone {
    method clone (line 13) | fn clone(self) -> Self;
    method clone (line 18) | fn clone(self) -> Self {

FILE: hax-lib/core-models/src/core/cmp.rs
  type PartialEq (line 4) | pub trait PartialEq<Rhs>
    method eq (line 9) | fn eq(&self, other: &Rhs) -> bool;
  type Eq (line 12) | pub trait Eq: PartialEq<Self> {}
  type Ordering (line 14) | pub enum Ordering {
  type PartialOrd (line 21) | pub trait PartialOrd<Rhs>: PartialEq<Rhs>
    method partial_cmp (line 26) | fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
  type Neq (line 32) | trait Neq<Rhs> {
    method neq (line 34) | fn neq(&self, y: &Rhs) -> bool;
  method neq (line 38) | fn neq(&self, y: &T) -> bool {
  type PartialOrdDefaults (line 45) | trait PartialOrdDefaults<Rhs> {
    method lt (line 47) | fn lt(&self, y: &Rhs) -> bool
    method le (line 51) | fn le(&self, y: &Rhs) -> bool
    method gt (line 55) | fn gt(&self, y: &Rhs) -> bool
    method ge (line 59) | fn ge(&self, y: &Rhs) -> bool
  method lt (line 65) | fn lt(&self, y: &T) -> bool
  method le (line 71) | fn le(&self, y: &T) -> bool
  method gt (line 80) | fn gt(&self, y: &T) -> bool
  method ge (line 86) | fn ge(&self, y: &T) -> bool
  type Ord (line 98) | pub trait Ord: Eq + PartialOrd<Self> {
    method cmp (line 100) | fn cmp(&self, other: &Self) -> Ordering;
    method cmp (line 134) | fn cmp(&self, other: &Reverse<T>) -> Ordering {
  function max (line 103) | pub fn max<T: Ord>(v1: T, v2: T) -> T {
  function min (line 110) | pub fn min<T: Ord>(v1: T, v2: T) -> T {
  type Reverse (line 117) | pub struct Reverse<T>(pub T);
  function partial_cmp (line 120) | fn partial_cmp(&self, other: &Reverse<T>) -> Option<Ordering> {
  function eq (line 126) | fn eq(&self, other: &Reverse<T>) -> bool {

FILE: hax-lib/core-models/src/core/convert.rs
  type TryInto (line 4) | trait TryInto<T> {
    method try_into (line 7) | fn try_into(self) -> Result<T, Self::Error>;
  type Into (line 11) | trait Into<T> {
    method into (line 13) | fn into(self) -> T;
  type From (line 17) | trait From<T> {
    method from (line 19) | fn from(x: T) -> Self;
  type TryFrom (line 23) | trait TryFrom<T>: Sized {
    method try_from (line 26) | fn try_from(x: T) -> Result<Self, Self::Error>;
  method into (line 30) | fn into(self) -> U {
  type Infallible (line 35) | pub struct Infallible;
  type Error (line 38) | type Error = Infallible;
  method try_from (line 39) | fn try_from(x: T) -> Result<Self, Self::Error> {
  type Error (line 47) | type Error = TryFromSliceError;
  function try_from (line 48) | fn try_from(x: &[T]) -> Result<[T; N], TryFromSliceError> {
  type Error (line 60) | type Error = U::Error;
  method try_into (line 61) | fn try_into(self) -> Result<U, Self::Error> {
  method from (line 67) | fn from(x: T) -> Self {
  type AsRef (line 73) | trait AsRef<T> {
    method as_ref (line 75) | fn as_ref(self) -> T;
  method as_ref (line 79) | fn as_ref(self) -> T {

FILE: hax-lib/core-models/src/core/default.rs
  type Default (line 2) | pub trait Default {
    method default (line 4) | fn default() -> Self;

FILE: hax-lib/core-models/src/core/error.rs
  type Error (line 3) | pub trait Error: Display + Debug {}

FILE: hax-lib/core-models/src/core/f32.rs
  type f32 (line 3) | struct f32;
  function abs (line 7) | fn abs(x: f64) -> f64 {

FILE: hax-lib/core-models/src/core/fmt.rs
  type Error (line 3) | pub struct Error;
  type Result (line 5) | pub type Result = super::result::Result<(), Error>;
  type Formatter (line 7) | pub struct Formatter;
  type Display (line 9) | pub trait Display {
    method fmt (line 10) | fn fmt(&self, f: &mut Formatter) -> Result;
  type Debug (line 13) | pub trait Debug {
    method dbg_fmt (line 14) | fn dbg_fmt(&self, f: &mut Formatter) -> Result;
    method dbg_fmt (line 20) | fn dbg_fmt(&self, f: &mut Formatter) -> Result {
  type Arguments (line 17) | pub struct Arguments<'a>(&'a ());
  function write_fmt (line 36) | fn write_fmt(f: &mut Formatter, args: Arguments) -> Result {
  type ArgumentType (line 44) | enum ArgumentType<'a> {
  type Argument (line 53) | pub struct Argument<'a> {
  function new_display (line 59) | fn new_display<T>(x: &T) -> Self {
  function new_debug (line 63) | fn new_debug<T>(x: &T) -> Self {
  function new_lower_hex (line 67) | fn new_lower_hex<T>(x: &T) -> Self {
  function new_binary (line 73) | fn new_binary<T>(x: &T) -> Self {
  function new_const (line 77) | fn new_const<T, U>(x: &T, y: &U) -> super::Arguments<'a> {
  function new_v1 (line 81) | fn new_v1<T, U, V, W>(x: &T, y: &U, z: &V, t: &W) -> super::Arguments<'a> {
  function none (line 84) | fn none() -> [Self; 0] {
  function new_v1_formatted (line 88) | fn new_v1_formatted<T, U, V>(x: &T, y: &U, z: &V) -> super::Arguments<'a> {
  type Count (line 93) | enum Count {
  type Placeholder (line 99) | struct Placeholder {
  type UnsafeArg (line 106) | struct UnsafeArg;

FILE: hax-lib/core-models/src/core/hash.rs
  type Hasher (line 1) | pub trait Hasher {}
  type Hash (line 4) | pub trait Hash {
    method hash (line 6) | fn hash<H: Hasher>(&self, h: H) -> H;
    method hash (line 11) | fn hash<H: Hasher>(&self, h: H) -> H {

FILE: hax-lib/core-models/src/core/hint.rs
  function black_box (line 2) | pub fn black_box<T>(dummy: T) -> T {
  function must_use (line 7) | pub fn must_use<T>(value: T) -> T {

FILE: hax-lib/core-models/src/core/iter.rs
  type Iterator (line 15) | pub trait Iterator {
    method next (line 18) | fn next(&mut self) -> Option<Self::Item>;
    type Item (line 143) | type Item = (usize, <I as Iterator>::Item);
    method next (line 145) | fn next(&mut self) -> Option<(usize, <I as Iterator>::Item)> {
    type Item (line 175) | type Item = <I as Iterator>::Item;
    method next (line 177) | fn next(&mut self) -> Option<<I as Iterator>::Item> {
    type Item (line 201) | type Item = O;
    method next (line 203) | fn next(&mut self) -> Option<O> {
    type Item (line 224) | type Item = <I as Iterator>::Item;
    method next (line 226) | fn next(&mut self) -> Option<<I as Iterator>::Item> {
    type Item (line 256) | type Item = U::Item;
    method next (line 257) | fn next(&mut self) -> Option<U::Item> {
    type Item (line 300) | type Item = <<I as Iterator>::Item as Iterator>::Item;
    method next (line 301) | fn next(&mut self) -> Option<<<I as Iterator>::Item as Iterator>::Item> {
    type Item (line 331) | type Item = (I1::Item, I2::Item);
    method next (line 332) | fn next(&mut self) -> Option<Self::Item> {
  type IteratorMethods (line 22) | trait IteratorMethods: Iterator {
    method fold (line 23) | fn fold<B, F: FnOnce<(B, Self::Item), Output = B>>(self, init: B, f: F...
    method enumerate (line 24) | fn enumerate(self) -> Enumerate<Self>
    method step_by (line 27) | fn step_by(self, step: usize) -> StepBy<Self>
    method map (line 30) | fn map<O, F: FnOnce<Self::Item, Output = O>>(self, f: F) -> Map<Self, F>
    method all (line 33) | fn all<F: FnOnce<Self::Item, Output = bool>>(self, f: F) -> bool;
    method take (line 34) | fn take(self, n: usize) -> Take<Self>
    method flat_map (line 37) | fn flat_map<U: Iterator, F: FnOnce<Self::Item, Output = U>>(
    method flatten (line 43) | fn flatten(self) -> Flatten<Self>
    method zip (line 47) | fn zip<I2: Iterator>(self, it2: I2) -> Zip<Self, I2>
    method fold (line 53) | fn fold<B, F: FnOnce<(B, I::Item), Output = B>>(mut self, init: B, f: ...
    method enumerate (line 61) | fn enumerate(self) -> Enumerate<I> {
    method step_by (line 65) | fn step_by(self, step: usize) -> StepBy<I> {
    method map (line 69) | fn map<O, F: FnOnce<I::Item, Output = O>>(self, f: F) -> Map<I, F> {
    method all (line 73) | fn all<F: FnOnce<I::Item, Output = bool>>(mut self, f: F) -> bool {
    method take (line 82) | fn take(self, n: usize) -> Take<I> {
    method flat_map (line 86) | fn flat_map<U: Iterator, F: FnOnce<I::Item, Output = U>>(
    method flatten (line 93) | fn flatten(self) -> Flatten<I>
    method zip (line 100) | fn zip<I2: Iterator>(self, it2: I2) -> Zip<Self, I2> {
  type IntoIter (line 106) | type IntoIter = Self;
  method into_iter (line 107) | fn into_iter(self) -> Self {
  type IntoIterator (line 115) | pub trait IntoIterator {
    method into_iter (line 119) | fn into_iter(self) -> Self::IntoIter;
  type FromIterator (line 122) | pub trait FromIterator<A>: Sized {
    method from_iter (line 124) | fn from_iter<T: IntoIterator>(iter: T) -> Self;
  type Enumerate (line 133) | pub struct Enumerate<I> {
  function new (line 138) | pub fn new(iter: I) -> Enumerate<I> {
  type StepBy (line 163) | pub struct StepBy<I> {
  function new (line 168) | pub fn new(iter: I, step: usize) -> Self {
  type Map (line 188) | pub struct Map<I, F> {
  function new (line 193) | pub fn new(iter: I, f: F) -> Self {
  type Take (line 214) | pub struct Take<I> {
  function new (line 219) | pub fn new(iter: I, n: usize) -> Take<I> {
  type FlatMap (line 239) | pub struct FlatMap<I, U, F> {
  function new (line 245) | pub fn new(it: I, f: F) -> Self {
  type Flatten (line 277) | pub struct Flatten<I: Iterator>
  function new (line 288) | pub fn new(it: I) -> Self {
  type Zip (line 320) | pub struct Zip<I1, I2> {
  function new (line 325) | pub fn new(it1: I1, it2: I2) -> Self {

FILE: hax-lib/core-models/src/core/marker.rs
  type Copy (line 3) | pub trait Copy: Clone {}
  type Send (line 4) | pub trait Send {}
  type Sync (line 5) | pub trait Sync {}
  type Sized (line 6) | pub trait Sized {}
  type StructuralPartialEq (line 7) | pub trait StructuralPartialEq {}
  type PhantomData (line 17) | struct PhantomData<T>(T);

FILE: hax-lib/core-models/src/core/mem.rs
  function forget (line 6) | pub fn forget<T>(t: T) {
  function forget_unsized (line 11) | pub fn forget_unsized<T>(t: T) {
  function size_of (line 16) | pub fn size_of<T>() -> usize {
  function size_of_val (line 21) | pub fn size_of_val<T: ?Sized>(val: &T) -> usize {
  function min_align_of (line 26) | pub fn min_align_of<T>() -> usize {
  function min_align_of_val (line 31) | pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
  function align_of (line 36) | pub fn align_of<T>() -> usize {
  function align_of_val (line 41) | pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
  function align_of_val_raw (line 46) | pub unsafe fn align_of_val_raw<T>(val: T) -> usize {
  function needs_drop (line 51) | pub fn needs_drop<T: ?Sized>() -> bool {
  function uninitialized (line 56) | pub unsafe fn uninitialized<T>() -> T {
  function swap (line 61) | pub fn swap<T>(x: &mut T, y: &mut T) {
  function replace (line 66) | pub fn replace<T>(dest: &mut T, src: T) -> T {
  function drop (line 71) | pub fn drop<T>(_x: T) {}
  function copy (line 73) | pub fn copy<T: Copy>(x: &T) -> T {
  function take (line 78) | pub unsafe fn take<T>(x: &mut T) -> T {
  function transmute_copy (line 83) | pub unsafe fn transmute_copy<Src, Dst>(src: &Src) -> Dst {
  function variant_count (line 88) | pub fn variant_count<T>() -> usize {
  function zeroed (line 93) | pub unsafe fn zeroed<T>() -> T {
  function transmute (line 98) | pub unsafe fn transmute<Src, Dst>(src: Src) -> Dst {
  type ManuallyDrop (line 103) | pub struct ManuallyDrop<T: ?Sized> {

FILE: hax-lib/core-models/src/core/num/error.rs
  type TryFromIntError (line 4) | pub struct TryFromIntError(pub(crate) ());
  type ParseIntError (line 6) | pub struct ParseIntError {
  type IntErrorKind (line 20) | pub struct IntErrorKind;

FILE: hax-lib/core-models/src/core/num/mod.rs
  type u8 (line 261) | pub struct u8;
  type u16 (line 263) | pub struct u16;
  type u32 (line 265) | pub struct u32;
  type u64 (line 267) | pub struct u64;
  type u128 (line 269) | pub struct u128;
  type usize (line 271) | pub struct usize;
  type i8 (line 273) | pub struct i8;
  type i16 (line 275) | pub struct i16;
  type i32 (line 277) | pub struct i32;
  type i64 (line 279) | pub struct i64;
  type i128 (line 281) | pub struct i128;
  type isize (line 283) | pub struct isize;

FILE: hax-lib/core-models/src/core/ops.rs
  type Add (line 2) | pub trait Add<Rhs = Self> {
    method add (line 4) | fn add(self, rhs: Rhs) -> Self::Output;
  type Sub (line 6) | pub trait Sub<Rhs = Self> {
    method sub (line 8) | fn sub(self, rhs: Rhs) -> Self::Output;
  type Mul (line 10) | pub trait Mul<Rhs = Self> {
    method mul (line 12) | fn mul(self, rhs: Rhs) -> Self::Output;
  type Div (line 14) | pub trait Div<Rhs = Self> {
    method div (line 16) | fn div(self, rhs: Rhs) -> Self::Output;
  type Neg (line 18) | pub trait Neg {
    method neg (line 20) | fn neg(self) -> Self::Output;
  type Rem (line 22) | pub trait Rem<Rhs = Self> {
    method rem (line 24) | fn rem(self, rhs: Rhs) -> Self::Output;
  type AddAssign (line 26) | pub trait AddAssign<Rhs = Self> {
    method add_assign (line 27) | fn add_assign(&mut self, rhs: Rhs);
  type SubAssign (line 29) | pub trait SubAssign<Rhs = Self> {
    method sub_assign (line 30) | fn sub_assign(&mut self, rhs: Rhs);
  type MulAssign (line 32) | pub trait MulAssign<Rhs = Self> {
    method mul_assign (line 33) | fn mul_assign(&mut self, rhs: Rhs);
  type DivAssign (line 35) | pub trait DivAssign<Rhs = Self> {
    method div_assign (line 36) | fn div_assign(&mut self, rhs: Rhs);
  type RemAssign (line 38) | pub trait RemAssign<Rhs = Self> {
    method rem_assign (line 39) | fn rem_assign(&mut self, rhs: Rhs);
  type Shr (line 69) | trait Shr<Rhs = Self> {
    method shr (line 71) | fn shr(self, rhs: Rhs) -> Self::Output;
  type Shl (line 73) | trait Shl<Rhs = Self> {
    method shl (line 75) | fn shl(self, rhs: Rhs) -> Self::Output;
  type BitXor (line 77) | trait BitXor<Rhs = Self> {
    method bitxor (line 79) | fn bitxor(self, rhs: Rhs) -> Self::Output;
  type BitAnd (line 81) | trait BitAnd<Rhs = Self> {
    method bitand (line 83) | fn bitand(self, rhs: Rhs) -> Self::Output;
  type BitOr (line 85) | trait BitOr<Rhs = Self> {
    method bitor (line 87) | fn bitor(self, rhs: Rhs) -> Self::Output;
  type ControlFlow (line 92) | pub enum ControlFlow<B, C> {
  type Index (line 99) | pub trait Index<Idx> {
    method index (line 101) | fn index(&self, i: Idx) -> &Self::Output;
  type FnOnce (line 107) | pub trait FnOnce<Args> {
    method call_once (line 110) | fn call_once(&self, args: Args) -> Self::Output;
  type Fn (line 113) | pub trait Fn<Args>: FnOnce<Args> {
    method call (line 115) | fn call(&self, args: Args) -> Self::Output;
  type Output (line 130) | type Output = Out;
  function call_once (line 131) | fn call_once(&self, arg: Arg) -> Out {
  type Output (line 136) | type Output = Out;
  function call_once (line 137) | fn call_once(&self, arg: (Arg1, Arg2)) -> Out {
  type Output (line 142) | type Output = Out;
  function call_once (line 143) | fn call_once(&self, arg: (Arg1, Arg2, Arg3)) -> Out {
  type FromResidual (line 150) | trait FromResidual<R> {
    method from_residual (line 151) | fn from_residual(x: R) -> Self;
  type Try (line 154) | trait Try {
    method from_output (line 157) | fn from_output(x: Self::Output) -> Self;
    method branch (line 158) | fn branch(&self) -> super::control_flow::ControlFlow<Self::Residual, S...
  type Deref (line 163) | pub trait Deref {
    method deref (line 166) | fn deref(&self) -> &Self::Target;
    type Target (line 170) | type Target = T;
    method deref (line 171) | fn deref(&self) -> &T {
  type Drop (line 178) | trait Drop {
    method drop (line 179) | fn drop(&mut self);
  type RangeTo (line 184) | pub struct RangeTo<T> {
  type RangeFrom (line 187) | pub struct RangeFrom<T> {
  type Range (line 190) | pub struct Range<T> {
  type RangeFull (line 194) | pub struct RangeFull;

FILE: hax-lib/core-models/src/core/option.rs
  type Option (line 1) | pub enum Option<T> {
  function is_some (line 15) | pub fn is_some(&self) -> bool {
  function is_some_and (line 19) | pub fn is_some_and<F: FnOnce<T, Output = bool>>(self, f: F) -> bool {
  function is_none (line 26) | pub fn is_none(&self) -> bool {
  function is_none_or (line 30) | pub fn is_none_or<F: FnOnce<T, Output = bool>>(self, f: F) -> bool {
  function as_ref (line 36) | pub const fn as_ref(&self) -> Option<&T> {
  function expect (line 44) | pub fn expect(self, _msg: &str) -> T {
  function unwrap (line 52) | pub fn unwrap(self) -> T {
  function unwrap_or (line 59) | pub fn unwrap_or(self, default: T) -> T {
  function unwrap_or_else (line 66) | pub fn unwrap_or_else<F: FnOnce<(), Output = T>>(self, f: F) -> T {
  function unwrap_or_default (line 73) | pub fn unwrap_or_default(self) -> T
  function map (line 83) | pub fn map<U, F>(self, f: F) -> Option<U>
  function map_or (line 93) | pub fn map_or<U, F>(self, default: U, f: F) -> U
  function map_or_else (line 103) | pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
  function map_or_default (line 114) | pub fn map_or_default<U, F>(self, f: F) -> U
  function ok_or (line 124) | pub fn ok_or<E>(self, err: E) -> Result<T, E> {
  function ok_or_else (line 131) | pub fn ok_or_else<E, F: FnOnce<(), Output = E>>(self, err: F) -> Result<...
  function and_then (line 138) | pub fn and_then<U, F>(self, f: F) -> Option<U>
  function take (line 150) | pub fn take(self) -> (Option<T>, Option<T>) {

FILE: hax-lib/core-models/src/core/panicking.rs
  function panic_explicit (line 3) | pub fn panic_explicit() -> ! {
  function panic (line 9) | pub fn panic(_msg: &str) -> ! {
  function panic_fmt (line 15) | pub fn panic_fmt(_fmt: super::fmt::Arguments) -> ! {
  function panic (line 24) | pub fn panic<T>() -> T {

FILE: hax-lib/core-models/src/core/result.rs
  type Result (line 1) | pub enum Result<T, E> {
  function unwrap (line 13) | pub fn unwrap(self) -> T {
  function unwrap_or (line 19) | pub fn unwrap_or(self, default: T) -> T {
  function expect (line 26) | pub fn expect(self, _msg: &str) -> T {
  function map (line 32) | pub fn map<U, F>(self, op: F) -> Result<U, E>
  function map_or (line 41) | pub fn map_or<U, F>(self, default: U, f: F) -> U
  function map_or_else (line 50) | pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
  function map_err (line 60) | pub fn map_err<F, O>(self, op: O) -> Result<T, F>
  function is_ok (line 70) | pub fn is_ok(&self) -> bool {
  function and_then (line 73) | pub fn and_then<U, F>(self, op: F) -> Result<U, E>
  function ok (line 82) | pub fn ok(self) -> Option<T> {

FILE: hax-lib/core-models/src/core/slice.rs
  type Slice (line 5) | struct Slice<T>(T);
  type Chunks (line 11) | pub struct Chunks<'a, T> {
  function new (line 16) | pub fn new(cs: usize, elements: &'a [T]) -> Chunks<'a, T> {
  type ChunksExact (line 20) | pub struct ChunksExact<'a, T> {
  function new (line 25) | pub fn new(cs: usize, elements: &'a [T]) -> ChunksExact<'a, T> {
  type Iter (line 29) | pub struct Iter<T>(pub Seq<T>);
  type Item (line 32) | type Item = T;
  function next (line 33) | fn next(&mut self) -> Option<Self::Item> {
  type Item (line 45) | type Item = &'a [T];
  function next (line 46) | fn next(&mut self) -> Option<Self::Item> {
  type Item (line 62) | type Item = &'a [T];
  function next (line 63) | fn next(&mut self) -> Option<Self::Item> {
  function len (line 77) | fn len(s: &[T]) -> usize {
  function chunks (line 80) | fn chunks<'a>(s: &'a [T], cs: usize) -> iter::Chunks<'a, T> {
  function iter (line 83) | fn iter(s: &[T]) -> iter::Iter<T> {
  function chunks_exact (line 86) | fn chunks_exact<'a>(s: &'a [T], cs: usize) -> iter::ChunksExact<'a, T> {
  function copy_from_slice (line 90) | fn copy_from_slice(s: &mut [T], src: &[T])
  function clone_from_slice (line 97) | fn clone_from_slice(s: &mut [T], src: &[T])
  function split_at (line 104) | fn split_at(s: &[T], mid: usize) -> (&[T], &[T]) {
  function split_at_checked (line 107) | fn split_at_checked(s: &[T], mid: usize) -> Option<(&[T], &[T])> {
  function is_empty (line 114) | fn is_empty(s: &[T]) -> bool {
  function contains (line 118) | fn contains(s: &[T], v: T) -> bool {
  function copy_within (line 122) | fn copy_within<R>(s: &[T], src: R, dest: usize) -> &[T]
  function binary_search (line 129) | fn binary_search(s: &[T], x: &T) -> Result<usize, usize> /* where T: sup...
  function get (line 132) | fn get<I: SliceIndex<[T]>>(s: &[T], index: I) -> Option<&<I as SliceInde...
  type IntoIter (line 140) | type IntoIter = iter::Iter<T>;
  function into_iter (line 141) | fn into_iter(self) -> Self::IntoIter {
  type SliceIndex (line 149) | pub trait SliceIndex<T: ?Sized> {
    method get (line 153) | fn get(self, slice: &T) -> Option<&Self::Output>;
  type Output (line 164) | type Output = T;
  function get (line 165) | fn get(self, slice: &[T]) -> Option<&T> {
  type Output (line 177) | type Output = [T];
  function get (line 178) | fn get(self, slice: &[T]) -> Option<&[T]> {
  type Output (line 186) | type Output = [T];
  function get (line 187) | fn get(self, slice: &[T]) -> Option<&[T]> {
  type Output (line 198) | type Output = [T];
  function get (line 199) | fn get(self, slice: &[T]) -> Option<&[T]> {
  type Output (line 210) | type Output = [T];
  function get (line 211) | fn get(self, slice: &[T]) -> Option<&[T]> {
  type Output (line 228) | type Output = [T];
  function index (line 230) | fn index(&self, i: Range<usize>) -> &[T] {
  type Output (line 237) | type Output = [T];
  function index (line 239) | fn index(&self, i: RangeTo<usize>) -> &[T] {
  type Output (line 246) | type Output = [T];
  function index (line 248) | fn index(&self, i: RangeFrom<usize>) -> &[T] {
  type Output (line 255) | type Output = [T];
  function index (line 256) | fn index(&self, i: RangeFull) -> &[T] {
  type Output (line 264) | type Output = T;
  function index (line 266) | fn index(&self, i: usize) -> &T {

FILE: hax-lib/core-models/src/core/str.rs
  function from_utf8 (line 3) | fn from_utf8(s: &[u8]) -> crate::result::Result<&str, super::error::Utf8...
  type Utf8Error (line 9) | pub struct Utf8Error;
  type Split (line 13) | struct Split<T>(T);
  type FromStr (line 17) | trait FromStr: Sized {
    method from_str (line 19) | fn from_str(s: &str) -> crate::result::Result<Self, Self::Err>;
    type Err (line 25) | type Err = u64;
    method from_str (line 26) | fn from_str(s: &str) -> crate::result::Result<Self, Self::Err> {

FILE: hax-lib/core-models/std/src/lib.rs
  type HashMap (line 5) | struct HashMap<K, V, S>(Option<K>, Option<V>, Option<S>);
  function new (line 7) | fn new() -> HashMap<K, V, crate::hash::random::RandomState> {
  function get (line 14) | fn get<Y>(m: HashMap<K, V, S>, k: K) -> core_models::option::Option<V> {
  function insert (line 17) | fn insert(
  type f64 (line 32) | struct f64;
  function powf (line 34) | fn powf(x: core::primitive::f64, y: core::primitive::f64) -> core::primi...
  type RandomState (line 42) | pub struct RandomState;
  type Read (line 48) | pub trait Read {
    method read (line 52) | fn read(&mut self, buf: &mut [u8]) -> Result<usize, error::Error>;
    method read_exact (line 61) | fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), error::Error>;
  type Write (line 74) | pub trait Write {
    method write (line 77) | fn write(&mut self, buf: &[u8]) -> Result<usize, error::Error>;
    method flush (line 79) | fn flush(&mut self) -> Result<(), error::Error>;
    method write_all (line 85) | fn write_all(&mut self, buf: &[u8]) -> Result<(), error::Error>;
  type Error (line 92) | pub struct Error;
    method kind (line 138) | fn kind(&self) -> ErrorKind {
  type ErrorKind (line 93) | pub enum ErrorKind {
  function read (line 145) | fn read(&mut self, buf: &mut [u8]) -> Result<usize, super::error::Error> {
  function read_exact (line 154) | fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), super::error::Err...
  function write (line 170) | fn write(&mut self, buf: &[u8]) -> Result<usize, super::error::Error> {
  function write_all (line 174) | fn write_all(&mut self, buf: &[u8]) -> Result<(), super::error::Error> {
  function flush (line 178) | fn flush(&mut self) -> Result<(), super::error::Error> {
  function e_print (line 184) | fn e_print(args: core::fmt::Arguments) {}

FILE: hax-lib/macros/src/dummy.rs
  function fstar_expr (line 63) | pub fn fstar_expr(_payload: TokenStream) -> TokenStream {
  function coq_expr (line 67) | pub fn coq_expr(_payload: TokenStream) -> TokenStream {
  function lean_expr (line 71) | pub fn lean_expr(_payload: TokenStream) -> TokenStream {
  function proverif_expr (line 75) | pub fn proverif_expr(_payload: TokenStream) -> TokenStream {
  function lemma (line 80) | pub fn lemma(_attr: TokenStream, _item: TokenStream) -> TokenStream {
  function unsafe_expr (line 84) | fn unsafe_expr() -> TokenStream {
  function fstar_unsafe_expr (line 92) | pub fn fstar_unsafe_expr(_payload: TokenStream) -> TokenStream {
  function coq_unsafe_expr (line 96) | pub fn coq_unsafe_expr(_payload: TokenStream) -> TokenStream {
  function lean_unsafe_expr (line 100) | pub fn lean_unsafe_expr(_payload: TokenStream) -> TokenStream {
  function proverif_unsafe_expr (line 104) | pub fn proverif_unsafe_expr(_payload: TokenStream) -> TokenStream {
  function fstar_prop_expr (line 109) | pub fn fstar_prop_expr(_payload: TokenStream) -> TokenStream {
  function coq_prop_expr (line 113) | pub fn coq_prop_expr(_payload: TokenStream) -> TokenStream {
  function lean_prop_expr (line 117) | pub fn lean_prop_expr(_payload: TokenStream) -> TokenStream {
  function proverif_prop_expr (line 121) | pub fn proverif_prop_expr(_payload: TokenStream) -> TokenStream {
  function not_hax_attribute (line 125) | fn not_hax_attribute(attr: &syn::Attribute) -> bool {
  function not_field_attribute (line 133) | fn not_field_attribute(attr: &syn::Attribute) -> bool {
  function attributes (line 143) | pub fn attributes(_attr: TokenStream, item: TokenStream) -> TokenStream {
  function int (line 188) | pub fn int(payload: TokenStream) -> TokenStream {
  function impl_fn_decoration (line 202) | pub fn impl_fn_decoration(_attr: TokenStream, _item: TokenStream) -> Tok...
  function trait_fn_decoration (line 207) | pub fn trait_fn_decoration(_attr: TokenStream, _item: TokenStream) -> To...
  function loop_invariant (line 212) | pub fn loop_invariant(_predicate: TokenStream) -> TokenStream {
  function loop_decreases (line 217) | pub fn loop_decreases(_predicate: TokenStream) -> TokenStream {

FILE: hax-lib/macros/src/hax_paths.rs
  function expect_simple_path (line 7) | fn expect_simple_path(path: &Path) -> Option<Vec<String>> {
  constant DECORATION_KINDS (line 22) | pub const DECORATION_KINDS: &[&str] = &["decreases", "ensures", "require...
  function expects_path_decoration (line 27) | pub fn expects_path_decoration(path: &Path) -> Result<Option<String>> {
  function expects_refine (line 32) | pub fn expects_refine(path: &Path) -> Result<Option<String>> {
  function expects_order (line 37) | pub fn expects_order(path: &Path) -> Result<Option<String>> {
  function expects_hax_path (line 43) | pub fn expects_hax_path(allowlist: &[&str], path: &Path) -> Result<Optio...

FILE: hax-lib/macros/src/impl_fn_decoration.rs
  type ImplFnDecoration (line 9) | pub struct ImplFnDecoration {
    method parse (line 17) | fn parse(input: parse::ParseStream) -> Result<Self> {

FILE: hax-lib/macros/src/implementation.rs
  type FnLike (line 21) | pub type FnLike = syn::ImplItemFn;
  function fstar_options (line 32) | pub fn fstar_options(attr: pm::TokenStream, item: pm::TokenStream) -> pm...
  function loop_invariant (line 65) | pub fn loop_invariant(predicate: pm::TokenStream) -> pm::TokenStream {
  function loop_decreases (line 95) | pub fn loop_decreases(predicate: pm::TokenStream) -> pm::TokenStream {
  function fstar_verification_status (line 116) | pub fn fstar_verification_status(attr: pm::TokenStream, item: pm::TokenS...
  function fstar_postprocess_with (line 164) | pub fn fstar_postprocess_with(attr: pm::TokenStream, item: pm::TokenStre...
  function include (line 180) | pub fn include(attr: pm::TokenStream, item: pm::TokenStream) -> pm::Toke...
  function exclude (line 190) | pub fn exclude(attr: pm::TokenStream, item: pm::TokenStream) -> pm::Toke...
  function lemma (line 250) | pub fn lemma(attr: pm::TokenStream, item: pm::TokenStream) -> pm::TokenS...
  function decreases (line 328) | pub fn decreases(attr: pm::TokenStream, item: pm::TokenStream) -> pm::To...
  function fstar_smt_pat (line 345) | pub fn fstar_smt_pat(attr: pm::TokenStream, item: pm::TokenStream) -> pm...
  function requires (line 379) | pub fn requires(attr: pm::TokenStream, item: pm::TokenStream) -> pm::Tok...
  function ensures (line 422) | pub fn ensures(attr: pm::TokenStream, item: pm::TokenStream) -> pm::Toke...
  function impl_fn_decoration (line 462) | pub fn impl_fn_decoration(attr: pm::TokenStream, item: pm::TokenStream) ...
  function trait_fn_decoration (line 479) | pub fn trait_fn_decoration(attr: pm::TokenStream, item: pm::TokenStream)...
  function attributes (line 546) | pub fn attributes(_attr: pm::TokenStream, item: pm::TokenStream) -> pm::...
  function opaque_type (line 728) | pub fn opaque_type(attr: pm::TokenStream, item: pm::TokenStream) -> pm::...
  function opaque (line 736) | pub fn opaque(_attr: pm::TokenStream, item: pm::TokenStream) -> pm::Toke...
  function transparent (line 746) | pub fn transparent(_attr: pm::TokenStream, item: pm::TokenStream) -> pm:...
  function process_read (line 755) | pub fn process_read(_attr: pm::TokenStream, item: pm::TokenStream) -> pm...
  function process_write (line 764) | pub fn process_write(_attr: pm::TokenStream, item: pm::TokenStream) -> p...
  function process_init (line 773) | pub fn process_init(_attr: pm::TokenStream, item: pm::TokenStream) -> pm...
  function protocol_messages (line 782) | pub fn protocol_messages(_attr: pm::TokenStream, item: pm::TokenStream) ...
  function pv_constructor (line 791) | pub fn pv_constructor(_attr: pm::TokenStream, item: pm::TokenStream) -> ...
  function pv_handwritten (line 800) | pub fn pv_handwritten(_attr: pm::TokenStream, item: pm::TokenStream) -> ...
  function int (line 816) | pub fn int(payload: pm::TokenStream) -> pm::TokenStream {
  function lean_proof (line 829) | pub fn lean_proof(payload: pm::TokenStream, item: pm::TokenStream) -> pm...
  function lean_pure_requires_proof (line 840) | pub fn lean_pure_requires_proof(
  function lean_pure_ensures_proof (line 854) | pub fn lean_pure_ensures_proof(payload: pm::TokenStream, item: pm::Token...
  function lean_proof_method_grind (line 864) | pub fn lean_proof_method_grind(_attr: pm::TokenStream, item: pm::TokenSt...
  function lean_proof_method_bv_decide (line 873) | pub fn lean_proof_method_bv_decide(
  function refinement_type (line 1092) | pub fn refinement_type(mut attr: pm::TokenStream, item: pm::TokenStream)...

FILE: hax-lib/macros/src/quote.rs
  constant SPLIT_MARK (line 18) | const SPLIT_MARK: &str = "SPLIT_QUOTE";
  type AntiquoteKind (line 21) | enum AntiquoteKind {
  method to_tokens (line 29) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type Antiquote (line 40) | struct Antiquote {
  method to_tokens (line 46) | fn to_tokens(&self, tokens: &mut TokenStream) {
  function process_string (line 64) | fn process_string(s: &str) -> std::result::Result<(String, Vec<Antiquote...
  function item (line 128) | pub(super) fn item(
  function detect_future_node_in_expression (line 162) | pub(super) fn detect_future_node_in_expression(e: &syn::Expr) -> bool {
  type InlineExprType (line 177) | pub(super) enum InlineExprType {
  function expression (line 183) | pub(super) fn expression(typ: InlineExprType, payload: pm::TokenStream) ...

FILE: hax-lib/macros/src/rewrite_self.rs
  type SpanWrapper (line 15) | struct SpanWrapper(Span);
  constant _ (line 16) | const _: () = {
  type RewriteSelf (line 34) | pub struct RewriteSelf {
    method get_error (line 42) | pub fn get_error(self) -> Option<proc_macro2::TokenStream> {
    method self_detected (line 58) | fn self_detected(&mut self, span: Span) {
    method self_ident (line 63) | pub fn self_ident(&mut self, span: Span) -> &Ident {
    method self_ty (line 68) | pub fn self_ty(&mut self, span: Span) -> Type {
    method new (line 75) | pub fn new(ident: Ident, typ: Option<Type>) -> Self {
    method visit_expr_mut (line 87) | fn visit_expr_mut(&mut self, e: &mut Expr) {
    method visit_type_mut (line 94) | fn visit_type_mut(&mut self, ty: &mut Type) {
    method visit_fn_arg_mut (line 100) | fn visit_fn_arg_mut(&mut self, arg: &mut FnArg) {
    method visit_item_impl_mut (line 128) | fn visit_item_impl_mut(&mut self, _i: &mut ItemImpl) {

FILE: hax-lib/macros/src/syn_ext.rs
  type ExprClosure1 (line 6) | pub struct ExprClosure1 {
  method parse (line 12) | fn parse(ps: ParseStream) -> Result<Self> {
  type ExpectIdent (line 26) | pub trait ExpectIdent {
    method expect_ident (line 28) | fn expect_ident(&self) -> Option<Ident>;
    method is_ident (line 30) | fn is_ident(&self, name: &str) -> bool {
    method expect_ident (line 38) | fn expect_ident(&self) -> Option<Ident> {
    method expect_ident (line 49) | fn expect_ident(&self) -> Option<Ident> {
    method expect_ident (line 55) | fn expect_ident(&self) -> Option<Ident> {
    method expect_ident (line 66) | fn expect_ident(&self) -> Option<Ident> {
    method expect_ident (line 77) | fn expect_ident(&self) -> Option<Ident> {
  function expect_punctuated_1 (line 44) | fn expect_punctuated_1<T: Clone, S>(x: &Punctuated<T, S>) -> Option<T> {

FILE: hax-lib/macros/src/utils.rs
  type HaxQuantifiers (line 7) | pub struct HaxQuantifiers;
  method to_tokens (line 9) | fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
  type FnDecorationKind (line 21) | pub enum FnDecorationKind {
  method to_string (line 29) | fn to_string(&self) -> String {
  method from (line 40) | fn from(kind: FnDecorationKind) -> Self {
  function merge_generics (line 51) | pub(crate) fn merge_generics(x: Generics, y: Generics) -> Generics {
  function unmut_references_in_inputs (line 87) | fn unmut_references_in_inputs(sig: &mut Signature) -> Vec<FnArg> {
  function expect_fn_arg_var_pat (line 117) | fn expect_fn_arg_var_pat(arg: &FnArg) -> Option<(String, syn::Type)> {
  type NotFutureExpr (line 130) | pub(crate) enum NotFutureExpr {
  function expect_future_expr (line 137) | pub(crate) fn expect_future_expr(e: &Expr) -> Option<std::result::Result...
  type IdentCollector (line 150) | pub struct IdentCollector {
    method visit_ident (line 155) | fn visit_ident(&mut self, ident: &'ast Ident) {
    method fresh_ident (line 162) | pub fn fresh_ident(&self, prefix: &str) -> Ident {
  type RewriteFuture (line 174) | struct RewriteFuture(HashSet<String>);
  method visit_expr_mut (line 176) | fn visit_expr_mut(&mut self, e: &mut Expr) {
  function create_future_ident (line 213) | fn create_future_ident(name: &str) -> syn::Ident {
  function add_unit_to_sig_if_needed (line 224) | fn add_unit_to_sig_if_needed(signature: &mut Signature) {
  function make_fn_decoration (line 231) | pub fn make_fn_decoration(

FILE: hax-lib/macros/types/src/lib.rs
  type ItemUid (line 20) | pub struct ItemUid {
    method fmt (line 26) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    method fresh (line 32) | pub fn fresh() -> Self {
  type ItemStatus (line 43) | pub enum ItemStatus {
  type AssociationRole (line 59) | pub enum AssociationRole {
  type ItemQuotePosition (line 78) | pub enum ItemQuotePosition {
  type ItemQuoteFStarOpts (line 89) | pub struct ItemQuoteFStarOpts {
  type ItemQuote (line 102) | pub struct ItemQuote {
  type ProofMethod (line 111) | pub enum ProofMethod {
  type AttrPayload (line 122) | pub enum AttrPayload {
  constant HAX_TOOL (line 164) | pub const HAX_TOOL: &str = "_hax";
  constant HAX_CFG_OPTION_NAME (line 165) | pub const HAX_CFG_OPTION_NAME: &str = "hax_compilation";
  type HaxTool (line 167) | pub struct HaxTool;
  type HaxCfgOptionName (line 168) | pub struct HaxCfgOptionName;
  type DebugOrHaxCfgExpr (line 169) | pub struct DebugOrHaxCfgExpr;
  method to_tokens (line 171) | fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
  method to_tokens (line 176) | fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
  method to_tokens (line 181) | fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
  function from (line 189) | fn from(payload: &AttrPayload) -> Self {
  method to_tokens (line 196) | fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {

FILE: hax-lib/src/abstraction.rs
  type Abstraction (line 6) | pub trait Abstraction {
    method lift (line 10) | fn lift(self) -> Self::AbstractType;
  type Concretization (line 15) | pub trait Concretization<T> {
    method concretize (line 17) | fn concretize(self) -> T;

FILE: hax-lib/src/dummy.rs
  function inline (line 39) | pub fn inline(_: &str) {}
  function inline_unsafe (line 42) | pub fn inline_unsafe<T>(_: &str) -> T {
  function _internal_loop_invariant (line 47) | pub const fn _internal_loop_invariant<T, R: Into<Prop>, P: FnOnce(T) -> ...
  function _internal_while_loop_invariant (line 50) | pub const fn _internal_while_loop_invariant(_: Prop) {}
  function _internal_loop_decreases (line 53) | pub const fn _internal_loop_decreases(_: int::Int) {}
  type Refinement (line 55) | pub trait Refinement {
    method new (line 57) | fn new(x: Self::InnerType) -> Self;
    method get (line 58) | fn get(self) -> Self::InnerType;
    method get_mut (line 59) | fn get_mut(&mut self) -> &mut Self::InnerType;
    method invariant (line 60) | fn invariant(value: Self::InnerType) -> crate::Prop;
  type RefineAs (line 63) | pub trait RefineAs<RefinedType> {
    method into_checked (line 64) | fn into_checked(self) -> RefinedType;
  type Int (line 78) | pub struct Int(pub u8);
    method new (line 81) | pub fn new(x: impl Into<u8>) -> Self {
    method get (line 84) | pub fn get(self) -> u8 {
    method pow2 (line 122) | pub fn pow2(self) -> Self {
    method _unsafe_from_str (line 125) | pub fn _unsafe_from_str(_s: &str) -> Self {
    method rem_euclid (line 128) | pub fn rem_euclid(&self, v: Self) -> Self {
  type Output (line 90) | type Output = Self;
  method add (line 92) | fn add(self, other: Self) -> Self::Output {
  type Output (line 98) | type Output = Self;
  method sub (line 100) | fn sub(self, other: Self) -> Self::Output {
  type Output (line 106) | type Output = Self;
  method mul (line 108) | fn mul(self, other: Self) -> Self::Output {
  type Output (line 114) | type Output = Self;
  method div (line 116) | fn div(self, other: Self) -> Self::Output {
  type ToInt (line 133) | pub trait ToInt {
    method to_int (line 134) | fn to_int(self) -> Int;
  type Abstraction (line 137) | pub trait Abstraction {
    method lift (line 139) | fn lift(self) -> Self::AbstractType;
  type Concretization (line 142) | pub trait Concretization<T> {
    method concretize (line 143) | fn concretize(self) -> T;

FILE: hax-lib/src/implementation.rs
  function assert (line 66) | pub fn assert(_formula: bool) {}
  function assert_prop (line 87) | pub fn assert_prop(_formula: Prop) {}
  function assume (line 94) | pub fn assume(_formula: Prop) {}
  function inline (line 126) | pub fn inline(_: &str) {}
  function inline_unsafe (line 130) | pub fn inline_unsafe<T>(_: &str) -> T {
  function any_to_unit (line 138) | pub fn any_to_unit<T>(_: T) -> () {
  function _internal_loop_invariant (line 144) | pub fn _internal_loop_invariant<T, R: Into<Prop>, P: FnOnce(T) -> R>(_: ...
  function _internal_while_loop_invariant (line 148) | pub const fn _internal_while_loop_invariant(_: Prop) {}
  function _internal_loop_decreases (line 152) | pub fn _internal_loop_decreases(_: Int) {}
  type Refinement (line 161) | pub trait Refinement {
    method new (line 166) | fn new(x: Self::InnerType) -> Self;
    method get (line 168) | fn get(self) -> Self::InnerType;
    method get_mut (line 170) | fn get_mut(&mut self) -> &mut Self::InnerType;
    method invariant (line 172) | fn invariant(value: Self::InnerType) -> Prop;
  type RefineAs (line 181) | pub trait RefineAs<RefinedType> {
    method into_checked (line 191) | fn into_checked(self) -> RefinedType;

FILE: hax-lib/src/int/bigint.rs
  constant BYTES (line 7) | const BYTES: usize = 1024;
  type BigInt (line 9) | pub(super) struct BigInt {
    method new (line 17) | pub(super) fn new(i: &num_bigint::BigInt) -> Self {
    method get (line 28) | pub(super) fn get(self) -> num_bigint::BigInt {
    method eq (line 34) | fn eq(&self, other: &Self) -> bool {
    method cmp (line 40) | fn cmp(&self, other: &Self) -> core::cmp::Ordering {
    method partial_cmp (line 45) | fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {

FILE: hax-lib/src/int/mod.rs
  type Int (line 17) | pub struct Int(BigInt);
    method fmt (line 20) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    method new (line 26) | fn new(x: impl Into<num_bigint::BigInt>) -> Self {
    method get (line 29) | fn get(self) -> num_bigint::BigInt {
    method pow2 (line 76) | pub fn pow2(self) -> Self {
    method _unsafe_from_str (line 84) | pub fn _unsafe_from_str(s: &str) -> Self {
    method rem_euclid (line 89) | pub fn rem_euclid(&self, v: Self) -> Self {
  type Output (line 35) | type Output = Self;
  method add (line 37) | fn add(self, other: Self) -> Self::Output {
  type Output (line 43) | type Output = Self;
  method neg (line 45) | fn neg(self) -> Self::Output {
  type Output (line 51) | type Output = Self;
  method sub (line 53) | fn sub(self, other: Self) -> Self::Output {
  type Output (line 59) | type Output = Self;
  method mul (line 61) | fn mul(self, other: Self) -> Self::Output {
  type Output (line 67) | type Output = Self;
  method div (line 69) | fn div(self, other: Self) -> Self::Output {
  type ToInt (line 96) | pub trait ToInt {
    method to_int (line 97) | fn to_int(self) -> Int;

FILE: hax-lib/src/prop.rs
  type Prop (line 6) | pub struct Prop(bool);
    method from_bool (line 49) | pub const fn from_bool(b: bool) -> Self {
    method and (line 53) | pub fn and(self, other: impl Into<Self>) -> Self {
    method or (line 57) | pub fn or(self, other: impl Into<Self>) -> Self {
    method not (line 61) | pub fn not(self) -> Self {
    method eq (line 65) | pub fn eq(self, other: impl Into<Self>) -> Self {
    method ne (line 69) | pub fn ne(self, other: impl Into<Self>) -> Self {
    method implies (line 73) | pub fn implies(self, other: impl Into<Self>) -> Self {
    method from (line 95) | fn from(value: bool) -> Self {
    type Output (line 101) | type Output = Prop;
    method bitand (line 102) | fn bitand(self, rhs: T) -> Self::Output {
    type Output (line 108) | type Output = Prop;
    method bitor (line 109) | fn bitor(self, rhs: T) -> Self::Output {
  function from_bool (line 12) | pub const fn from_bool(b: bool) -> Prop {
  function and (line 15) | pub fn and(lhs: Prop, other: Prop) -> Prop {
  function or (line 18) | pub fn or(lhs: Prop, other: Prop) -> Prop {
  function not (line 21) | pub fn not(lhs: Prop) -> Prop {
  function eq (line 26) | pub fn eq<T>(_lhs: T, _rhs: T) -> Prop {
  function ne (line 30) | pub fn ne<T>(_lhs: T, _rhs: T) -> Prop {
  function implies (line 34) | pub fn implies(lhs: Prop, other: Prop) -> Prop {
  function forall (line 38) | pub fn forall<A, F: Fn(A) -> Prop>(_pred: F) -> Prop {
  function exists (line 42) | pub fn exists<A, F: Fn(A) -> Prop>(_pred: F) -> Prop {
  type AbstractType (line 79) | type AbstractType = Prop;
  method lift (line 80) | fn lift(self) -> Self::AbstractType {
  type ToProp (line 85) | pub trait ToProp {
    method to_prop (line 86) | fn to_prop(self) -> Prop;
    method to_prop (line 89) | fn to_prop(self) -> Prop {
  type Output (line 115) | type Output = Prop;
  method not (line 116) | fn not(self) -> Self::Output {
  function forall (line 127) | pub fn forall<T, U: Into<Prop>>(f: impl Fn(T) -> U) -> Prop {
  function exists (line 137) | pub fn exists<T, U: Into<Prop>>(f: impl Fn(T) -> U) -> Prop {
  function implies (line 142) | pub fn implies(lhs: impl Into<Prop>, rhs: impl Into<Prop>) -> Prop {

FILE: hax-types/build.rs
  constant UNKNOWN (line 15) | const UNKNOWN: &str = "unknown";
  function git_command (line 17) | fn git_command(args: &[&str]) -> String {
  function main (line 27) | fn main() {

FILE: hax-types/src/cli_options/extension.rs
  type EmptyArgsExtension (line 29) | pub struct EmptyArgsExtension {}
  type EmptySubcommandExtension (line 33) | pub enum EmptySubcommandExtension {}
  type Extension (line 35) | pub trait Extension: 'static {
    type Options (line 43) | type Options = EmptyArgsExtension;
    type Command (line 44) | type Command = EmptySubcommandExtension;
    type BackendOptions (line 45) | type BackendOptions = EmptyArgsExtension;
    type FStarOptions (line 46) | type FStarOptions = EmptyArgsExtension;

FILE: hax-types/src/cli_options/mod.rs
  type DebugEngineMode (line 12) | pub enum DebugEngineMode {
    method from (line 18) | fn from(s: &str) -> Self {
  type ForceCargoBuild (line 28) | pub struct ForceCargoBuild {
    method from (line 33) | fn from(s: &str) -> Self {
  type PathOrDash (line 49) | pub enum PathOrDash {
    method from (line 55) | fn from(s: &str) -> Self {
    method open_or_stdout (line 64) | pub fn open_or_stdout(&self) -> Box<dyn std::io::Write> {
    method map_path (line 73) | pub fn map_path<F: FnOnce(&Path) -> PathBuf>(&self, f: F) -> Self {
  function absolute_path (line 81) | fn absolute_path(path: impl AsRef<std::path::Path>) -> std::io::Result<s...
  type NormalizePaths (line 95) | pub trait NormalizePaths {
    method normalize_paths (line 96) | fn normalize_paths(&mut self);
    method normalize_paths (line 100) | fn normalize_paths(&mut self) {
    method normalize_paths (line 105) | fn normalize_paths(&mut self) {
    method normalize_paths (line 560) | fn normalize_paths(&mut self) {
    method normalize_paths (line 570) | fn normalize_paths(&mut self) {
  type ProVerifOptions (line 115) | pub struct ProVerifOptions {
  type FStarOptions (line 135) | pub struct FStarOptions<E: Extension> {
  type Backend (line 174) | pub enum Backend<E: Extension> {
  function fmt (line 202) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type DepsKind (line 209) | pub enum DepsKind {
  type InclusionKind (line 217) | pub enum InclusionKind {
  type InclusionClause (line 226) | pub struct InclusionClause {
  constant PREFIX_INCLUDED_TRANSITIVE (line 231) | const PREFIX_INCLUDED_TRANSITIVE: &str = "+";
  constant PREFIX_INCLUDED_SHALLOW (line 232) | const PREFIX_INCLUDED_SHALLOW: &str = "+~";
  constant PREFIX_INCLUDED_NONE (line 233) | const PREFIX_INCLUDED_NONE: &str = "+!";
  constant PREFIX_SIGNATURE_ONLY (line 234) | const PREFIX_SIGNATURE_ONLY: &str = "+:";
  constant PREFIX_EXCLUDED (line 235) | const PREFIX_EXCLUDED: &str = "-";
  method to_string (line 238) | fn to_string(&self) -> String {
  function parse_inclusion_clause (line 250) | pub fn parse_inclusion_clause(
  type TranslationOptions (line 282) | pub struct TranslationOptions {
  type BackendOptions (line 326) | pub struct BackendOptions<E: Extension> {
  type Command (line 397) | pub enum Command<E: Extension> {
  function body_kinds (line 467) | pub fn body_kinds(&self) -> Vec<ExportBodyKind> {
  function backend_name (line 474) | pub fn backend_name(&self) -> Option<BackendName> {
  type ExportBodyKind (line 486) | pub enum ExportBodyKind {
  type ExtensibleOptions (line 501) | pub struct ExtensibleOptions<E: Extension> {
  type Options (line 550) | pub type Options = ExtensibleOptions<()>;
  type MessageFormat (line 554) | pub enum MessageFormat {
  function from (line 576) | fn from(_opts: Options) -> hax_frontend_exporter_options::Options {
  type ExporterOptions (line 591) | pub struct ExporterOptions {
    method from (line 632) | fn from(options: &Options) -> Self {
  type BackendName (line 602) | pub enum BackendName {
    method fmt (line 615) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    method from (line 644) | fn from(backend: &Backend<E>) -> Self {
  constant ENV_VAR_OPTIONS_FRONTEND (line 659) | pub const ENV_VAR_OPTIONS_FRONTEND: &str = "DRIVER_HAX_FRONTEND_OPTS";
  constant ENV_VAR_OPTIONS_FULL (line 660) | pub const ENV_VAR_OPTIONS_FULL: &str = "DRIVER_HAX_FRONTEND_FULL_OPTS";

FILE: hax-types/src/diagnostics/message.rs
  type HaxMessage (line 7) | pub enum HaxMessage {
    method discriminant (line 34) | pub fn discriminant(&self) -> u16 {
    method code (line 38) | pub fn code(&self) -> String {

FILE: hax-types/src/diagnostics/mod.rs
  type Diagnostics (line 9) | pub struct Diagnostics {
    method fmt (line 17) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
  type Kind (line 117) | pub enum Kind {
    method issue_number (line 92) | fn issue_number(&self) -> Option<u32> {
    method discriminant (line 191) | pub fn discriminant(&self) -> u16 {
    method code (line 195) | pub fn code(&self) -> String {

FILE: hax-types/src/diagnostics/report.rs
  type ReportCtx (line 10) | pub struct ReportCtx {
    method file_contents (line 22) | fn file_contents<'a>(&'a mut self, path: PathBuf) -> Rc<String> {
    method seen_already (line 34) | pub fn seen_already(&mut self, diagnostic: Diagnostics) -> bool {
  function compute_offset (line 16) | fn compute_offset(src: &str, line: usize, col: usize) -> usize {
  method with_message (line 42) | pub fn with_message<R, F: for<'a> FnMut(Message<'a>) -> R>(

FILE: hax-types/src/driver_api.rs
  constant HAX_DRIVER_STDERR_PREFIX (line 3) | pub const HAX_DRIVER_STDERR_PREFIX: &str = "::hax-driver::";
  type EmitHaxMetaMessage (line 7) | pub struct EmitHaxMetaMessage {
  type HaxDriverMessage (line 14) | pub enum HaxDriverMessage {
  type Items (line 20) | pub enum Items<Body: hax_frontend_exporter::IsBody> {
  type HaxMeta (line 27) | pub struct HaxMeta<Body: hax_frontend_exporter::IsBody> {
  function write (line 48) | pub fn write(self, write: &mut impl std::io::Write, id_table: id_table::...
  function read (line 57) | pub fn read(reader: impl std::io::Read) -> (Self, id_table::Table) {

FILE: hax-types/src/engine_api.rs
  type ThirBody (line 4) | type ThirBody = hax_frontend_exporter::ThirBody;
  type EngineOptions (line 8) | pub struct EngineOptions {
  type SourceMap (line 21) | pub struct SourceMap {
    method inline_sources_content (line 32) | pub fn inline_sources_content(&mut self) {
  type File (line 48) | pub struct File {
  type Output (line 56) | pub struct Output {
  type ProfilingData (line 64) | pub struct ProfilingData {
  type FromEngine (line 86) | pub enum FromEngine {
    method requires_response (line 107) | pub fn requires_response(&self) -> bool {
  type ToEngine (line 100) | pub enum ToEngine {
  type WithDefIds (line 122) | pub struct WithDefIds<Body: hax_frontend_exporter::IsBody> {

FILE: hax-types/src/lib.rs
  constant HAX_VERSION (line 31) | pub const HAX_VERSION: &str = env!("HAX_VERSION");

FILE: rust-engine/macros/src/lib.rs
  function setup_error_handling_struct (line 26) | pub fn setup_error_handling_struct(_attr: TokenStream, item: TokenStream...
  function setup_printer_struct (line 35) | pub fn setup_printer_struct(_attr: TokenStream, item: TokenStream) -> To...
  function crate_name (line 43) | pub(crate) fn crate_name() -> Ident {
  function prepend (line 49) | pub(crate) fn prepend(item: TokenStream, prefix: proc_macro2::TokenStrea...
  function add_derive (line 59) | pub(crate) fn add_derive(item: TokenStream, payload: proc_macro2::TokenS...
  function rust_engine_krate_name (line 66) | pub(crate) fn rust_engine_krate_name() -> proc_macro2::TokenStream {
  function derive_group_for_ast (line 81) | pub fn derive_group_for_ast(_attr: TokenStream, item: TokenStream) -> To...
  function derive_group_for_ast_serialization (line 94) | pub fn derive_group_for_ast_serialization(_attr: TokenStream, item: Toke...
  function derive_group_for_ast_base (line 103) | pub fn derive_group_for_ast_base(_attr: TokenStream, item: TokenStream) ...
  function replace (line 119) | pub fn replace(attr: TokenStream, item: TokenStream) -> TokenStream {
  function partial_apply (line 134) | pub fn partial_apply(attr: TokenStream, item: TokenStream) -> TokenStream {
  function prepend_associated_functions_with (line 155) | pub fn prepend_associated_functions_with(attr: TokenStream, item: TokenS...

FILE: rust-engine/macros/src/partial_application.rs
  type PartialApplyArgs (line 5) | struct PartialApplyArgs {
    method parse (line 12) | fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
  function partial_apply (line 25) | pub(crate) fn partial_apply(attr: TokenStream, item: TokenStream) -> Tok...

FILE: rust-engine/macros/src/replace.rs
  function replace_in_stream (line 13) | fn replace_in_stream(
  type AttributeArgs (line 36) | struct AttributeArgs {
  method parse (line 42) | fn parse(input: ParseStream) -> Result<Self> {
  function replace (line 84) | pub fn replace(attr: TokenStream, item: TokenStream) -> TokenStream {

FILE: rust-engine/macros/src/struct_fields.rs
  function add_field_to_item_struct (line 13) | fn add_field_to_item_struct(
  function setup_error_handling_struct (line 79) | pub(crate) fn setup_error_handling_struct(_attr: TokenStream, item: Toke...
  function setup_printer_struct (line 110) | pub(crate) fn setup_printer_struct(_attr: TokenStream, item: TokenStream...

FILE: rust-engine/src/ast.rs
  type GenericValue (line 33) | pub enum GenericValue {
  type PrimitiveTy (line 53) | pub enum PrimitiveTy {
  type Region (line 68) | pub struct Region;
  type Ty (line 72) | pub struct Ty(pub(crate) Box<TyKind>);
    method bool (line 76) | pub fn bool() -> Self {
    method int (line 80) | pub fn int(size: IntSize, signedness: Signedness) -> Self {
    method is_int (line 87) | pub fn is_int(&self) -> bool {
    method prop (line 98) | pub fn prop() -> Self {
  type TyKind (line 108) | pub enum TyKind {
  type ErrorNode (line 215) | pub struct ErrorNode {
    method assertion_failure (line 224) | pub fn assertion_failure(
  type DynTraitGoal (line 255) | pub struct DynTraitGoal {
  type Metadata (line 264) | pub struct Metadata {
  type Expr (line 274) | pub struct Expr {
  type Pat (line 285) | pub struct Pat {
  type Arm (line 296) | pub struct Arm {
  type Guard (line 309) | pub struct Guard {
  type BorrowKind (line 318) | pub enum BorrowKind {
  type BindingMode (line 335) | pub enum BindingMode {
  type PatKind (line 350) | pub enum PatKind {
  type GuardKind (line 451) | pub enum GuardKind {
  type Lhs (line 473) | pub enum Lhs {
  type ImplExpr (line 501) | pub struct ImplExpr {
  type ImplExprKind (line 519) | pub enum ImplExprKind {
  type ImplItem (line 619) | pub struct ImplItem {
  type ImplItemKind (line 632) | pub enum ImplItemKind {
  type TraitItem (line 677) | pub struct TraitItem {
  type TraitItemKind (line 698) | pub enum TraitItemKind {
  type QuoteContent (line 737) | pub enum QuoteContent {
  type Quote (line 750) | pub struct Quote(pub Vec<QuoteContent>);
  type ItemQuoteOrigin (line 754) | pub struct ItemQuoteOrigin {
  type ItemQuoteOriginKind (line 765) | pub enum ItemQuoteOriginKind {
  type ItemQuoteOriginPosition (line 793) | pub enum ItemQuoteOriginPosition {
  type LoopKind (line 805) | pub enum LoopKind {
  type ControlFlowKind (line 858) | pub enum ControlFlowKind {
  type LoopState (line 868) | pub struct LoopState {
  type ExprKind (line 878) | pub enum ExprKind {
    method into_expr (line 1671) | pub fn into_expr(self, span: Span, ty: Ty, attributes: Vec<Attribute>)...
  type GenericParamKind (line 1123) | pub enum GenericParamKind {
  type TraitGoal (line 1140) | pub struct TraitGoal {
  type ImplIdent (line 1149) | pub struct ImplIdent {
  type ProjectionPredicate (line 1162) | pub struct ProjectionPredicate {
  type GenericConstraint (line 1173) | pub enum GenericConstraint {
  type GenericParam (line 1184) | pub struct GenericParam {
  type Generics (line 1195) | pub struct Generics {
    method type_class_constraints (line 1538) | pub fn type_class_constraints(&self) -> impl Iterator<Item = &ImplIden...
    method equality_constraints (line 1545) | pub fn equality_constraints(&self) -> impl Iterator<Item = &Projection...
  type SafetyKind (line 1204) | pub enum SafetyKind {
  type Attribute (line 1213) | pub struct Attribute {
  type AttributeKind (line 1222) | pub enum AttributeKind {
  type DocCommentKind (line 1243) | pub enum DocCommentKind {
  type Attributes (line 1251) | pub type Attributes = Vec<Attribute>;
  type SpannedTy (line 1255) | pub struct SpannedTy {
  type Param (line 1269) | pub struct Param {
  type Variant (line 1283) | pub struct Variant {
  type ItemKind (line 1297) | pub enum ItemKind {
  type Item (line 1504) | pub struct Item {
    method is_opaque (line 1515) | pub fn is_opaque(&self) -> bool {
  type Module (line 1527) | pub struct Module {
  type HasMetadata (line 1557) | pub trait HasMetadata {
    method metadata (line 1559) | fn metadata(&self) -> &Metadata;
    method metadata_mut (line 1561) | fn metadata_mut(&mut self) -> &mut Metadata;
  type HasSpan (line 1564) | pub trait HasSpan {
    method span (line 1566) | fn span(&self) -> Span;
    method span_mut (line 1568) | fn span_mut(&mut self) -> &mut Span;
    method span (line 1576) | fn span(&self) -> Span {
    method span_mut (line 1579) | fn span_mut(&mut self) -> &mut Span {
    method span (line 1636) | fn span(&self) -> Span {
    method span_mut (line 1639) | fn span_mut(&mut self) -> &mut Span {
    method span (line 1661) | fn span(&self) -> Span {
    method span_mut (line 1664) | fn span_mut(&mut self) -> &mut Span {
  type Typed (line 1571) | pub trait Typed {
    method ty (line 1573) | fn ty(&self) -> &Ty;
    method ty (line 1645) | fn ty(&self) -> &Ty {
    method ty (line 1650) | fn ty(&self) -> &Ty {
    method ty (line 1655) | fn ty(&self) -> &Ty {
  type HasKind (line 1585) | pub trait HasKind {
    method kind (line 1589) | fn kind(&self) -> &Self::Kind;
    method kind_mut (line 1591) | fn kind_mut(&mut self) -> &mut Self::Kind;
    type Kind (line 1683) | type Kind = TyKind;
    method kind (line 1685) | fn kind(&self) -> &Self::Kind {
    method kind_mut (line 1688) | fn kind_mut(&mut self) -> &mut Self::Kind {
  type FallibleAstNode (line 1694) | pub trait FallibleAstNode {
    method set_error (line 1696) | fn set_error(&mut self, error_node: ErrorNode);
    method get_error (line 1698) | fn get_error(&self) -> Option<&ErrorNode>;

FILE: rust-engine/src/ast/diagnostics.rs
  type Diagnostic (line 13) | pub struct Diagnostic {
    method info (line 46) | pub fn info(&self) -> &DiagnosticInfo {
    method node (line 50) | pub fn node(&self) -> &Fragment {
    method new (line 54) | pub fn new(node: impl Into<Fragment>, info: DiagnosticInfo) -> Self {
  type DiagnosticInfo (line 21) | pub struct DiagnosticInfo {
    method emit (line 32) | pub fn emit(&self) {
  type Context (line 66) | pub enum Context {
    method fmt (line 82) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {

FILE: rust-engine/src/ast/identifiers.rs
  type LocalId (line 15) | pub struct LocalId(pub Symbol);
    method is_self (line 19) | pub fn is_self(&self) -> bool {
    method fmt (line 25) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    method from (line 30) | fn from(value: &hax_frontend_exporter::LocalIdent) -> Self {
    method from (line 35) | fn from(name: &str) -> Self {

FILE: rust-engine/src/ast/identifiers/global_id.rs
  type DefIdInner (line 45) | struct DefIdInner {
    method from (line 58) | fn from(value: hax_frontend_exporter::DefId) -> Self {
    method rename_krate (line 73) | fn rename_krate(&self, name: &str) -> Self {
    method to_debug_string (line 80) | fn to_debug_string(&self) -> String {
  method interning_table (line 108) | fn interning_table() -> &'static Mutex<InterningTable<Self>> {
  type DefId (line 116) | type DefId = Interned<DefIdInner>;
    method rename_krate (line 120) | fn rename_krate(&self, name: &str) -> Self {
    method eq (line 615) | fn eq(&self, other: &GlobalId) -> bool {
  type ExplicitDefId (line 141) | struct ExplicitDefId {
    method parent (line 150) | fn parent(&self) -> Option<Self> {
    method parents (line 160) | fn parents(&self) -> impl Iterator<Item = Self> {
    method rename_krate (line 165) | fn rename_krate(&mut self, name: &str) {
    method into_global_id_inner (line 170) | fn into_global_id_inner(self) -> GlobalIdInner {
    method eq (line 627) | fn eq(&self, other: &GlobalId) -> bool {
  type FreshModule (line 181) | pub struct FreshModule {
    method view (line 192) | fn view(&self) -> view::View {
    method rename_krate (line 197) | fn rename_krate(&self, name: &str) -> Self {
    method to_debug_string (line 214) | fn to_debug_string(&self) -> String {
  type ReservedSuffix (line 221) | pub enum ReservedSuffix {
  type ConcreteId (line 232) | pub struct ConcreteId {
    method view (line 575) | fn view(&self) -> view::View {
    method mod_only_closest_parent (line 581) | fn mod_only_closest_parent(&self) -> Self {
    method rename_krate (line 596) | fn rename_krate(&mut self, name: &str) {
    method to_debug_string (line 600) | fn to_debug_string(&self) -> String {
  type GlobalIdInner (line 243) | enum GlobalIdInner {
    method explicit_def_id (line 527) | fn explicit_def_id(&self) -> Option<ExplicitDefId> {
    method is_constructor (line 535) | pub fn is_constructor(&self) -> bool {
    method is_projector (line 544) | pub fn is_projector(&self) -> bool {
    method is_precondition (line 556) | pub fn is_precondition(&self) -> bool {
    method is_postcondition (line 562) | pub fn is_postcondition(&self) -> bool {
  type TupleId (line 265) | pub enum TupleId {
    method into_owned_concrete_id (line 302) | fn into_owned_concrete_id(self) -> ConcreteId {
    method as_concreteid (line 353) | pub fn as_concreteid(self) -> &'static ConcreteId {
  type GlobalId (line 382) | pub struct GlobalId(Interned<GlobalIdInner>);
    method from (line 295) | fn from(tuple_id: TupleId) -> Self {
    method from_frontend (line 386) | pub fn from_frontend(id: hax_frontend_exporter::DefId, is_value: bool)...
    method krate (line 415) | pub fn krate(self) -> &'static str {
    method to_debug_string (line 432) | pub fn to_debug_string(self) -> String {
    method is_constructor (line 441) | pub fn is_constructor(self) -> bool {
    method is_projector (line 446) | pub fn is_projector(self) -> bool {
    method is_precondition (line 452) | pub fn is_precondition(self) -> bool {
    method is_postcondition (line 458) | pub fn is_postcondition(self) -> bool {
    method view (line 463) | pub fn view(self) -> view::View {
    method expect_tuple (line 472) | pub fn expect_tuple(self) -> Option<TupleId> {
    method mod_only_closest_parent (line 481) | pub fn mod_only_closest_parent(self) -> Self {
    method rename_krate (line 492) | pub fn rename_krate(self, name: &str) -> Self {
    method with_suffix (line 511) | pub fn with_suffix(self, suffix: ReservedSuffix) -> Self {
    method from (line 568) | fn from(concrete_id: ConcreteId) -> Self {
    method eq (line 606) | fn eq(&self, other: &DefId) -> bool {
    method eq (line 621) | fn eq(&self, other: &ExplicitDefId) -> bool {

FILE: rust-engine/src/ast/identifiers/global_id/compact_serialization.rs
  type Repr (line 15) | type Repr = (String, Vec<(DefPathItem, u32)>, DefKind, bool);
  type BorrowedRepr (line 17) | type BorrowedRepr<'a> = (
  function serialize (line 25) | pub fn serialize(edid: &ExplicitDefId) -> String {
  function deserialize (line 42) | pub fn deserialize(s: &str, parent: Option<ExplicitDefId>) -> ExplicitDe...

FILE: rust-engine/src/ast/identifiers/global_id/generated.rs
  function did_0 (line 13) | fn did_0() -> ExplicitDefId {
  function did_1 (line 16) | fn did_1() -> ExplicitDefId {
  function did_2 (line 22) | fn did_2() -> ExplicitDefId {
  function did_3 (line 25) | fn did_3() -> ExplicitDefId {
  function did_4 (line 31) | fn did_4() -> ExplicitDefId {
  function did_5 (line 37) | fn did_5() -> ExplicitDefId {
  function did_6 (line 43) | fn did_6() -> ExplicitDefId {
  function did_7 (line 49) | fn did_7() -> ExplicitDefId {
  function did_8 (line 52) | fn did_8() -> ExplicitDefId {
  function did_9 (line 58) | fn did_9() -> ExplicitDefId {
  function did_10 (line 64) | fn did_10() -> ExplicitDefId {
  function did_11 (line 70) | fn did_11() -> ExplicitDefId {
  function did_12 (line 76) | fn did_12() -> ExplicitDefId {
  function did_13 (line 82) | fn did_13() -> ExplicitDefId {
  function did_14 (line 88) | fn did_14() -> ExplicitDefId {
  function did_15 (line 94) | fn did_15() -> ExplicitDefId {
  function did_16 (line 100) | fn did_16() -> ExplicitDefId {
  function did_17 (line 106) | fn did_17() -> ExplicitDefId {
  function did_18 (line 112) | fn did_18() -> ExplicitDefId {
  function did_19 (line 115) | fn did_19() -> ExplicitDefId {
  function did_20 (line 121) | fn did_20() -> ExplicitDefId {
  function did_21 (line 127) | fn did_21() -> ExplicitDefId {
  function did_22 (line 133) | fn did_22() -> ExplicitDefId {
  function did_23 (line 139) | fn did_23() -> ExplicitDefId {
  function did_24 (line 145) | fn did_24() -> ExplicitDefId {
  function did_25 (line 151) | fn did_25() -> ExplicitDefId {
  function did_26 (line 157) | fn did_26() -> ExplicitDefId {
  function did_27 (line 163) | fn did_27() -> ExplicitDefId {
  function did_28 (line 169) | fn did_28() -> ExplicitDefId {
  function did_29 (line 175) | fn did_29() -> ExplicitDefId {
  function did_30 (line 181) | fn did_30() -> ExplicitDefId {
  function did_31 (line 187) | fn did_31() -> ExplicitDefId {
  function did_32 (line 193) | fn did_32() -> ExplicitDefId {
  function did_33 (line 199) | fn did_33() -> ExplicitDefId {
  function did_34 (line 205) | fn did_34() -> ExplicitDefId {
  function did_35 (line 211) | fn did_35() -> ExplicitDefId {
  function did_36 (line 217) | fn did_36() -> ExplicitDefId {
  function did_37 (line 223) | fn did_37() -> ExplicitDefId {
  function did_38 (line 229) | fn did_38() -> ExplicitDefId {
  function did_39 (line 235) | fn did_39() -> ExplicitDefId {
  function did_40 (line 241) | fn did_40() -> ExplicitDefId {
  function did_41 (line 247) | fn did_41() -> ExplicitDefId {
Condensed preview — 1353 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,015K chars).
[
  {
    "path": ".cargo/config.toml",
    "chars": 37,
    "preview": "[build]\nrustflags = [\"--cfg\", \"hax\"]\n"
  },
  {
    "path": ".docker/Dockerfile",
    "chars": 580,
    "preview": "# This Dockerfile should be run from the root directory of this repo\n# e.g. `docker build -f .docker/Dockerfile .` from "
  },
  {
    "path": ".dockerignore",
    "chars": 41,
    "preview": ".git\n.gitignore\n**/target\n**/_build\ndebug"
  },
  {
    "path": ".envrc",
    "chars": 41,
    "preview": "watch_file rust-toolchain.toml\nuse flake\n"
  },
  {
    "path": ".github/assets/change-padding.sh",
    "chars": 299,
    "preview": "#!/usr/bin/env bash\n# set padding so that logos are centered when rendered by GH\n\nset -euo pipefail\nX=\"${1:?Usage: $0 <n"
  },
  {
    "path": ".github/workflows/bertie.yml",
    "chars": 707,
    "preview": "name: Extract Bertie\n\non:\n  pull_request:\n  merge_group:\n  workflow_dispatch:\n  push:\n    branches: [main]\n\nenv:\n  CARGO"
  },
  {
    "path": ".github/workflows/changelog.yml",
    "chars": 2370,
    "preview": "name: Check Changelog Update\n\non:\n  pull_request:\n    types: [opened, synchronize, reopened, edited]\n    if: github.acto"
  },
  {
    "path": ".github/workflows/clippy_rust_engine.yml",
    "chars": 401,
    "preview": "name: Linting for the Rust engine\n\non:\n  pull_request:\n  merge_group:\n  workflow_dispatch:\n  push:\n    branches: [main]\n"
  },
  {
    "path": ".github/workflows/extract_and_run_coq.yml",
    "chars": 279,
    "preview": "name: Extract and Run - Coq\n\non: [pull_request]\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actio"
  },
  {
    "path": ".github/workflows/flake_lock.yml",
    "chars": 379,
    "preview": "name: Make sure flake.lock is up-to-date\n\non:\n  pull_request:\n  merge_group:\n  workflow_dispatch:\n\njobs:\n  flake_lock_up"
  },
  {
    "path": ".github/workflows/format.yml",
    "chars": 618,
    "preview": "name: Ensure formatting\n\non:\n  pull_request:\n  merge_group:\n  workflow_dispatch:\n  push:\n    branches: [main]\n\njobs:\n  o"
  },
  {
    "path": ".github/workflows/gh_pages.yml",
    "chars": 1019,
    "preview": "name: Deploy to GH Pages\n\non:\n  workflow_dispatch:\n  push:\n    branches: [main]\n\njobs:\n  # Build job\n  build:\n    runs-o"
  },
  {
    "path": ".github/workflows/install_and_test.yml",
    "chars": 1562,
    "preview": "name: Install & test\n\non:\n  pull_request:\n  merge_group:\n  workflow_dispatch:\n  push:\n    branches: [main]\n\njobs:\n  test"
  },
  {
    "path": ".github/workflows/licenses.yml",
    "chars": 636,
    "preview": "name: Check licenses\n\non:\n  pull_request:\n  merge_group:\n  workflow_dispatch:\n  push:\n    branches: [main]\n\njobs:\n  test"
  },
  {
    "path": ".github/workflows/mldsa.yml",
    "chars": 1451,
    "preview": "name: Extract and lax-check libcrux ML-DSA\n\non:\n  schedule:\n    - cron: '0 0 * * *'\n  workflow_dispatch:\n\nenv:\n  CARGO_T"
  },
  {
    "path": ".github/workflows/mlkem.yml",
    "chars": 3621,
    "preview": "name: Extract and TC ML-Kem\n\non:\n  pull_request:\n  merge_group:\n  workflow_dispatch:\n  push:\n    branches: [main]\n\nenv:\n"
  },
  {
    "path": ".github/workflows/playwright-docs.yml",
    "chars": 1619,
    "preview": "name: Playwright Docs Tests\non:\n  schedule:\n    - cron: '0 0 * * *'\n  workflow_dispatch:\njobs:\n  test:\n    timeout-minut"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 1668,
    "preview": "name: Release binaries for hax-engine\n\non:\n  push:\n    tags:\n      - '*'\n\njobs:\n  release-js:\n    if: startsWith(github."
  },
  {
    "path": ".github/workflows/rustc-coverage-tests.yml",
    "chars": 1308,
    "preview": "name: Rustc coverage tests with negative results, and snapshots verification\n\non:\n    pull_request:\n    merge_group:\n   "
  },
  {
    "path": ".github/workflows/stale.yml",
    "chars": 1317,
    "preview": "name: 'Triage stale issues and PRs'\non:\n  schedule:\n    - cron: '00 00 * * 4'\n  workflow_dispatch:\n\njobs:\n  stale:\n    r"
  },
  {
    "path": ".github/workflows/test.yml",
    "chars": 1158,
    "preview": "name: Test Workspace\n\non:\n  push:\n    branches: [main]\n  pull_request:\n  merge_group:\n  workflow_dispatch:\n\nconcurrency:"
  },
  {
    "path": ".github/workflows/test_installs.yml",
    "chars": 1691,
    "preview": "name: Test installations\n\non:\n  pull_request:\n  merge_group:\n  workflow_dispatch:\n  push:\n    branches: [main]\n    \njobs"
  },
  {
    "path": ".github/workflows/this-month-in-hax.yml",
    "chars": 1094,
    "preview": "name: Generate This Month in hax\n\non:\n  workflow_dispatch:\n  schedule:\n    - cron: '0 4 1 * *'\n\njobs:\n  generate:\n    pe"
  },
  {
    "path": ".gitignore",
    "chars": 383,
    "preview": "debug/\ntarget/\n**/*.rs.bk\n**/*.profraw\nnode_modules\nTODO.org\n.direnv\n_build\nresult\n.DS_Store\n.depend\n.cache\n.lake\nproof-"
  },
  {
    "path": ".utils/jq_utils.jq",
    "chars": 1114,
    "preview": "# Removes a field from an object at any depth\ndef remove_field(field):\n    walk(if type == \"object\" and has(field) then "
  },
  {
    "path": ".utils/rebuild.sh",
    "chars": 2420,
    "preview": "#!/usr/bin/env bash\n\n# This is a small script to rebuild Hax (the Rust CLI & frontend and\n# OCaml engine) quickly.\n\n# Op"
  },
  {
    "path": ".utils/rust-by-example.js",
    "chars": 5978,
    "preview": "// This script expects Rust By Example to be in current directory\n// (clone the repo https://github.com/rust-lang/rust-b"
  },
  {
    "path": ".utils/this-month-in-hax-skeleton.sh",
    "chars": 3690,
    "preview": "#!/usr/bin/env bash\n# This script creates a skeleton blog post for the \"This Month in hax\" blog series.\n# It writes a ne"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 10421,
    "preview": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Change"
  },
  {
    "path": "CI.md",
    "chars": 1389,
    "preview": "# Continuous Integration (CI)\n\n## Github Actions\n - [`add_to_project`](./.github/workflows/add_to_project.yml): each\n   "
  },
  {
    "path": "CODEOWNERS",
    "chars": 15,
    "preview": "* @cryspen/hax\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 7192,
    "preview": "# Engineering & Contributing Guidelines\n\nThe following is a set of guidelines for contributing to this repository.\nThese"
  },
  {
    "path": "Cargo.toml",
    "chars": 2504,
    "preview": "[workspace]\nmembers = [\n     \"frontend/exporter\",\n     \"frontend/exporter/options\",\n     \"cli/subcommands\",\n     \"cli/dr"
  },
  {
    "path": "LICENSE",
    "chars": 10756,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "PUBLISHING.md",
    "chars": 2576,
    "preview": "# Publishing\n\n## OCaml\n\nThere is only the package `hax-engine`, that includes a binary and a\nnumber of libraries.\n\nWe ha"
  },
  {
    "path": "README.md",
    "chars": 11490,
    "preview": "<p align=\"center\">\n  <img src=\"logo.svg\"/>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://hacspec.zulipchat.com/\"><img src="
  },
  {
    "path": "cli/default.nix",
    "chars": 3998,
    "preview": "{ craneLib, stdenv, makeWrapper, lib, rustc, rustc-docs, gcc, hax-engine\n, doCheck ? true, libz, libiconv }:\nlet\n  pname"
  },
  {
    "path": "cli/driver/Cargo.toml",
    "chars": 821,
    "preview": "[package]\nname = \"hax-driver\"\nversion.workspace = true\nauthors.workspace = true\nlicense.workspace = true\nhomepage.worksp"
  },
  {
    "path": "cli/driver/src/callbacks_wrapper.rs",
    "chars": 1944,
    "preview": "use hax_types::cli_options::{ENV_VAR_OPTIONS_FRONTEND, ExporterOptions};\n\nuse rustc_ast::Crate;\nuse rustc_driver::{Callb"
  },
  {
    "path": "cli/driver/src/driver.rs",
    "chars": 7085,
    "preview": "#![feature(rustc_private)]\n#![feature(box_patterns)]\n#![feature(trait_alias)]\n#![allow(unused_imports)]\n#![allow(unused_"
  },
  {
    "path": "cli/driver/src/exporter.rs",
    "chars": 7014,
    "preview": "use hax_frontend_exporter::SInto;\nuse hax_frontend_exporter::state::LocalContextS;\nuse hax_types::cli_options::PathOrDas"
  },
  {
    "path": "cli/driver/src/features.rs",
    "chars": 4864,
    "preview": "use std::collections::HashSet;\n\nuse rustc_driver::{Callbacks, Compilation};\nuse rustc_interface::interface;\nuse rustc_mi"
  },
  {
    "path": "cli/subcommands/Cargo.toml",
    "chars": 1668,
    "preview": "[package]\nname = \"cargo-hax\"\nversion.workspace = true\nauthors.workspace = true\nlicense.workspace = true\nhomepage.workspa"
  },
  {
    "path": "cli/subcommands/build.rs",
    "chars": 2040,
    "preview": "fn rustc_version_env_var() {\n    let (_version, channel, date) = version_check::triple().unwrap();\n    println!(\"cargo:r"
  },
  {
    "path": "cli/subcommands/src/cargo_hax.rs",
    "chars": 30258,
    "preview": "#![feature(rustc_private)]\nuse annotate_snippets::{Level, Renderer};\nuse clap::Parser;\nuse colored::Colorize;\nuse hax_ty"
  },
  {
    "path": "cli/subcommands/src/engine_debug_webapp/README.md",
    "chars": 674,
    "preview": "This folder implements a small webapp designed for viewing how a rust\ncrate is translated by the engine, step-by-step.\n\n"
  },
  {
    "path": "cli/subcommands/src/engine_debug_webapp/mod.rs",
    "chars": 1699,
    "preview": "use tiny_http::{Header, Response, Server};\n\nfn get_server() -> Server {\n    let mut port = std::env::var_os(\"HAX_DEBUGGE"
  },
  {
    "path": "cli/subcommands/src/engine_debug_webapp/static/index.html",
    "chars": 3197,
    "preview": "<meta charset=\"UTF-8\">\n<script src=\"//unpkg.com/prismjs@1.29.0/components/prism-core.min.js\"></script>\n<script src=\"//un"
  },
  {
    "path": "cli/subcommands/src/engine_debug_webapp/static/script.js",
    "chars": 11602,
    "preview": "/*\n  This webapp is written in vanilla JS as two pure components: `json` and `phases_viewer`.\n  */\n\n// Make a DOM node\nl"
  },
  {
    "path": "cli/subcommands/src/json_schema.rs",
    "chars": 130,
    "preview": "const JSON_SCHEMA: &str = include_str!(concat!(env!(\"OUT_DIR\"), \"/schema.json\"));\n\nfn main() {\n    println!(\"{}\", JSON_S"
  },
  {
    "path": "deny.toml",
    "chars": 247,
    "preview": "[licenses]\nunused-allowed-license = \"allow\"\nallow = [\n    \"Apache-2.0\",\n    \"MIT\",\n    \"Unicode-DFS-2016\",\n    \"MPL-2.0\""
  },
  {
    "path": "dependabot.yml",
    "chars": 191,
    "preview": "version: 2\nupdates:\n- package-ecosystem: \"cargo\"\n  directory: \"/\"\n  schedule:\n    interval: \"weekly\"\n- package-ecosystem"
  },
  {
    "path": "docs/.test/.gitignore",
    "chars": 47,
    "preview": "test-results/\ngenerated.json\nplaywright-report\n"
  },
  {
    "path": "docs/.test/global-setup.ts",
    "chars": 3204,
    "preview": "// Global setup: writes `generated.json`, the list of pages\nimport { BrowserContext, chromium, expect, FullConfig } from"
  },
  {
    "path": "docs/.test/package.json",
    "chars": 254,
    "preview": "{\n    \"name\": \"docs-ci-checks\",\n    \"private\": true,\n    \"type\": \"module\",\n    \"scripts\": {\n        \"test\": \"playwright "
  },
  {
    "path": "docs/.test/playwright.config.ts",
    "chars": 548,
    "preview": "import { defineConfig } from '@playwright/test';\n\nexport default defineConfig({\n    globalSetup: './global-setup.ts',\n  "
  },
  {
    "path": "docs/.test/tests/docs.spec.ts",
    "chars": 5066,
    "preview": "import { test, expect, request, BrowserContext, Page } from '@playwright/test';\nimport { CrawlPage } from '../global-set"
  },
  {
    "path": "docs/RFCs/.nav.yml",
    "chars": 11,
    "preview": "hide: true\n"
  },
  {
    "path": "docs/RFCs/0000-template.md",
    "chars": 1278,
    "preview": "---\n    title: 0000 template\n    tags:\n        - Accepted\n---\n\n```\n---\ntags: Draft | Proposed | Rejected | Accepted | Su"
  },
  {
    "path": "docs/RFCs/index.md",
    "chars": 9,
    "preview": "# RFCs\n\n\n"
  },
  {
    "path": "docs/blog/.authors.yml",
    "chars": 511,
    "preview": "authors:\n  franziskus:\n    name: Franziskus Kiefer\n    description: Creator\n    avatar: /blog/avatars/franziskus.jpg\n  l"
  },
  {
    "path": "docs/blog/index.md",
    "chars": 97,
    "preview": "---\nweight: 4\n---\n\n# Blog\n\nThe hax blog.\nHere you find announcement, development news, and more.\n"
  },
  {
    "path": "docs/blog/posts/announce-v0.1.md",
    "chars": 5796,
    "preview": "---\nauthors:\n  - franziskus\n  - lucas\ntitle: \"A new chapter\"\ndate: 2025-01-21\n---\n\n# Hax Takes Flight: Announcing Our Fi"
  },
  {
    "path": "docs/blog/posts/hax-for-everyone.md",
    "chars": 8361,
    "preview": "---\nauthors:\n  - maxime\ntitle: \"Hax for everyone\"\ndate: 2025-02-25\n---\n\n# Trying to make hax usable in more contexts\nThe"
  },
  {
    "path": "docs/blog/posts/lucas-departure.md",
    "chars": 3517,
    "preview": "---\nauthors:\n  - lucas\ntitle: \"My Departure from hax and Cryspen\"\ndate: 2026-01-14\n---\n\nToday, I want to share an update"
  },
  {
    "path": "docs/blog/posts/reworking-names/reworking-names.md",
    "chars": 7582,
    "preview": "---\nauthors:\n  - lucas\ntitle: \"Redesigning Global Identifiers in hax\"\ndate: 2025-04-01\n---\n\n# Redesigning Global Identif"
  },
  {
    "path": "docs/blog/posts/rust-gcd-1.md",
    "chars": 36932,
    "preview": "---\nauthors:\n  - alex\ntitle: \"Verifying a real world Rust crate\"\ndate: 2025-12-08\n---\n\n# Verifying a real world Rust cra"
  },
  {
    "path": "docs/blog/posts/rust-gcd-2.md",
    "chars": 5374,
    "preview": "---\nauthors:\n  - alex\ntitle: \"Verifying a real world Rust crate\"\ndate: 2026-01-19\n---\n\n# Verifying a while loop in Hax/L"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-01.md",
    "chars": 4982,
    "preview": "---\nauthors:\n  - lucas\ntitle: \"This Month in Hax: January 2025\"\ndate: 2025-02-10\n---\n\n\nThis blog post continues our ongo"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-02.md",
    "chars": 3881,
    "preview": "---\nauthors:\n  - lucas\ntitle: \"This Month in Hax: February 2025\"\ndate: 2025-03-05\n---\n\nIn February, we merged **23 pull "
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-03.md",
    "chars": 5280,
    "preview": "---\nauthors:\n  - lucas\ntitle: \"This Month in Hax: March 2025\"\ndate: 2025-04-01\n---\n\nIn March, we successfully merged **3"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-04.md",
    "chars": 5650,
    "preview": "---\nauthors:\n  - maxime\ntitle: \"This Month in Hax: April 2025\"\ndate: 2025-05-05\n---\n\nIn April, we successfully merged **"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-05.md",
    "chars": 3093,
    "preview": "---\nauthors:\n  - maxime\ntitle: \"This Month in Hax: May 2025\"\ndate: 2025-05-05\n---\n\nIn May, we successfully merged **19 p"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-06.md",
    "chars": 3685,
    "preview": "---\nauthors:\n  - maxime\ntitle: \"This Month in Hax: June 2025\"\ndate: 2025-06-08\n---\n\nIn June, we successfully merged **21"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-07.md",
    "chars": 4887,
    "preview": "---\nauthors:\n  - maxime\ntitle: \"This Month in Hax: July 2025\"\ndate: 2025-07-07\n---\n\nIn July, we successfully merged **32"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-08.md",
    "chars": 2976,
    "preview": "---\nauthors:\n  - lucas\ntitle: \"This Month in Hax: August 2025\"\ndate: 2025-09-02\n---\n\nIn August, we successfully merged *"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-09.md",
    "chars": 6029,
    "preview": "---\nauthors:\n  - clement\ntitle: \"This Month in Hax: September 2025\"\ndate: 2025-10-01\n---\n\nIn September, we successfully "
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-10.md",
    "chars": 2736,
    "preview": "---\nauthors:\n  - lucas\ntitle: \"This Month in Hax: October 2025\"\ndate: 2025-11-01\n---\n\nIn October, we successfully merged"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2025-11.md",
    "chars": 2740,
    "preview": "---\nauthors:\n  - maxime\ntitle: \"This Month in Hax: November 2025\"\ndate: 2025-12-01\n---\n\nIn November, we successfully mer"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2026-01.md",
    "chars": 4419,
    "preview": "---\nauthors:\n  - maxime\ntitle: \"This Month in Hax: January 2026\"\ndate: 2026-02-02\n---\n\nIn January, we successfully merge"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2026-02.md",
    "chars": 4573,
    "preview": "---\nauthors:\n  - alex\ntitle: \"This Month in Hax: February 2026\"\ndate: 2026-03-03\n---\n\nIn February, we successfully merge"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2026-03.md",
    "chars": 1546,
    "preview": "---\nauthors:\n  - maxime\ntitle: \"This Month in Hax: March 2026\"\ndate: 2026-04-01\n---\n\nIn March, we successfully merged **"
  },
  {
    "path": "docs/blog/posts/this-month-in-hax/2026-04.md",
    "chars": 2564,
    "preview": "---\nauthors:\n  - alex\ntitle: \"This Month in Hax: April 2026\"\ndate: 2026-05-07\n---\n\nIn April, we successfully merged **11"
  },
  {
    "path": "docs/default.nix",
    "chars": 1349,
    "preview": "{ stdenv, buildPythonPackage, fetchPypi, setuptools, wheel, mkdocs\n, mkdocs-material, fetchFromGitHub, natsort, wcmatch,"
  },
  {
    "path": "docs/dev/architecture.md",
    "chars": 5644,
    "preview": "# Architecture\n\nHax is a software pipeline designed to transform Rust code into various formal verification backends suc"
  },
  {
    "path": "docs/dev/ast_ebnf.md",
    "chars": 6370,
    "preview": "We currently take inputs from the following AST. Literals are strings, numbers and\nbooleans.\n\n``` ebnf\nchar ::= [a-zA-Z]"
  },
  {
    "path": "docs/dev/docs.md",
    "chars": 768,
    "preview": "# Docs\n\n## mkdocs material (this page)\n\nInstall dependencies\n\n```bash\npip install mkdocs-glightbox mkdocs-nav-weight mkd"
  },
  {
    "path": "docs/dev/index.md",
    "chars": 216,
    "preview": "---\nweight: 5\n---\n\n# Dev on hax\nThis chapter contains information about internals of hax.\n\nPlease read the [`CONTRIBUTIN"
  },
  {
    "path": "docs/dev/libraries_macros.md",
    "chars": 1070,
    "preview": "# Libraries\n\n# Macros and attributes\nThe hax engine understands only one attribute: `#[_hax::json(PAYLOAD)]`,\nwhere `PAY"
  },
  {
    "path": "docs/engine/index.md",
    "chars": 132,
    "preview": "# Engine\n\nThe hax engine. Its [odoc](https://ocaml.github.io/odoc/) documentation can be found [here](./docs/hax-engine/"
  },
  {
    "path": "docs/engine/toolchain_structure/index.md",
    "chars": 535,
    "preview": "# Toolchain structure\n\nHax is composed of three main parts:\n\n* The frontend, which interfaces with rustc to extract Rust"
  },
  {
    "path": "docs/frontend/evaluation.md",
    "chars": 9080,
    "preview": "# Evaluation of the hax Frontend\n\nThis section provides an evaluation of the hax frontend, consisting of two parts:\n\n- A"
  },
  {
    "path": "docs/frontend/index.md",
    "chars": 9325,
    "preview": "# Frontend\n\nhax is a tool designed to facilitate the formal verification of Rust programs. It enables the translation of"
  },
  {
    "path": "docs/index.md",
    "chars": 621,
    "preview": "# hax\n\nhax is a tool for high assurance translations of a large subset of\nRust into formal languages such as [F\\*](https"
  },
  {
    "path": "docs/javascripts/ansi_up.js",
    "chars": 14107,
    "preview": "/**\n * Minified by jsDelivr using Terser v5.19.2.\n * Original file: /npm/ansi_up@6.0.2/ansi_up.js\n *\n * Do NOT use SRI w"
  },
  {
    "path": "docs/javascripts/fstar.js",
    "chars": 2713,
    "preview": "/*! `ocaml` grammar compiled for Highlight.js 11.10.0 */\n  (function(){\n    var hljsGrammar = (function () {\n  'use stri"
  },
  {
    "path": "docs/javascripts/hax_playground.js",
    "chars": 7529,
    "preview": "const PLAYGROUND_URL = 'https://hax-playground.cryspen.com';\n\n// Fetches the commit hash for latest `main` of hax\nasync "
  },
  {
    "path": "docs/javascripts/lz-string.js",
    "chars": 4815,
    "preview": "var LZString=function(){var r=String.fromCharCode,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\","
  },
  {
    "path": "docs/manual/faq/include-flags.md",
    "chars": 5636,
    "preview": "# **Rust Item Extraction Using `cargo hax`**\n\n## **Overview**\nWhen extracting Rust items with hax, it is often necessary"
  },
  {
    "path": "docs/manual/faq/index.md",
    "chars": 235,
    "preview": "---\nweight: 200\n---\n\n# Troubleshooting/FAQ\n\nThis chapter captures a list of common questions or issues and how to resolv"
  },
  {
    "path": "docs/manual/faq/into.md",
    "chars": 22,
    "preview": "# Troubleshooting/FAQ\n"
  },
  {
    "path": "docs/manual/fstar/.nav.yml",
    "chars": 9,
    "preview": "title: F*"
  },
  {
    "path": "docs/manual/fstar/index.md",
    "chars": 147,
    "preview": "This section introduces the F\\* backend of hax. It covers how to setup a project, and the basics of how to use the hax a"
  },
  {
    "path": "docs/manual/fstar/quick_start.md",
    "chars": 4396,
    "preview": "---\nweight: 0\n---\n\n# Quick start\n\nDo you want to try hax out on a Rust crate of yours? This chapter is\nwhat you are look"
  },
  {
    "path": "docs/manual/fstar/tutorial/data-invariants.md",
    "chars": 3271,
    "preview": "---\nweight: 2\n---\n\n# Data invariants\n\nIn the two previous chapters we saw how to write specifications on\nfunctions, be i"
  },
  {
    "path": "docs/manual/fstar/tutorial/index.md",
    "chars": 676,
    "preview": "---\nweight: 1\n---\n\n# Tutorial\n\nThis tutorial is a guide for formally verifying properties about Rust\nprograms using the "
  },
  {
    "path": "docs/manual/fstar/tutorial/panic-freedom.md",
    "chars": 5041,
    "preview": "---\nweight: 0\n---\n\n# Panic freedom\n\nLet's start with a simple example: a function that squares a `u8`\ninteger. To extrac"
  },
  {
    "path": "docs/manual/fstar/tutorial/proofs/fstar/extraction/Makefile",
    "chars": 4454,
    "preview": "# This is a generically useful Makefile for F* that is self-contained\n#\n# It is tempting to factor this out into multipl"
  },
  {
    "path": "docs/manual/fstar/tutorial/proofs/fstar/extraction/Tutorial_src.Math.Lemmas.fst",
    "chars": 259,
    "preview": "module Tutorial_src.Math.Lemmas\n#set-options \"--fuel 0 --ifuel 1 --z3rlimit 150\"\nopen Core\nopen FStar.Mul\n\n\nval cancel_m"
  },
  {
    "path": "docs/manual/fstar/tutorial/proofs/fstar/extraction/Tutorial_src.fst",
    "chars": 2484,
    "preview": "module Tutorial_src\n#set-options \"--fuel 0 --ifuel 1 --z3rlimit 15\"\nopen Core\nopen FStar.Mul\n\ntype t_F3 =\n  | F3_E1 : t_"
  },
  {
    "path": "docs/manual/fstar/tutorial/properties.md",
    "chars": 5563,
    "preview": "---\nweight: 1\n---\n\n# Proving properties\n\nIn the last chapter, we proved one property on the `square` function:\npanic fre"
  },
  {
    "path": "docs/manual/index.md",
    "chars": 3037,
    "preview": "---\nweight: -5\n---\n\n# Introduction\n\nhax is a tool for high assurance translations of a large subset of\nRust into formal "
  },
  {
    "path": "docs/manual/lean/index.md",
    "chars": 212,
    "preview": "This section introduces the Lean backend of hax. It shows the basic setup to use hax and Lean on a Rust crate, and gives"
  },
  {
    "path": "docs/manual/lean/internals.md",
    "chars": 10918,
    "preview": "---\nweight: 102\n---\n\n# Internals\n\nThe encoding of Rust in Lean has three main components:\n\n* the *syntax* (items, functi"
  },
  {
    "path": "docs/manual/lean/quick_start.md",
    "chars": 4710,
    "preview": "---\nweight: 100\n---\n\n# Quick start\n\n## Setup the tools\n\n - <input type=\"checkbox\" class=\"user-checkable\"/> [Install the "
  },
  {
    "path": "docs/manual/lean/tutorial/index.md",
    "chars": 148,
    "preview": "---\nweight: 101\n---\n\n# Tutorial\n\nThis tutorial focuses on proving properties with the hax toolchain and its\n[Lean](https"
  },
  {
    "path": "docs/manual/lean/tutorial/panic-freedom.md",
    "chars": 4129,
    "preview": "---\nweight: 0\n---\n\n# Panic freedom\n\nLet's start with a simple example: a function that squares a `u8`\ninteger. To extrac"
  },
  {
    "path": "docs/manual/lean/tutorial/properties.md",
    "chars": 794,
    "preview": "---\nweight: 1\n---\n\n# Proving properties\n\nIn the previous chapter, we proved one property of the `square` function:\npanic"
  },
  {
    "path": "docs/overrides/main.html",
    "chars": 835,
    "preview": "{% extends \"base.html\" %}\n\n{% block site_meta %}\n<script type=\"module\" src=\"https://esm.sh/run\"></script>\n<link rel=\"sty"
  },
  {
    "path": "docs/publications.md",
    "chars": 1778,
    "preview": "---\nweight: 5\n---\n\nTo cite hax, please use\n**[hax: Verifying Security-Critical Rust Software using Multiple Provers](htt"
  },
  {
    "path": "docs/stylesheets/hax_playground.css",
    "chars": 703,
    "preview": ".md-hax-playground::after {\n    display: none;\n}\n\ntextarea.code.inline+div.CodeMirror div.CodeMirror-lines {\n    padding"
  },
  {
    "path": "docs/stylesheets/logo.css",
    "chars": 459,
    "preview": ".md-header__button[data-md-component=\"logo\"] {\n    display: block !important;\n}\n\nlabel.md-header__button.md-icon[for=\"__"
  },
  {
    "path": "docs/stylesheets/tags-colors.css",
    "chars": 843,
    "preview": "/* This sets the color of the ADR status tags see https://github.com/squidfunk/mkdocs-material/discussions/5101 */\n\n.md-"
  },
  {
    "path": "engine/.ocamlformat",
    "chars": 35,
    "preview": "profile = default\nversion = 0.27.0\n"
  },
  {
    "path": "engine/DEV.md",
    "chars": 3426,
    "preview": "# Notes about developping on the engine\n\nNote that Hax uses [JSON schemas](https://json-schema.org/): an OCaml\nmodule `t"
  },
  {
    "path": "engine/backends/coq/coq/coq_backend.ml",
    "chars": 41696,
    "preview": "open Hax_engine\nopen Utils\nopen Base\nopen Coq_ast\n\ninclude\n  Backend.Make\n    (struct\n      open Features\n      include "
  },
  {
    "path": "engine/backends/coq/coq/coq_backend.mli",
    "chars": 82,
    "preview": "open Hax_engine.Backend\ninclude T with module BackendOptions = UnitBackendOptions\n"
  },
  {
    "path": "engine/backends/coq/coq/dune",
    "chars": 337,
    "preview": "(library\n (name coq_backend)\n (package hax-engine)\n (libraries hax_engine base hacspeclib_macro_parser coq_ast)\n (prepro"
  },
  {
    "path": "engine/backends/coq/coq_ast.ml",
    "chars": 30553,
    "preview": "open Hax_engine\nopen Utils\nopen Base\n\nmodule type Library = sig\n  module Notation : sig\n    val int_repr : string -> str"
  },
  {
    "path": "engine/backends/coq/dune",
    "chars": 411,
    "preview": "(library\n (name coq_ast)\n (package hax-engine)\n (libraries hax_engine base hacspeclib_macro_parser)\n (preprocess\n  (pps\n"
  },
  {
    "path": "engine/backends/coq/ssprove/dune",
    "chars": 341,
    "preview": "(library\n (name ssprove_backend)\n (package hax-engine)\n (libraries hax_engine base hacspeclib_macro_parser coq_ast)\n (pr"
  },
  {
    "path": "engine/backends/coq/ssprove/ssprove_backend.ml",
    "chars": 91012,
    "preview": "open Hax_engine\nopen Utils\nopen Base\nopen Coq_ast\n\ninclude\n  Backend.Make\n    (struct\n      open Features\n      include "
  },
  {
    "path": "engine/backends/coq/ssprove/ssprove_backend.mli",
    "chars": 82,
    "preview": "open Hax_engine.Backend\ninclude T with module BackendOptions = UnitBackendOptions\n"
  },
  {
    "path": "engine/backends/easycrypt/dune",
    "chars": 306,
    "preview": "(library\n (name easycrypt_backend)\n (package hax-engine)\n (libraries hax_engine)\n (preprocess\n  (pps\n   ppx_yojson_conv\n"
  },
  {
    "path": "engine/backends/easycrypt/easycrypt_backend.ml",
    "chars": 12466,
    "preview": "(* -------------------------------------------------------------------- *)\nopen Hax_engine\nopen Base\n\n(* ---------------"
  },
  {
    "path": "engine/backends/easycrypt/easycrypt_backend.mli",
    "chars": 82,
    "preview": "open Hax_engine.Backend\ninclude T with module BackendOptions = UnitBackendOptions\n"
  },
  {
    "path": "engine/backends/fstar/dune",
    "chars": 366,
    "preview": "(library\n (name fstar_backend)\n (package hax-engine)\n (wrapped false)\n (libraries hax_engine base fstar_surface_ast hacs"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/.gitignore",
    "chars": 14,
    "preview": "_build\nresult\n"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/.ocamlformat-ignore",
    "chars": 2,
    "preview": "*\n"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_BaseTypes.ml",
    "chars": 309,
    "preview": "type char   = FStar_Char.char[@@deriving yojson,show]\ntype float  = Base.Float.t\ntype double = Base.Float.t\ntype byte   "
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Char.ml",
    "chars": 64,
    "preview": "module UChar = BatUChar\ntype char = int[@@deriving yojson,show]\n"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Compiler_Effect.ml",
    "chars": 445,
    "preview": "let op_Bar_Greater (x : 'a) (f : ('a -> 'b)) : 'b = f x\nlet op_Less_Bar  (f : ('a -> 'b)) (x : 'a) : 'b = f x\n\ntype 'a r"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Compiler_List.ml",
    "chars": 139,
    "preview": "(* We give an implementation here using OCaml's BatList,\n   which provides tail-recursive versions of most functions *)\n"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Compiler_Range.ml",
    "chars": 6664,
    "preview": "open Prims\ntype file_name = Prims.string[@@deriving yojson,show]\ntype pos = {\n  line: Prims.int ;\n  col: Prims.int }[@@d"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Compiler_Util.ml",
    "chars": 16601,
    "preview": "let ensure_decimal s = Z.to_string (Z.of_string s)\n\n\nlet max_int = Z.of_int max_int\nlet is_letter c = if c > 255 then fa"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Const.ml",
    "chars": 1244,
    "preview": "open Prims\ntype signedness =\n  | Unsigned \n  | Signed [@@deriving yojson,show]\ntype width =\n  | Int8 \n  | Int16 \n  | Int"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Errors.ml",
    "chars": 23274,
    "preview": "open Prims\nexception Invalid_warn_error_setting of Prims.string \nlet (uu___is_Invalid_warn_error_setting : Prims.exn -> "
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Errors_Codes.ml",
    "chars": 97640,
    "preview": "open Prims\ntype error_flag =\n  | CFatal \n  | CAlwaysError \n  | CError \n  | CWarning \n  | CSilent \nlet (uu___is_CFatal : "
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Getopt.ml",
    "chars": 3812,
    "preview": "let noshort = 0\ntype 'a opt_variant =\n  | ZeroArgs of (unit -> 'a)\n  | OneArg of (string -> 'a) * string\ntype 'a opt' = "
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Ident.ml",
    "chars": 6375,
    "preview": "open Prims\ntype ident = {\n  idText: Prims.string ;\n  idRange: FStar_Compiler_Range.range }[@@deriving yojson,show,yojson"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_ImmutableArray_Base.ml",
    "chars": 170,
    "preview": "type 'a t = 'a array\n\nlet of_list (l:'a list) = Array.of_list l\n\nlet length (a: 'a t) = Z.of_int (Array.length a)\n\nlet i"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_List.ml",
    "chars": 1164,
    "preview": "(* We give an implementation here using OCaml's BatList,\n   which provides tail-recursive versions of most functions *)\n"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_AST.ml",
    "chars": 109290,
    "preview": "open Prims\ntype level =\n  | Un \n  | Expr \n  | Type_level \n  | Kind \n  | Formula \nlet (uu___is_Un : level -> Prims.bool) "
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_AST_Util.ml",
    "chars": 47304,
    "preview": "open Prims\nlet (eq_ident : FStar_Ident.ident -> FStar_Ident.ident -> Prims.bool) =\n  fun i1 -> fun i2 -> FStar_Ident.ide"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_Const.ml",
    "chars": 30620,
    "preview": "open Prims\nlet (p2l : FStar_Ident.path -> FStar_Ident.lident) =\n  fun l -> FStar_Ident.lid_of_path l FStar_Compiler_Rang"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_Driver.ml",
    "chars": 3049,
    "preview": "open Prims\nlet (is_cache_file : Prims.string -> Prims.bool) =\n  fun fn ->\n    let uu___ = FStar_Compiler_Util.get_file_e"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_LexFStar.ml",
    "chars": 24555,
    "preview": "open FStar_Parser_Parse\nopen FStar_Parser_Util\n\nmodule Option  = BatOption\nmodule String  = BatString\nmodule Hashtbl = B"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_Parse.ml",
    "chars": 636251,
    "preview": "open Prims\nopen FStar_Errors\nopen FStar_Compiler_List\nopen FStar_Compiler_Util\nopen FStar_Compiler_Range\n(* open FStar_O"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_ParseIt.ml",
    "chars": 11683,
    "preview": "module U = FStar_Compiler_Util\nopen FStar_Errors\n(* open FStar_Syntax_Syntax *)\nopen Lexing\nopen FStar_Sedlexing\nopen FS"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_ToDocument.ml",
    "chars": 219348,
    "preview": "open Prims\nlet (maybe_unthunk : FStar_Parser_AST.term -> FStar_Parser_AST.term) =\n  fun t ->\n    match t.FStar_Parser_AS"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_Utf8.ml",
    "chars": 5450,
    "preview": "(*\n   Originally part of the ulex package with the following license:\n\n   Copyright 2005 by Alain Frisch.\n\n   Permission"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Parser_Util.ml",
    "chars": 1953,
    "preview": "open FStar_Compiler_Range\nopen Lexing\n\n(* This brings into scope enough the translation of F# type names into the\n * cor"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Pervasives.ml",
    "chars": 87,
    "preview": "let id : 'a . 'a -> 'a = fun x -> x\ntype ('a, 'b) either =\n  | Inl of 'a\n  | Inr of 'b\n"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Pervasives_Native.ml",
    "chars": 200,
    "preview": "type 'a option' = 'a option =\n  | None\n  | Some of 'a[@@deriving yojson,show]\n\ntype 'a option = 'a option' =\n  | None\n  "
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Pprint.ml",
    "chars": 2812,
    "preview": "(*\n   Copyright 2016 Microsoft Research\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may n"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_Sedlexing.ml",
    "chars": 2625,
    "preview": "(**\nA custom version of Sedlexing enhanced with\nlc, bol and fname position tracking and\nspecialized for UTF-8 string inp"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_String.ml",
    "chars": 1212,
    "preview": "let make i c = BatUTF8.init (Z.to_int i) (fun _ -> BatUChar.chr c)\nlet strcat s t = s ^ t\nlet op_Hat s t =  strcat s t\n\n"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/FStar_VConfig.ml",
    "chars": 17476,
    "preview": "open Prims\ntype vconfig =\n  {\n  initial_fuel: Prims.int ;\n  max_fuel: Prims.int ;\n  initial_ifuel: Prims.int ;\n  max_ifu"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/README",
    "chars": 55,
    "preview": "Those files were extracted from github:fstarlang/fstar\n"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/dune",
    "chars": 272,
    "preview": "(library\n (name fstar_surface_ast)\n (package hax-engine)\n (libraries batteries stdint ppxlib menhirLib pprint base)\n (wr"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/prims.ml",
    "chars": 1055,
    "preview": "type int = Z.t[@printer Z.pp_print][@@deriving show]\nlet of_int = Z.of_int\nlet int_zero = Z.zero\nlet int_one = Z.one\nlet"
  },
  {
    "path": "engine/backends/fstar/fstar-surface-ast/z.ml",
    "chars": 1278,
    "preview": "type t = String.t [@@deriving show]\n\nlet to_t = Base.Int.of_string\nlet of_t = Base.Int.to_string\n\nlet compare = String.c"
  },
  {
    "path": "engine/backends/fstar/fstar_ast.ml",
    "chars": 3895,
    "preview": "open Hax_engine.Utils\nopen Base\nmodule Util = FStar_Parser_Util\nmodule AST = FStar_Parser_AST\nmodule Const = FStar_Const"
  },
  {
    "path": "engine/backends/fstar/fstar_backend.ml",
    "chars": 82146,
    "preview": "open Hax_engine\nopen Utils\nopen Base\n\ninclude\n  Backend.Make\n    (struct\n      open Features\n      include Off\n      inc"
  },
  {
    "path": "engine/backends/fstar/fstar_backend.mli",
    "chars": 162,
    "preview": "open Hax_engine.Backend\ninclude T with type BackendOptions.t = Hax_engine.Types.f_star_options_for__null\n\nval post_proce"
  },
  {
    "path": "engine/backends/lean/dune",
    "chars": 323,
    "preview": "(library\n (name lean_backend)\n (package hax-engine)\n (wrapped false)\n (libraries hax_engine base)\n (preprocess\n  (pps\n  "
  },
  {
    "path": "engine/backends/lean/lean_backend.ml",
    "chars": 4087,
    "preview": "open Hax_engine\nopen Utils\nopen Base\n\ninclude\n  Backend.Make\n    (struct\n      open Features\n      include Off\n      inc"
  },
  {
    "path": "engine/backends/proverif/dune",
    "chars": 351,
    "preview": "(library\n (name proverif_backend)\n (package hax-engine)\n (wrapped false)\n (libraries hax_engine base hacspeclib_macro_pa"
  },
  {
    "path": "engine/backends/proverif/proverif_backend.ml",
    "chars": 35945,
    "preview": "open Hax_engine\nopen Utils\nopen Base\n\ninclude\n  Backend.Make\n    (struct\n      open Features\n      include Off\n      inc"
  },
  {
    "path": "engine/backends/proverif/proverif_backend.mli",
    "chars": 98,
    "preview": "open Hax_engine.Backend\ninclude T with type BackendOptions.t = Hax_engine.Types.pro_verif_options\n"
  },
  {
    "path": "engine/bin/dune",
    "chars": 596,
    "preview": "(library\n (name lib)\n (modules lib)\n (wrapped false)\n (libraries\n  hax_engine\n  fstar_backend\n  lean_backend\n  coq_backe"
  },
  {
    "path": "engine/bin/dune-js",
    "chars": 195,
    "preview": "(executable\n (optional)\n (name js_driver)\n (modes js)\n (modules js_driver)\n (js_of_ocaml\n  (javascript_files js_stubs/mu"
  },
  {
    "path": "engine/bin/js_driver.ml",
    "chars": 2891,
    "preview": "open Base\nopen Js_of_ocaml\n\n(* Strings are slow with js_of_ocaml. Thus, parsing a string into a\n   `Yojson.Safe.t` is ex"
  },
  {
    "path": "engine/bin/js_stubs/mutex.js",
    "chars": 1272,
    "preview": "// Whether to log.\nvar v_log = false;\nfunction ll(s) { if (v_log) console.log(s); }\n\n//Provides: caml_condition_broadcas"
  },
  {
    "path": "engine/bin/js_stubs/stdint.js",
    "chars": 27840,
    "preview": "\n// Provides: int8_of_nativeint\nfunction int8_of_nativeint(){};\n// Provides: int8_of_float\nfunction int8_of_float(){};\n/"
  },
  {
    "path": "engine/bin/js_stubs/unix.js",
    "chars": 16731,
    "preview": "// //Provides: unix_ll\n// function unix_ll(s, args) { \n//   // if (unix_ll.log) joo_global_object.console.warn(s, args);"
  },
  {
    "path": "engine/bin/lib.ml",
    "chars": 11752,
    "preview": "open Hax_engine\nopen Base\nopen Stdio\nopen Utils\n\nlet setup_logs (options : Types.engine_options) =\n  let level : Logs.le"
  },
  {
    "path": "engine/bin/lib.mli",
    "chars": 68,
    "preview": "val engine : unit -> unit\nval driver_for_rust_engine : unit -> unit\n"
  },
  {
    "path": "engine/bin/native_driver.ml",
    "chars": 651,
    "preview": "open Hax_engine\nopen Base\n\nlet _ =\n  Hax_io.init\n    (module struct\n      let stdin_json_stream =\n        ref (Yojson.Sa"
  },
  {
    "path": "engine/default.nix",
    "chars": 3444,
    "preview": "{ ocamlPackages, fetchzip, hax-rust-frontend, hax-engine-names-extract, rustc\n, nodejs, jq, closurecompiler, gnused, lib"
  },
  {
    "path": "engine/doc/dune",
    "chars": 57,
    "preview": "(documentation\n (package hax-engine)\n (mld_files index))\n"
  },
  {
    "path": "engine/doc/index.mld",
    "chars": 632,
    "preview": "{0 Hax Engine}\n\nThe engine of hax is written in OCaml, and has the following structure:\n{ul {- the {!module-Hax_engine} "
  },
  {
    "path": "engine/dune-project",
    "chars": 1085,
    "preview": "(lang dune 3.0)\n\n(name hax-engine)\n\n(version 0.3.6)\n\n(generate_opam_files true)\n\n(source\n (github hacspec/hax))\n\n(author"
  },
  {
    "path": "engine/hax-engine.opam",
    "chars": 1232,
    "preview": "# This file is generated by dune, edit dune-project instead\nopam-version: \"2.0\"\nversion: \"0.3.6\"\nsynopsis: \"The engine o"
  },
  {
    "path": "engine/hax-engine.opam.template",
    "chars": 29,
    "preview": "depexts: [\n  [\"nodejs\"] {}\n]\n"
  },
  {
    "path": "engine/lib/analyses/function_dependency.ml",
    "chars": 766,
    "preview": "open! Prelude\n\nmodule%inlined_contents Make (F : Features.T) = struct\n  module FA = F\n  module A = Ast.Make (F)\n  module"
  },
  {
    "path": "engine/lib/analyses/mutable_variables.ml",
    "chars": 7301,
    "preview": "open! Prelude\n\nmodule%inlined_contents Make (F : Features.T) = struct\n  module FA = F\n  module A = Ast.Make (F)\n  module"
  },
  {
    "path": "engine/lib/analyses.ml",
    "chars": 104,
    "preview": "module Function_dependency = Function_dependency.Make\nmodule Mutable_variables = Mutable_variables.Make\n"
  },
  {
    "path": "engine/lib/ast.ml",
    "chars": 16898,
    "preview": "open! Prelude\n\ntype todo = string [@@deriving show, yojson, hash, compare, sexp, hash, eq]\ntype span = Span.t [@@derivin"
  },
  {
    "path": "engine/lib/ast_builder.ml",
    "chars": 7627,
    "preview": "open! Prelude\nopen! Ast\n\nmodule Make (F : Features.T) = struct\n  module AST = Ast.Make (F)\n  open AST\n\n  open struct\n   "
  }
]

// ... and 1153 more files (download for full content)

About this extraction

This page contains the full source code of the hacspec/hax GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1353 files (7.2 MB), approximately 2.0M tokens, and a symbol index with 5651 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!