Search code examples
standardsiso-prologreference-implementation

Is there an ISO-Prolog reference implementation?


Java has a reference implementation.

Does ISO-Prolog have a reference implementation?

I do have INCITS/ISO/IEC 13211-1:1995 (R 2007) so no need to suggest that.

EDIT

Of note: Conformity Testing I: Syntax


Solution

  • Let me first clarify what you mean by a reference implementation. You mean a sample implementation that is deemed to represent a valid interpretation of the standard. It is never clear what normative value such an implementation could have — think of the Java float syntax bug that made many systems loop.

    There is no reference implementation for ISO Prolog. Like there is none for C, C++ or any other ISO/IEC standardized programming language. Please note that Java is not standardized by any standardization body like ISO, IEC, ITU nor CEN nor any national body like ANSI ; but rather by one company. And it is that very company that provides the reference implementation.

    Also, Prolog exists since 1972 — long before any standardization took place. And it has been the first language of its kind and paradigm. It soon split into several different dialects with incompatible syntax (Prolog 1, Edinburgh, Prolog II etc.). One of the first standard related documents — Draft Proposed Standard for Prolog Evaluable Predicates by Richard O'Keefe was circulated 1984. BSI started 1984; AFNOR 1985. In 1987 the ISO process started, delivering ISO/IEC 13211-1 in 1995.

    Contrast this to Java which evolved out of previous languages like C, C++ as well as other object oriented languages and inherited a lot from them. It had been developed quite differently with a company fiercely defending the language against all kinds of deviations — Think of it: even copies of the manuals were forbidden to be offered on the Internet.

    In any case the Prolog systems with closest conformance are:

    1. SICStus Prolog 4.3 beta 1. Not known to misread any valid Prolog text. Full support of Cor.1, Cor.2.

    2. GNU Prolog 1.4.4 (git version). Not known to misread any valid Prolog text. Some differences in arithmetics. Otherwise Cor.1, Cor.2.

    3. IF/Prolog V5. The only system offering a strictly conforming mode (see ISO/IEC 13211-1:1995 subclause 5.1 e).

    A concrete comparison w.r.t. syntax (reading and writing) gives you a bit of an impression of what you can expect from these and other implementations.