vyre-conform 0.1.0

Conformance suite for vyre backends — proves byte-identical output to CPU reference
Documentation
use crate::properties::tests::{pair, primitive, result_u32, unary};
use crate::spec::law::AlgebraicLaw;

#[inline]
pub fn verify_associative(spec: &crate::spec::types::OpSpec) {
    for a in SAMPLE {
        for b in SAMPLE {
            for c in SAMPLE {
                let ab = call_u32(spec, &pair(a, b));
                let lhs = call_u32(spec, &pair(ab, c));
                let bc = call_u32(spec, &pair(b, c));
                let rhs = call_u32(spec, &pair(a, bc));
                assert_eq!(
                    lhs, rhs,
                    "{} violates Associative at ({a}, {b}, {c})",
                    spec.id
                );
            }
        }
    }
}