2P-Kt
What 2P-Kt is
2P-Kt is
- the current implementation of tuProlog, written afresh in Kotlin as a multi-platform project targetting the JVM, JS — server- and browser-side — and Android
- built on a minimal, layered core — terms and clauses, unification, theories, resolution — extended by modules rather than configured by options
- meant to give intelligent systems engineers a general-purpose, extensible, open ecosystem for symbolic AI, and not a Prolog interpreter alone
- open source, released under the Apache 2.0 License
The two IDEs
The same Prolog IDE exists in two incarnations, sharing model and controller and differing only in the toolkit that draws them.
- the Web IDE runs in a browser with nothing installed — tuprolog.github.io/2p-kt/web-ide
- the desktop IDE is a runnable jar on the release page, built on Swing
Editing, syntax highlighting, diagnostics and query solving behave the same way in both. They part company on storage: in the browser, New, Open, Save and Save as keep pages in the browser's own local storage, so they survive a reload without touching the file system, while Upload and Download are what read and write a theory file on disk.
The modules
2P-Kt is a family of modules, each a separate artefact, layered so that an application takes only what it needs.
| module | what it provides |
|---|---|
| core | logic terms and clauses |
| unify | unification |
| theory | in-memory indexing and storage of theories |
| solve | the generic API for resolving queries — solve-classic and solve-streams target ISO Prolog |
| solve-plp | probabilistic logic programming, with solve-problog over the bdd module |
| solve-concurrent | OR-concurrent resolution |
| dsl-* | a Prolog-like domain specific language inside Kotlin |
| parser-core, parser-theory | parsing terms, and theories |
| serialize-core, serialize-theory | (de)serialising terms, and theories |
| repl | Prolog from the command line |
| ide, ide-plp | Prolog, and probabilistic logic programming, through a graphical interface |
The architecture is deliberately unopinionated: it is meant to carry other sorts of symbolic AI than Prolog — answer set programming, tabled resolution, concurrent logic programming — as further modules. And because the project is pure Kotlin, committed to the common library alone, it stays small and portable: JVM, JS and Android today, Kotlin/Native in principle.
Releases
Versions, release notes and artefacts live with the code, on GitHub. These pages do not track them: what is current is best read there.
The engine it replaces
2P-Kt is a reboot, not a port: the Java engine it replaces is a project in its own right, with twenty years of its own history, and has its own pages here — tuProlog.