use super::OP_ID;
use vyre::ir::Program;
use vyre_primitives::graph::csr_forward_traverse::csr_forward_traverse;
use vyre_primitives::graph::program_graph::ProgramGraphShape;
#[must_use]
pub fn reaching_defs_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,
|| reaching_defs_step(ProgramGraphShape::new(4, 4), "fin", "fout"),
Some(|| {
let to_bytes = crate::dispatch_decode::pack_u32;
vec![vec![
to_bytes(&[0, 0, 0, 0]), to_bytes(&[0, 2, 3, 4, 4]), to_bytes(&[1, 2, 3, 3]), to_bytes(&[1, 1, 1, 1]), to_bytes(&[0, 0, 0, 0]), to_bytes(&[0b0001]), to_bytes(&[0b0001]), ]]
}),
Some(|| {
let to_bytes = crate::dispatch_decode::pack_u32;
vec![vec![to_bytes(&[0b0111])]]
}),
)
}
inventory::submit! {
vyre_harness::ConvergenceContract {
op_id: OP_ID,
max_iterations: 64,
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ReachingDefs;
impl crate::soundness::SoundnessTagged for ReachingDefs {
fn soundness(&self) -> crate::soundness::Soundness {
crate::soundness::Soundness::Exact
}
}