Overview
ISO/IEC 13211-1:1995 is the international standard that defines the General Core of the Prolog programming language. Its purpose is to promote the applicability and portability of Prolog text and data across diverse data-processing systems by specifying the representation of Prolog text, the language syntax and constraints, semantic rules for interpretation, input/output representations, and the restrictions and limits placed on a conforming Prolog processor. The standard also includes a formal semantics annex describing the kernel behavior.
Key topics and requirements
The standard covers a comprehensive set of language and implementation topics, including:
- Syntax and tokens: formal grammar (BNF), abstract term syntax, layout, names, numbers, quoted strings and list notations.
- Semantic rules: types (variable, atom, integer, float, compound), term order, unification (including occurs-check considerations), and execution model for goals.
- Control constructs: conjunction, disjunction, if-then, if-then-else, cut (!), catch/throw and other control predicates.
- Built-in predicates: detailed definitions and error behavior for unification, type testing, term creation/decomposition, clause manipulation (assert/retract/abolish), all-solutions predicates (findall/bagof/setof), and more.
- Input/output and streams: stream operations, read/write options, character/byte/term I/O and stream control.
- Evaluable functors and arithmetic: numeric operations, floating and integer semantics, mixed-mode arithmetic, bitwise operators, and exceptional values.
- Implementation and conformance: requirements for Prolog processors and Prolog text, documentation, and permitted extensions (syntax, operators, flags, built-ins).
- Formal semantics: annex providing a formal specification, search-tree models, and abstract data structures for rigorous interpretation.
Applications and who uses it
ISO/IEC 13211-1 is essential for:
- Prolog implementers and compiler authors who need a formal reference for building conformance-compliant Prolog processors and runtime systems.
- Tool vendors and integrators embedding Prolog engines in systems that require portable code and predictable behavior.
- Software engineers and researchers developing logic-programming applications where deterministic semantics, I/O behavior, and built-ins must be standardized.
- Educators and students needing a canonical description of Prolog core language features.
- Organizations performing portability or interoperability testing for Prolog programs and data exchange.
Related standards and next steps
This document defines the general core; organizations should consult ISO/IEC channels for other Prolog-related parts or complementary ISO standards for programming languages and language conformance. For implementation or procurement decisions, obtain the full ISO/IEC 13211-1:1995 text from ISO to review exact normative language, examples, and formal semantics.