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 andersen_points_to(
shape: ProgramGraphShape,
constraints_in: &str,
pts_out: &str,
) -> Program {
csr_forward_traverse(shape, constraints_in, pts_out, u32::MAX)
}
#[deprecated(
since = "0.4.1",
note = "use `andersen_points_to(shape, ...)` directly - the name suffix is redundant since the 2-arg entry was removed"
)]
#[must_use]
pub fn andersen_points_to_with_shape(
shape: ProgramGraphShape,
constraints_in: &str,
pts_out: &str,
) -> Program {
andersen_points_to(shape, constraints_in, pts_out)
}
inventory::submit! {
vyre_harness::OpEntry::new(
OP_ID,
|| andersen_points_to(ProgramGraphShape::new(4, 3), "pts_in", "pts_out"),
Some(|| {
let to_bytes = crate::dispatch_decode::pack_u32;
vec![vec![
to_bytes(&[0, 0, 0, 0]), to_bytes(&[0, 1, 2, 3, 3]), to_bytes(&[1, 2, 3]), to_bytes(&[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(&[0b0011])]]
}),
)
}
inventory::submit! {
vyre_harness::ConvergenceContract {
op_id: OP_ID,
max_iterations: 4096,
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct PointsTo;
impl crate::soundness::SoundnessTagged for PointsTo {
fn soundness(&self) -> crate::soundness::Soundness {
crate::soundness::Soundness::MayOver
}
}