9

Is there a description of Prolog language (syntax and semantics) available online?

There are a lot of reference manuals for implementations. But neither of those is a language description. For example the SWI Prolog manual states

This manual does not describe the full syntax and semantics of Prolog.

And refers to a set of books printed on paper, published in the nineteen eighties. And to ISO standard which is for money and "should be available from my country's ISO representative" gibberish.

Infinite Recursion
  • 6,511
  • 28
  • 39
  • 51
Alexander Gorshenev
  • 2,769
  • 18
  • 33
  • You could have a look at the GNU Prolog manual, there might be some implementation differences but GNU Prolog conforms to the ISO standard also: http://www.gprolog.org/manual/gprolog.html – Hunter McMillen Jun 06 '12 at 12:25
  • 2
    This is just another implementation manual. Does it specify the notation for octal integers? Does it discuss such nice details as what is a whitespace and where the whitespaces are mandatory? What does backslash at the end of the line do? etc – Alexander Gorshenev Jun 06 '12 at 13:03
  • Googlng Prolog Syntax turned this up: http://www.sics.se/sicstus/docs/3.7.1/html/sicstus_45.html – Hunter McMillen Jun 06 '12 at 13:10
  • 3
    @HunterMcMillen: This documentation is no longer current. You are referring to version 3 of SICStus. [Here is the current version of it, much closer to ISO](http://www.sics.se/sicstus/docs/latest4/html/sicstus.html/ref_002dsyn.html) – false Jun 06 '12 at 13:15
  • The whole chapter "4 The Prolog Language" seems very relevant. (Modulo the fact that this is probably shifted in favour of sicstus). – Alexander Gorshenev Jun 06 '12 at 13:20
  • One more thing I was able to find that is tangentially relevant: [ISO Prolog: A summary of the draft proposed standard.](http://fsl.cs.uiuc.edu/images/9/9c/PrologStandard.pdf) – Alexander Gorshenev Jun 06 '12 at 19:13

1 Answers1

5

The ISO standard is available for a very low price (currently USD 30 60) from the ANSI webstore as an INCITS document. Instructions to get the original document for USD 30. There you also get the three corrigenda for free. See iso-prolog tag info for all current documents. Here is a comprehensive overview of all built-in predicates which includes Cor.1, Cor.2, and Cor.3.

If you want a printout version, the best is still to print above INCITS document yourself being aware that page 10 is missing (a page left intentionally blank) — otherwise subsequent odd pages are on the left side. The document is an A4 scan with two columns per page. The informal Annex A goes better in a separate binding. Instead, add the three corrigenda!

Alternatively, SAI sells hardcopies.

false
  • 10,264
  • 13
  • 101
  • 209
  • 1
    USD 30 is definitely better than CHF 238. – Alexander Gorshenev Jun 06 '12 at 13:16
  • 1
    @WouterBeek: This answer will be of interest to you. Alternatively, you get all documents from your national member body. [Here is Cor.2](http://www.nen.nl/NEN-Shop-2/Standard/NENISOIEC-1321111995C22012-en.htm). – false Oct 23 '14 at 15:48
  • @false Thanks for pointing us to these documents! Too bad this question was considered off-topic. The new generation of Web and Open Source programmers is not used to buying these kinds of resources from standards bodies, but they definitely should. These docs contain a ton of info. – Wouter Beek Oct 24 '14 at 20:35
  • @WouterBeek: Please note that many organizations like W3C or The Open Group are approved PAS Submitters to ISO/IEC JTC1. So they are preparing documents, but ISO publishes them. So the same procedures apply to get those standards. – false Oct 25 '14 at 10:57