Chapter 4: Search and Backtracking
Modern SWI-Prolog (2026 Edition) Second...
VOLUME I: The Foundations of Logic
Prolog's execution model is not a function call graph. It is a search. Every query the engine receives is a problem statement — "find all substitutions for these variables that make this formula true" — and the engine's job is to explore the space of possible ...