PROLOG
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
Prolog Preview.
At a glance
| Purpose | Prolog source code: facts, rules and directives of a logic program. |
| Extensions | .prolog |
| Poka parser | poka-prolog |
| Viewer | poka-metadata-card-viewer |
| Depth tier | Metadata card (see Depth tiers) |
| Breadth tier | B4 Summary (see Breadth tiers) |
How much Poka reads
B4 Summary. The container and metadata are read and summarised (counts, properties, structure), but the main content is not rendered.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-prolog/src/main.rs (283 lines) and plugin.json in full. The crate has no unit tests and no tests/samples.rs, and the corpus has no .prolog sample, so the tier rests on reading the code. Covers .prolog. The output is a metadata card of counts found by matching text line by line: the module declaration, facts, rules, DCG rules, directives, queries, use_module imports, dynamic, discontiguous and multifile declarations, op/3 declarations, distinct predicate names with samples, and line counts. Judgement: B4, because the structure is summarised but the source itself is never shown.
What Poka does not read
- The source text is not shown: the card carries only counts and a few sample names, with no code view or highlighting
- Constructs are found by matching text line by line, not by parsing, so multi-line declarations, nested or indented definitions and keywords inside strings or comments can be miscounted
- Counts of named items stop where their name list is capped (predicate names at 256), so a larger file under-reports them
- Files over 64 MiB are cut to the first 64 MiB (the card says so)
- Text that is not UTF-8 is decoded with replacement characters; no other encoding is tried
- Predicates are named without their arity
- The module comment names .pl and .pro, which go to poka-code instead (only .prolog reaches this module)
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- java-prolog-parser (candidate; Apache-2.0; Java; https://github.com/raydac/java-prolog-parser) — Pure Java Edinburgh-style parser with operators and comments; on Maven Central.
- arena-terms-parser (candidate; MIT; Rust; https://github.com/ikhomyakov/arena-terms) — Parses Prolog-like terms with user operators; README says MIT, a search snippet said LGPL, so check; coverage may be partial.
- Tau Prolog (candidate; BSD-3-Clause; JavaScript; https://github.com/arcanis/tau-prolog) — ISO Prolog interpreter that parses source in browser or Node; page loaded is a fork of tau-prolog/tau-prolog.
- Scryer Prolog (candidate; BSD-3-Clause; Rust; https://github.com/mthom/scryer-prolog) — Full Prolog system; README says it passes syntactic conformity tests, but no standalone reader API was confirmed.
Sources
- parsers/poka-prolog/src/main.rs
- parsers/poka-prolog/plugin.json