Docworks PDF 600
Total Page:16
File Type:pdf, Size:1020Kb
P!l)_n.ted a.t .the Mathematic.al Cen.tJie, 413 K/f./.JMlaan, Am6.te.Jtdam. The Mathematic.al Cen.tJie , 6011.nded .the 11-.th 06 Feb'1.U1V1.IJ 1946, ,u., a non p!W 6U w:Ut.u.:tio n aJm.ing a.t .the pJWmo:Uo n o 6 pwr.e ma.the.ma:Ue!i and ill., appUc.ationJ.,. 1.t ,u., -6poY11.>01Led by .the Ne.the.Jtland6 Gove.Jtnmen.t .th!Wu.gh .the Ne..the.Jtland6 O!Lganiza:Uon 6DIL .the Advanc.e.men.t 06 PUILe Re-6e.a!Lc.h {Z.W.0.). MATHEMATICAL CENTRE TRACTS 134 PROCEEDINGS INTERNATIONAL CONFERENCE ON ALGOL 68 J.C. van VLIET (ed.) H. WUPPER (ed.) RECHENZENTRUM DER RUHR-UNIVERSITAT BOCHUM, BRD, MARCH 30-31, 1981 MATHEMATISCH CENTRUM AMSTERDAM 1981 1980 Mathematics·subjectclassification: 68-06,68B10,68B20 Co~uting Reviews: 4.22,1.52,4.34,4.12,5.23 l. INTRODUCTION "What can we do with ALGOL 68?" is the question raised by the chairman of the Standing Subcommittee on ALGOL 68 Support in the first contribution to this conference. The three main topics of the conference suggest three possible answers to this question: one can teach the language, implement it, and apply it. The papers collected in these proceedings deal with various aspects of teaching, implementation, and applications. They do not attempt to fully answer the question of what can be done, but they hopefully will provide some useful pieces of information, both to those who want to learn more about the,language, and to those who are actually involved in problems in the areas addressed. In several respects, ALGOL 68 has not been very successful. It is not heavily used except at a number of sites in Europe (most notably the UK), its new terminology has not been widely adopted, it is difficult to implement (or isn't it). But many people who know the language feel that its use to write programs reflects only one aspect, and that the more important advantages stem from its orthogonal design, carefully chosen notation, and clarity. ALGOL 68 offers a unified view of both the user program and its environ ment. This combination, together with its carefully chosen notation, offers a good basis for teaching the language, and for understanding programming in' general. ALGOL 68 is the only language which offers such a complete, setting, which allows one to develop programs independent of the outside world. It ·is our firm belief that many of the everyday problems that occur in programming are easily.solved when the benefits of ALGOL 68 are taken into account. This conference may be regarded as an attempt to reveal some of these benefits. The Program Committee for this conference consisted of H. Ehlich (Ruhr-Universitat Bochum, BRD) C.H.A. Koster (University of Nijmegen, The Netherlands) A.D. Mc,Gettrick (University of Strathclyde, Glasgow, UK) S.G. van der Meulen (University of Utrecht, The Netherlands) I L. Trilling (Universite de Rennes, France) J.C. van Vliet (Mathematical Centre, Amsterdam, The Netherlands) H. Wupper (Ruhr-Universitat Bochum, BRD). .1..1. During the refereeing process, much help was obtained from P. Bakkus, A. Couvert, D. Grune, P. le Guernic, R.B. Hunter, H. Jonkers, K. Kleine, L.G.L.T. Meertens, F. Ployette, A. Quere and J. Voiron. We thank the Director of the computer centre of the Ruhr-Universitat Bochum, Prof.Dr. H. Ehlich, and his colleagues, who took care of the local organization. We thank the Mathematical Centre for the opportunity to publish these proceedings in their series Mathematical Centre Tracts and all those at the Mathematical Centre who have contributed to its technical realization. J .c. van Vliet H. Wupper .l.l.l CONTENTS Session 1 (Monday, March 30, A.M.) What can we do with ALGOL 68 (invited lecture) S .G. van der Meu1en • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • . 1 Syntactic errors made by beginners using an ALGOL 68 subset J.. Andre & J. Barre 17 A comparative evaluation of ALGOL 68 for programming instruction P.R. Eggert & R .C. Uzgalis • • • • • • • • • • • • • • .. • • • • • • • • • • • • • • • • • • • • • • • 33 Session 2 (Monday, March 30, P.M.) Teaching with ALGOL 68 in Dresden (invited lecture) G. Stiller • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 45 Semantic analysis and synthesis in the ALGOL 68 R 4000 compiler H. Loeper, H. -J. Jakel & H. Pietsch ••••••••••••••••• , •••••• • •• • • • 59 Essay on copying K. Wright • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 81 On the design of an abstract machine for a portable ALGOL 68 compiler L.G.L.T. Meertens • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 97 Session 3 (Tuesday, March 31, A.M.) An implementation of modular compilation in ALGOL 68 (invited lecture) G .J. Finnie & M .c. Thomas •••••••••••••••••••••••••••••••••••••••• 119 Programming languages for a course in data structures V.J. Rayward-Smith ••••••••••••••••••••••••••••••••••••••••••••••• 143 Context-free grammars and derivation trees in ALGOL 68 V. Linnemann • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 16 7 Session 4 (Tuesday, March 31, P.M.) An ALGOL 68 prelude for the implementation of test generation algorithms S.D. Butland ••••••••••••••••••••••••••••••••••••••••••••••••••••• 183 A programming system for interval arithmetic in ALGOL 68 G. Gunther & G. Marquardt • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 201 Teaching with ALGOL 68, in Manchester (invited lecture) C.H. Lindsey 217 List of .addresses of authors ••••• ; •.••••••••••••••••••••••••••••.••••• 231 WHAT CAN WE DO WITH ALGOL 68 S.G. van der MEULEN ABSTRACT Despite its power, orthogonal design, and other nice features, ALGOL68 has not become a widely used language. Some possible reasons for this neglection by the computing community are commented upon. The paper also gives a short history of the way the language developed, and sketches a possible future. Finally, the place and tasks of the Subcommittee on ALGOL68 support are elaborated upon. 2 1. WHAT CAN WE DO WITH ALGOL68? The most obvious answer to this question - and also the most natural one - of course is: We can write programs in it. And, beyond any doubt, this was precisely what we had in mind - when we designed the language, went to the limit in an attempt to define it with the utmost rigour, intro duc~d it informally "for the uninitiated reader", implemented it with a keen eye for possible improvements, reconsidered and revised it with a keen and open eye for possible implementations, then went to an even further limit in redefining it with even more rigour and less consideration for the uninitia ted, reintroduced it in an informal revision, implemented it again (and now complete and unabridged) and started to promulgate it, modelled its transput cleaning an (in spite of all efforts) still clumsy cluster of often overspe cifying I/O- and file-manipulating routines, explored its possibilities through subsets and supersets and by extending it in its semantic prelude for particular application areas------- and we wrote papers and books on it: primers, guides, treatises, conference proceedings and textbooks on various aspects such as two-level grammars, orthogonal design, recursive modes and mode-equivalencing, new implementation techniques, possible ex tensions --- and so on etcetera. But did we write programs in it? An often heard objection is: There are no good compilers. But there are. And not only on CDC-CYBERs - also on IBM370s, on DEC20 and PDP11, on ICLs and other systems. Their availability may leave something to be de sired (in no small measure a matter of demand), but they exist and some of them are pretty good - for teaching purposes or for production aims or for both._ One of the benefits of an ambitious and well-designed language is, that the circle of ~ts implementers is limited to competent and ambitious experts. As to demand and supply: it is a proven fact that manufacturers can be coerced into implementing the language (CDC) or supporting an exist ing implementation (DEC). It is - at least partly - up to those who want to write programs in it. Another ~llegation is: There are no easy (and get-at-able) books on the language and its use. But again: there are. In the small library of our small computer science department we have as many titles on ALGOL68 as on any otQer programming language, including PASCAL which is a heavily support ed language in our university. Yes, but they are difficult for the beginning programmer. Are they, all of them? It is true that The Report is unreadable for the non-expert and producing headaches with almost any one else. It is 3 also true that the other, more or less officially suppo~ted IFIP-WG2.1 "companion volume" - the Informal Introduction - is not a primer for the programming novice: it rather is another (and pretty precise) description of the whole language, and only informal as compared to that monstrous monument of formal rigour which is the Report. But it is equally true that most of the other primers, practical guides, introductions, tutorials and what else do we have, have been written for and are quite easy readable by any student and any intellectual who is able to think on a level not below FORTRAN. And yet: we don't write programs in it. Or do we? Let us try to de limit more or less who are "we". Apparently, the "we"_ of the first para graph is the small group of those who designed the language (IFIP-WG2.1 & affiliates), implemented it for the first time (the Malvern people of the Royal Radar Establishment), revised it (WG2.1 & affiliates & many respond ers), implemented it again (several groups and even individuals) and wrote about it (see bibliography) - not so many amongst them actually wrote pro grams in it. I nciw'wake up to the fact that I wrote and tried my first ALGOL68 program in 1975 (shortly after the release of the CDC-CYBER imple mentation). The "we" of the ALGOL68-users is another "we": it is a very small subset of the total "we" that constitutes tjJ.e computing community.