N. Wirth, The Essence of Programming Languages
4 Language Semantics While disregarding details and further unresolved difficulties, we emphasize that the language’s definition must be stated in terms of mathematical formulae and be free of references to any mechanism for execution. A language must be understandable by its static rules alone, without knowledge about any possible implementation. We explain this strong requirement by three familiar examples: 1. Numbers: Operations on numbers (integers) are defined by the axioms of mathematics. Hence there is no need to specify how numbers are represented as sequences of bits. In fact, representation must not be specified, as this would narrow the freedoms of implementers. Such an over-specification would break the notion of the abstraction; it would reveal to the reader properties of their (possible) representation instead of the numbers themselves. 2. Data Structures: Each element of an array is selected by a unique index, and an element of a matrix by a tuple of indices. Hence, there is no need for a programmer to know how an array is allocated within a computer store (whether row- or columnwise or anything else). In fact, this knowledge would allow the programmer to perform operations not specified by the proper abstraction alone. 3. Iterative Statements: Repetitions are typically explained in terms of their implementation with jumps. But there is no need for a programmer to know about jumps, in fact he must avoid the notion of structure-breaking jumps. Instead, the properties of an iterative statement S must be defined in terms of the effect of the iterated statement Q alone.
整数や配列の番地の展開は実装の詳細に依らぬのがいいと言っていて、その通りだと思いますが Fortran を学ぶ上では避けては通れない知識だとも思います。ここが表面的な文法を学んだだけでは苦しい所である気がします。
それは、現在の計算機ではメモリー上のデータの移動が律速段階になっていて、明示的代入を通じてメモリー移動を巧妙に制御しないと計算機資源を有効に活用できない所に遠因していると考えます。
なお三番目のループ(ジャンプ)については Hoare の記述に依っているようです。
N. Wirth, The Development of Procedural Programming Languages Personal Contributions and Perspectives
ALGOL, PASCAL, Module-2, Oberon の系譜について回顧
- 作者:ヴィルト,N.,Niklaus Wirth
- 発売日: 1990/09/01
- メディア: 単行本
Into the Realm of Oberon: An Introduction to Programming and the Oberon-2 Programming Language
- 作者:Nikitin, Eric W.
- 発売日: 1997/01/01
- メディア: ペーパーバック
Oberon-2 Programming with Windows
- 作者:Muehlbacher, Joerg R.
- 発売日: 1997/06/20
- メディア: ペーパーバック
Object-Oriented Programming in Oberon-2
- 作者:Moessenboeck, Hanspeter
- 発売日: 1995/01/01
- メディア: ペーパーバック
Programming in Oberon: Steps Beyond Pascal and Modula (ACM Press)
- 作者:Reiser, Martin,Wirth, Niklaus
- 発売日: 1992/06/01
- メディア: ペーパーバック