PR: feat: make structural enumeration the CLI verify default #42 - #48
Conversation
metasmile
left a comment
There was a problem hiding this comment.
Reviewed the reporter refactor. One actionable item: the "and N more failures" count should reflect the present rows in the structural pipeline. The split_counts invariant approach is sound.
| fn split_counts(total: usize, evaluations: &[Evaluation]) -> (usize, usize) { | ||
| let passed = evaluations.iter().filter(|e| e.passed).count(); | ||
| assert!( | ||
| passed <= total, |
There was a problem hiding this comment.
The invariant is enforced with assert!, which panics. The trait returns bool rather than Result, so a panic is the loudest available signal for a caller-side contract violation, and it is preferable to a silent usize wrap in release. This is a reasonable design choice; documenting it in the trait doc comment (already done) is sufficient.
| if i == MAX_PRINTED_FAILURES { | ||
| println!( | ||
| " ... and {} more failures", | ||
| failed_count - MAX_PRINTED_FAILURES |
There was a problem hiding this comment.
The "and N more failures" count is failed_count - MAX_PRINTED_FAILURES, where failed_count includes combinations that were never enumerated in the structural pipeline (the structurally absent ones). This overstates the unprinted detail. Since failed_rows holds the present rows, failed_rows.len() - MAX_PRINTED_FAILURES is the accurate count of remaining listed rows; on the full expansion path the two are identical.
Summary
Integrates the structural enumeration pipeline (issue #40, tagma_core CoordSpace) into the
ev verifyCLI path, closing issue #42 and unlocking the two speed-ignored CLI tests.Changes
src/verify/compose.rs:raw_total_combinationscomputes the cartesian product size from field domains without enumeration, sharing the overflow andMAX_COMBINATIONSguard withexpand_all.src/verify/evaluate.rs:evaluate_structuralreturns the raw total plus the evaluations of the structurally valid subset (StructuralEnum + evaluate_all), with an invariant guard that fails loudly if the emitted count exceeds the raw total.src/report/reporter.rs:ReporterCapable::reportgains atotalparameter; the four reporters derive failed = total - passed viasplit_counts, which asserts passed <= total. The TextReporter prints the failure header only when failure rows are present.src/main.rs:verifyroutes throughevaluate_structural; the simulate channel is unchanged.tests/structural_enum.rspinevaluate_structuralagainstexpand_all+evaluate_all, including an enable_mask differential test (alu_ext).run.sh: the 33M fixture is asserted in CI instead of skipped; CVA6 full and R4 counts checked via_verify_check.docs/devlog/2026-08-23-cli-structural-integration.md, README pipeline and validation table updates.Measured result
ev verifyCVA6 full (33.5M raw)Counts are unchanged on every committed fixture (verified across all 10 fixtures). The 33M CLI test runs in 0.45 s in debug.
Validation
cargo test --release: 97 passing (73 lib + 16 CLI + 8 structural), none ignored.bash run.sh --code: fmt, clippy, build, test, bench all pass.Related
tests/cli_test.rs,run.sh, and the README validation table with the PR for Tagma hw RTL fixture specs: feasible verification YAML specs and plan #47 (Tagma fixtures); the R4 test conflict resolves to this PR's version.