Struct chalk_engine::ExClause
source · [−]pub struct ExClause<I: Interner> {
pub subst: Substitution<I>,
pub ambiguous: bool,
pub constraints: Vec<InEnvironment<Constraint<I>>>,
pub subgoals: Vec<Literal<I>>,
pub delayed_subgoals: Vec<InEnvironment<Goal<I>>>,
pub answer_time: TimeStamp,
pub floundered_subgoals: Vec<FlounderedSubgoal<I>>,
}
Expand description
The paper describes these as A :- D | G
.
Fields
subst: Substitution<I>
The substitution which, applied to the goal of our table, would yield A.
ambiguous: bool
True if any subgoals were depended upon negatively and
were not fully evaluated, or if we encountered a CannotProve
goal. (In the full SLG algorithm, we would use delayed literals here,
but we don’t bother, as we don’t need that support.)
constraints: Vec<InEnvironment<Constraint<I>>>
Region constraints we have accumulated.
subgoals: Vec<Literal<I>>
Subgoals: literals that must be proven
delayed_subgoals: Vec<InEnvironment<Goal<I>>>
We assume that negative literals cannot have coinductive cycles.
answer_time: TimeStamp
Time stamp that is incremented each time we find an answer to
some subgoal. This is used to figure out whether any of the
floundered subgoals may no longer be floundered: we record the
current time when we add something to the list of floundered
subgoals, and then we can compare whether its value has
changed since then. This is not the same TimeStamp
of
Forest
’s clock.
floundered_subgoals: Vec<FlounderedSubgoal<I>>
List of subgoals that have floundered. See FlounderedSubgoal
for more information.
Trait Implementations
sourceimpl<I: Interner> HasInterner for ExClause<I>
impl<I: Interner> HasInterner for ExClause<I>
type Interner = I
type Interner = I
The interner associated with the type.
sourceimpl<I: Interner> TypeFoldable<I> for ExClause<I>
impl<I: Interner> TypeFoldable<I> for ExClause<I>
sourcefn fold_with<E>(
self,
folder: &mut dyn TypeFolder<I, Error = E>,
outer_binder: DebruijnIndex
) -> Result<Self, E>
fn fold_with<E>(
self,
folder: &mut dyn TypeFolder<I, Error = E>,
outer_binder: DebruijnIndex
) -> Result<Self, E>
Apply the given folder folder
to self
; binders
is the
number of binders that are in scope when beginning the
folder. Typically binders
starts as 0, but is adjusted when
we encounter Binders<T>
in the IR or other similar
constructs. Read more
sourceimpl<I: Interner> TypeVisitable<I> for ExClause<I>
impl<I: Interner> TypeVisitable<I> for ExClause<I>
sourcefn visit_with<B>(
&self,
visitor: &mut dyn TypeVisitor<I, BreakTy = B>,
outer_binder: DebruijnIndex
) -> ControlFlow<B>
fn visit_with<B>(
&self,
visitor: &mut dyn TypeVisitor<I, BreakTy = B>,
outer_binder: DebruijnIndex
) -> ControlFlow<B>
Apply the given visitor visitor
to self
; binders
is the
number of binders that are in scope when beginning the
visitor. Typically binders
starts as 0, but is adjusted when
we encounter Binders<T>
in the IR or other similar
constructs. Read more
impl<I: Eq + Interner> Eq for ExClause<I>
impl<I: Interner> StructuralEq for ExClause<I>
impl<I: Interner> StructuralPartialEq for ExClause<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for ExClause<I> where
<I as Interner>::InternedGoal: RefUnwindSafe,
<I as Interner>::InternedLifetime: RefUnwindSafe,
<I as Interner>::InternedProgramClauses: RefUnwindSafe,
<I as Interner>::InternedSubstitution: RefUnwindSafe,
<I as Interner>::InternedType: RefUnwindSafe,
impl<I> Send for ExClause<I> where
<I as Interner>::InternedGoal: Send,
<I as Interner>::InternedLifetime: Send,
<I as Interner>::InternedProgramClauses: Send,
<I as Interner>::InternedSubstitution: Send,
<I as Interner>::InternedType: Send,
impl<I> Sync for ExClause<I> where
<I as Interner>::InternedGoal: Sync,
<I as Interner>::InternedLifetime: Sync,
<I as Interner>::InternedProgramClauses: Sync,
<I as Interner>::InternedSubstitution: Sync,
<I as Interner>::InternedType: Sync,
impl<I> Unpin for ExClause<I> where
<I as Interner>::InternedGoal: Unpin,
<I as Interner>::InternedLifetime: Unpin,
<I as Interner>::InternedProgramClauses: Unpin,
<I as Interner>::InternedSubstitution: Unpin,
<I as Interner>::InternedType: Unpin,
impl<I> UnwindSafe for ExClause<I> where
<I as Interner>::InternedGoal: UnwindSafe,
<I as Interner>::InternedLifetime: UnwindSafe,
<I as Interner>::InternedProgramClauses: UnwindSafe,
<I as Interner>::InternedSubstitution: UnwindSafe,
<I as Interner>::InternedType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Cast for T
impl<T> Cast for T
sourcefn cast<U>(self, interner: <U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, I> Shift<I> for T where
T: TypeFoldable<I>,
I: Interner,
impl<T, I> Shift<I> for T where
T: TypeFoldable<I>,
I: Interner,
sourcefn shifted_in(self, interner: I) -> T
fn shifted_in(self, interner: I) -> T
Shifts this term in one level of binders.
sourcefn shifted_in_from(self, interner: I, source_binder: DebruijnIndex) -> T
fn shifted_in_from(self, interner: I, source_binder: DebruijnIndex) -> T
Shifts a term valid at outer_binder
so that it is
valid at the innermost binder. See DebruijnIndex::shifted_in_from
for a detailed explanation. Read more
sourcefn shifted_out_to(
self,
interner: I,
target_binder: DebruijnIndex
) -> Result<T, NoSolution>
fn shifted_out_to(
self,
interner: I,
target_binder: DebruijnIndex
) -> Result<T, NoSolution>
Shifts a term valid at the innermost binder so that it is
valid at outer_binder
. See DebruijnIndex::shifted_out_to
for a detailed explanation. Read more
sourcefn shifted_out(self, interner: I) -> Result<T, NoSolution>
fn shifted_out(self, interner: I) -> Result<T, NoSolution>
Shifts this term out one level of binders.
sourceimpl<T, I> VisitExt<I> for T where
I: Interner,
T: TypeVisitable<I>,
impl<T, I> VisitExt<I> for T where
I: Interner,
T: TypeVisitable<I>,
sourcefn has_free_vars(&self, interner: I) -> bool
fn has_free_vars(&self, interner: I) -> bool
Check whether there are free (non-bound) variables.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more