From: | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
Newsgroups: | comp.compilers |
Date: | Thu, 03 Jul 2014 11:51:24 GMT |
Organization: | Institut fuer Computersprachen, Technische Universitaet Wien |
References: | 14-06-010 14-06-023 14-06-025 14-06-027 14-06-030 14-06-031 14-06-035 14-07-001 |
Keywords: | semantics, algol68, history |
Posted-Date: | 04 Jul 2014 00:56:37 EDT |
Ivan Godard <ivan@ootbcomp.com> writes:
>When Algol68 was revised, there was a major split in the committee as
>to the merits of the proposed changes, and even more about the use of
>VWG as a language notation. The majority accepted the proposal, and
>their work became the Revised Report and their spiritual descendant
>populate IFIPS WG2.1 (Algol) to this day.
>
>The minority, which included a number of luminaries such as Wirth and
>Dijkstra, resigned from WG2.1, wrote scathingly about the Algol68
>language, and formed a rump group that became WG2.3, which also
>survives. Philosophically they wished to return to (a slightly cleaned
>up) Algol 60; the linguistic descendants include Pascal and Ada.
The story I read (IIRC in the HOPL paper on Algol 68 was that this
split happened in 1965 or so, leading to Wirth and Hoare publishing a
paper on Algol W in 1966. So that was not when Algol68 was revised,
but when Algol 60 was revised. Wirth and Hoare wanted a relatively
conservative revision, while the other wanted a revolutionary
revision.
Interestingly, wrt the original topic, Wikipedia says:
The Algol W Language Description defines Algol W in an affix grammar
that resembles BNF. This grammar was a precursor of the Van
Wijngaarden grammar.
Much of Algol W's semantics is defined grammatically:
* Identifiers are distinguished by their definition within the
current scope. For example, a <procedure identifier> is an
identifier that has been defined by a procedure declaration, a
<label identifier> is an identifier that is being used as a goto
label.
* The types of variables and expressions are represented by
affixes. For example <T function identifier> is the syntactic
entity for a function that returns a value of type T, if an
identifier has been declared as an integer function in the
current scope then that is expanded to <integer function
identifier>.
* Type errors are grammatical errors. For example "<integer
expression> / <integer expression>" and "<real expression> /
<real expression>" are valid but distinct syntactic entities
that represent expressions, but "<real expression> DIV <integer
expression>" (i.e. integer division performed on a
floating-point value) is an invalid syntactic entity.
And already the Algol 60 grammar (in BNF) does a number of things in
the grammar that are done in the type system in, say, Pascal. So it
seems to me that we explored the power of grammar formalisms in the
1960s, but eventually came to the conclusion that going beyond
context-free grammars is not practically useful, and type systems are
best not expressed in the grammar (they also became more complex
later, so expressing them as grammars probably would have been a
burden).
And no other generally-used formalism for expressing type systems has
appeared, either, although that seems to be an area where a formalism
can be helpful. But apparently the type systems always need new
features that would require extending the formalism, and people have
not learned how to divide stuff between a common type system formalism
that does not cover everything on the one side and stuff that does not
fit into the formalism on the other side. Given that, it's surprising
that we have learned how to do that with context-free grammars/(E)BNF,
and to accept the limitations of that formalism.
- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/
Return to the
comp.compilers page.
Search the
comp.compilers archives again.