use crate::HostTypes;
pub trait ProductiveStream<H: HostTypes> {
fn is_productive(&self) -> bool;
type Term: crate::kernel::schema::Term<H>;
fn step_term(&self) -> &Self::Term;
fn productivity_witness(&self) -> &H::HostString;
}
pub trait Epoch<H: HostTypes> {
type EulerReduction: crate::kernel::reduction::EulerReduction<H>;
fn epoch_reduction(&self) -> &Self::EulerReduction;
type Datum: crate::kernel::schema::Datum<H>;
fn epoch_output(&self) -> &Self::Datum;
type Context: crate::user::state::Context<H>;
fn epoch_context(&self) -> &Self::Context;
fn epoch_index(&self) -> u64;
}
pub trait EpochBoundary<H: HostTypes> {
type Epoch: Epoch<H>;
fn boundary_from(&self) -> &Self::Epoch;
fn boundary_to(&self) -> &Self::Epoch;
type Context: crate::user::state::Context<H>;
fn continuation_context(&self) -> &Self::Context;
}
pub trait StreamPrefix<H: HostTypes> {
type Epoch: Epoch<H>;
fn prefix_epochs(&self) -> &[Self::Epoch];
fn prefix_length(&self) -> u64;
}
pub trait StreamMorphism<H: HostTypes>: crate::user::morphism::Transform<H> {}
pub trait Unfold<H: HostTypes> {
type Context: crate::user::state::Context<H>;
fn unfold_seed(&self) -> &Self::Context;
type ComputationDatum: crate::user::morphism::ComputationDatum<H>;
fn unfold_step(&self) -> &Self::ComputationDatum;
type ProductiveStream: ProductiveStream<H>;
fn unfold_result(&self) -> &Self::ProductiveStream;
}