Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.misty.com!news.iecc.com!.POSTED!nerds-end From: Ivan Godard Newsgroups: comp.compilers Subject: Re: Formatting of Language LRMs Date: Fri, 20 Jun 2014 12:09:33 -0700 Organization: A noiseless patient Spider Lines: 37 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-06-016@comp.compilers> References: <14-06-010@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: miucha.iecc.com 1403313513 37240 2001:470:1f07:1126:0:676f:7373:6970 (21 Jun 2014 01:18:33 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sat, 21 Jun 2014 01:18:33 +0000 (UTC) Keywords: standards, algol68, Ada Posted-Date: 20 Jun 2014 21:18:32 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1271 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.