skip to main content
Skip header Section
Towards a formal description of AdaJanuary 1980
  • Editors:
  • D. Bjoerner,
  • O. N. Oest
Publisher:
  • Springer-Verlag
  • Berlin, Heidelberg
ISBN:978-0-387-10283-2
Published:01 January 1980
Pages:
630
Skip Bibliometrics Section
Bibliometrics
Contributors

Recommendations

Reviews

Herbert G. Mayer

General Comments Vol. 98 of the Lecture Notes in Computer Science gives a formal description of the new programming language Ada, as specified by the language reference manual (LRM) of July 1980 [1]. The authors take great pains to avoid any confusion between their description, originated at the Technical University of Denmark, and another formal definition: “The formal definition of Ada,” commissioned by the United States Department of Defense (DoD). The style of the Danish definition is that of Denotational Semantics, using the meta-language META-IV of the Vienna Development Method (VDM); not surprisingly, over half of the pages are VDM formulas. What is surprising about the volume is the fact that it was published so swiftly; it was printed in 1980, the same year the LRM was published. This must be an enthusiastic and hard-working group down there in Denmark] Much of this work was based on preliminary Ada, but a close contact with the language design team in France during Ada's creation phase enabled the authors to relate their work to LRM [1]. The Danes' scrutinizing look into the defined language revealed numerous inconsistencies, omissions, and contradictions, which, once detected, were redirected and served as feedback to the language developers. In fact the new Ada definition of 1982 [2] resolves many of these very issues. The anticipated audience of the book is the group of all those Ada intimates needing a precise, complete, unambiguous language definition; this is particularly true for Ada implementors. The LRM, even though using a conveniently modified version of BNF for syntax constructs, is written in English prose. It is thus more susceptible to human error, but certainly easier to read. Volume 98 should be read at least twice: once totally skipping the VDM formulas and once with the VDM representation of interest. The mix of English prose and heavy formalism certainly doesn't make the book a work of belles lettres, but it allows gradual access to a precise understanding, which in contrast is virtually impossible for the normal mortal with a comparable document, the ALGOL 68 Report. Structure and External Make-up In addition to a short prelude and some appendices the book consists of the following three parts: I. Compiler Development, II. A Formal Definition of Ada, and III. An Ada computer. Part II comprises the major portion of the volume. It is composed of independent subparts which are master's theses or summarizing papers. All subparts seem to have been written in parallel. On the one hand this would explain the timely completion of the book, while on the other hand it causes some degree of duplication. I perceived the repetition as a welcome form of redundancy, allowing me to double check my partial understanding. Although this parallel working also resulted in minor inconsistencies, the major ideas are consistent. The editors, Bjoerner and Oest, created a well-composed mosaic rather than a series of different pictures. It is only a pity and inconvenience that the tables of contents are distributed over the various parts. The one-page, initial Table of Contents at the beginning of the book stands in recognition of a need but does not fulfill it. Main Goals The Danish project aims for the following related goals: 1) a formal description of full Ada, 2) the systematic derivation of an Ada Compiler from the formal definition, generating code for a hypothetical A-code machine, and 3) the systematic derivation of “a formal definition of a multiprocessor computer architecture, optimally suited for the concurrent execution of Ada tasks,” using the formal definition of Ada TASKs of goal 1 above. The first goal has been achieved nicely, although not completely. The authors deliberately omitted certain language constructs, such as Generics and Separate Compilation, from the definition effort. These omissions are clearly spelled out. A description of full Ada and subsequently a compiler capable of analyzing it are planned as a future extension. It is amazing to see how seemingly unimportant but mandatory, subtle language issues are treated with the same effort and care as the larger and obvious ones. Compiler writers are the ones most likely to benefit from this effort. One of the very concrete implementation proposals, resulting from the modeling scheme, is the uniform handling of PROCEDURE and DECLARE blocks. The only differences are that the former can be called from many places, while the latter are only virtually called from one place, the line after their declaration. Also, DECLARE blocks may have no parameters. Another fine idea to be adopted by implementors is the FUNCTION trap: if the execution of a FUNCTION ever reaches its END, i.e., if no RETURN statement causes the required value assignment and return, a trap at the end results in a run-time error message. Various simplifications are identified. For example, since FUNCTIONs have only IN parameters, it is not necessary (in a compiler's symbol table) to store the parameter mode once the syntax checks have been performed. However, the book does not mention all possible simplifications. For example, it does not emphasize that all parameter modes can be implemented using just one technique. Since IN parameters cannot be assigned, it is not necessary to create a copy of the actual parameter. Thus a BY REFERENCE passing mechanism is legal for formal parameters, and advantageous, if already so used for OUT parameters. Goal two, the systematic derivation of an actual compiler, falls a bit short, even though a nice approach is outlined, reminiscent of hierarchical operating systems design. The approach is based on “experimental languages A0 to A6 designed in order to study static aspects with increasing complexity semantically, and to keep the current model up to date, according to language changes that came up during the project period. A0 was based on preliminary Ada, while A6 is based on the current version of the language as defined” by LRM [1]. The third goal, the formal definition of Ada TASKs and the derivation of a virtual machine capable of executing these tasks, must have been the most difficult goal. It is here that the authors earn their laurels. The third paper in Part II, Parallelism in Ada, and the complete, short Part III cover this problem. For me this second half of the book was the most rewarding. The model of TASK types and TASK objects develops consistently. Whenever a TASK object is declared directly, i.e., without referencing an intermediate TASK typemark, an anonymous TASK type is created, virtually referenced in the subsequent object declaration. Finally there is no difference anymore between TASK objects declared directly and those declared using a typemark. This simplification reflects the same philosophy as the previously described way of handling PROCEDURE and DECLARE blocks and represents another step towards systematic design. Conclusion Vol. 98, even though hard to read due to its dry style, is an exceptional tool for Ada language implementors; together with an Ada Compiler Validation Capability it can help to improve the correctness and completeness of an Ada compiler. A short introduction to VDM would have been helpful; also Ada program samples or fragments should have been used more. Ada topics which are covered greatly enhance the reader's understanding. This holds for subtle issues such as illegal circularity in TYPE declarations via PRIVATE types, as well as in such broad areas as the TASK concept. A fairly complete description of an Ada machine, capable of running multiple TASKs simultaneously, is given.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.