Algol 60 Compilation and Assessment

Total Page:16

File Type:pdf, Size:1020Kb

Algol 60 Compilation and Assessment Algol 60 Compilation and Assessment B. A. Wichmann August 1973 ii Preface The ease and effectiveness of computer utilisation depend very heavily on the quality of the implementation of the programming language used. This book is dedicated to raising the quality of ALGOL 60 implementations. It gives an objective comparative assessment of over twenty existing compilers in accordance with numerical and non- numerical criteria, and describes in greater detail the techniques which contribute to high quality. The book is required reading for any programmer embarking on an implementa- tion of ALGOL 60; and is equally valuable for implementors of many subsequently designed languages. For users of ALGOL 60, it will not only assist in the selection of a high quality compiler, but it also shows how to use an existing compiler more effectively. Finally, for all designers and users of programming languages and other software, it gives an example of how the quality of software may be objectively de- fined and assessed. The first chapter considers the compilation of the more straightforward aspects of ALGOL, by using an illustrative one-address computer. It is clear that most inter- comparisons must depend upon statistical information of the use of ALGOL 60 and this is presented and analysed in chapter 2 to make it useful for performance assessment. These statistical data also give guide lines on the construction of efficient algorithms, which are detailed in chapter 3. The problem of syntax analysis of ALGOL 60 source text is not considered in de- tail, as this is handled very ably elsewhere. However, some difficulties are enumerated in chapter 4, since a few existing compilers are known to handle these matters incor- rectly. As far as the user is concerned, the diagnostic features are all-important. If he cannot understand these diagnostics, or inexplicably gets the wrong answers, it is of little consequence that the compiler is “efficient” in terms of machine resources. These aspects are discussed in chapter 5. A related topic is the documentation of computer software, or in this case, ALGOL 60 source text. Several automatic aids and compiling options are considered. In chapter 7, the compilation of the obscure points of ALGOL 60 is discussed. In many cases, these features are omitted from an implementation, not necessarily because of their difficulty, but because they are rarely used. A related problem is that of demonstrating the apparent correctness of a compiler. Certainly the known trouble- spots can be the subject of explicit tests, which, to be reasonably effective, must amount to about 100 programs. The design of such tests is described in chapter 8. A detailed comparison of six existing compilers is made in chapter 9: for Atlas, KDF9, 1900, CDC 6600, B5500 and the 1108. The range of architecture enables a judgement to be made of the desirable features of a machine for good ALGOL object code. Numerous examples are given from test programs to illustrate the points made. The improvement of the object code in a compiler by various optimisation strategies is discussed in chapter 10. Simple local optimisation is compared with more ambitious schemes. This analysis leads naturally to what must be regarded as minimal machine features to support ALGOL 60 and the reasoning behind this is presented in chapter 11. The implementation of ALGOL 60 implies various mechanisms within both the compiler and object-code. These mechanisms are capable of supporting features which are not present in ALGOL 60, and are hence candidates for extensions to the language. This leads to a discussion on language design in the final chapter which is arranged in iii order of increasing complexity from minor extensions to a brief analysis of ALGOL W and ALGOL 68. I should like to thank all the “ALGOL men” with whom I have had much useful discussion, enabling this book to be written. Professor C. A. R. Hoare, Mr R. Scowen and Mr M. Woodger have contributed substantially to my understanding of ALGOL 60. Dr P. T. Cameron and Mr J. Wielgosz have contributed to some of the work reported in chapter 9, and Dr C. Phelps to that in chapter 2; this collaboration has proved very useful and I am glad to acknowledge their support. I should also like to thank Mr D. S. Akka for permission to quote from his M.Sc. Thesis. This work would not have been possible without the permission of the Director of the National Physical Laboratory to use the published reports and papers upon which this book is largely based. Any opinions expressed however, are mine, and not neces- sarily those of the Laboratory. Finally, I should like to thank my wife for her support in the preparation of the book. August 1973 B.A.W. Logical order of the chapters 1 - 5 n n@ @ R@ 6 - 7 n n@ @ R@ 4 - 8 n n@ @ R@ 2 - 9 - 11 - 12 n@ n@ n n @ @ R@ R@ 3 10 n n iv Contents 1 The Generation of Machine-Code 3 1.1 Arithmetic Expressions . 3 1.1.1 SIMPLE ARITHMETIC EXPRESSIONS . 3 1.1.2 ANONYMOUS WORKING STORE . 5 1.1.3 TYPE CONVERSION . 6 1.1.4 OPERATORS NOT AVAILABLE ON THE HARDWARE OF THE MACHINE . 7 1.1.5 NESTED EXPRESSIONS . 10 1.2 Array Variables . 11 1.2.1 THE “ARRAY WORD” . 11 1.2.2 THE DOPE VECTOR TECHNIQUE . 11 1.2.3 THE CODE WORD METHOD . 12 1.2.4 THE STORAGE LAYOUT . 12 1.2.5 MACHINE CODE EXAMPLES . 13 1.2.6 SUBSCRIPT BOUND CHECKING . 17 1.3 Constants . 18 1.4 Boolean Expressions . 19 1.4.1 THE RELATIONAL OPERATORS . 19 1.5 Conditional Statements and Expressions . 21 1.6 Assignment Statements . 22 1.7 For Loops . 24 1.7.1 MULTIPLE FOR LIST ELEMENTS . 25 1.7.2 THE STEP-UNTIL ELEMENT . 26 1.7.3 THE WHILE ELEMENT . 29 1.7.4 THE GENERAL CASE . 29 1.8 Storage allocation . 30 1.8.1 BLOCK LEVEL ADDRESSING . 31 1.8.2 PROCEDURE LEVEL ADDRESSING . 32 1.8.3 FIRST AND SECOND ORDER WORKING STORE . 34 1.8.4 LINK DATA AND THE USE OF REGISTERS . 39 1.9 Procedure and Function Calls . 40 1.9.1 PARAMETERLESS PROCEDURE ENTRY AND EXIT . 40 1.9.2 THUNKS . 43 1.9.3 VALUE PARAMETERS . 44 1.9.4 STRING PARAMETERS . 46 1.9.5 ARRAY PARAMETERS . 47 1.9.6 LABEL PARAMETERS . 47 1.9.7 STANDARD FUNCTIONS . 48 v vi CONTENTS 1.9.8 SIDE-EFFECTS . 48 1.10 Name Call . 49 1.10.1 THE GENERAL CASE . 50 1.10.2 OPTIMISATION WITH SIMPLE VARIABLES . 51 1.10.3 REAL-INTEGER TYPE CONVERSION . 52 1.11 Switches and Gotos . 52 1.11.1 LABELS . 52 1.11.2 DESIGNATIONAL EXPRESSIONS . 53 1.11.3 SWITCHES . 54 2 Performance Measurement 55 2.1 General Techniques . 55 2.2 Statement Times . 56 2.2.1 TIMING THE SIMPLE STATEMENTS . 56 2.2.2 CHOICE OF THE STATEMENTS . 58 2.2.3 THE ACTUAL TIMES OBSERVED . 58 2.2.4 ANALYSIS OF THE TIMES—A MODEL . 58 2.2.5 THE LIMITATIONS AND USES OF THE MODEL . 60 2.2.6 SOME REMARKS ON THE OBSERVED TIMES . 61 2.3 Program Analysis—General Techniques . 68 2.3.1 WHETSTONE ALGOL DYNAMIC ANALYSIS . 69 2.3.2 WORK OF D. S. AKKA . 78 2.3.3 STATIC ANALYSIS OF SOURCE TEXT . 79 2.3.4 STATIC ANALYSIS OF COMPILED CODE . 84 2.4 An ALGOL Performance Measure . 85 2.4.1 EXPANSION OF THE SIMPLE STATEMENTS . 87 2.4.2 CALCULATION OF THE WEIGHTS . 87 2.4.3 COMPARISON OF THE MIX FIGURES . 91 2.5 Benchmarks . 93 3 Estimating the Speed of a Program 95 3.1 Arithmetic expressions . 95 3.2 Assignment statements . 97 3.3 Relational operators and Boolean expressions . 97 3.4 Declarations . 98 3.5 For loops . 99 3.6 Procedure and function calls . 100 3.6.1 EXAMPLES . 100 3.7 Access via Formal Parameters . 101 3.8 Labels, designational expressions and switches . 101 3.9 Use and accuracy of the estimation . 101 3.10 Tabular Summary of the Estimates . 102 4 Syntax Analysis 105 4.1 Common Syntactic Errors . 105 4.1.1 ERRORS IN SYNTAX ONLY . 105 4.1.2 ERRORS EFFECTING SEMANTICS . 106 4.2 Output from the Syntax Analysis . 107 4.2.1 INFORMATION REQUIRED FOR CODE GENERATION . 108 CONTENTS vii 5 Diagnostic and Debugging Aids 111 5.1 General Techniques . 111 5.2 Compile-time Diagnostics . 111 5.2.1 COMPILING OPTIONS . 114 5.2.2 COMPILE-TIME CHECKING . 115 5.3 Run-time Checking . 115 5.3.1 SUBSCRIPT CHECKING . 116 5.3.2 OVERFLOW AND UNDERFLOW . 116 5.3.3 STACK OVERFLOW . 117 5.3.4 USE BEFORE ASSIGNMENT . 118 5.3.5 ADDITIONAL CHECKS . 119 5.3.6 TRACING . 119 5.4 Failure Time Diagnostics . 120 5.4.1 FAILURE INFORMATION . 120 5.4.2 INFORMATION RELATED TO THE FAILURE . 121 5.4.3 PROGRAM STATUS INFORMATION . 122 5.4.4 THE KIDSGROVE ALGOL POST-MORTEM FACILITY . 123 5.4.5 FAILURE STATISTICS . 124 5.5 Operating System Features . 125 6 Program Documentation Aids 127 6.1 Source Text Methods . 127 6.2 Compiler-oriented Documentation Aids . 129 6.3 Execution Aids . 130 6.4 Machine-code Analysis . 132 7 Trouble-spots in the Compilation Process 135 7.1 The Dimensions of Formal Arrays . 135 7.2 Formal Procedure Parameters . 136 7.3 Arrays By Value . 137 7.4 Subscripted Variable as a Control Variable . 138 7.5 Function and Name Calls .
Recommended publications
  • A Quick Guide to Southeast Florida's Coral Reefs
    A Quick Guide to Southeast Florida’s Coral Reefs DAVID GILLIAM NATIONAL CORAL REEF INSTITUTE NOVA SOUTHEASTERN UNIVERSITY Spring 2013 Prepared by the Land-based Sources of Pollution Technical Advisory Committee (TAC) of the Southeast Florida Coral Reef Initiative (SEFCRI) BRIAN WALKER NATIONAL CORAL REEF INSTITUTE, NOVA SOUTHEASTERN Southeast Florida’s coral-rich communities are more valuable than UNIVERSITY the Spanish treasures that sank nearby. Like the lost treasures, these amazing reefs lie just a few hundred yards off the shores of Martin, Palm Beach, Broward and Miami-Dade Counties where more than one-third of Florida’s 19 million residents live. Fishing, diving, and boating help attract millions of visitors to southeast Florida each year (30 million in 2008/2009). Reef-related expen- ditures generate $5.7 billion annually in income and sales, and support more than 61,000 local jobs. Such immense recreational activity, coupled with the pressures of coastal development, inland agriculture, and robust cruise and commercial shipping industries, threaten the very survival of our reefs. With your help, reefs will be protected from local stresses and future generations will be able to enjoy their beauty and economic benefits. Coral reefs are highly diverse and productive, yet surprisingly fragile, ecosystems. They are built by living creatures that require clean, clear seawater to settle, mature and reproduce. Reefs provide safe havens for spectacular forms of marine life. Unfortunately, reefs are vulnerable to impacts on scales ranging from local and regional to global. Global threats to reefs have increased along with expanding ART SEITZ human populations and industrialization. Now, warming seawater temperatures and changing ocean chemistry from carbon dioxide emitted by the burning of fossil fuels and deforestation are also starting to imperil corals.
    [Show full text]
  • Typology of Programming Languages E Early Languages E
    Typology of programming languages e Early Languages E Typology of programming languages Early Languages 1 / 71 The Tower of Babel Typology of programming languages Early Languages 2 / 71 Table of Contents 1 Fortran 2 ALGOL 3 COBOL 4 The second wave 5 The finale Typology of programming languages Early Languages 3 / 71 IBM Mathematical Formula Translator system Fortran I, 1954-1956, IBM 704, a team led by John Backus. Typology of programming languages Early Languages 4 / 71 IBM 704 (1956) Typology of programming languages Early Languages 5 / 71 IBM Mathematical Formula Translator system The main goal is user satisfaction (economical interest) rather than academic. Compiled language. a single data structure : arrays comments arithmetics expressions DO loops subprograms and functions I/O machine independence Typology of programming languages Early Languages 6 / 71 FORTRAN’s success Because: programmers productivity easy to learn by IBM the audience was mainly scientific simplifications (e.g., I/O) Typology of programming languages Early Languages 7 / 71 FORTRAN I C FIND THE MEAN OF N NUMBERS AND THE NUMBER OF C VALUES GREATER THAN IT DIMENSION A(99) REAL MEAN READ(1,5)N 5 FORMAT(I2) READ(1,10)(A(I),I=1,N) 10 FORMAT(6F10.5) SUM=0.0 DO 15 I=1,N 15 SUM=SUM+A(I) MEAN=SUM/FLOAT(N) NUMBER=0 DO 20 I=1,N IF (A(I) .LE. MEAN) GOTO 20 NUMBER=NUMBER+1 20 CONTINUE WRITE (2,25) MEAN,NUMBER 25 FORMAT(11H MEAN = ,F10.5,5X,21H NUMBER SUP = ,I5) STOP TypologyEND of programming languages Early Languages 8 / 71 Fortran on Cards Typology of programming languages Early Languages 9 / 71 Fortrans Typology of programming languages Early Languages 10 / 71 Table of Contents 1 Fortran 2 ALGOL 3 COBOL 4 The second wave 5 The finale Typology of programming languages Early Languages 11 / 71 ALGOL, Demon Star, Beta Persei, 26 Persei Typology of programming languages Early Languages 12 / 71 ALGOL 58 Originally, IAL, International Algebraic Language.
    [Show full text]
  • A Politico-Social History of Algolt (With a Chronology in the Form of a Log Book)
    A Politico-Social History of Algolt (With a Chronology in the Form of a Log Book) R. w. BEMER Introduction This is an admittedly fragmentary chronicle of events in the develop­ ment of the algorithmic language ALGOL. Nevertheless, it seems perti­ nent, while we await the advent of a technical and conceptual history, to outline the matrix of forces which shaped that history in a political and social sense. Perhaps the author's role is only that of recorder of visible events, rather than the complex interplay of ideas which have made ALGOL the force it is in the computational world. It is true, as Professor Ershov stated in his review of a draft of the present work, that "the reading of this history, rich in curious details, nevertheless does not enable the beginner to understand why ALGOL, with a history that would seem more disappointing than triumphant, changed the face of current programming". I can only state that the time scale and my own lesser competence do not allow the tracing of conceptual development in requisite detail. Books are sure to follow in this area, particularly one by Knuth. A further defect in the present work is the relatively lesser availability of European input to the log, although I could claim better access than many in the U.S.A. This is regrettable in view of the relatively stronger support given to ALGOL in Europe. Perhaps this calmer acceptance had the effect of reducing the number of significant entries for a log such as this. Following a brief view of the pattern of events come the entries of the chronology, or log, numbered for reference in the text.
    [Show full text]
  • Individual Mechanical Stimulation
    Durham E-Theses Investigations into the structure and function of nerve and skeletal muscle of anisoptebous odonata, with special reference to aeschnid nymphs Malpus, C. M. How to cite: Malpus, C. M. (1968) Investigations into the structure and function of nerve and skeletal muscle of anisoptebous odonata, with special reference to aeschnid nymphs, Durham theses, Durham University. Available at Durham E-Theses Online: http://etheses.dur.ac.uk/8803/ Use policy The full-text may be used and/or reproduced, and given to third parties in any format or medium, without prior permission or charge, for personal research or study, educational, or not-for-prot purposes provided that: • a full bibliographic reference is made to the original source • a link is made to the metadata record in Durham E-Theses • the full-text is not changed in any way The full-text must not be sold in any format or medium without the formal permission of the copyright holders. Please consult the full Durham E-Theses policy for further details. Academic Support Oce, Durham University, University Oce, Old Elvet, Durham DH1 3HP e-mail: [email protected] Tel: +44 0191 334 6107 http://etheses.dur.ac.uk 2 INVESTIGATIONS. INTO THE STRUCTURE AND FUNCTION OF NERVE. AND SKELETAL. MUSCLE OF ANISOPTEHOUS ODONATA, WITH SPECIAL REFERENCE TO AESCHNID NYMPHS by C. MV MALPUS, B.SC.. (Dunelm) GREY: COLLEGE:. Being a thesis presented in candidature for the degree of Doctor of Philosophy of the University of Durham. January 1968 PUBLICATION A preliminary report of some of this work, comprising the subject matter of Chapter k and part of Chapter 7, has been published under the title of "Electrical and Mechanical Responses of the skeletal muscle of a primitive insect"' in Nature 215, 991 - 992.
    [Show full text]
  • Security Applications of Formal Language Theory
    Dartmouth College Dartmouth Digital Commons Computer Science Technical Reports Computer Science 11-25-2011 Security Applications of Formal Language Theory Len Sassaman Dartmouth College Meredith L. Patterson Dartmouth College Sergey Bratus Dartmouth College Michael E. Locasto Dartmouth College Anna Shubina Dartmouth College Follow this and additional works at: https://digitalcommons.dartmouth.edu/cs_tr Part of the Computer Sciences Commons Dartmouth Digital Commons Citation Sassaman, Len; Patterson, Meredith L.; Bratus, Sergey; Locasto, Michael E.; and Shubina, Anna, "Security Applications of Formal Language Theory" (2011). Computer Science Technical Report TR2011-709. https://digitalcommons.dartmouth.edu/cs_tr/335 This Technical Report is brought to you for free and open access by the Computer Science at Dartmouth Digital Commons. It has been accepted for inclusion in Computer Science Technical Reports by an authorized administrator of Dartmouth Digital Commons. For more information, please contact [email protected]. Security Applications of Formal Language Theory Dartmouth Computer Science Technical Report TR2011-709 Len Sassaman, Meredith L. Patterson, Sergey Bratus, Michael E. Locasto, Anna Shubina November 25, 2011 Abstract We present an approach to improving the security of complex, composed systems based on formal language theory, and show how this approach leads to advances in input validation, security modeling, attack surface reduction, and ultimately, software design and programming methodology. We cite examples based on real-world security flaws in common protocols representing different classes of protocol complexity. We also introduce a formalization of an exploit development technique, the parse tree differential attack, made possible by our conception of the role of formal grammars in security. These insights make possible future advances in software auditing techniques applicable to static and dynamic binary analysis, fuzzing, and general reverse-engineering and exploit development.
    [Show full text]
  • The Advent of Recursion & Logic in Computer Science
    The Advent of Recursion & Logic in Computer Science MSc Thesis (Afstudeerscriptie) written by Karel Van Oudheusden –alias Edgar G. Daylight (born October 21st, 1977 in Antwerpen, Belgium) under the supervision of Dr Gerard Alberts, and submitted to the Board of Examiners in partial fulfillment of the requirements for the degree of MSc in Logic at the Universiteit van Amsterdam. Date of the public defense: Members of the Thesis Committee: November 17, 2009 Dr Gerard Alberts Prof Dr Krzysztof Apt Prof Dr Dick de Jongh Prof Dr Benedikt Löwe Dr Elizabeth de Mol Dr Leen Torenvliet 1 “We are reaching the stage of development where each new gener- ation of participants is unaware both of their overall technological ancestry and the history of the development of their speciality, and have no past to build upon.” J.A.N. Lee in 1996 [73, p.54] “To many of our colleagues, history is only the study of an irrele- vant past, with no redeeming modern value –a subject without useful scholarship.” J.A.N. Lee [73, p.55] “[E]ven when we can't know the answers, it is important to see the questions. They too form part of our understanding. If you cannot answer them now, you can alert future historians to them.” M.S. Mahoney [76, p.832] “Only do what only you can do.” E.W. Dijkstra [103, p.9] 2 Abstract The history of computer science can be viewed from a number of disciplinary perspectives, ranging from electrical engineering to linguistics. As stressed by the historian Michael Mahoney, different `communities of computing' had their own views towards what could be accomplished with a programmable comput- ing machine.
    [Show full text]
  • Standards for Computer Aided Manufacturing
    //? VCr ~ / Ct & AFML-TR-77-145 )R^ yc ' )f f.3 Standards for Computer Aided Manufacturing Office of Developmental Automation and Control Technology Institute for Computer Sciences and Technology National Bureau of Standards Washington, D.C. 20234 January 1977 Final Technical Report, March— December 1977 Distribution limited to U.S. Government agencies only; Test and Evaluation Data; Statement applied November 1976. Other requests for this document must be referred to AFML/LTC, Wright-Patterson AFB, Ohio 45433 Manufacturing Technology Division Air Force Materials Laboratory Wright-Patterson Air Force Base, Ohio 45433 . NOTICES When Government drawings, specifications, or other data are used for any purpose other than in connection with a definitely related Government procurement opera- tion, the United States Government thereby incurs no responsibility nor any obligation whatsoever; and the fact that the Government may have formulated, furnished, or in any way supplied the said drawing, specification, or other data, is not to be regarded by implication or otherwise as in any manner licensing the holder or any person or corporation, or conveying any rights or permission to manufacture, use, or sell any patented invention that may in any way be related thereto Copies of this report should not be returned unless return is required by security considerations, contractual obligations, or notice on a specified document This final report was submitted by the National Bureau of Standards under military interdepartmental procurement request FY1457-76 -00369 , "Manufacturing Methods Project on Standards for Computer Aided Manufacturing." This technical report has been reviewed and is approved for publication. FOR THE COMMANDER: DtiWJNlb L.
    [Show full text]
  • Efficient Computation of LALR(1) Look-Ahead Sets
    Efficient Computation of LALR(1) Look-Ahead Sets FRANK DeREMER and THOMAS PENNELLO University of California, Santa Cruz, and MetaWare TM Incorporated Two relations that capture the essential structure of the problem of computing LALR(1) look-ahead sets are defined, and an efficient algorithm is presented to compute the sets in time linear in the size of the relations. In particular, for a PASCAL grammar, the algorithm performs fewer than 15 percent of the set unions performed by the popular compiler-compiler YACC. When a grammar is not LALR(1), the relations, represented explicitly, provide for printing user- oriented error messages that specifically indicate how the look-ahead problem arose. In addition, certain loops in the digraphs induced by these relations indicate that the grammar is not LR(k) for any k. Finally, an oft-discovered and used but incorrect look-ahead set algorithm is similarly based on two other relations defined for the fwst time here. The formal presentation of this algorithm should help prevent its rediscovery. Categories and Subject Descriptors: D.3.1 [Programming Languages]: Formal Definitions and Theory--syntax; D.3.4 [Programming Languages]: Processors--translator writing systems and compiler generators; F.4.2 [Mathematical Logic and Formal Languages]: Grammars and Other Rewriting Systems--parsing General Terms: Algorithms, Languages, Theory Additional Key Words and Phrases: Context-free grammar, Backus-Naur form, strongly connected component, LALR(1), LR(k), grammar debugging, 1. INTRODUCTION Since the invention of LALR(1) grammars by DeRemer [9], LALR grammar analysis and parsing techniques have been popular as a component of translator writing systems and compiler-compilers.
    [Show full text]
  • The Advent of Recursion in Programming, 1950S-1960S
    The Advent of Recursion in Programming, 1950s-1960s Edgar G. Daylight?? Institute of Logic, Language, and Computation, University of Amsterdam, The Netherlands [email protected] Abstract. The term `recursive' has had different meanings during the past two centuries among various communities of scholars. Its historical epistemology has already been described by Soare (1996) with respect to the mathematicians, logicians, and recursive-function theorists. The computer practitioners, on the other hand, are discussed in this paper by focusing on the definition and implementation of the ALGOL60 program- ming language. Recursion entered ALGOL60 in two novel ways: (i) syn- tactically with what we now call BNF notation, and (ii) dynamically by means of the recursive procedure. As is shown, both (i) and (ii) were in- troduced by linguistically-inclined programmers who were not versed in logic and who, rather unconventionally, abstracted away from the down- to-earth practicalities of their computing machines. By the end of the 1960s, some computer practitioners had become aware of the theoreti- cal insignificance of the recursive procedure in terms of computability, though without relying on recursive-function theory. The presented re- sults help us to better understand the technological ancestry of modern- day computer science, in the hope that contemporary researchers can more easily build upon its past. Keywords: recursion, recursive procedure, computability, syntax, BNF, ALGOL, logic, recursive-function theory 1 Introduction In his paper, Computability and Recursion [41], Soare explained the origin of computability, the origin of recursion, and how both concepts were brought to- gether in the 1930s by G¨odel, Church, Kleene, Turing, and others.
    [Show full text]
  • SAKI: a Fortran Program for Generalized Linear Inversion of Gravity and Magnetic Profiles
    UNITED STATES DEPARTMENT OF THE INTERIOR GEOLOGICAL SURVEY SAKI: A Fortran program for generalized linear Inversion of gravity and magnetic profiles by Michael Webring Open File Report 85-122 1985 This report is preliminary and has not been reviewed for conformity with U.S. Geological Survey editorial standards. Table of Contents Abstract ------------------------------ 1 Introduction ---------------------------- 1 Theory ------------------------------- 2 Users Guide ---------------------------- 7 Model File -------------------------- 7 Observed Data Files ---------------------- 9 Command File ------------------------- 10 Data File Parameters ------------------- 10 Magnetic Parameters ------------------- 10 General Parameters -------------------- H Plotting Parameters ------------------- n Annotation Parameters ------------------ 12 Program Interactive Commands ----------------- 13 Inversion Function ---------------------- 16 Examples ------------------------------ 20 References ----------------------------- 26 Appendix A - plot system description ---------------- 27 Appendix B - program listing -------------------- 30 Abstract A gravity and magnetic inversion program is presented which models a structural cross-section as an ensemble of 2-d prisms formed by linking vertices into a network that may be deformed by a modified Marquardt algorithm. The nonuniqueness of this general model is constrained by the user in an interactive mode. Introduction This program fits in a least-squares sense the theoretical gravity and magnetic response of
    [Show full text]
  • Latest Results from the Procedure Calling Test, Ackermann's Function
    Latest results from the procedure calling test, Ackermann’s function B A WICHMANN National Physical Laboratory, Teddington, Middlesex Division of Information Technology and Computing March 1982 Abstract Ackermann’s function has been used to measure the procedure calling over- head in languages which support recursion. Two papers have been written on this which are reproduced1 in this report. Results from further measurements are in- cluded in this report together with comments on the data obtained and codings of the test in Ada and Basic. 1 INTRODUCTION In spite of the two publications on the use of Ackermann’s Function [1, 2] as a mea- sure of the procedure-calling efficiency of programming languages, there is still some interest in the topic. It is an easy test to perform and the large number of results ob- tained means that an implementation can be compared with many other systems. The purpose of this report is to provide a listing of all the results obtained to date and to show their relationship. Few modern languages do not provide recursion and hence the test is appropriate for measuring the overheads of procedure calls in most cases. Ackermann’s function is a small recursive function listed on page 2 of [1] in Al- gol 60. Although of no particular interest in itself, the function does perform other operations common to much systems programming (testing for zero, incrementing and decrementing integers). The function has two parameters M and N, the test being for (3, N) with N in the range 1 to 6. Like all tests, the interpretation of the results is not without difficulty.
    [Show full text]
  • Data General Extended Algol 60 Compiler
    DATA GENERAL EXTENDED ALGOL 60 COMPILER, Data General's Extended ALGOL is a powerful language tial I/O with optional formatting. These extensions comple­ which allows systems programmers to develop programs ment the basic structure of ALGOL and significantly in­ on mini computers that would otherwise require the use of crease the convenience of ALGOL programming without much larger, more expensive computers. No other mini making the language unwieldy. computer offers a language with the programming features and general applicability of Data General's Extended FEATURES OF DATA GENERAL'S EXTENDED ALGOL Character strings are implemented as an extended data ALGOL. type to allow easy manipulation of character data. The ALGOL 60 is the most widely used language for describ­ program may, for example, read in character strings, search ing programming algorithms. It has a flexible, generalized, for substrings, replace characters, and maintain character arithmetic organization and a modular, "building block" string tables efficiently. structure that provides clear, easily readable documentation. Multi-precision arithmetic allows up to 60 decimal digits The language is powerful and concise, allowing the systems of precision in integer or floating point calculations. programmer to state algorithms without resorting to "tricks" Device-independent I/O provides for reading and writ­ to bypass the language. ing in line mode, sequential mode, or random mode.' Free These characteristics of ALGOL are especially important form reading and writing is permitted for all data types, or in the development of working prototype systems. The output can be formatted according to a "picture" of the clear documentation makes it easy for the programmer to output line or lines.
    [Show full text]