Definition
A programming and reasoning paradigm where programs are expressed as sets of logical clauses and computation proceeds by goal-directed proof search, typically using unification and backtracking to find derivations that satisfy goals.

Principle

Principle
Write specifications as facts and rules; interpret computation as attempting to prove a goal from those rules via resolution or SLD-resolution, with unification instantiating variables and backtracking exploring alternatives.

Demonstration

Demonstration
A Prolog-style family-tree program: facts state parent relations and rules define ancestor as transitive closure; querying ancestor(X,Y) triggers a search that unifies variables and backtracks to enumerate solutions.

Misapplication

Misapplication
Treating a logic program purely as imperative code and relying on side-effectful predicates or order-dependent constructs undermines the declarative semantics and makes reasoning about correctness difficult.

Consequence

Consequence
Proper use yields concise, declarative programs, inherent search control via backtracking, and powerful meta-programming and symbolic reasoning capabilities; it also facilitates rapid prototyping of search-oriented applications.

Reversal

Reversal
Flip to functional or imperative programming where computation is given by deterministic function evaluation or ordered commands instead of proof search; this emphasizes control flow rather than logical specification.

Boundary

Boundary
Typically concerns Horn-clause fragments and goal-directed operational semantics; it excludes arbitrary first-order theories with uninterpreted resolution behavior, and termination and completeness are not guaranteed without restrictions.

Semantic Tension

Semantic Tension
Tension between model-theoretic (declarative) and operational (procedural) readings: the same program can be seen as a specification of logical consequences or as an operational recipe whose behaviour depends on evaluation strategy.

Synthesis

Synthesis
Logic programming treats programs as logical theories and computation as automated proving: by encoding knowledge as clauses, one uses unification and backtracking to realize declarative specifications through goal-directed search.