use crate::enums::ComplexityClass;
use crate::enums::MetricAxis;
use crate::enums::WittLevel;
use crate::Primitives;
pub trait Resolver<P: Primitives> {
type TypeDefinition: crate::user::type_::TypeDefinition<P>;
fn input_type(&self) -> &Self::TypeDefinition;
type Partition: crate::bridge::partition::Partition<P>;
fn output_type(&self) -> &Self::Partition;
type TermExpression: crate::kernel::schema::TermExpression<P>;
fn strategy(&self) -> &Self::TermExpression;
type ResolutionState: ResolutionState<P>;
fn resolution_state(&self) -> &Self::ResolutionState;
fn has_complexity_class(&self) -> ComplexityClass;
type DispatchTable: crate::kernel::predicate::DispatchTable<P>;
fn dispatch_table(&self) -> &Self::DispatchTable;
type TypePredicate: crate::kernel::predicate::TypePredicate<P>;
fn resolver_predicate(&self) -> &Self::TypePredicate;
}
pub trait DihedralFactorizationResolver<P: Primitives>: Resolver<P> {}
pub trait CanonicalFormResolver<P: Primitives>: Resolver<P> {}
pub trait EvaluationResolver<P: Primitives>: Resolver<P> {}
pub trait ResolutionState<P: Primitives> {
fn is_complete(&self) -> P::Boolean;
fn iteration_count(&self) -> P::NonNegativeInteger;
type FreeRank: crate::bridge::partition::FreeRank<P>;
fn site_deficit(&self) -> &Self::FreeRank;
type RefinementSuggestion: RefinementSuggestion<P>;
fn suggestion(&self) -> &[Self::RefinementSuggestion];
fn convergence_rate(&self) -> P::Decimal;
type CechNerve: CechNerve<P>;
fn cech_nerve(&self) -> &Self::CechNerve;
fn residual_entropy(&self) -> P::Decimal;
fn topologically_complete(&self) -> P::Boolean;
fn nerve_euler_characteristic(&self) -> P::Integer;
type Jacobian: crate::bridge::observable::Jacobian<P>;
fn guiding_jacobian(&self) -> &Self::Jacobian;
}
pub trait RefinementSuggestion<P: Primitives> {
fn suggested_axis(&self) -> MetricAxis;
fn suggested_class(&self) -> &P::String;
type SiteIndex: crate::bridge::partition::SiteIndex<P>;
fn target_sites(&self) -> &[Self::SiteIndex];
}
pub trait CechNerve<P: Primitives>:
crate::bridge::homology::SimplicialComplex<P> + crate::bridge::homology::KanComplex<P>
{
}
pub trait CompletenessResolver<P: Primitives>: Resolver<P> {
type CompletenessCandidate: crate::user::type_::CompletenessCandidate<P>;
fn completeness_target(&self) -> &Self::CompletenessCandidate;
}
pub trait WittLevelResolver<P: Primitives>: Resolver<P> {
fn quantum_level(&self) -> WittLevel;
}
pub trait SessionResolver<P: Primitives>: Resolver<P> {
type BindingAccumulator: crate::user::state::BindingAccumulator<P>;
fn session_accumulator(&self) -> &Self::BindingAccumulator;
type ExecutionPolicy: ExecutionPolicy<P>;
fn execution_policy(&self) -> &Self::ExecutionPolicy;
}
pub trait TypeSynthesisResolver<P: Primitives>: Resolver<P> {
type TypeSynthesisGoal: crate::user::type_::TypeSynthesisGoal<P>;
fn synthesis_goal(&self) -> &Self::TypeSynthesisGoal;
}
pub trait ConstraintSearchState<P: Primitives> {
fn explored_count(&self) -> P::NonNegativeInteger;
type ConstrainedType: crate::user::type_::ConstrainedType<P>;
fn current_candidate(&self) -> &Self::ConstrainedType;
}
pub trait IncrementalCompletenessResolver<P: Primitives>: Resolver<P> {
type WittLift: crate::user::type_::WittLift<P>;
fn lift_target(&self) -> &Self::WittLift;
}
pub trait LiftRefinementSuggestion<P: Primitives>: RefinementSuggestion<P> {
fn lift_site_position(&self) -> &Self::SiteIndex;
type LiftObstructionClass: crate::bridge::observable::LiftObstructionClass<P>;
fn obstruction_class(&self) -> &Self::LiftObstructionClass;
}
pub trait MonodromyResolver<P: Primitives>: Resolver<P> {
type ConstrainedType: crate::user::type_::ConstrainedType<P>;
fn monodromy_target(&self) -> &Self::ConstrainedType;
type HolonomyGroup: crate::bridge::observable::HolonomyGroup<P>;
fn holonomy_result(&self) -> &Self::HolonomyGroup;
}
pub trait JacobianGuidedResolver<P: Primitives>: Resolver<P> {}
pub trait SuperpositionResolver<P: Primitives>: Resolver<P> {
fn amplitude_vector(&self) -> P::Decimal;
}
pub trait GroundingAwareResolver<P: Primitives>: Resolver<P> {
fn used_grounding(&self) -> P::Boolean;
}
pub trait GeodesicValidator<P: Primitives>: Resolver<P> {
type GeodesicTrace: crate::bridge::trace::GeodesicTrace<P>;
fn validate_geodesic(&self) -> &Self::GeodesicTrace;
}
pub trait MeasurementResolver<P: Primitives>: Resolver<P> {
fn collapse_amplitude(&self) -> P::Decimal;
fn collapsed_site(&self) -> P::NonNegativeInteger;
fn measurement_outcome(&self) -> P::NonNegativeInteger;
fn prior_amplitude_vector(&self) -> P::Decimal;
}
pub trait TowerCompletenessResolver<P: Primitives>: Resolver<P> {
fn tower_source_level(&self) -> WittLevel;
fn tower_target_level(&self) -> WittLevel;
type LiftChain: crate::user::type_::LiftChain<P>;
fn current_chain(&self) -> &Self::LiftChain;
type IncrementalCompletenessResolver: IncrementalCompletenessResolver<P>;
fn tower_step_resolver(&self) -> &Self::IncrementalCompletenessResolver;
}
pub trait ExecutionPolicy<P: Primitives> {}
pub trait HomotopyResolver<P: Primitives>: Resolver<P> {
type CechNerve: CechNerve<P>;
fn homotopy_target(&self) -> &Self::CechNerve;
type HomotopyGroup: crate::bridge::observable::HomotopyGroup<P>;
fn homotopy_result(&self) -> &[Self::HomotopyGroup];
}
pub trait ModuliResolver<P: Primitives>: Resolver<P> {
type CompleteType: crate::user::type_::CompleteType<P>;
fn moduli_target(&self) -> &Self::CompleteType;
type DeformationComplex: crate::bridge::homology::DeformationComplex<P>;
fn moduli_deformation(&self) -> &Self::DeformationComplex;
}
pub mod constant_time {}
pub mod logarithmic_time {}
pub mod linear_time {}
pub mod exponential_time {}
pub mod fifo_policy {}
pub mod min_free_count_first {}
pub mod max_free_count_first {}
pub mod disjoint_first {}