pub struct Proof<'a> {
pub hypothesis: Hypothesis,
pub heap: QueryHeap<'a>,
/* private fields */
}Expand description
The proof search engine.
Maintains a goal stack and iteratively resolves goals against the predicate
table and the current hypothesis. Call Proof::prove repeatedly to
enumerate solutions via backtracking.
Fields§
§hypothesis: Hypothesis§heap: QueryHeap<'a>Implementations§
Source§impl<'a> Proof<'a>
impl<'a> Proof<'a>
pub fn new(heap: QueryHeap<'a>, goals: &[usize]) -> Self
Sourcepub fn with_hypothesis(
heap: QueryHeap<'a>,
goals: &[usize],
hypothesis: Hypothesis,
) -> Self
pub fn with_hypothesis( heap: QueryHeap<'a>, goals: &[usize], hypothesis: Hypothesis, ) -> Self
Create a new proof with an existing hypothesis (for negation-as-failure checks)
pub fn prove( &mut self, predicate_table: &PredicateTable, config: Config, ) -> bool
Auto Trait Implementations§
impl<'a> Freeze for Proof<'a>
impl<'a> RefUnwindSafe for Proof<'a>
impl<'a> !Send for Proof<'a>
impl<'a> !Sync for Proof<'a>
impl<'a> Unpin for Proof<'a>
impl<'a> UnsafeUnpin for Proof<'a>
impl<'a> UnwindSafe for Proof<'a>
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> 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