pub(super) fn resolvent_clause(
    infer: &mut InferenceTable,
    goal: &InEnvironment<DomainGoal>,
    subst: &Substitution,
    clause: &Binders<ProgramClauseImplication>,
) -> Satisfiable<ExClause> {
    // Relating the above description to our situation:
    //
    // - `goal` G, except with binders for any existential variables.
    //   - Also, we always select the first literal in `ex_clause.literals`, so `i` is 0.
    // - `clause` is C, except with binders for any existential variables.

    // Goal here is now G.
    let ex_clause = ExClause {
        subst: subst.clone(),
        delayed_literals: vec![],
        constraints: vec![],
        subgoals: vec![],
    };

    // The selected literal for us will always be the main goal
    // `G`. See if we can unify that with C'.
    let environment = &goal.environment;

    // C' in the description above is `consequence :- conditions`.
    //
    // Note that G and C' have no variables in common.
    let ProgramClauseImplication {
        consequence,
        conditions,
    } = infer.instantiate_binders_in(environment.universe, clause);
    let consequence: InEnvironment<DomainGoal> = InEnvironment::new(&environment, consequence);

    resolvent::resolvent_unify(infer, ex_clause, &goal, &consequence, conditions)
}
/// Applies the SLG resolvent algorithm to incorporate a program
/// clause into the main X-clause, producing a new X-clause that
/// must be solved.
///
/// # Parameters
///
/// - `goal` is the goal G that we are trying to solve
/// - `clause` is the program clause that may be useful to that end
Applies the SLG resolvent algorithm to incorporate a program
clause into the main X-clause, producing a new X-clause that
must be solved.
Applies the SLG resolvent algorithm to incorporate a program clause into the main X - clause producing a new X - clause that must be solved .
pub(super) fn resolvent_clause(
    infer: &mut InferenceTable,
    goal: &InEnvironment<DomainGoal>,
    subst: &Substitution,
    clause: &Binders<ProgramClauseImplication>,
) -> Satisfiable<ExClause> {
    // Relating the above description to our situation:
    //
    // - `goal` G, except with binders for any existential variables.
    //   - Also, we always select the first literal in `ex_clause.literals`, so `i` is 0.
    // - `clause` is C, except with binders for any existential variables.
    // Goal here is now G.
    let ex_clause = ExClause {
        subst: subst.clone(),
        delayed_literals: vec![],
        constraints: vec![],
        subgoals: vec![],
    };
    // The selected literal for us will always be the main goal
    // `G`. See if we can unify that with C'.
    let environment = &goal.environment;
    // C' in the description above is `consequence :- conditions`.
    //
    // Note that G and C' have no variables in common.
    let ProgramClauseImplication {
        consequence,
        conditions,
    } = infer.instantiate_binders_in(environment.universe, clause);
    let consequence: InEnvironment<DomainGoal> = InEnvironment::new(&environment, consequence);
    resolvent::resolvent_unify(infer, ex_clause, &goal, &consequence, conditions)
}
pub ( super ) fn resolvent_clause ( infer : & mut InferenceTable , goal : & InEnvironment < DomainGoal > , subst : & Substitution , clause : & Binders < ProgramClauseImplication > , ) -> Satisfiable < ExClause > { // Relating the above description to our situation: // // - `goal` G, except with binders for any existential variables. //   - Also, we always select the first literal in `ex_clause.literals`, so `i` is 0. // - `clause` is C, except with binders for any existential variables. // Goal here is now G. let ex_clause = ExClause { subst : subst . clone ( ) , delayed_literals : vec ! [ ] , constraints : vec ! [ ] , subgoals : vec ! [ ] , } ; // The selected literal for us will always be the main goal // `G`. See if we can unify that with C'. let environment = & goal . environment ; // C' in the description above is `consequence :- conditions`. // // Note that G and C' have no variables in common. let ProgramClauseImplication { consequence , conditions , } = infer . instantiate_binders_in ( environment . universe , clause ) ; let consequence : InEnvironment < DomainGoal > = InEnvironment :: new ( & environment , consequence ) ; resolvent :: resolvent_unify ( infer , ex_clause , & goal , & consequence , conditions ) }
Applies the SLG resolvent algorithm to incorporate a program
clause into the main X-clause, producing a new X-clause that
must be solved.
Applies the SLG resolvent algorithm to incorporate a program clause into the main X - clause producing a new X - clause that must be solved .
infer
&mut InferenceTable
goal
&InEnvironment<DomainGoal>
None
subst
&Substitution
clause
&Binders<ProgramClauseImplication>
None