Prolog conformance suite

These 127 black-box cases test the Prolog subset described by the Prolog reference. Each case gives the adapter its .pl input and compares the output and exit code with the expected result. The cases in the files named iso take their queries and answers from ISO/IEC 13211-1:1995 and its Technical Corrigenda 1 to 3, for the notation and operations the subset shares with Prolog, written as the Prolog reference writes answers; the other cases come from the reference itself. An input the reference rejects must fail with a message on standard error and no answers.

node pl-conformance/run.js                                # eyemind from this checkout
node pl-conformance/run.js --command "/path/to/my-prolog" # another implementation
node pl-conformance/run.js -k aggregates                  # select by case name
node pl-conformance/run.js 04-iso-arithmetic.js -v        # select a case file
npm test -- pl-conformance                                # the Prolog section of the eyemind tests

Run the Prolog suite in your browser. The shared case format defines the manifest, settings and pass criteria.

Coverage

File Reference Cases What it tests
01-programs.js PL-SPEC.a-first-program, PL-SPEC.documents, PL-SPEC.layout-and-comments, PL-SPEC.names-variables-and-quotes, PL-SPEC.terms, PL-SPEC.operators, PL-SPEC.syntax, PL-SPEC.requests, PL-SPEC.output, PL-SPEC.evaluation 22 Programs, documents, layout, names, operators, requests and the output document
02-iso-terms.js PL-SPEC.names-variables-and-quotes, PL-SPEC.clauses-and-goals, PL-SPEC.terms, PL-SPEC.operators 5 ISO lexical forms, variables, unification, lists and operator priorities
03-iso-clauses-and-built-ins.js PL-SPEC.evaluation, PL-SPEC.clauses-and-goals, PL-SPEC.negation, PL-SPEC.built-in-predicates 8 ISO clauses, control, atom order, univ and the atom and number predicates
04-iso-arithmetic.js PL-SPEC.arithmetic 7 ISO evaluation, quotients, functions, powers, rounding, the integer model and bits
05-negation-aggregates-witnesses.js PL-SPEC.negation, PL-SPEC.binding-modes, PL-SPEC.aggregates, PL-SPEC.witnesses, PL-SPEC.evaluation, PL-SPEC.built-in-predicates, PL-SPEC.clauses-and-goals 20 Goals, binding modes, evaluation, built-ins, negation, aggregates and witnesses
06-compilation.js PL-SPEC.compilation-to-ls, PL-SPEC.built-in-predicates 5 Proofs of the compiled program, LS names, term construction and negations over demands
07-rejected-input.js PL-SPEC.not-supported, PL-SPEC.terms, PL-SPEC.syntax, PL-SPEC.documents 12 Syntax and directives outside the subset
08-rejected-iso.js PL-SPEC.arithmetic, PL-SPEC.not-supported 48 Arithmetic and other errors ISO requires, and unsupported input