use crate::pipeline::certify::Violation;
use crate::spec::types::OpSpec;
use crate::spec::types::OracleKind;
pub struct VerifyCtx<'a> {
pub op: &'a OpSpec,
pub backend_id: &'a str,
pub input: &'a [u8],
pub reference_output: &'a [u8],
pub backend_output: &'a [u8],
}
pub type VerifyResult = Result<(), Violation>;
pub trait Oracle: Send + Sync {
fn id(&self) -> &'static str;
fn kind(&self) -> OracleKind;
fn applicable_to(&self, op: &OpSpec) -> bool;
fn verify(&self, ctx: &VerifyCtx<'_>) -> VerifyResult;
}
automod::dir!(pub(crate) "src/proof/oracles");
include!(concat!(env!("OUT_DIR"), "/oracles_registry.rs"));