//! Engine-level specifications.
//!
//! Engines are composed programs (DFA, eval, scatter, dataflow).
//! Their specs define invariants that must hold beyond individual
//! op correctness.
use super::invariant::EngineInvariant;
use crate::spec::types::CpuReferenceFn;
/// Specification for a vyre engine.
///
/// Engines are not individual ops; they are full programs with cross-op
/// guarantees such as determinism, termination, and output ordering.
/// The conform engine runs these invariants after every op-level gate
/// has passed, because local correctness does not imply global correctness.
#[derive(Clone)]
pub struct EngineSpec {
/// Engine identifier: "engine.dfa", "engine.eval", "engine.scatter".
pub id: &'static str,
/// Human-readable description.
pub description: &'static str,
/// Invariants this engine must maintain.
pub invariants: Vec<EngineInvariant>,
/// CPU reference function for the engine.
/// Takes structured input (serialized) and returns structured output.
pub cpu_fn: Option<CpuReferenceFn>,
}