Advanced Search
Search Results
92 total results found
Chapter 7: Tabling — Memory-Safe Infinite Reasoning
Overview In Chapter 6, we passed --table-space=128m to the engine initialisation and moved on without explanation. That flag allocates a dedicated memory region for a capability that does not exist in classical Prolog: the ability to reason correctly over cycl...
Chapter 8: Prolog at the Edge — The WASM Revolution
Overview Every chapter in Part III so far has been about the server side of the architecture. The Go orchestrator embeds libswipl and calls it at microsecond latency. The tabling engine resolves cyclic infrastructure graphs without stack overflow. These are re...
Chapter 9: The "Go-Log" Concurrency Model
Overview The orchestrator built in Chapter 6 has a ceiling. Every call to the embedded Prolog engine blocks the calling goroutine until the query returns. If a Go HTTP server receives fifty simultaneous requests each requiring a Prolog evaluation, those evalua...
Modern SWI-Prolog (2026 Edition) Second Edition
Outline
THE MASTER SYLLABUS: Sovereign Infrastructure & Industrial Logic VOLUME I: The Foundations of Logic Chapter 1: The Sovereign Paradigm Core Concepts: The fundamental differences between imperative state mutation and declarative relational logic are explored ...
Preface
Index
Gemini Prompt
MASTER SYSTEM DIRECTIVE: Sovereign Infrastructure Project (v4) Role: You are the Master Architect and Managing Editor for a 2,300+ page industrial-grade textbook: "Modern SWI-Prolog (2026 Edition): Sovereign Infrastructure & Industrial Logic." Assume the raw o...
VOLUME I: The Foundations of Logic
Chapter 1: The Sovereign Paradigm
Before a single line of Prolog is written, the engineer must understand why this technology is being chosen. Not because it is fashionable — it is decidedly not — but because it is correct for a specific class of infrastructure problem that imperative tools ha...
Chapter 2: The Anatomy of Unification
The word "unification" is borrowed from mathematical logic, where it names the process of finding a substitution that makes two expressions identical. That definition is precise and complete. The engineer who internalises it — rather than reaching for the comf...
Chapter 3: The Static Knowledge Base
Every inference engine requires a foundation of facts it treats as unconditionally true. In Prolog, this foundation is the Knowledge Base (KB): the complete set of facts and rules loaded into the WAM at any given moment. The correctness of every derivation the...
Chapter 4: Search and Backtracking
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 ...
Chapter 5: The Command Oracle (ZFS & Proxmox)
Every administrative command issued against production infrastructure carries an implicit precondition: the system is in the state the operator believes it to be in. zpool replace requires the failing disk to be in the specified pool. qm clone requires the sou...
Chapter 6: Control Flow and The Cut (!)
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...
Chapter 7: List Processing and Recursion
An imperative loop is a mutable index advancing through a mutable array under a termination condition checked at runtime. It has three moving parts — the counter, the array pointer, and the termination predicate — all of which can be wrong independently. It al...
Chapter 8: Advanced Data Structures (Dicts)
Every infrastructure record is a named collection of typed fields: a host has a name, a MAC address, a RAM capacity, a storage layout, a cluster role. In the KB architecture of Chapters 1–7, these fields are encoded as positional arguments in compound terms: p...
Chapter 9: Meta-Programming & State Management
Prolog has one data type: the term. Rules, facts, queries, and data values are all terms. A clause physical_host('pve-node-01', 'AA:BB:CC:DD:EE:01', 256) is a term with functor physical_host and arity 3. A rule can_migrate(VM, Host) :- ... is a term with funct...