pub struct OpSpec {Show 33 fields
pub id: &'static str,
pub archetype: &'static str,
pub category: Category,
pub intrinsic_table: IntrinsicTable,
pub signature: OpSignature,
pub strictness: Strictness,
pub cpu_fn: fn(&[u8]) -> Vec<u8>,
pub wgsl_fn: fn() -> String,
pub alt_wgsl_fns: Vec<(&'static str, fn() -> String)>,
pub laws: Vec<AlgebraicLaw>,
pub declared_laws: Box<[DeclaredLaw]>,
pub spec_table: &'static [SpecRow],
pub archetypes: &'static [&'static str],
pub mutation_sensitivity: &'static [MutationClass],
pub oracle_override: Option<OracleKind>,
pub since_version: Version,
pub docs_path: &'static str,
pub equivalence_classes: Vec<EquivalenceClass>,
pub boundary_values: Vec<BoundaryValue>,
pub comparator: ComparatorKind,
pub convention: Convention,
pub version: u32,
pub version_history: Vec<u32>,
pub workgroup_size: Option<u32>,
pub min_throughput_bytes_per_sec: Option<u64>,
pub expected_output_bytes: Option<usize>,
pub external_oracle_url: Option<&'static str>,
pub property_invariants: &'static [&'static str],
pub ir_program: Option<fn() -> Program>,
pub no_algebraic_laws_reason: Option<&'static str>,
pub admission_witness_cap: Option<usize>,
pub cpu_fingerprint: Option<u64>,
pub overflow_contract: Option<OverflowContract>,
}Expand description
Complete executable specification for one vyre operation.
Fields§
§id: &'static strHierarchical identifier: “primitive.bitwise.xor”, “primitive.encoding.base64”
archetype: &'static strArchetype from the locked vocabulary (e.g. “binary-bitwise”). Empty string means “not yet classified” — the certify heuristic fills in a best-guess. New ops MUST set this from spec.toml.
category: CategoryA/C category declaration enforcing zero-cost composition or native intrinsic availability.
intrinsic_table: IntrinsicTablePer-backend intrinsic spellings required for Category C operations.
signature: OpSignatureType signature — what goes in, what comes out.
strictness: StrictnessBit-exact versus approximate conformance declaration.
cpu_fn: fn(&[u8]) -> Vec<u8>CPU reference function. THE specification. GPU must match byte-for-byte.
wgsl_fn: fn() -> StringWGSL source for the op (defines a function named after the last id segment).
alt_wgsl_fns: Vec<(&'static str, fn() -> String)>Alternative WGSL sources to test against the same CPU reference.
laws: Vec<AlgebraicLaw>Algebraic laws this operation must satisfy.
declared_laws: Box<[DeclaredLaw]>Provenance-bearing law declarations for proof-aware phases.
spec_table: &'static [SpecRow]Concrete input/output examples that define load-bearing edge cases.
archetypes: &'static [&'static str]Archetype ids that this operation participates in.
mutation_sensitivity: &'static [MutationClass]Mutation classes that should be caught by this operation’s tests.
oracle_override: Option<OracleKind>Optional override for the default oracle selection order.
since_version: VersionSemantic schema version when this operation became available.
docs_path: &'static strRepository-relative documentation path for this operation.
equivalence_classes: Vec<EquivalenceClass>Equivalence classes of the input space.
boundary_values: Vec<BoundaryValue>Explicit boundary values that must be tested.
comparator: ComparatorKindHow to compare GPU vs CPU output.
convention: ConventionCalling convention this op needs.
version: u32Spec version. Increment when behavior changes. Regressions are tagged with this.
version_history: Vec<u32>Previous spec versions for regression migration.
workgroup_size: Option<u32>Preferred workgroup size for conformance testing.
min_throughput_bytes_per_sec: Option<u64>Minimum throughput (input bytes/sec) for performance conformance.
expected_output_bytes: Option<usize>Expected output size in bytes for a single invocation.
external_oracle_url: Option<&'static str>External oracle URL (required when oracle_override is External).
property_invariants: &'static [&'static str]Declared property invariants (required when oracle_override is Property).
ir_program: Option<fn() -> Program>Optional IR program for the reference interpreter oracle.
no_algebraic_laws_reason: Option<&'static str>Documented justification when laws is empty (gate 6 admission).
admission_witness_cap: Option<usize>Per-spec override for the gate-4 generated witness cap.
cpu_fingerprint: Option<u64>Declared CPU fingerprint used when no oracle is declared (gate 5).
overflow_contract: Option<OverflowContract>Integer overflow contract (plan 3.6). None means the op was
not declared to operate on integer types; every op that names
DataType::U32 / DataType::I32 / DataType::U64 in its
signature must declare one of the four OverflowContract
variants or the overflow_contract gate fails red.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpSpec
impl RefUnwindSafe for OpSpec
impl Send for OpSpec
impl Sync for OpSpec
impl Unpin for OpSpec
impl UnsafeUnpin for OpSpec
impl UnwindSafe for OpSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more