vyre-conform 0.1.0

Conformance suite for vyre backends — proves byte-identical output to CPU reference
Documentation
use crate::proof::comparator::ComparatorKind;
use crate::spec::types::{ChainSpec, OpSpec, Strictness};
pub use super::suite::ConformanceSuite;
use crate::spec::minimums::{MIN_BOUNDARY_VALUES, MIN_EQUIVALENCE_CLASSES};

/// Validate that an op spec meets minimum coverage requirements.
#[inline]
pub fn validate_minimum_coverage(op: &crate::OpSpec) -> Result<(), String> {
    // P1.20-F14: error messages were a single long line with wide internal
    // padding ("...minimum is 4.              Add boundary values..."). Use
    // explicit newlines so the rendered output is readable.
    if op.boundary_values.len() < MIN_BOUNDARY_VALUES {
        return Err(format!(
            "Fix: op '{}' has {} boundary values, minimum is {}.\n\
             Add boundary values covering zero, one, max, and at least one\n\
             domain-specific edge case.",
            op.id,
            op.boundary_values.len(),
            MIN_BOUNDARY_VALUES
        ));
    }
    if op.equivalence_classes.len() < MIN_EQUIVALENCE_CLASSES {
        return Err(format!(
            "Fix: op '{}' has {} equivalence classes, minimum is {}.\n\
             Add at least one equivalence class describing the input domain.",
            op.id,
            op.equivalence_classes.len(),
            MIN_EQUIVALENCE_CLASSES
        ));
    }
    Ok(())
}