package prolog.ast.logic

import prolog.Answers
import prolog.Substitutions
import prolog.ast.terms.Goal

/**
 * Can be instructed to solve a goal.
 */
interface Resolvent {
    /**
     * Attempts to solve the given goal.
     *
     * @return A sequence of substitutions that can be applied to the goal to unify it with this resolvent.
     * If the goal cannot be unified with this resolvent, an empty sequence is returned.
     */
    fun solve(goal: Goal, subs: Substitutions): Answers
}
