fn resolvent_answer(
    infer: &mut InferenceTable,
    ex_clause: &ExClause,
    selected_goal: &InEnvironment<Goal>,
    answer_table_goal: &CanonicalGoal,
    answer_subst: &CanonicalConstrainedSubst,
) -> Satisfiable<ExClause> {
    // Relating the above describes to our parameters:
    //
    // - the goal G is `ex_clause` is, with `selected_goal` being
    //   the selected literal Li, already removed from the list.
    // - the clause C is `answer.` (i.e., the answer has no conditions).

    // C' is now `answer`. No variables in commmon with G.
    let ConstrainedSubst {
        subst: answer_subst,
        constraints: answer_constraints,
    } = infer.instantiate_canonical(&answer_subst);

    // Apply the substitution from the answer to the original
    // table goal to yield our new `answer_goal`. This is needed
    // for unifying.
    let answer_goal = answer_table_goal.instantiate_with_subst(&answer_subst);

    // Perform the SLG resolvent unification.
    let resolvent = resolvent::resolvent_unify(
        infer,
        ex_clause.clone(),
        selected_goal,
        &answer_goal,
        vec![],
    );

    // We have one additional complication: we have to insert the
    // region constraints.
    resolvent.map(|ex_clause| ex_clause.with_constraints(answer_constraints))
}
/// Applies the SLG resolvent algorithm to incorporate an answer
/// produced by the selected literal into the main X-clause,
/// producing a new X-clause that must be solved.
///
/// # Parameters
///
/// - `ex_clause` is the X-clause we are trying to prove,
///   with the selected literal removed from its list of subgoals
/// - `selected_goal` is the selected literal that was removed
/// - `answer` is some answer to `selected_goal` that has been found
Applies the SLG resolvent algorithm to incorporate an answer
produced by the selected literal into the main X-clause,
producing a new X-clause that must be solved.
Applies the SLG resolvent algorithm to incorporate an answer produced by the selected literal into the main X - clause producing a new X - clause that must be solved .
fn resolvent_answer(
    infer: &mut InferenceTable,
    ex_clause: &ExClause,
    selected_goal: &InEnvironment<Goal>,
    answer_table_goal: &CanonicalGoal,
    answer_subst: &CanonicalConstrainedSubst,
) -> Satisfiable<ExClause> {
    // Relating the above describes to our parameters:
    //
    // - the goal G is `ex_clause` is, with `selected_goal` being
    //   the selected literal Li, already removed from the list.
    // - the clause C is `answer.` (i.e., the answer has no conditions).
    // C' is now `answer`. No variables in commmon with G.
    let ConstrainedSubst {
        subst: answer_subst,
        constraints: answer_constraints,
    } = infer.instantiate_canonical(&answer_subst);
    // Apply the substitution from the answer to the original
    // table goal to yield our new `answer_goal`. This is needed
    // for unifying.
    let answer_goal = answer_table_goal.instantiate_with_subst(&answer_subst);
    // Perform the SLG resolvent unification.
    let resolvent = resolvent::resolvent_unify(
        infer,
        ex_clause.clone(),
        selected_goal,
        &answer_goal,
        vec![],
    );
    // We have one additional complication: we have to insert the
    // region constraints.
    resolvent.map(|ex_clause| ex_clause.with_constraints(answer_constraints))
}
fn resolvent_answer ( infer : & mut InferenceTable , ex_clause : & ExClause , selected_goal : & InEnvironment < Goal > , answer_table_goal : & CanonicalGoal , answer_subst : & CanonicalConstrainedSubst , ) -> Satisfiable < ExClause > { // Relating the above describes to our parameters: // // - the goal G is `ex_clause` is, with `selected_goal` being //   the selected literal Li, already removed from the list. // - the clause C is `answer.` (i.e., the answer has no conditions). // C' is now `answer`. No variables in commmon with G. let ConstrainedSubst { subst : answer_subst , constraints : answer_constraints , } = infer . instantiate_canonical ( & answer_subst ) ; // Apply the substitution from the answer to the original // table goal to yield our new `answer_goal`. This is needed // for unifying. let answer_goal = answer_table_goal . instantiate_with_subst ( & answer_subst ) ; // Perform the SLG resolvent unification. let resolvent = resolvent :: resolvent_unify ( infer , ex_clause . clone ( ) , selected_goal , & answer_goal , vec ! [ ] , ) ; // We have one additional complication: we have to insert the // region constraints. resolvent . map ( | ex_clause | ex_clause . with_constraints ( answer_constraints ) ) }
Applies the SLG resolvent algorithm to incorporate an answer
produced by the selected literal into the main X-clause,
producing a new X-clause that must be solved.
Applies the SLG resolvent algorithm to incorporate an answer produced by the selected literal into the main X - clause producing a new X - clause that must be solved .
infer
&mut InferenceTable
ex_clause
&ExClause
None
selected_goal
&InEnvironment<Goal>
None
answer_table_goal
&CanonicalGoal
answer_subst
&CanonicalConstrainedSubst
answer
None