pub struct Branch {
pub depth: usize,
pub answers: Vec<(Ident, TermVal<IdentCtx>)>,
pub prims: Vec<(Prim, Vec<AtomVal<IdentCtx>>)>,
pub calls: Vec<PredCall>,
}Fields§
§depth: usize§answers: Vec<(Ident, TermVal<IdentCtx>)>§prims: Vec<(Prim, Vec<AtomVal<IdentCtx>>)>§calls: Vec<PredCall>Implementations§
Source§impl Branch
impl Branch
pub fn new(pred: Ident, pars: Vec<Ident>, rule_cnt: usize) -> Branch
pub fn clear_history(&mut self)
pub fn merge(&mut self, unifier: Unifier<IdentCtx, LitVal, OptCons<Ident>>)
pub fn insert(&mut self, call_idx: usize, call: PredCall)
pub fn remove(&mut self, call_idx: usize) -> PredCall
pub fn random_strategy(&mut self) -> usize
pub fn left_biased_strategy(&mut self) -> usize
pub fn naive_strategy(&mut self, n: usize) -> usize
pub fn struct_recur_strategy(&mut self) -> usize
pub fn lookahead_strategy(&mut self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Branch
impl RefUnwindSafe for Branch
impl Send for Branch
impl Sync for Branch
impl Unpin for Branch
impl UnsafeUnpin for Branch
impl UnwindSafe for Branch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more