Difficulty: Easy
Correct Answer: Rules (implications) that drive logical inference and backtracking
Explanation:
Introduction / Context:
PROLOG is a declarative language where you state facts and rules, then ask queries. Instead of prescribing an algorithmic sequence of steps, you let the inference engine search for solutions that satisfy the logical relationships. Understanding how facts and rules interact is central to using PROLOG effectively in knowledge representation and reasoning tasks.
Given Data / Assumptions:
Concept / Approach:
When a query is posed, PROLOG attempts to prove it by matching it against facts or the heads of rules. If a rule matches, its body is pursued recursively. Variable bindings are discovered through unification, and alternative paths are explored via backtracking. The process is driven by the logical content of rules rather than explicit procedural control flow.
Step-by-Step Solution:
Store base knowledge as facts.Add rules to infer new relationships from existing facts.Issue queries; the engine applies rules to derive answers using unification and backtracking.
Verification / Alternative check:
Classic examples like family relationships or graph reachability show facts alone are static; rules create the derived knowledge that answers queries.
Why Other Options Are Wrong:
A: PROLOG is not imperative by default. C: Low-level memory manipulation is outside the PROLOG model. D: Numeric simulation is unrelated to logical inference.
Common Pitfalls:
Writing rules that are not sufficiently constrained, causing infinite recursion or excessive backtracking.
Final Answer:
Rules (implications) that drive logical inference and backtracking.
Discussion & Comments