/// Given a selected positive subgoal, applies the subgoal
/// abstraction function to yield the canonical form that will be
/// used to pick a table. Typically, this abstraction has no
/// effect, and hence we are simply returning the canonical form
/// of `subgoal`, but if the subgoal is getting too big, we may
/// truncate the goal to ensure termination.
///
/// This technique is described in the SA paper.
Given a selected positive subgoal, applies the subgoal
abstraction function to yield the canonical form that will be
used to pick a table. Typically, this abstraction has no
effect, and hence we are simply returning the canonical form
of `subgoal`, but if the subgoal is getting too big, we may
truncate the goal to ensure termination.

This technique is described in the SA paper.
Given a selected positive subgoal applies the subgoal abstraction function to yield the canonical form that will be used to pick a table . Typically this abstraction has no effect and hence we are simply returning the canonical form of ` subgoal ` but if the subgoal is getting too big we may truncate the goal to ensure termination . This technique is described in the SA paper .
fn abstract_positive_literal<I: Context>(
        &mut self,
        infer: &mut dyn InferenceTable<C, I>,
        subgoal: &I::GoalInEnvironment,
    ) -> C::CanonicalGoalInEnvironment {
        // Subgoal abstraction: Rather than looking up the table for
        // `selected_goal` directly, first apply the truncation
        // function. This may introduce fresh variables, making the
        // goal that we are looking up more general, and forcing us to
        // reuse an existing table. For example, if we had a selected
        // goal of
        //
        //     // Vec<Vec<Vec<Vec<i32>>>>: Sized
        //
        // we might now produce a truncated goal of
        //
        //     // Vec<Vec<?T>>: Sized
        //
        // Obviously, the answer we are looking for -- if it exists -- will be
        // found amongst the answers of this new, truncated goal.
        //
        // Subtle point: Note that the **selected goal** remains
        // unchanged and will be carried over into the "pending
        // clause" for the positive link on the new subgoal. This
        // means that if our new, truncated subgoal produces
        // irrelevant answers (e.g., `Vec<Vec<u32>>: Sized`), they
        // will fail to unify with our selected goal, producing no
        // resolvent.
        match infer.truncate_goal(subgoal) {
            None => infer.canonicalize_goal(subgoal),
            Some(truncated_subgoal) => {
                debug!("truncated={:?}", truncated_subgoal);
                infer.canonicalize_goal(&truncated_subgoal)
            }
        }
    }
fn abstract_positive_literal < I : Context > ( & mut self , infer : & mut dyn InferenceTable < C , I > , subgoal : & I :: GoalInEnvironment , ) -> C :: CanonicalGoalInEnvironment { // Subgoal abstraction: Rather than looking up the table for // `selected_goal` directly, first apply the truncation // function. This may introduce fresh variables, making the // goal that we are looking up more general, and forcing us to // reuse an existing table. For example, if we had a selected // goal of // //     // Vec<Vec<Vec<Vec<i32>>>>: Sized // // we might now produce a truncated goal of // //     // Vec<Vec<?T>>: Sized // // Obviously, the answer we are looking for -- if it exists -- will be // found amongst the answers of this new, truncated goal. // // Subtle point: Note that the **selected goal** remains // unchanged and will be carried over into the "pending // clause" for the positive link on the new subgoal. This // means that if our new, truncated subgoal produces // irrelevant answers (e.g., `Vec<Vec<u32>>: Sized`), they // will fail to unify with our selected goal, producing no // resolvent. match infer . truncate_goal ( subgoal ) { None => infer . canonicalize_goal ( subgoal ) , Some ( truncated_subgoal ) => { debug ! ( " " truncated_subgoal ) ; infer . canonicalize_goal ( & truncated_subgoal ) } } }
Given a selected positive subgoal, applies the subgoal
abstraction function to yield the canonical form that will be
used to pick a table.
Given a selected positive subgoal applies the subgoal abstraction function to yield the canonical form that will be used to pick a table .
&mut self
infer
&mut dyn InferenceTable<C, I>
subgoal
&I::GoalInEnvironment