Explanation¶
Understanding-oriented discussion of 2P-Kt's design and the rationale behind it: why things are the way they are, not just how to use them.
Suggested reading order¶
Roughly: why the project exists, then the core data model, then increasingly specific engine internals, ending with a few build-tooling rationale pages that are useful mostly to contributors:
- Project history — from tuProlog's Java origins to the 2P-Kt rewrite.
- Philosophy — the design philosophy behind 2P-Kt's modular architecture.
- Term model — why terms are immutable and what that buys you.
- Variables and scoping — why
Varequality/scoping works the way it does. - Clause databases and RETE — how theories index clauses for fast matching.
- Solver design — the rationale behind the
Solver/SolutionAPI's shape. - The solve-classic state machine — how the classic SLD-resolution engine actually runs.
- Parser architecture — how Prolog source text becomes terms and theories.
- I/O library design — why
:io-lib'sUrl/channel split looks the way it does. - Kotlin Multiplatform — why 2P-Kt targets multiple platforms from one codebase.
- Gradle multi-project build — why ~30 modules instead of one.
- Kotlin DSL background — why the build itself is written in Kotlin DSL.