next up previous contents
Next: Bibliography Up: ale_trale_ref Previous: Pivot Checking   Contents

SLD Resolution

The term resolution in logic refers to a mechanical method for proving statements in first-order logic. It is applied to two clauses in a sentence, and by unification, it eliminates a literal that occurs positive in one clause and negative in the other. A literal stated in the antecedent of an implication is negative because an implication $P\to Q$ is equivalent to $\neg P \vee Q$. Therefore, in


\begin{exe}
\ex $(man(X) \to mortal(X))\wedge man(socrates)$\end{exe}

we can unify $socrates$ with $X$. This will give us


\begin{exe}
\ex $(man(socrates) \to mortal(socrates)) \wedge man(socrates)$\end{exe}

which is equivalent to


\begin{exe}
\ex $(\neg man(socrates) \vee mortal(socrates) \wedge man(socrates))$\end{exe}

By distribution, we have


\begin{exe}
\ex $(man(socrates) \wedge \neg man(socrates)) \vee (man(socrates)
\wedge mortal(socrates))$\end{exe}

Since $P\wedge \neg P = false$, we have


\begin{exe}
\ex $man(socrates) \wedge mortal(socrates)$\end{exe}

Through this resolution process, we proved $mortal(socrates)$. Resolution with backtracking is the basic control mechanism in Prolog.12.1

SLD resolution is a term used in logic programming to refer to the control strategy used in such languages to resolve issues of nondeterminism. By definition, SLD resolution is linear resolution with a selection function for definite sentences. A definite sentence has exactly one positive literal in each clause and this literal is selected to be resolved upon, i.e., replaced in the goal clause by the conjunction of negative literals which form the body of the clause.

SLD resolution in ALE is identical to what Prolog does. In fact, in implementation ALE relies on Prolog for SLD resolution. For more information on how Prolog handles nondeterminism, refer to chapter 5 of Sterling and Shapiro (1986).

ALE compiles a clause declaration into instructions, and processes these instructions as follows:

A few built-in operators merit considerationl. =@/2 is compiled to an equality check (using Prolog ==/2) on the Tags of the ALE data structure. =/2 is compiled to unification. when/2 is compiled as stated in Chapter 6. Prolog hooks are compiled directly to Prolog calls. Cut, shallow-cut and negation-by-failure are compiled to their Prolog equivalents.


next up previous contents
Next: Bibliography Up: ale_trale_ref Previous: Pivot Checking   Contents
TRALE Reference Manual