Article View: comp.arch
Article #183Algol 68 (was: Documentation (was Re: Performance of xchg reg,reg))
From: Anton Ertl
Date: Sun, 18 Oct 2026 14:08
Date: Sun, 18 Oct 2026 14:08
74 lines
5227 bytes
5227 bytes
George Neuner <gneuner2@comcast.net> writes: >On Sat, 17 Oct 2026 20:54:44 -0000 (UTC), Lawrence D´Oliveiro ><ldo@nz.invalid> wrote: >>Isn’t that why formal specification languages were invented? For some >>reason they never caught on. >> >>For a classic example, look at the Algol-68 language spec. Yet many >>people threw up their hands in horror at how it was written. > >The problem with the original report was that they attempted with the >grammar turn [at least some kinds of] semantic errors into syntax >errors. My take is that BNF was a big success in formalizing a part of a language. So what do you do when you are successful? You try to follow up on that. So they wanted to formalize more of the language, and go beyond the limits of BNF (context-free grammars) with Vw grammars. This was technically successful, but from a usability POV it was not. Nevertheless, there have been attempts to formally specify programming languages completely, or at least more of them than just the context-free grammar part of them. AFAIK all attempts to formally specify everything in the language definition have been unsuccessful: not only did the specification become too hard to understand for the programmers, but it seems to me that the programming language also became to hard to extend by its designers. A team at the IBM Lab in Vienna made a formal specification for PL/I; I attended a lecture by Heinz Zemanek (the team leader) where he mentioned something about an implementor disagreeing with the formal specification for recursion (disagreements between implementor and specification can also happen with specifications written in a natural language, so that may not say much). Anyway, <https://en.wikipedia.org/wiki/PL/I#Standardization> says "The standard is couched as a formal definition[17] using a "PL/I Machine"[21] to specify the semantics." This sounds like the operational semantics that was developed by the IBM Lab Vienna, so maybe the standardization committee picked up this work. But it seems that the first standard never had a followon; was the definition too unwieldy? Standard ML has been formally specified, and, given the audience of this language, if any programming language may have success going there, it should be a language like ML. There is a first revision (1990) and a second revision (1997), and SML seems to have reached the end of its evolution there. Other programming languages have formalized parts of the language beyond the context-free grammar, probably the parts that can be described well with a formalism, such as the type system. I guess some of these attempts have been successful, and others not so much. Concerning terms like "semantic errors" or "static semantics" they make it appear that there is a fundamental difference between syntax and "static semantics" (the part that is not context-free and that is checked by the compiler). It seems to me that that's just a matter of what is expressed in the BNF. E.g., in Algol 60 the computation of conditions for if-statements have special BNF rules, whereas some later programming languages have a boolean type and putting a non-boolean between IF and THEN produces a type error, not a syntax error. So I don't think that there is a fundamental difference, and if there was a formalism that is as easy to work with (both for programmers and for language designers) as BNF is, we would be using that formalism for that; and if that formalism also took over the role that BNF has now, we would be considering all the errors that this formalism finds to be in the same category. - anton -- 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.' Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
Technical Details
Message-ID:
<2026Oct18.160834@mips.complang.tuwien.ac.at>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<2026Oct13.104347@mips.complang.tuwien.ac.at> <11au1vu$3ks5m$2@dont-email.me> <11aunpn$8c6$1@reader2.panix.com> <1792257076-5857@newsgrouper.org> <11b0bd3$b5b$1@reader2.panix.com> <1792265982-5857@newsgrouper.org> <11b0nak$iems$9@dont-email.me> <kqg9dl5oj9l0dih5kvnrif2fv91ns8lgs3@4ax.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.arch Subject: Algol 68 (was: Documentation (was Re: Performance of xchg reg,reg)) Date: Sun, 18 Oct 2026 14:08:34 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 74 Message-ID: <2026Oct18.160834@mips.complang.tuwien.ac.at> References: <2026Oct13.104347@mips.complang.tuwien.ac.at> <11au1vu$3ks5m$2@dont-email.me> <11aunpn$8c6$1@reader2.panix.com> <1792257076-5857@newsgrouper.org> <11b0bd3$b5b$1@reader2.panix.com> <1792265982-5857@newsgrouper.org> <11b0nak$iems$9@dont-email.me> <kqg9dl5oj9l0dih5kvnrif2fv91ns8lgs3@4ax.com> Injection-Date: Sun, 18 Oct 2026 15:07:26 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1312964"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Vqp6Jw+UMlcHQ2KlaH5HI"; posting-host="ba7b1f5472640d23e9d2e2c2f24e9c05" Cancel-Lock: sha1:6LA9D5P7EOfAr66/Bh4wNE7VwxU= sha256:LdVtCkKAjQdcgbwnM8/Ib9zlvRLcIkT+y4m9W5Gjww4= sha1:zhaGg13/ouQHmIQ8Pf1thRoOtw4= sha256:CdbByCMg2OD1ldZtAYU1H16rCHAq2zh+nqtGn9652Q0= X-newsreader: xrn 10.11