- Rocq Prover 88%
- Shell 5%
- Rust 4%
- OCaml 3%
- C <1%
- 2 more languages <1%
Loom #
Loom compiles fixed synchronous circuits into ONNX Boolean tensor graphs. The compiler uses executable Rocq definitions and proofs, extracted to a private OCaml backend. All six public tools are Rust programs: project handling, formatting, linting, test files, execution and visualization live in Rust. The full source language and all nine release emission strategies are implemented. See the implementation and proof boundaries.
Build and use #
Install Rust/Cargo, Rocq 9.3, OCaml, ocamlfind, Zarith and just.
just build
export PATH="$PWD/bin:$PATH"
loom new example
cd example
loom build
loom run x=41
loom test
just build invokes make -C rocq install, which checks the proof gate before
installing all six Rust tools and the private loom-compiler backend in bin/:
loom: projects, manifests, profiles and workspacesloomc: parsing, elaboration, lowering, evaluation, ONNX and model certificatesloomfmt: source formattingloomlint: syntax, semantics and unused-wire diagnosticsloomtest: source tests and optional ONNX Runtime comparisonsloomviz: emitted graphs as DOT, SVG, PNG or PDF
just rocq-experimental is the development build with -rocq command names.
It does not replace the proof gate. The earlier all-OCaml migration passed the
coordinated gates on 2026-11-10. The Rust split has separate compatibility tests;
rerun the gates after changes. See
the validation record for coverage and remaining proof boundaries.
Verification and tests #
just verify
just check
just rust-test
just rust-clippy
just rust-fmt
ORT_DYLIB_PATH=/path/to/libonnxruntime.dylib make -C rocq onnx-test
ORT_DYLIB_PATH=/path/to/libonnxruntime.dylib make -C rocq utilities-test
just verify runs the Rocq proof gate and native tests. just check runs native
compiler, project, CLI, fixture and certificate checks. Runtime tests require
the ONNX Runtime shared library; Graphviz dot is needed for SVG, PNG and PDF.
No Haskell or Lean toolchain is required.
Closed certificates cover the compiler core, configured optimizations and source/model results, including dense/sparse integer and array strategies. Independent raw-source, whole-circuit and component-unit acceptance are proved, including all prefix/disjoint lowering modes. The source-to-model boundary does not include filesystem/project operations or runtime tools. Extraction, the execution platform and external ONNX Runtime remain trusted, rather than proved correct. See verification scope.
Emission choices #
Release supports scalar, ReLU-XOR, vector, CPU-cost, calibrated minimum-batch, packed/lane reuse, conjunction fusion, dense integer affine and sparse integer affine emission. Array read/write controls compose with those strategies. Single-source lane Gather reuse is implemented; multi-source planning and dynamic Gather/Scatter array lowering remain planning/performance work, not missing source-language operations. Target names select ONNX policies, not guaranteed execution-provider placement.
Source layout #
rocq/Loom/: executable definitions and proofsrocq/: compiler extraction, narrow OCaml adapters and compiler testscrates/loom-tools/: Rust command-line tools, runtime and utility teststests/fixtures/,examples/: shared language fixtures and runnable circuitsbook/src/: language and tool documentation
State is explicit. Feed next-state outputs back as register inputs; ONNX ports are least-significant-bit-first float32 vectors containing zero or one. The language specification is normative. Retired implementations are not native build dependencies.
On this Mac, ignored rocq/Makefile.local selects the installed Xcode linker,
SDK and GMP location. It does not change global developer-tool settings.