Re: Formatting of Language LRMs

Ivan Godard <>
Fri, 20 Jun 2014 12:09:33 -0700

          From comp.compilers

Related articles
Formatting of Language LRMs (Seima Rao) (2014-06-17)
Re: Formatting of Language LRMs ( (2014-06-20)
Re: Formatting of Language LRMs (Ivan Godard) (2014-06-20)
Re: Formatting of Language LRMs (glen herrmannsfeldt) (2014-06-21)
Re: Formatting of Language LRMs (Kaz Kylheku) (2014-06-21)
Re: Formatting of Language LRMs (=?UTF-8?B?Sm9zaHVhIENyYW5tZXIg8J+Qpw==?=) (2014-06-22)
Re: VWG and K, was Formatting of Language LRMs (Ivan Godard) (2014-06-22)
Re: Formatting of Language LRMs (2014-06-30)
RE: Formatting of Language LRMs (Costello, Roger L.) (2014-07-03)
[6 later articles]
| List of all articles for this month |

From: Ivan Godard <>
Newsgroups: comp.compilers
Date: Fri, 20 Jun 2014 12:09:33 -0700
Organization: A noiseless patient Spider
References: 14-06-010
Keywords: standards, algol68, Ada
Posted-Date: 20 Jun 2014 21:18:32 EDT

On 6/17/2014 4:24 AM, Seima Rao wrote:
> Some of the noticeable aspect about standards is that most of them
> tend to follow the same format: grammar in BNF, semantics in
> documentation. This is the pattern throughout.
> Therefore I am curious to know if there are other interesting formatting
> of language standards or language definitions such that the
> pattern is different? ...

> [People have tried lots of other definition schemes over the years, like railroad
> diagrams in some Fortran standards and VDL in PL/I. BNF+text seems to be a workable
> balance between formalisms and readability. The PL/I standard was notably opaque,
> and its authors said "you don't have to understand it, just implement it" to which
> the answer was "yeah, bugs and all." -John]

Two very important cases not following this practice: Algol68, which
used van Wijngaarten notation ("VWG"), and Ada where the standard is
defined by a test suite. There are Ada manuals, but if the manual
differs from the suite then the suite governs.

VWG is vastly superior to BNF because it provides a formal specification
of semantics, in particular the type system, which cannot be expressed
in BNF. Unfortunately formal reasoning about semantics is beyond many
users. Stll IMO no other formal semantic notation (Denotational
Semantics for example) is superior to VWG.

The Ada approach was driven by the government procurement process in
which they had too much experience with ambiguous specification and
differing, incompatible implementations,. They sought a mechanism by
which they could have some confidence that their programs would
actually work with the same results in different environments, with
enforceable contracts that did not depend on the pissing contests of
language lawyers. This was largely successful, and Ada has a huge
canonical test suite. Other languages have evolved similar suites, and
in practice the major compilers run all their issues through each
others' compilers to produce an informal consensus, but that's not a
formal process.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.