Liking cljdoc? Tell your friends :D

title: Class-A preset correctness and specialization gate date: 2026-08-01 project: liblevenshtein-rust kind: feature status: complete verdict: presets_accepted_dedicated_walkers_rejected root_epic: extending-liblevenshtein-automaton-families-4bb97598 work_item: phase-8-class-a-presets-and-the-degenerate-walkers-816011c0

Class-A preset correctness and specialization gate

1. Provenance

The expanded plan pre-registered the preset/oracle/reference three-way gate, metric and boundary properties, complete Birkbeck corpus applicability, and the compound degenerate-walker benchmark before Phase-8 implementation. This ledger was created after the first core and property runs, so it reports those results without relabeling them as newly pre-registered.

The walker measurement is not repeated here. Its append-only Phase-0 record is the source of the frozen decision.

2. Hypotheses and decision rules

IDHypothesis or obligationFrozen rule
class-a-001-hammingThe preset and scalar mismatch count denote the same partial metric.Preset = explicit operation set = reference on 2,000 generated pairs; fixed-length metric laws pass.
class-a-002-indelThe preset equals both the DP and the LCS identity.Three-way equality on 2,000 pairs; symmetry, triangle, length, parity, and threshold laws pass.
class-a-003-skipBounded skip is exactly directional subsequence matching.Three-way equality on 2,000 pairs, including empty and Unicode boundaries.
class-a-004-validationInvalid or excessive operation sets fail before grid expansion.Focused boundaries, 4,000 generated valid/non-progressing sets, and heterogeneous formal proofs pass.
class-a-005-corpusSynthetic equality generalizes to spelling data.Every explicit Birkbeck pair agrees with each applicable independent reference.
class-a-006-walkersDedicated dictionary walkers justify another public traversal path.Ship only if runtime is at least two-times faster on the frozen arms and enumerated edges drop at least four-times.

3. Results to date

EvidencePopulationResultVerdict
preset/manual/reference properties6,000 casesexact equalityaccepted
metric, threshold, and inter-metric properties10,000 casesall invariants passaccepted
resource-validation properties4,000 casesvalid sets accepted; cycles rejectedaccepted
focused examples and compatibility suite1 runnable example; 9 compatibility testsall passaccepted
Birkbeck corpus42,395 pairsevery Hamming, indel, and skip result agreesaccepted
Hamming applicability13,297 equal-length corpus pairsexact mismatch count agreesaccepted
bounded-skip applicability10,671 subsequence corpus pairsexact skipped count agreesaccepted
dedicated-walker structural gate322,794 baseline edges / 262,656 candidate edges = 1.229 timesbelow required four-times reductionrejected
formal toolboxRocq theorem suite; Dafny 16/16; Verus 10/10; Z3 and cvc5 13/13 unsatisfiable obligations; TLA+ 124 generated states, 72 distinct states, depth 7every registered obligation passesaccepted
repository gatesall-feature and no-default-feature tests; strict Clippy and rustdoc; documentation lint; 61-diagram reproducibility; diff check; pgmcp bug gateevery gate passesaccepted

The generated threshold property found an affordable empty-side defect: indel_distance_bounded("a", "", 1) returned None. The implementation now handles either empty side before the interior band loop; the minimized seed 7cf34e99389c421981029b46abaaa29f6948796f5bf3b2a44b8b8903010546de is committed in tests/proptest_class_a_presets.proptest-regressions.

Captured command evidence remains under /tmp/liblevenshtein_phase8_* until the complete multi-phase implementation run finishes.

4. Repository-gate record

GateResult
cargo test --all-featuresaccepted: 3,844 library tests plus all integration/property suites; 269 doctests passed and 364 were intentionally ignored
cargo test --no-default-featuresaccepted: 1,077 library tests plus all applicable integration/property suites; 173 doctests passed and 121 were intentionally ignored
Class-A generated propertiesaccepted: 20,000 cases across ten properties
complete Birkbeck validationaccepted: 42,395 source pairs, including every applicable Hamming and bounded-skip pair
scripts/verify-formal.sh allaccepted across the registered Rocq, Dafny, Verus, SMT, and TLA+ artifacts
strict Clippy and rustdocaccepted with warnings denied
documentation and diagramsaccepted: 0 math-lint violations in 281 living documents; all 61 SVGs reproducible
git diff --checkaccepted
pgmcp bug-gateaccepted: no open bugs anchored to 150 changed files

The public deliverable is therefore the validated Class-A preset surface and its independent reference distances. Dedicated Hamming and indel dictionary walkers remain benchmark-only because their structural reduction missed the pre-registered compound gate even though runtime improved.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close