use vyre_foundation::operation::{OperationRegistry, OperationTier, SemanticOperation};
pub use crate::region::{reparent_program_children, tag_program, wrap, wrap_anonymous, wrap_child};
pub fn all_entries() -> impl Iterator<Item = SemanticOperation> {
OperationRegistry::global()
.iter()
.filter(|entry| entry.tier == OperationTier::Library)
}
pub fn fixture_entries() -> impl Iterator<Item = SemanticOperation> {
all_entries().filter(|entry| entry.test_inputs.is_some() && entry.expected_output.is_some())
}
#[derive(Clone, Debug)]
pub struct ConvergenceContract {
pub op_id: &'static str,
pub max_iterations: u32,
}
inventory::collect!(ConvergenceContract);
#[must_use]
pub fn convergence_contract(op_id: &str) -> Option<&'static ConvergenceContract> {
inventory::iter::<ConvergenceContract>().find(|contract| contract.op_id == op_id)
}