Internals

Verification

The checks cover the extracted facts, the generated code, cvc5's own tests and examples, and this site. This page lists them, the commands that run them, and what they do not establish.

pixi run --locked test builds one Mojo executable for all runnable fixtures and examples, using source imports, O0 and assertions enabled. Each fixture runs in a fresh process against that executable. Native C helpers are separate builds. Unchanged reruns reuse the artifact; test --run-only requires reuse. Prepare dependencies with pixi run --locked fetch first.

Compiler rejection, alternate compiler settings, sanitizers and package imports require additional compilations and remain explicit separate checks. See the development commands.

Test layers

✓ marks the layers that run today.

Layer What it checks Status
Extraction Every C signature compiles against the headers. Every enum value comes from a compiled program. Every declared function is exported by a library of the release. ✓
Raw-layer types Static assertions, compiled against the headers, of the size of every C type the raw layer maps, and of its signedness where that matters ✓
Completeness gate Every Python method has a binding status, no override is stale, and the automatic join stays above its minimum (the completeness gate) ✓
Reproducibility CI regenerates everything and requires the committed files to match ✓
Generation policy Unexpected or stale raw/base API omissions fail generation. Unit regressions mutate the native release protocol and C++ defaults and check that extraction refuses them ✓
Boundary contracts pixi run --locked contracts runs string, null-formatting, single-pass formatting, literal-range, collection-input, returned-collection, retention, ownership, return-conversion, compound FFI, and generated-sequence regressions from the shared executable. Formatting checks enforce native-call counts and failure behavior; injected decoding failures check pending-reference cleanup; statistics checks cover filtering, order, detached values, and partial decoding; compound comparisons and seeded sequences check C/raw/public observations, with an independent exact-arithmetic model for sequences ✓
Runtime loading pixi run --locked runtime-test checks selection precedence, missing libraries/symbols, version rejection, invalid version text, stable cached failures, and cleanup before process exit. The default uses the shared executable; alternate build settings are explicit checks. See the initialization report ✓
Raw layer tests/smoke/test_raw.mojo calls at least one generated method for each crossing and direction, and checks the values. The crossings are handles, owners, enums, bool, each integer width, strings, string and handle arrays, out-parameters, 32-bit strings, and an error ✓
Base API tests/smoke/test_api.mojo covers each marshaling rule of bindgen.gen_api and each generated class of the base API, and checks the values. It includes optional strings, variadic and List overloads, range checks, tuples, a borrowed term manager, datatypes, the parser and its errors, proofs, and synthesis ✓
Smoke tests/smoke/test_smoke.mojo builds terms, calls checkSat, gets an unsat core, and raises and recovers from an error ✓
Threads tests/smoke/test_threads.mojo starts 16 independent workers together, verifies one shared cached API, deliberately overlaps pending native errors and clean threads, checks worker-specific Unicode diagnostics, and solves after recovery. The runtime matrix also checks concurrent cached loading failures ✓
Lifetimes tests/smoke/test_lifetimes.mojo checks that a result outlives its solver, that a term outlives its term manager value, and that print(solver.checkSat()) works ✓
Leaks tests/smoke/test_leaks.mojo exercises repeated owner lifetimes. test_retention.mojo exercises 200,000 discarded query results with a live solver, repeated proof and grammar exports, and bounded solver and term-manager lifetimes for synthesis. Resident growth must stay within the test budgets ✓
Matched ownership Independent C, raw Mojo, and public Mojo fixtures use the same loaded native libraries. CI checks complete graph cleanup; the live-owner controls for results, proofs, unformatted grammars, commands, datatypes, statistics and synthesis-result copies run locally, because their growth budget is not stable on GitHub's runners. Grammar formatting and repeated synthesis queries remain failing native-growth diagnostics. See matched binding controls, the ownership audit, and family controls ✓
Documentation examples Every program on this site runs from the shared executable, and its output is compared with the recorded output ✓
Translated cvc5 tests cvc5's Python unit tests (17 files, 377 tests) are translated to Mojo by bindgen.translate into tests/cvc5/ and run by pixi run --locked cvc5-tests. The coverage report lists, with its reason, each test that the translator does not handle or that bindgen/overrides.toml leaves out because it cannot pass in Mojo. A left-out test that passes fails the run ✓
Differential cvc5's Python examples (23) are translated by bindgen.translate into tests/cvc5/examples/. Each must satisfy its comparison policy and match the Python exit status: exact output for deterministic examples; assertion and model-value checks with exact remaining output for floating-point witnesses. bindgen.oracle records the Python output during pixi run --locked generate, in the oracle environment (PyPI cvc5==1.4.1), and pixi run --locked cvc5-tests compares the two. The comparison policy is selected by [example_checks] in bindgen/overrides.toml; exclusions remain explicit in [examples] ✓
Coverage The C functions that cvc5's translated tests and examples call. The raw layer records them at run time in builds with -D CVC5_MOJO_TRACE, and they are saved in tests/cvc5/calls.json. The coverage report lists the generated methods that none of them reaches ✓

The translated tests and examples are regenerated at every cvc5 bump, so the tests that run are always those of the pinned release.

Production-like soaks add sustained CAS-style workloads, RSS trends, per-request timing, and process watchdogs. They run separately from the ordinary CI gate; soak-check tests their analysis, checkpoint reader, and batch-selection policy. batch-benchmark reuses the same checked integer workload and monitoring helpers to compare recycling intervals sequentially.

Upstream argument-rejection blocks generate isolated compile-fail modules. The default run lists these as excluded, because a successful shared build cannot include programs intended to fail compilation. Run them explicitly with pixi run --locked python scripts/run_cvc5_tests.py --compile-fail-only. Each must reproduce its classified diagnostic. Runtime exclusions still run from the shared binary; a newly passing exclusion fails the suite as stale.

Commands

Command Checks
pixi run --locked test All runnable test suites, documentation examples and benchmark semantic checks from one Mojo build
pixi run --locked binding-check Matched-control analysis, reference accounting, and loaded-library identity regressions
pixi run --locked matched-controls --output .cache/matched-<n> --modes results,proofs,grammar-empty,grammar-rules,commands --operations 20000 --repetitions 1 Cached-only core C/raw/public ownership subset; CI also runs the family and graph-cleanup controls
pixi run --locked cvc5-tests Translated runtime tests, examples and runtime exclusions from the shared executable. The command rewrites tests/cvc5/calls.json only after a successful full run; CI requires it to be unchanged
pixi run --locked docs-test --output .cache/docs-<n> Every documentation example from the shared executable
pixi run --locked -e docs docs-check The documentation audit, a strict site build, and the site's links, anchors, and search index

Definition of done

A change is done when:

  • pixi run --locked generate leaves no difference in the committed generated files, tests/cvc5/ included;
  • pixi run --locked test passes;
  • docs-test and docs-check pass when pages, examples, or the snapshot changed;
  • the documentation describes the change (see maintaining the docs).

What is not established

The checks give evidence for the paths and inputs they run. They do not establish the following:

  • Other platforms and versions. The Mojo 1.2 upgrade is checked on Linux x86-64 with cvc5 1.4.1. Native ARM64 and macOS validation is pending; see release notes.
  • Paths no test runs. The coverage report lists the generated methods that no cvc5 test or example reaches.
  • Identical output on every build. The examples are compared with the PyPI build of cvc5, not with the release binaries the bindings load. Model values can differ between builds, which is why floating_point is left out.
  • Other ways of using threads. Several threads are tested only with one term manager and one solver per thread.
  • Every leak. RSS budgets catch sustained growth on these workloads, not every leaked allocation. Repeated synthesis with a shared term manager still grows in the upstream engine; see runtime. The matched C grammar formatter also grows; public String(grammar) makes twice as many native formatting calls on the pinned Mojo compiler. See the open formatting finding. Fixed-input synthesis queries also fail the memory budget in the matched C build; copy and graph-cleanup controls distinguish the tested ownership paths from that native query growth.
cvc5_mojo v1.4.1.1 for Mojo 1.2 and cvc5 1.4.1 · Apache License 2.0 with LLVM Exceptions · Source on GitHub