Hubbry Logo
SLD resolutionSLD resolutionMain
Open search
SLD resolution
Community hub
SLD resolution
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
SLD resolution
SLD resolution
from Wikipedia

SLD resolution (Selective Linear Definite clause resolution) is the basic inference rule used in logic programming. It is a refinement of resolution, which is both sound and refutation complete for Horn clauses.

The SLD inference rule

[edit]

Given a goal clause, represented as the negation of a problem to be solved:

with selected literal , and an input definite clause:

whose positive literal (atom) unifies with the atom of the selected literal , SLD resolution derives another goal clause, in which the selected literal is replaced by the negative literals of the input clause and the unifying substitution is applied:

In the simplest case, in propositional logic, the atoms and are identical, and the unifying substitution is vacuous. However, in the more general case, the unifying substitution is necessary to make the two literals identical.

The origin of the name "SLD"

[edit]

The name "SLD resolution" was given by Maarten van Emden for the unnamed inference rule introduced by Robert Kowalski.[1] Its name is derived from SL resolution,[2] which is both sound and refutation complete for the unrestricted clausal form of logic. "SLD" stands for "SL resolution with Definite clauses".

In both, SL and SLD, "L" stands for the fact that a resolution proof can be restricted to a linear sequence of clauses:

where the "top clause" is an input clause, and every other clause is a resolvent one of whose parents is the previous clause . The proof is a refutation if the last clause is the empty clause.

In SLD, all of the clauses in the sequence are goal clauses, and the other parent is an input clause. In SL resolution, the other parent is either an input clause or an ancestor clause earlier in the sequence.

In both SL and SLD, "S" stands for the fact that the only literal resolved upon in any clause is one that is uniquely selected by a selection rule or selection function. In SL resolution, the selected literal is restricted to one which has been most recently introduced into the clause. In the simplest case, such a last-in-first-out selection function can be specified by the order in which literals are written, as in Prolog. However, the selection function in SLD resolution is more general than in SL resolution and in Prolog. There is no restriction on the literal that can be selected.

The computational interpretation of SLD resolution

[edit]

In clausal logic, an SLD refutation demonstrates that the input set of clauses is unsatisfiable. In logic programming, however, an SLD refutation also has a computational interpretation. The top clause can be interpreted as the denial of a conjunction of subgoals . The derivation of clause from is the derivation, by means of backward reasoning, of a new set of sub-goals using an input clause as a goal-reduction procedure. The unifying substitution both passes input from the selected subgoal to the body of the procedure and simultaneously passes output from the head of the procedure to the remaining unselected subgoals. The empty clause is simply an empty set of subgoals, which signals that the initial conjunction of subgoals in the top clause has been solved.

SLD resolution strategies

[edit]

SLD resolution implicitly defines a search tree of alternative computations, in which the initial goal clause is associated with the root of the tree. For every node in the tree and for every definite clause in the program whose positive literal unifies with the selected literal in the goal clause associated with the node, there is a child node associated with the goal clause obtained by SLD resolution.

A leaf node, which has no children, is a success node if its associated goal clause is the empty clause. It is a failure node if its associated goal clause is non-empty but its selected literal unifies with no positive literal of definite clauses in the program.

SLD resolution is non-deterministic in the sense that it does not determine the search strategy for exploring the search tree. Prolog searches the tree depth-first, one branch at a time, using backtracking when it encounters a failure node. Depth-first search is very efficient in its use of computing resources, but is incomplete if the search space contains infinite branches and the search strategy searches these in preference to finite branches: the computation does not terminate. Other search strategies, including breadth-first, best-first, and branch-and-bound search are also possible. Moreover, the search can be carried out sequentially, one node at a time, or in parallel, many nodes simultaneously.

SLD resolution is also non-deterministic in the sense, mentioned earlier, that the selection rule is not determined by the inference rule, but is determined by a separate decision procedure, which can be sensitive to the dynamics of the program execution process.

The SLD resolution search space is an or-tree, in which different branches represent alternative computations. In the case of propositional logic programs, SLD can be generalised so that the search space is an and-or tree, whose nodes are labelled by single literals, representing subgoals, and nodes are joined either by conjunction or by disjunction. In the general case, where conjoint subgoals share variables, the and-or tree representation is more complicated.

Example

[edit]

Given the logic program in the Prolog language:

q :- p.
p.

and the top-level goal:

q.

the search space consists of a single branch, in which q is reduced to p which is reduced to the empty set of subgoals, signalling a successful computation. In this case, the program is so simple that there is no role for the selection function and no need for any search.

In clausal logic, the program is represented by the set of clauses:

and top-level goal is represented by the goal clause with a single negative literal:

The search space consists of the single refutation:

where represents the empty clause.

If the following clause were added to the program:

q :- r.

then there would be an additional branch in the search space, whose leaf node r is a failure node. In Prolog, if this clause were added to the front of the original program, then Prolog would use the order in which the clauses are written to determine the order in which the branches of the search space are investigated. Prolog would try this new branch first, fail, and then backtrack to investigate the single branch of the original program and succeed.

If the clause

p :- p.

were now added to the program, then the search tree would contain an infinite branch. If this clause were tried first, then Prolog would go into an infinite loop and not find the successful branch.

SLDNF

[edit]

SLDNF[3] is an extension of SLD resolution to deal with negation as failure. In SLDNF, goal clauses can contain negation as failure literals, say of the form , which can be selected only if they contain no variables. When such a variable-free literal is selected, a subproof (or subcomputation) is attempted to determine whether there is an SLDNF refutation starting from the corresponding unnegated literal as top clause. The selected subgoal succeeds if the subproof fails, and it fails if the subproof succeeds.

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
SLD resolution, or Selective Linear Definite clause resolution, is an rule in and that applies linear resolution restricted to definite clauses, which are Horn clauses with exactly one positive literal, using a selection function to choose literals for resolution. It enables the derivation of answer substitutions for queries against a expressed as a set of definite clauses, forming the core mechanism for goal-directed proof search in logic programs. The procedure is both sound—ensuring that all derived answers are logical consequences of the program—and complete under fair selection strategies, meaning it can find all valid ground answers if the search terminates. Introduced as a refinement of general resolution in the early 1970s, SLD resolution builds on SL-resolution, a linear variant proposed by and Donald Kuehner in 1971 to improve efficiency by restricting resolutions to a single chain and incorporating a selection function for literal choice. further developed it in 1974 as the operational foundation for interpreting predicate logic as a programming language, shifting focus from theorem proving to where programs are logic theories and computations are proofs. The soundness of SLD resolution was established early, while its completeness for definite programs was first proved by Robert Hill in 1974. In practice, SLD resolution powers the execution model of , the seminal language implemented in 1972 by Alain Colmerauer and colleagues, through with chronological to explore resolution paths. A computation begins with a query , a conjunction of atomic formulas; an atom is selected, unified with the head of a program clause via a most general unifier, and replaced by the clause's body to yield a resolvent , accumulating substitutions along successful refutations to the empty clause. This approach supports variables in queries, allowing generalization and efficient handling of relational data, though practical implementations like may omit certain checks (e.g., the occurs check) for performance, potentially affecting completeness in infinite structure cases.

Foundations

Definition and Properties

SLD resolution is the core inference mechanism employed in first-order logic programming with definite clause programs, which are finite sets of definite Horn clauses. A is defined as a disjunction of literals containing at most one positive literal, while a definite (or definite clause) is a with exactly one positive literal as the head and a (possibly empty) conjunction of positive literals in the body. SLD resolution serves as a refinement of the general resolution principle, specifically a special case of SL-resolution adapted for definite clauses, utilizing to derive refutations from an initial goal clause expressed as a conjunction of atoms in the form A1An\leftarrow A_1 \land \dots \land A_n, where each AiA_i is an atom. Developed in the as a foundational element of , SLD resolution enables the operational execution of definite programs by systematically reducing goals through resolution steps, thereby supporting the procedural interpretation of logical specifications. It is inherently restricted to definite clauses, ensuring that clause bodies consist solely of positive literals, which aligns with the positive logic underlying definite programs and facilitates . SLD resolution possesses key properties of soundness and refutation-completeness with respect to Horn clauses. Soundness guarantees that any derived fact or answer substitution obtained via an SLD-refutation is a of the program, preserving semantic correctness. Refutation-completeness ensures that for any unsatisfiable set of Horn clauses—meaning any provable —there exists an SLD-refutation demonstrating the inconsistency, thereby allowing the procedure to establish all derivable theorems within definite logic programs.

Historical Development

SLD resolution emerged in the early 1970s as a refinement of earlier resolution-based theorem proving techniques, building on the foundational work of J. Alan Robinson, who introduced the general resolution principle in 1965 to enable machine-oriented automated deduction from formulas. This general method, while complete, was computationally inefficient for practical applications, prompting researchers to develop specialized variants like linear input resolution to focus on ordered derivations and improve efficiency in programming contexts. A pivotal step toward SLD resolution came from efforts to provide a procedural interpretation of logical clauses, particularly Horn clauses, for computational purposes. In 1969, and Patrick J. Hayes explored semantic trees in automatic theorem proving, introducing ideas of procedural attachment that linked logical inference to executable procedures, laying groundwork for interpreting resolution steps as program execution. Building on this, and Donald Kuehner formalized SL resolution in 1971 as a selective linear variant of resolution, incorporating a selection function to restrict inferences to relevant literals and enhance focus in top-down derivations from definite clauses. The inference rule underlying SLD resolution was introduced by in 1974, and the name "SLD resolution," standing for Selective Linear Definite clause resolution, was given by Maarten H. van Emden in a 1974 memo at the . This development coincided with Alain Colmerauer's creation of in 1972, during which Kowalski's visit to influenced the adoption of a top-down resolution strategy based on SLD principles for tasks. The first implementation of SLD resolution occurred in the initial interpreter written in 1972 by Colmerauer and Philippe Roussel using Algol-W on an IBM 360, demonstrating its viability as an for logic programs. By 1973, refinements to incorporated SLD resolution more robustly, and David H.D. Warren's DEC-10 implementation in the mid-1970s further entrenched it as the theoretical foundation for languages, enabling efficient and unification in practical systems. This evolution marked a shift from general proving to , where SLD resolution provided a sound and complete mechanism for computing answers from logic programs.

Inference Mechanism

The SLD Inference Rule

The SLD inference rule, central to SLD resolution in logic programming, enables the systematic reduction of goals using definite clauses from a program PP, which consists of Horn clauses of the form HB1BmH \leftarrow B_1 \wedge \cdots \wedge B_m where HH and each BjB_j are atomic formulas and m0m \geq 0. A goal is represented as a conjunction G=L1LnG = \leftarrow L_1 \wedge \cdots \wedge L_n, where the LiL_i are literals (atomic formulas in this context, as negation is not handled). The rule selects a literal LiL_i from the current goal and resolves it against a head HH of a clause in PP. Formally, the rule is stated as follows: Given goal G=L1,,Li1,Li,Li+1,,LnG = \leftarrow L_1, \dots, L_{i-1}, L_i, L_{i+1}, \dots, L_n and clause C=HB1,,BmC = H \leftarrow B_1, \dots, B_m (with variables renamed apart to avoid clashes), if θ=mgu(Li,H)\theta = \mathrm{mgu}(L_i, H) exists, then the derived goal is G=θ(L1,,Li1,B1,,Bm,Li+1,,Ln),G' = \theta (L_1, \dots, L_{i-1}, B_1, \dots, B_m, L_{i+1}, \dots, L_n), where the empty body (m=0m = 0) simply removes LiL_i after substitution. This derivation step replaces the selected literal with the clause body under the most general unifier, preserving while reducing the . The process relies on unification to match the selected literal with the clause . An SLD derivation is a finite or infinite sequence G0,G1,G_0, G_1, \dots starting from an initial G0G_0, where each Gk+1G_{k+1} is obtained from GkG_k by applying the SLD rule with some selection of literal and choice of . The linear nature of the rule ensures that only one new is introduced per step, focusing the search along a single path of goal reductions. Success occurs via an SLD refutation: a finite derivation ending in the empty \square, with the computed answer substitution being the composition θ1θ2θr\theta_1 \theta_2 \cdots \theta_r restricted to the variables of G0G_0; failure arises if no unifiable exists for any remaining literal before reaching \square. This inference mechanism, introduced by to interpret predicate logic procedurally, underpins the operational semantics of languages like , ensuring goal-directed computation through repeated resolution steps.

Unification Process

In unification, the process seeks a substitution θ\theta that renders two terms ss and tt identical, such that sθ=tθs\theta = t\theta. A most general unifier (MGU) is the least restrictive such substitution, meaning any other unifier σ\sigma satisfies σ=θρ\sigma = \theta \circ \rho for some substitution ρ\rho. This concept ensures that unification preserves generality in logical inferences, avoiding overly specific bindings that could limit further derivations. The unification algorithm, originally formulated for resolution-based systems, operates by iteratively resolving differences between terms. It begins by initializing an empty substitution and identifying the disagreement set—the pairs of corresponding atomic subterms that differ. For each disagreement pair involving a variable VV and a non-variable term UU, if VV does not occur in UU (via the occurs check, which prevents cycles like X=f(X)X = f(X)), the algorithm binds VV to UU and applies this substitution to the terms, updating the disagreement set. The process repeats until no disagreements remain or a conflict arises (e.g., distinct constants). This yields the MGU if successful, and the occurs check is crucial for terminating in finite time and avoiding infinite structures. A representative example illustrates the process: unifying p(X,a)p(X, a) and p(b,Y)p(b, Y) proceeds by disagreeing on the first argument (XX vs. bb) and second (aa vs. YY). Binding X/bX/b resolves the first, then Y/aY/a the second, with no occurs check violation, producing the MGU θ={X/b,Y/a}\theta = \{X/b, Y/a\}. Such steps operate over the Herbrand universe, the set of all ground terms constructible from the function symbols in the language, ensuring unification aligns with the Herbrand base for semantic completeness. Disagreement sets guide efficient scanning, often implemented via pointer-based methods in practice. In SLD resolution, unification is applied at each step to a selected literal with a program clause head, yielding an MGU that instantiates the resolvent. Substitutions from successive steps are composed, where θ1θ2\theta_1 \circ \theta_2 applies θ2\theta_2 first followed by θ1\theta_1, accumulating bindings to form the overall computed answer while maintaining consistency. This composition, along with the occurs check, underpins the of SLD derivations in definite logic programs.

Operational Aspects

Computational Interpretation

In logic programming, SLD resolution interprets definite clause programs computationally via , where an initial goal representing a query is reduced step by step until it is either satisfied or fails, simulating a proof search from the query backward to the program's clauses as axioms. This process aligns the declarative semantics of Horn clauses with a procedural mechanism for theorem proving and query answering, as originally proposed in the context of predicate logic as a programming language. The execution model of SLD resolution starts with an initial clause G0G_0, typically a conjunction of atoms to be derived from the program PP. At each step, a literal AA is selected from the current GiG_i, and a AB1,,BnA' \leftarrow B_1, \dots, B_n from PP is chosen such that there exists a most general unifier θ\theta for AA and AA'; the next Gi+1G_{i+1} is then (Gi{A})θ{B1θ,,Bnθ}(G_i - \{A\}) \theta \cup \{B_1 \theta, \dots, B_n \theta\}. This reduction continues until the becomes the empty clause (denoted \square), indicating success and a refutation, or until no further resolution is possible, indicating failure. Along a successful derivation, substitutions θ1,θ2,,θk\theta_1, \theta_2, \dots, \theta_k are accumulated, and the computed answer substitution is their composition θ=θ1θ2θk\theta = \theta_1 \circ \theta_2 \circ \dots \circ \theta_k, which binds variables in the original query to values satisfying it relative to PP. The search space of all possible SLD derivations from G0G_0 forms the SLD , with nodes representing goals and edges corresponding to resolution steps under a fixed for literals. SLD resolution is refutation-complete for definite programs, meaning that if P{G0}P \cup \{ \leftarrow G_0 \} has a refutation (i.e., G0G_0 is a of PP), then the SLD contains at least one finite successful leading to \square, ensuring that an exhaustive fair search will find a proof if one exists. This completeness property underpins the reliability of SLD as a query evaluation mechanism in systems like , though practical implementations often employ specific search strategies to navigate the tree efficiently.

Resolution Strategies

In SLD resolution, the search process explores the SLD derivation , where nodes represent or subgoals, and branches arise from the selection of literals within a goal and the choice of applicable clauses from the program. This encapsulates all possible derivations for a given query, with paths leading to success (empty ), failure, or infinite loops depending on the program's properties. The and completeness of resolution depend on the used to traverse this tree, as well as the selection functions that guide literal and clause choices. Common strategies include , which is the default in systems like and employs chronological to explore branches sequentially. In this approach, the search commits to the deepest path first, selecting the leftmost literal in the goal (per Prolog's standard selection function) and trying clauses in top-down program order before upon failure. While space-efficient, risks non-termination on programs with infinite branches, such as left-recursive rules, potentially missing solutions or looping indefinitely. Breadth-first search, by contrast, explores all goals at a given depth before proceeding deeper, ensuring completeness by systematically examining the entire finite SLD tree without favoring any path prematurely. However, it is memory-intensive, as it requires storing all pending subgoals, making it impractical for large programs. Iterative deepening combines elements of both by performing successive depth-first searches with increasing depth bounds, achieving completeness akin to breadth-first while maintaining the space efficiency of depth-first; this strategy is asymptotically optimal in time and space for brute-force searches in tree-structured spaces. Selection functions play a crucial role in these strategies, determining which literal in the current goal is resolved next—typically the leftmost for simplicity and efficiency in —and which clauses are considered, often in the order they appear in the program. For completeness, strategies must be fair, meaning every finite branch in the SLD tree is eventually explored, avoiding biases that could omit solutions; unfair selections, like those in standard depth-first, may fail this in infinite trees despite .

Extensions and Variants

SLDNF Resolution

SLDNF resolution extends the SLD resolution mechanism to accommodate negation as failure in normal logic programs, where clauses may include negative literals of the form not(P), with P being a conjunction of atoms. In this framework, positive literals are resolved using standard SLD steps, while a negative literal not(P) succeeds if the subgoal P fails to derive, meaning no refutation exists for P under SLD resolution. This operational treatment of negation allows systems like to handle incomplete information by inferring the absence of facts when exhaustive search yields no proof. The SLDNF inference rule mirrors SLD for positive goals but introduces branching for . Specifically, when a negative literal not(A) is selected—provided A is ground to avoid floundering—the resolution attempts an SLD derivation for A; the negation succeeds (and the overall goal proceeds) only if this derivation finitely fails, yielding an empty refutation tree, whereas it fails if any successful derivation for A is found. For non-ground negative literals, SLDNF requires them to be ground before selection to prevent floundering, where the computation halts without committing to success or . This rule operationalizes as a search for rather than classical , enabling practical computation in top-down evaluators. SLDNF resolution is sound with respect to Clark's completion semantics, correctly deriving only logical consequences of the program's completion, where predicates are interpreted as if-then equivalences and as failure aligns with the . However, it is not complete for arbitrary normal programs due to issues like floundering and loops in ; completeness holds for stratified programs, where dependencies form a layered without through , ensuring the least Herbrand model coincides with the perfect model. In such cases, SLDNF captures the model semantics for ground queries without floundering, alternating between success and failure sets in a fixed-point manner. These properties make SLDNF the foundational for in , though it requires careful program design to avoid incompleteness.

Modern Extensions

Modern extensions of SLD resolution have addressed limitations in handling and in logic programs, particularly the incompleteness of SLDNF for non-stratified , by integrating advanced semantics and mechanisms. The model semantics, introduced by Gelfond and Lifschitz in 1988, provides a declarative foundation for non-monotonic reasoning in logic programs, enabling SLD-like procedures to compute models as fixed points of a reduct transformation, which extends the least model semantics of definite programs to disjunctive and normal programs. This integration allows resolution-based solvers to identify multiple models, supporting (ASP) where SLD resolution variants, such as credulous resolution, perform goal-directed search over answer sets without full grounding. In disjunctive logic programs, which generalize normal programs by allowing disjunctions in rule heads, SLD-like resolution has been extended through procedures such as near-Horn Prologs. These methods incorporate to handle disjunctive heads, mimicking SLD's linear derivation while ensuring completeness under the well-founded semantics for disjunctive programs. For instance, the D-SLS resolution strategy builds on SLD by delaying loops and managing unfounded sets, providing a top-down evaluation that avoids the inefficiencies of bottom-up approaches in disjunctive settings. To mitigate infinite loops and redundant computations in recursive queries, tabling techniques via SLG resolution have become a cornerstone extension, implemented in systems like XSB . SLG resolution, a linear variant of SLS resolution, memoizes subgoals and answers during SLD-style derivations, computing the well-founded model for general logic programs by suspending and resuming calls as needed. This approach ensures termination for a broader class of programs, including those with negation, and supports advanced features like call-answer subsumption for efficiency. Constraint Handling Rules (CHR) represent another extension, augmenting SLD resolution with multi-headed guarded rules for constraint simplification and propagation in . CHR programs execute via committed-choice semantics that interleave with Prolog's SLD resolution, allowing dynamic constraint stores to handle domains like numerical constraints or custom solvers without altering the core unification process. This integration enables CHR to serve as a host language for implementing extensions, where rules fire on the current store during SLD derivations. Recent developments have hybridized SLD resolution with probabilistic and paradigms to tackle uncertainty and scalability. In programming, systems like ProbLog extend SLD resolution to compute marginal probabilities over logic programs by annotating facts with probabilities and using SLD derivations to enumerate explanations, as in the ProbLog inference engine which lifts SLD trees into probabilistic queries. For neural proving, post-2020 works integrate with SLD, such as DeepProofLog, which employs stochastic SLD resolution to define distributions over proofs, guiding neural networks in learning resolution strategies for tasks. These hybrids enhance SLD's applicability in uncertain domains like completion, where neural guidance prunes search spaces while preserving logical soundness.

Applications and Examples

Illustrative Examples

To illustrate the mechanics of SLD resolution, consider a basic logic program consisting of the definite parent(X, Y) ← mother(X, Y). and the unit mother(ann, bob). The goal ← parent(ann, bob). is processed by selecting the literal parent(ann, bob) and unifying it with the head parent(X, Y), yielding the substitution θ = {X/ann, Y/bob}. The resolvent is then ← mother(ann, bob)., obtained by applying θ to the body. This new goal unifies directly with the fact mother(ann, bob)., resulting in the empty goal and a successful derivation with computed answer substitution { }. A step-by-step trace of this SLD derivation forms a linear path in the SLD tree:
  1. Initial : G_0 = ← parent(ann, bob).
  2. Select literal parent(ann, bob) and resolve with parent(X, Y) ← mother(X, Y). using θ_1 = {X/ann, Y/bob}, yielding G_1 = ← mother(ann, bob).
  3. Select literal mother(ann, bob) and resolve with unit mother(ann, bob). using θ_2 = { }, yielding the empty G_2 = ← .
This refutation succeeds, confirming the goal under the program's least Herbrand model. In a failure case with the same program, the goal ← parent(ann, sue). selects parent(ann, sue) and unifies with the clause head parent(X, Y) using θ = {X/ann, Y/sue}, producing G_1 = ← mother(ann, sue). No program clause unifies with mother(ann, sue)., so the derivation terminates in failure with no computed substitution. To demonstrate resolution strategies, particularly depth-first search with backtracking, extend the program to include an additional clause parent(X, Y) ← father(X, Y). along with facts mother(ann, bob). and father(ann, sue). For the goal ← parent(ann, X)., depth-first traversal first selects parent(ann, X) and resolves with parent(X, Y) ← mother(X, Y). using θ_1 = {X/ann, Y/X} (renaming variables apart), yielding G_1 = ← mother(ann, X). This unifies with mother(ann, bob). using θ_2 = {X/bob}, succeeding with partial answer {X/bob}. Backtracking then returns to the selection point, trying the alternative clause parent(X, Y) ← father(X, Y). with θ_3 = {X/ann, Y/X}, yielding G_2 = ← father(ann, X). Unification with father(ann, sue). gives θ_4 = {X/sue}, producing another success with {X/sue}. This process explores the SLD tree depth-first, enumerating all solutions via systematic backtracking over clause choices.

Practical Applications

SLD resolution serves as the foundational inference mechanism in the Prolog programming language, which is standardized by the International Organization for Standardization (ISO) under ISO/IEC 13211, defining its operational semantics through depth-first search with leftmost selection and chronological backtracking. Modern Prolog engines, such as SWI-Prolog and GNU Prolog, implement SLD resolution with various optimizations, including just-in-time compilation and efficient unification algorithms, to enhance performance in practical computing environments. These implementations support the execution of logic programs in domains requiring declarative reasoning, with SWI-Prolog extending SLD through features like tabling for improved termination properties. In knowledge representation, SLD resolution powers expert systems built with , enabling rule-based inference for decision support in fields like and , where facts and rules are queried declaratively to derive conclusions. For , it facilitates parsing through Definite Clause Grammars (DCGs), a extension that models as logic rules, allowing efficient top-down analysis of sentences in applications such as and development. Additionally, SLD resolution underpins in verification tools, where -based systems check properties of software and hardware models by resolving queries against formal specifications. The efficiency of SLD resolution shines in handling recursive queries, such as those in or relationship computations, by enabling compact, declarative code that avoids explicit loops and scales well for depth-limited searches in programs. However, it faces limitations with non-termination in left-recursive or cyclic queries, a challenge mitigated in modern systems through tabling techniques that memoize intermediate results to prevent redundant computations and ensure convergence. As of 2025, SLD resolution is employed in approximately a dozen actively maintained -based systems, with ongoing adoption in AI planning domains—such as PDDL-compliant solvers that leverage for plan generation—and semantic web technologies, including query engines that incorporate resolution-like inference for RDF data retrieval.

Comparisons

Relation to Other Resolution Methods

SLD resolution serves as a linear, input-restricted variant of general resolution, which was originally introduced by Robinson in as a refutation-complete method for using binary inferences between clauses. Unlike full binary resolution, which can combine any two clauses and may generate exponential numbers of intermediate clauses, SLD restricts resolutions to a linear starting from a goal clause and program clauses (definite Horn clauses), thereby avoiding unnecessary branching and improving computational efficiency in practice. SLD resolution refines SL resolution, a developed by and Kuehner in 1971 that applies linear resolution with a selection function to full clausal logic, allowing resolutions only on selected literals to mimic . By further limiting SL resolution to definite clauses (with exactly one positive literal) and refuting goals (negative clauses), SLD ensures a goal-directed search suitable for , where queries are resolved against a program in a top-down manner. In comparison to the semantic tableau method (also known as analytic tableaux), which systematically explores disjunctions through branching paths to construct models or detect contradictions, SLD resolution maintains a linear structure focused on conjunctive goals in logic, eschewing explicit branching for disjunctive cases. This linearity aligns SLD more closely with procedures but limits its applicability to refutations involving and conjunctions, whereas tableaux handle full propositional and first-order formulas via systematic case analysis. SLD resolution shares similarities with model elimination, a procedure introduced by Loveland in that employs linear expansions and contractions in a tree-like format to eliminate models, akin to in resolution. However, model elimination is more general, applicable to arbitrary clausal forms without the Horn clause restriction, and incorporates contraction rules to prune redundant branches, whereas SLD's derivations remain strictly linear and input-dependent for efficiency in definite logic programs. A key limitation of SLD resolution is its completeness only for Horn clauses and definite programs, in contrast to the generality of full resolution methods, which achieve refutational completeness for any unsatisfiable set of clauses. This specialization enables practical implementations like but requires extensions for non-Horn logics.

Differences from General Resolution

SLD resolution differs from general resolution primarily in its syntactic restrictions, which limit it to definite clauses and goals. General resolution, introduced by J.A. Robinson in , operates on arbitrary clauses in clausal form, allowing disjunctions that include both positive and negative literals. In contrast, SLD resolution applies exclusively to Horn clauses, specifically definite clauses (implications with a single positive literal as the head and a conjunction of positive literals as the body) and goal clauses (conjunctions of atoms without a head). This restriction ensures that resolutions occur only between a selected atom in the goal and the head of a definite clause, using unification to reduce the goal, without permitting resolutions involving negative literals directly. Efficiency advantages in SLD resolution arise from its linear structure and avoidance of unnecessary clause generation. Unlike general resolution, which can produce an exponential number of new resolvents by resolving any pair of complementary literals across the clause set, SLD follows a single linear derivation path guided by a selection function, deriving only the necessary steps for refutation without adding clauses to the . This selective linear approach, refined from SL-resolution by and Kuehner in , minimizes search space explosion, making it computationally more tractable for goal-directed queries. In terms of applicability, SLD resolution is optimized for the procedural semantics of logic programming languages like Prolog, where it supports top-down, goal-reduction computation to compute answers via backtracking. General resolution, however, is better suited for unrestricted first-order theorem proving, handling full clausal logic including negation. SLD's design, inspired by Robinson's general resolution principle, adapts it specifically for definite programs but limits its scope; it is refutation-complete only for Horn clause sets, as proven in foundational work on logic programming semantics, and fails completeness for arbitrary clauses with negation.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.