use crate::Primitives;
pub trait Predicate<P: Primitives> {
fn evaluates_over(&self) -> &P::String;
type DescentMeasure: crate::kernel::recursion::DescentMeasure<P>;
fn bounded_evaluator(&self) -> &[Self::DescentMeasure];
}
pub trait TypePredicate<P: Primitives>: Predicate<P> {}
pub trait StatePredicate<P: Primitives>: Predicate<P> {}
pub trait FiberPredicate<P: Primitives>: Predicate<P> {}
pub trait DispatchRule<P: Primitives> {
type Predicate: Predicate<P>;
fn dispatch_predicate(&self) -> &Self::Predicate;
type Resolver: crate::bridge::resolver::Resolver<P>;
fn dispatch_target(&self) -> &Self::Resolver;
fn dispatch_index(&self) -> P::NonNegativeInteger;
}
pub trait DispatchTable<P: Primitives> {
type DispatchRule: DispatchRule<P>;
fn dispatch_rules(&self) -> &[Self::DispatchRule];
fn is_exhaustive(&self) -> P::Boolean;
fn is_mutually_exclusive(&self) -> P::Boolean;
}
pub trait GuardedTransition<P: Primitives> {
type StatePredicate: StatePredicate<P>;
fn guard_predicate(&self) -> &Self::StatePredicate;
type Effect: crate::kernel::effect::Effect<P>;
fn guard_effect(&self) -> &Self::Effect;
type CascadeStage: crate::kernel::cascade::CascadeStage<P>;
fn guard_target(&self) -> &Self::CascadeStage;
}
pub trait MatchArm<P: Primitives> {
type Predicate: Predicate<P>;
fn arm_predicate(&self) -> &Self::Predicate;
type Term: crate::kernel::schema::Term<P>;
fn arm_result(&self) -> &Self::Term;
fn arm_index(&self) -> P::NonNegativeInteger;
}
pub trait MatchExpression<P: Primitives>: crate::kernel::schema::Term<P> {
type MatchArm: MatchArm<P>;
fn match_arms(&self) -> &[Self::MatchArm];
}
pub mod always {
pub const EVALUATES_OVER: &str = "https://uor.foundation/schema/Datum";
}
pub mod never {
pub const EVALUATES_OVER: &str = "https://uor.foundation/schema/Datum";
}
pub mod is_zero {
pub const EVALUATES_OVER: &str = "https://uor.foundation/schema/Datum";
}
pub mod is_unit {
pub const EVALUATES_OVER: &str = "https://uor.foundation/schema/Datum";
}
pub mod is_odd {
pub const EVALUATES_OVER: &str = "https://uor.foundation/schema/Datum";
}
pub mod is_even {
pub const EVALUATES_OVER: &str = "https://uor.foundation/schema/Datum";
}
pub mod is_involution {
pub const EVALUATES_OVER: &str = "https://uor.foundation/schema/Datum";
}
pub mod fiber_pinned {
pub const EVALUATES_OVER: &str = "https://uor.foundation/partition/FiberCoordinate";
}
pub mod fiber_free {
pub const EVALUATES_OVER: &str = "https://uor.foundation/partition/FiberCoordinate";
}
pub mod contradiction_reached {
pub const EVALUATES_OVER: &str = "https://uor.foundation/state/ContradictionBoundary";
}
pub mod budget_exhausted {
pub const EVALUATES_OVER: &str = "https://uor.foundation/partition/FiberBudget";
}
pub mod cascade_converged {
pub const EVALUATES_OVER: &str = "https://uor.foundation/cascade/CascadeState";
}