1
IEEE TRANSACTIONS ON COMPUTERS, MY 1972 Book Reviews RICHARD R. SHIVELY, Book Reviews Editor B72-9 Compiler Construction for Digital Computers-D. Gries (New York: Wiley, 1971, 493 pp., $12.95). This book provides an excellent method to learn about compilers. At an introductory, intermediate, and advanced level, it discusses topics central and related to the construction of compilers, many of which have previously appeared only in journal articles or publications not generally available. The work has only two faults. It was composed on an IBM 360 line printer using FORMAT and thus suffers typographically. It is not a cookbook for advanced compiler implementation. That is, when one attempts to build an advanced compiler with optimization, and when he attempts to find the answer to his pressing practical prob- lems in the book, the answers may well not be there. In fairness, how- ever, the book provides excellent indices and a very good historical and general bibliography that might aid the serious implementer. After an introduction that describes the pieces of a compiler, the author discusses grammars and languages in a depth not usually found in a general-compiler book. He then proceeds to a discussion of finite automata and shows how the theory previously presented leads to a scanner (or lexical analyzer) as a cophase with the parser. Next he dis- cusses top down recognizers and the method of recursive descent. This is followed by a discussion of bottom up recognizers including prece- dence grammars, operator and higher order precedence, and bounded context methods. He introduces a production language for writing syntax recognizers and performing semantic actions. He follows this with an in-depth discussion of run time storage organizations, and the organization of, and data in, the Symbol Table. After dealing with various internal representations of the source program such as polish notation, triples, and quadruples, the author shows how semantic rou- tines are used, first in general and then for Algol-like constructs. Finally, he deals with allocation of run-time variables, error recovery, code generation, and optimization. In addition, the author covers topics of peripheral interest not normally covered in such books, including inter- preters, scanner constructors, the use of transition tables, the optimiza- tion of Boolean expressions, error recovery, the implementation of macros, and translator writing systems. While this reviewer emphasizes that the book is not exhaustive, it is by no means sketchy and provides more than enough material for a half-yeargraduatecourseincompiler construction. The book is very well written and is suitable for self-study. It is also well motivated by the inclusion of a great deal of practical material. It is authoritative to the novice and intermediate compiler constructor and offers him a great deal of practical advice and help in getting into the material. Even com- mercial compiler writers could benefit from reading this text. Finally, the exercises are useful and numerous. However, one might prefer that in some cases they had been included in the material discussed instead of being given as exercises. With all points considered, I believe this book, as the Knuth series, should find its way onto the bookshelves of all serious computer scientists. E. A. FEUSmL Rice Univ. Houston, Tex. B72-40 PL/I Programming In Technological Applications-G. F. Groner (New York: Wiley, 1971, 230 pp., $9.95 cloth, $7.95'paper). It is unusual these days to find a product that does more than ex- pected. Mr. Groner's book not only covers an appropriate subset of the PL/I language, but also imparts much wisdom from the field of scientific computing. It does much to bridge the wide gap between the functional understanding of a computer language and the skill necessary to effectively use it in solving problems. The reader is assumed to be knowledgeable in engineering or the sciencies, but a beginner to com- puter programming. A sample problem of heat transfercalculations is first considered as a vehicle for discussing the planning and design phase of program development. Questions such as: "Should we check the validity of data entered into the program?" and "Should we build e into the program or read it into the program ?" are raised, making this chapter very en- lightening. Advice based upon much experience in the field is given in answer to the questions. A realistic program has now been planned and carefully designed. The following chapters describe the elements of the language useful in technological applications. The explanations are good and the de- velopment is logical. An abundance of meaningful examples illustrate the use of the PL/I language facilities as well as demonstrate techniques and considerations for problem solving typically learned from experi- ence. Many problems are given for the reader to try his understanding Their solutions are in the Appendix. The reader should be aware that PL/I is a very large language with many facilities that permit it to be used in business applications and numerous other fields in addition to technological applications. The author, by necessity, selected a small part of the language for use in his book. Subsetting the language is a difficult task because it is a tradeoff between including more facilities and keeping the subset small for teaching purposes. The use of computer files for the temporary or permanent storage of data was not included in the subset, even though they are frequently used in technological applications. The omission may be justified on the basis that the book is for beginners. On the other hand, a beginner rarely has need for bit string manipulation, which was included. The reader should be cautioned against the use of the fixed decimal data type. It is rarely of any special value in technological applications. In addition, fixed decimal data in arithmetic expressions are very apt to lose the desired precision if the Multiply and Divide built-in functions or other special techniques are not used. Fortunately, the use of fixed decimal data was not emphasized. The highlight of the book is the last chapter where the reader learns about debugging and validating a PL/I program. A very realistic se- quence of events is concocted in the development of a statistical analysis program. The program is submitted to the computer for the first time. The output from the computer is shown, including diagnostic messages that are explained by the author. The program is resubmitted several times; the output from each run is shown. A variety of errors is discov- ered and explained as the validation procedure progresses. The tech- niques of program validation are well presented and logically developed. ELDON H. REMY 79 Eileen Drive Rochester, N. Y. 14616 In this section, the IEEE Computer Society publishes reviews of books in the computer field and related areas. Readers are invited to send comments on these reviews for possible publication in the Correspondence section of this TRANSACTIONS. Please address your comments and suggestions to the Book Reviews Editor: Richard R. Shively, Bell Telephone Laboratories, Whippany, N. J. 07981. The IEEE Computer Society does not necessarily endorse the opinions of the reviewers. 517

B72-10 PL/I Programming In Technological Applications

  • Upload
    eh

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: B72-10 PL/I Programming In Technological Applications

IEEE TRANSACTIONS ON COMPUTERS, MY 1972

Book ReviewsRICHARD R. SHIVELY, Book Reviews Editor

B72-9 Compiler Construction for Digital Computers-D. Gries (NewYork: Wiley, 1971, 493 pp., $12.95).

This book provides an excellent method to learn about compilers.At an introductory, intermediate, and advanced level, it discusses topicscentral and related to the construction of compilers, many of whichhave previously appeared only in journal articles or publications notgenerally available. The work has only two faults. It was composed on

an IBM 360 line printer using FORMAT and thus suffers typographically.It is not a cookbook for advanced compiler implementation. That is,when one attempts to build an advanced compiler with optimization,and when he attempts to find the answer to his pressing practical prob-lems in the book, the answers may well not be there. In fairness, how-ever, the book provides excellent indices and a very good historical andgeneral bibliography that might aid the serious implementer.

After an introduction that describes the pieces of a compiler, theauthor discusses grammars and languages in a depth not usually foundin a general-compiler book. He then proceeds to a discussion of finiteautomata and shows how the theory previously presented leads to a

scanner (or lexical analyzer) as a cophase with the parser. Next he dis-cusses top down recognizers and the method of recursive descent. Thisis followed by a discussion of bottom up recognizers including prece-dence grammars, operator and higher order precedence, and boundedcontext methods. He introduces a production language for writingsyntax recognizers and performing semantic actions. He follows thiswith an in-depth discussion of run time storage organizations, and theorganization of, and data in, the Symbol Table. After dealing withvarious internal representations of the source program such as polishnotation, triples, and quadruples, the author shows how semantic rou-

tines are used, first in general and then for Algol-like constructs. Finally,he deals with allocation of run-time variables, error recovery, codegeneration, and optimization. In addition, the author covers topics ofperipheral interest not normally covered in such books, including inter-preters, scanner constructors, the use of transition tables, the optimiza-tion of Boolean expressions, error recovery, the implementation ofmacros, and translator writing systems.

While this reviewer emphasizes that the book is not exhaustive, it isby no means sketchy and provides more than enough material for a

half-yeargraduatecourseincompiler construction. The book is very well

written and is suitable for self-study. It is also well motivated by theinclusion of a great deal of practical material. It is authoritative to thenovice and intermediate compiler constructor and offers him a greatdeal of practical advice and help in getting into the material. Even com-

mercial compiler writers could benefit from reading this text. Finally,the exercises are useful and numerous. However, one might prefer thatin some cases they had been included in the material discussed insteadof being given as exercises.

With all points considered, I believe this book, as the Knuth series,should find its way onto the bookshelves of all serious computerscientists.

E. A. FEUSmLRice Univ.Houston, Tex.

B72-40 PL/I Programming In Technological Applications-G. F.Groner (New York: Wiley, 1971, 230 pp., $9.95 cloth, $7.95'paper).

It is unusual these days to find a product that does more than ex-

pected. Mr. Groner's book not only covers an appropriate subset ofthe PL/I language, but also imparts much wisdom from the field ofscientific computing. It does much to bridge the wide gap between thefunctional understanding ofa computer language and the skill necessaryto effectively use it in solving problems. The reader is assumed to beknowledgeable in engineering or the sciencies, but a beginner to com-

puter programming.A sample problem of heat transfercalculations is first considered as

a vehicle for discussing the planning and design phase of programdevelopment. Questions such as: "Should we check the validity of dataentered into the program?" and "Should we build e into the programor read it into the program ?" are raised, making this chapter very en-

lightening. Advice based upon much experience in the field is given inanswer to the questions. A realistic program has now been planned andcarefully designed.

The following chapters describe the elements of the language usefulin technological applications. The explanations are good and the de-velopment is logical. An abundance of meaningful examples illustratethe use of the PL/I language facilities as well as demonstrate techniquesand considerations for problem solving typically learned from experi-ence. Many problems are given for the reader to try his understandingTheir solutions are in the Appendix.

The reader should be aware that PL/I is a very large language withmany facilities that permit it to be used in business applications andnumerous other fields in addition to technological applications. Theauthor, by necessity, selected a small part of the language for use in hisbook. Subsetting the language is a difficult task because it is a tradeoffbetween including more facilities and keeping the subset small forteaching purposes.

The use of computer files for the temporary or permanent storageof data was not included in the subset, even though they are frequentlyused in technological applications. The omission may be justified on

the basis that the book is for beginners. On the other hand, a beginnerrarely has need for bit string manipulation, which was included. Thereader should be cautioned against the use of the fixed decimal datatype. It is rarely of any special value in technological applications. Inaddition, fixed decimal data in arithmetic expressions are very apt tolose the desired precision if the Multiply and Divide built-in functionsor other special techniques are not used. Fortunately, the use of fixeddecimal data was not emphasized.

The highlight of the book is the last chapter where the reader learnsabout debugging and validating a PL/I program. A very realistic se-

quence of events is concocted in the development of a statistical analysisprogram. The program is submitted to the computer for the first time.The output from the computer is shown, including diagnostic messagesthat are explained by the author. The program is resubmitted severaltimes; the output from each run is shown. A variety of errors is discov-ered and explained as the validation procedure progresses. The tech-niques ofprogram validation are well presented and logically developed.

ELDON H. REMY79 Eileen DriveRochester, N. Y. 14616

In this section, the IEEE Computer Society publishes reviews of books in the computer field andrelated areas. Readers are invited to send comments on these reviews for possible publication in theCorrespondence section of this TRANSACTIONS. Please address your comments and suggestions tothe Book Reviews Editor: Richard R. Shively, Bell Telephone Laboratories, Whippany, N. J.07981. The IEEE Computer Society does not necessarily endorse the opinions of the reviewers.

517