Chapter 6: Control Flow and The Cut (!)
Modern SWI-Prolog (2026 Edition) Second...
VOLUME I: The Foundations of Logic
Backtracking is Prolog's correctness mechanism: it exhausts all proof paths, guaranteeing that every solution is found. For general logic programming this is a virtue. For infrastructure control predicates — where a predicate must produce exactly one answer, w...