use vyre::ir::Program;
use vyre_primitives::graph::csr_forward_traverse::csr_forward_traverse;
use vyre_primitives::graph::program_graph::ProgramGraphShape;
use super::OP_ID;
#[must_use]
pub fn live_step(shape: ProgramGraphShape, frontier_in: &str, frontier_out: &str) -> Program {
csr_forward_traverse(shape, frontier_in, frontier_out, 0xFFFF_FFFF)
}
inventory::submit! {
vyre_harness::OpEntry::new(
OP_ID,
|| live_step(ProgramGraphShape::new(4, 3), "fin", "fout"),
Some(|| {
let to_bytes = crate::dispatch_decode::pack_u32;
vec![vec![
to_bytes(&[0, 0, 0, 0]),
to_bytes(&[0, 0, 1, 2, 3]),
to_bytes(&[0, 1, 2]),
to_bytes(&[1, 1, 1]),
to_bytes(&[0, 0, 0, 0]),
to_bytes(&[0b1000]),
to_bytes(&[0b1000]),
]]
}),
Some(|| {
let to_bytes = crate::dispatch_decode::pack_u32;
vec![vec![to_bytes(&[0b1100])]]
}),
)
}
inventory::submit! {
vyre_harness::ConvergenceContract {
op_id: OP_ID,
max_iterations: 64,
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct Liveness;
impl crate::soundness::SoundnessTagged for Liveness {
fn soundness(&self) -> crate::soundness::Soundness {
crate::soundness::Soundness::Exact
}
}