Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

12 total results found

Chapter 2: The Anatomy of Unification

Modern SWI-Prolog (2026 Edition) Second... VOLUME I: The Foundations of Logic

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...

SWI-Prolog
chapter-02
unification
wam
security
volume-i

Chapter 3: The Static Knowledge Base

Modern SWI-Prolog (2026 Edition) Second... VOLUME I: The Foundations of Logic

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...

SWI-Prolog
chapter-03
knowledge-base
cwa
proxmox
security
volume-i

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 ...

SWI-Prolog
Chapter-04
Backtracking
sld-resolution
choice-points
security
volume-i

Chapter 7: List Processing and Recursion

Modern SWI-Prolog (2026 Edition) Second... VOLUME I: The Foundations of Logic

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...

SWI-Prolog
volume-i
security
chapter-07
lists
recursion
tco
batch-operations
security
volume-i

Chapter 11: Parsing System Logs

Modern SWI-Prolog (2026 Edition) Second... VOLUME II: Parsing & The Offline Library

/var/log/auth.log on a busy SSH-exposed host grows at several megabytes per day. A year's worth of auth logs on a cluster's edge node is routinely 2–10GB. The naive approach — read_file_to_string/3, then string_codes/2, then a DCG over the entire code list — a...

SWI-Prolog
security
volume-ii
zfs
brute-force,
auth-log
pure-input
dcg
streaming

Chapter 15: The CGO Bridge

Modern SWI-Prolog (2026 Edition) Second... VOLUME III: The Hybrid Engine & Web UI

An HTTP/REST boundary between a Go microservice and a Prolog inference engine introduces three costs that are unacceptable for microsecond-latency orchestration: TCP stack traversal, JSON serialisation and deserialisation on both sides, and the scheduling late...

SWI-Prolog
volume-iii
security
atom-table
marshaling
term_t
foreign-frames
fli
libswipl
cgo
chapter-15
compiler-hardening
ip-trie

Chapter 1: The Sovereign Paradigm

Modern SWI-Prolog (2026 Edition) Second... VOLUME I: The Foundations of Logic

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...

SWI-Prolog
chapter-01
sovereign-infrastructure
security
volume-1

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...

SWI-Prolog
chapter-06
cut
negation
control-flow
security
volume-i

Chapter 8: Advanced Data Structures (Dicts)

Modern SWI-Prolog (2026 Edition) Second... VOLUME I: The Foundations of Logic

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...

SWI-Prolog
volume-i
security
chapter-08
dicts
json
schema
security
atom-table

Chapter 9: Meta-Programming & State Management

Modern SWI-Prolog (2026 Edition) Second... VOLUME I: The Foundations of Logic

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...

SWI-Prolog
volume-i
security
call-injection
compliance
state-management
meta-programming
chapter-09

Chapter 12: Declarative Configuration

Modern SWI-Prolog (2026 Edition) Second... VOLUME II: Parsing & The Offline Library

Every configuration management tool in production infrastructure does the same thing: it takes a template, substitutes variables, and writes a string to disk. Ansible's template module renders Jinja2. Puppet uses ERB. Terraform interpolates HCL. The output is ...

SWI-Prolog
security
volume-ii
chapter-12
template-injection
configuration
bidirectional
ast
nginx
reversible
dcg

Chapter 10: Definite Clause Grammars (DCGs)

Modern SWI-Prolog (2026 Edition) Second... VOLUME II: Parsing & The Offline Library

A regular expression is a finite automaton description encoded as a write-only string. The engineer who writes ^(\d{1,3}\.){3}\d{1,3}$ cannot debug it by reading it. The engineer who inherits it cannot modify it without first reverse-engineering what it was at...

volume-ii
security
SWI-Prolog
network,
difference-lists
dcg
parsing