Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
//!
//! R3 Lane 1 + Lane 2 + L5 harness receipts: Lane 1 L4 now exercises the wired W1
//! `DifferentialEquals(rust_emit_output, dag_eval_output)` path (plus a mixed-lineage
//! `NotYetImplemented` control). Lane 2 / L5 rows remain intentionally deferred where noted.
//! `NotYetImplemented` control), and Lane 1 L7 now exercises the wired `Associativity`
//! operational witness. Lane 2 / L5 rows remain intentionally deferred where noted.
//! Matrix: `docs/briefs/r3-v-l7-algebra-coverage-matrix.md`.

use std::sync::OnceLock;
Expand Down Expand Up @@ -30,6 +31,7 @@ const L7_FIXTURE_PATH: &str =
"src/v3/compiler/tests/fixtures/r3_verification_l7_algebraic_laws.dag";
const L7_SUITE: &str = "r3_verification_l7_algebra_skeleton_suite";
const L7_CLAIM: &str = "r3_verification_l7_algebraic_laws_skeleton";
const L7_SEMIGROUP_ASSOCIATIVITY_CLAIM: &str = "r3_l7_semigroup_associativity";
const L7_MATRIX_SUITE: &str = "r3_verification_l7_algebra_matrix_suite";
const L7_MATRIX_WIRED_COUNT: usize = 8;
const L7_MATRIX_IDENTITY_NYI_COUNT: usize = 8;
Expand Down Expand Up @@ -118,6 +120,29 @@ fn r3_verification_l4_emit_eval_mixed_lineage_stays_not_yet_implemented() {
});
}

#[test]
fn r3_verification_l7_semigroup_associativity_passes_wired_associativity() {
run_on_larger_stack(|| {
let dag = cached_compile(L7_FIXTURE, L7_FIXTURE_PATH, &L7_DAG);
let results = TestRunner::new(dag).run_suite(L7_MATRIX_SUITE);
let result = results
.iter()
.find(|result| result.claim_name == L7_SEMIGROUP_ASSOCIATIVITY_CLAIM)
.unwrap_or_else(|| {
panic!(
"missing `{}` in {}",
L7_SEMIGROUP_ASSOCIATIVITY_CLAIM, L7_FIXTURE_PATH
)
});
assert!(
matches!(result.result, ClaimResult::Pass),
"expected L7 Associativity wire-up to pass for `{}`; got {:?}",
L7_SEMIGROUP_ASSOCIATIVITY_CLAIM,
result.result
);
});
}

#[test]
fn r3_verification_l7_algebraic_law_identity_skeleton_is_nyi() {
let dag = cached_compile(L7_FIXTURE, L7_FIXTURE_PATH, &L7_DAG);
Expand Down
Loading