#![deny(unsafe_code)]
#![cfg_attr(not(test), deny(clippy::todo, clippy::unimplemented))]
use clap::{Parser, Subcommand};
#[path = "../adversarial/mod.rs"]
pub(crate) mod adversarial;
#[path = "../enforce/mod.rs"]
pub(crate) mod enforce;
#[path = "../generate/mod.rs"]
pub(crate) mod generate;
#[path = "../meta/mod.rs"]
pub(crate) mod meta;
#[path = "../pipeline/mod.rs"]
pub(crate) mod pipeline;
#[path = "../proof/mod.rs"]
pub(crate) mod proof;
#[path = "../spec/mod.rs"]
pub(crate) mod spec;
#[path = "../verify/mod.rs"]
pub(crate) mod verify;
#[path = "../pipeline/bin/mod.rs"]
mod command;
pub use crate::enforce::EnforceGate;
pub use crate::generate::archetypes::Archetype;
pub use crate::pipeline::certify::certify;
pub use crate::pipeline::certify::Certificate;
pub use crate::pipeline::certify::Violation;
pub use crate::proof::oracles::Oracle;
pub use crate::spec::types::MutationClass;
pub use crate::spec::types::OpSpec;
pub use crate::spec::Finding;
pub use vyre::VyreBackend;
pub use vyre_spec::{AlgebraicLaw, Category};
pub(crate) use crate::meta::contribute;
pub(crate) use crate::pipeline::execution::InputCase;
pub(crate) use crate::pipeline::reporter;
pub(crate) use crate::spec::op_registry;
pub(crate) use crate::spec::registry;
pub(crate) use crate::spec::types::{
BufferAccess, ChainSpec, Convention, DataType, OpSignature, ParityFailure, Strictness,
};
pub(crate) use crate::verify::regression;
#[derive(Debug, Parser)]
#[command(name = "vyre-conform", about = "Vyre conformance command line tools")]
struct Cli {
#[command(subcommand)]
command: Command,
}
#[derive(Debug, Subcommand)]
enum Command {
Certify(command::certify::Args),
VerifyCert(command::verify_cert::Args),
Contribute(command::contribute::Args),
FreezeGoldens(command::freeze_goldens::Args),
Calibrate(command::phase6_calibrate::Args),
Coverage(command::coverage::Args),
GenTests(command::gen_tests::Args),
}
fn main() {
if let Err(error) = run(Cli::parse()) {
eprintln!("{error}");
std::process::exit(1);
}
}
fn run(cli: Cli) -> Result<(), Box<dyn std::error::Error>> {
match cli.command {
Command::Certify(args) => command::certify::run(args),
Command::VerifyCert(args) => command::verify_cert::run(args),
Command::Contribute(args) => command::contribute::run(args),
Command::FreezeGoldens(args) => command::freeze_goldens::run(args),
Command::Calibrate(args) => command::phase6_calibrate::run(args),
Command::Coverage(args) => command::coverage::run(args),
Command::GenTests(args) => command::gen_tests::run(args),
}
}