Algol and Pascal

Total Page:16

File Type:pdf, Size:1020Kb

Algol and Pascal � Topic IV � Block-structured procedural languages Algol and Pascal References: � Chapters 5 and 7, of Concepts in programming languages by J. C. Mitchell. CUP, 2003. � Chapters 10(§2) and 11(§1)of Programming languag es: Design and implementation(3 RD EDITION) by T.W. P !tt !"# M. $.%el&o'it(. P entice )all, *+++. � 74 Chapter 5of Programming languag es: Concepts & constructs by R.,ethi (2ND EDITION). -#di.on-Wesley, *++6. Chapter 7of Understanding program ming languages by M 0en-- i. Wiley, *++/. � 75 �� �� ��Parameters�� The e ! e t'o conce1t. that 23.t be cle! ly #isti"4ui.he#5 � - formal parameter i. ! #ecl! ation that !11ea . i" the #ecla !tio" of the .3bp o4 am. (The comput!tion in the body of the .ub1ro4 !2 i. ' itten in ter2. of fo mal 1! !mete ..) � -" actual parameter i. ! 6al3e that the c!lli"4 1 o4 !2 .en#. to the .3bp o4 !m. Example: Named 1! !mete !..ociatio".. No 2!lly the !ct3!l 1! !2eter. in ! .3b1 o4 !2 c!ll ! e 73.t listed !"# the matchi"4 'ith the formal 1! !meter. is do"e by � 76 1ositio"5 procedure Proc(First: Integer; Second: Character); Proc(24,’h’); I" -#! it i. 1os.ible to 3.e named association i" the c!ll: Proc(Second => ’h’, First => 24); ? What about in ML9 Can it be .i2ul!ted9 Thi. i. commo"ly 3.ed togethe 'ith default parameters5 procedure Proc(First: Integer := 0; Second: Character := ’*’); Proc(Second => ’o’); � 77 �� �� ��Parameter passing�� The '!y that !ct3al 1! !2eter. ! e e6al3ate# !"# 1!..e# to 1 oced3re. #epe"#. on the 1 o4 !2min4 la"43!ge !"# the &in# of parameter-passing mechanisms it 3.e.. The 2!i" #istinction bet'ee" #iffe ent 1! ameter-1!..in4 2echani.2. ! e: � the time that the act3!l 1! !mete is e6!l3!ted, !"# � the location 3.e# to .to e the 1! amete 6!lue. NB: The location of ! 6! i!ble (or e:1 e..ion) i. called it. L-value, !"# the value .to e# i" this loc!tio" i. c!lled the R-value of the 6! i!ble (o e:1 e..ion). � 78 �� �� ��Parameter passing�� Pass/Call-by-value � I" pass-by-value, the act3!l 1! amete i. e6!l3!ted. The 6!lue of the act3!l 1! !2ete i. then .to ed in ! "e' locatio" !lloc!te# fo the f3nctio" 1! amete . � Under call-by-value, ! fo 2!l 1! amete co e.1on#. to the 6!lue of !" act3!l 1! amete . That is, the fo 2!l of! 1 oced3reP t!&es o" the 6alue of t he !ct3al 1! !2eter. The ide! i. to e6!lu!te ! c!ll P(E) !. follo'.5 := !; e:ec3te the body of 1 oced3 eP; ifP i. ! f3nctio", et3 " ! e.3lt. � 79 �� �� ��Parameter passing�� Pass/Call-by-reference � I" pass-by-reference, the act3!l 1! amete 23.t ha6e !" 8-6al3e. The 8-6!lue of the !ct3al 1! !2eter i. the" bou"# to the for2!l 1! !2eter. � Under call-by-reference, ! fo 2!l 1! amete becomes ! .y"ony2 fo the loc!tio" of !" !ct3al 1! !2ete . -" !ct3!l efe ence 1! amete 23.t ha6e ! location. � 80 Example: program "ain; #egin $unction f( %ar x: integer; &: integer): integer; #egin := 2; & := 1; i$ = ' then $ := ' else $:= 2 end; %ar z: integer; ) := 0; *riteln( f(z,z) ) end � 81 The #iffere"ce bet'een call-by-6!lue !"# call-by- eference is i21ort!nt to the 1 o4 !2me i" .e6e al '!y.5 � Side effects -..i4"2e"t. in.i#e the f3"ctio" body 2!y h!6e different effect. 3"de 1!..-by-6!lue !"# 1!..-by- efe ence. � !liasin" -lia.i"4 occ3 . whe" t'o "!2e. efe to the .ame object or locatio". -lia.i"4 2!y occ3 whe" t'o 1! amete . ! e 1!..ed by efe ence o one 1! !2ete 1!..e# by efe ence h!. the .ame location !. the 4lobal 6! i!ble of the 1 oced3 e. � 82 Ef#cienc$ P!..-by-6al3e 2!y be inef<cie"t fo l! ge .t uct3 e. if the 6alue of the la ge .t uct3 e 23.t be copie#. P!..-by- efe e"ce 2!ybe les. ef<cie"t th!" 1!..-by-6!lue fo .mall .t uct3 e. that 'oul# <t di ectly on .t!c&, bec!3.e 'hen 1! amete . ! e 1!..ed by efere"ce 'e 23.t #e efe ence ! 1ointe to 4et thei 6al3e. � 83 �� �� ��Parameter passing�� Pass/Call-by-value/result Call-by-value/result i. al.o &no'" !. copy-in/copy-out bec!3.e the act3!l. ! e i"itially copied i"to the fo 2!l. !"# the formal. ! e e6e"t3!lly copied bac& out to the !ct3!ls. -ct3!ls that #o "ot h!6e loc!tio". ! e 1!..e# by 6al3e. -ct3!ls with loc!tio". ! e t eate# !. follo'.5 1. Copy-in phase. Both the 6alue. !"# the loc!tio". of the !ct3al 1! !2eter. ! e co21uted. The 6!lues !re !..ig"ed to the co es1o"#in4 formal., !. i" c!ll-by-6!lue, !"# the loc!tio". ! e .!6ed fo the co1y-out 1h!.e. 2. Copy-out phase. -fte the 1 oce#3 e body is e:ecuted, the <"!l 6!lue. of the fo mal. ! e copied bac& out to the locatio". compute# i" the copy-i" 1h!.e. � 84 Examples: � - 1! !2eter i" P!.cal i. "ormally 1!..e# by 6!lue. It i. 1!..e# by efe ence, ho'e6e , if the &ey'or# %ar !11ea . befo e the decla !tio" of the fo mal 1! !2eter. procedure proc(in: Integer; %ar out: +ea(); � The only 1! !mete -1!..i"4 2etho# i" C i. c!ll-by-6!lue; ho'e6e , the effect of c!ll-by- efe ence c!" be !chie6e# 3.i"4 pointe .. I" C+= t 3e call-by- efere"ce is !6ailable using reference parameters. � 85 -#! .31po t. three &in#. of 1! !mete .5 1. in 1! !mete ., cor e.1o"#in4 to 6!lue 1! amete .; 2. out 1! !mete ., co e.po"#in4 to 73.t the co1y-o3t ph!.e of call-by-6alue> e.3lt; !"# 3. in out 1! !mete ., co e.po"#in4 to eithe efe ence 1! !mete . o 6alue> e.ult 1! !2eter., at the #isc etio" of the imple2ent!tio". � 86 �� �� ��Parameter passing�� Pass/Call-by-name The -lgol /0 epo t #esc ibe. call-by-name !. follo'.5 1. -ct3!l 1! !2ete . !re te:t3!lly .3bstit3ted fo the formal.. Pos.ible con?ict. bet'ee" "ames in the act3!l. !"# local "ames in the 1 oced3 e body ! e !6oide# by e"amin4 the local. i" the body. 2. The es3lti"4 1 oce#3 e body is .3bstit3ted fo the c!ll. Pos.ible con?ict. bet'ee" "onlocal. i" the 1 oced3 e body !"# local. !t the 1oint of call ! e !6oide# by e"!2i"4 the local. !t the 1oint of call. � 87 Block structure I" ! block-structured language, each 1 og !2 o .ub1 o4 !2 i. o 4!ni.e# !. ! .et of ne.te# bloc&.. - block i. ! e4io" of 1 o4 !2 te:t, identi<e# by begi" !"# e"# 2! &e ., th!t 2!y contai" #ecl! ation. loc!l to this egion. n-line !or unnamed) blocks ! e 3.eful fo est icti"4 the .cope of 6! i!ble. by #ecl! in4 the2 only 'he" "eeded, i".tea# of at the begi""i"4 of ! .3bp og am. The t e"# i" 1 og !2mi"4 is to ed3ce the .i(e of .3bp o4 !2., .o the 3.e of 3""amed bloc&. i. les. 3.eful th!" it 3.e# to be. � 88 #ested procedures c!" be 3.ed to 4 ou1 .tate2e"t. th!t ! e e:ec3ted at 2o e th!" one loc!tion 'ithi" ! .ub1 o4 !2, b3t efer to loc!l 6! iables !"# .o c!"not be e:te "!l to the .3bp og !2. 0efo e mo#3le. !"# object-oriented 1 o4 !22i"4 'ere int od3ced, "ested 1 oced3re. 'e e 3.e# to .t 3ct3 e l! 4e 1 og !2.. 0loc& .t uct3 e '!. < .t #e<"ed in -lgol. P!.cal contai". "ested 1 oced3 e. but "ot in-line bloc&.; C contai". in-line bloc&. but "ot ne.te# 1 oce#3 es; -#! .31po t. both. $lock-structured languages ! e cha !cte i.e# by the follo'i"4 1 ope tie.5 � Ne' 6! iables 2!y be #ecla e# !t 6! io3. poi"t. in ! 1 og !2. � 89 E!ch #ecl! ation is 6i.ible within ! certai" e4ion of 1 og !2 te:t, c!lle# ! bloc&. Whe" ! 1 o4 !2 begi". e:ecuti"4 the in.t uction. containe# i" ! bloc& at 3" time, memory is !lloc!ted for the 6! iable. #ecl! e# i" that bloc&. Whe" ! 1 o4 !2 e:it. ! bloc&, .ome o all of the 2e2o y !lloc!ted to 6! iable. #ecl! e# i" th!t bloc& 'ill be #ealloc!ted. -" i#entifie that is not #elc! e# i" the c3 ent bloc& i. con.i#ere# 4lobal to the bloc& !"# efe . to the e"tity 'ith thi. "!2e th!t i. #ecla e# i" the clo.e.t enclo.i"4 bloc&. � 90 Algol had a major effect on language design The -lgol-li&e 1 og !22i"4 l!"43!4es e6ol6e# i" 1! !llel 'ith the 8I,P family of l!"43!ge., begi"ni"4 'ith -lgol @A !"# -lgol /0 i" the late *+@0s.
Recommended publications
  • 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]
  • 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]
  • BASIC Session
    BASIC Session Chairman: Thomas Cheatham Speaker: Thomas E. Kurtz PAPER: BASIC Thomas E. Kurtz Darthmouth College 1. Background 1.1. Dartmouth College Dartmouth College is a small university dating from 1769, and dedicated "for the educa- tion and instruction of Youth of the Indian Tribes in this Land in reading, writing and all parts of learning . and also of English Youth and any others" (Wheelock, 1769). The undergraduate student body (now nearly 4000) outnumbers all graduate students by more than 5 to 1, and majors predominantly in the Social Sciences and the Humanities (over 75%). In 1940 a milestone event, not well remembered until recently (Loveday, 1977), took place at Dartmouth. Dr. George Stibitz of the Bell Telephone Laboratories demonstrated publicly for the first time, at the annual meeting of the American Mathematical Society, the remote use of a computer over a communications line. The computer was a relay cal- culator designed to carry out arithmetic on complex numbers. The terminal was a Model 26 Teletype. Another milestone event occurred in the summer of 1956 when John McCarthy orga- nized at Dartmouth a summer research project on "artificial intelligence" (the first known use of this phrase). The computer scientists attending decided a new language was needed; thus was born LISP. [See the paper by McCarthy, pp. 173-185 in this volume. Ed.] 1.2. Dartmouth Comes to Computing After several brief encounters, Dartmouth's liaison with computing became permanent and continuing in 1956 through the New England Regional Computer Center at MIT, HISTORY OF PROGRAMMING LANGUAGES 515 Copyright © 1981 by the Association for Computing Machinery, Inc.
    [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]
  • Evolution of the Major Programming Languages
    COS 301 Programming Languages Evolution of the Major Programming Languages UMaine School of Computing and Information Science COS 301 - 2018 Topics Zuse’s Plankalkül Minimal Hardware Programming: Pseudocodes The IBM 704 and Fortran Functional Programming: LISP ALGOL 60 COBOL BASIC PL/I APL and SNOBOL SIMULA 67 Orthogonal Design: ALGOL 68 UMaine School of Computing and Information Science COS 301 - 2018 Topics (continued) Some Early Descendants of the ALGOLs Prolog Ada Object-Oriented Programming: Smalltalk Combining Imperative and Object-Oriented Features: C++ Imperative-Based Object-Oriented Language: Java Scripting Languages A C-Based Language for the New Millennium: C# Markup/Programming Hybrid Languages UMaine School of Computing and Information Science COS 301 - 2018 Genealogy of Common Languages UMaine School of Computing and Information Science COS 301 - 2018 Alternate View UMaine School of Computing and Information Science COS 301 - 2018 Zuse’s Plankalkül • Designed in 1945 • For computers based on electromechanical relays • Not published until 1972, implemented in 2000 [Rojas et al.] • Advanced data structures: – Two’s complement integers, floating point with hidden bit, arrays, records – Basic data type: arrays, tuples of arrays • Included algorithms for playing chess • Odd: 2D language • Functions, but no recursion • Loops (“while”) and guarded conditionals [Dijkstra, 1975] UMaine School of Computing and Information Science COS 301 - 2018 Plankalkül Syntax • 3 lines for a statement: – Operation – Subscripts – Types • An assignment
    [Show full text]
  • ALGOL 60 Programming on the Decsystem 10.Pdf
    La Trobe University DEPARTMENT OF MATHEMATICS ALGOL 60 Programming on the DECSystem 10 David Woodhouse Revised, August 1975 MELBOURNE, AUSTRALIA ALGOL 60 Programming on the DECSystem 10 David Woodhouse Revised, August 1975 CE) David Woodhouse National Library of Australia card number and ISBN. ISBN 0 85816 066 8 INTRODUCTION This text is intended as a complete primer on ALGOL 60 programming. It refers specifically to Version 4 of the DECSystem 10 implementation. However, it avoids idiosyncracies as far as possible, and so should be useful in learning the language on other machines. The few features in the DEC ALGOL manual which are not mentioned here should not be needed until the student is sufficiently advanced to be using this text for reference only. Exercises at the end of each chapter illustrate the concepts introduced therein, and full solutions are given. I should like to thank Mrs. K. Martin and Mrs. M. Wallis for their patient and careful typing. D. Woodhouse, February, 1975. CONTENTS Chapter 1 : High-level languages 1 Chapter 2: Languagt! struct.ure c.f ALGOL 6n 3 Chapter 3: Statemp.nts: the se'1tences {'\f the language 11 Chapter 4: 3tandard functions 19 Chapter 5: Input an~ Outp~t 21 Chapter 6: l>rray~ 31 Chapter 7 : For ane! ~hil~ statements 34 Chapter 8: Blocks anr! ',: ock sc rll,~ turr. 38 Chapter 9: PrOCe(:l1-:-~S 42 Chapter 10: Strin2 vp·jaLlps 60 Chapter 11: Own v~rj;lI'.i..es clOd s~itc.hef, 64 Chapter 12: Running ~nd ,;ebllggi"1g 67 Bibliography 70 Solutions to Exercises 71 Appendix 1 : Backus NOlUlaj F\:q'm 86 Appendix 2 : ALGuL-like languages 88 Appenclix 3.
    [Show full text]
  • Die Gruncllehren Cler Mathematischen Wissenschaften
    Die Gruncllehren cler mathematischen Wissenschaften in Einzeldarstellungen mit besonderer Beriicksichtigung der Anwendungsgebiete Band 135 Herausgegeben von J. L. Doob . E. Heinz· F. Hirzebruch . E. Hopf . H. Hopf W. Maak . S. Mac Lane • W. Magnus. D. Mumford M. M. Postnikov . F. K. Schmidt· D. S. Scott· K. Stein Geschiiftsfiihrende Herausgeber B. Eckmann und B. L. van der Waerden Handbook for Automatic Computation Edited by F. L. Bauer· A. S. Householder· F. W. J. Olver H. Rutishauser . K. Samelson· E. Stiefel Volume I . Part a Heinz Rutishauser Description of ALGOL 60 Springer-Verlag New York Inc. 1967 Prof. Dr. H. Rutishauser Eidgenossische Technische Hochschule Zurich Geschaftsfuhrende Herausgeber: Prof. Dr. B. Eckmann Eidgenossische Tecbnische Hocbscbule Zurich Prof. Dr. B. L. van der Waerden Matbematisches Institut der Universitat ZUrich Aile Rechte, insbesondere das der Obersetzung in fremde Spracben, vorbebalten Ohne ausdriickliche Genehmigung des Verlages ist es auch nicht gestattet, dieses Buch oder Teile daraus auf photomechaniscbem Wege (Photokopie, Mikrokopie) oder auf andere Art zu vervielfaltigen ISBN-13: 978-3-642-86936-5 e-ISBN-13: 978-3-642-86934-1 DOl: 10.1007/978-3-642-86934-1 © by Springer-Verlag Berlin· Heidelberg 1967 Softcover reprint of the hardcover 1st edition 1%7 Library of Congress Catalog Card Number 67-13537 Titel-Nr. 5l1B Preface Automatic computing has undergone drastic changes since the pioneering days of the early Fifties, one of the most obvious being that today the majority of computer programs are no longer written in machine code but in some programming language like FORTRAN or ALGOL. However, as desirable as the time-saving achieved in this way may be, still a high proportion of the preparatory work must be attributed to activities such as error estimates, stability investigations and the like, and for these no programming aid whatsoever can be of help.
    [Show full text]
  • Trends in Programming Language Design Professor Alfred V
    Trends in Programming Language Design Professor Alfred V. Aho Department of Computer Science Overview Columbia University – The most influential languages Trends in – Trends in language design Programming Language Design – Design issues in the AWK programming language 16 October 2002 1 Al Aho 2 Al Aho The Most Influential Programming The Most Influential Programming Languages of All Time Languages of All Time • Assembler • Fortran – 1950s – 1950s – Step up from machine language – Created by a team led by John Backus of IBM – Available on virtually every machine – Initial focus: scientific computing – Influenced FI, FII, FIV, F77, F90, HPF, F95 3 Al Aho 4 Al Aho The Most Influential Programming The Most Influential Programming Languages of All Time Languages of All Time • Cobol • Lisp – 1950s – 1950s – Created by U.S. DOD – Created by John McCarthy – Grace Murray Hopper influential in initial – Initial focus: symbol processing development – Influenced Scheme, Common Lisp, MacLisp, – Initial focus: business data processing Interlisp – Influenced C68, C74, C85, PL/1 – Dominant language for programming AI applications – The world’s most popular programming language for many years until the early 1990s 5 Al Aho 6 Al Aho The Most Influential Programming The Most Influential Programming Languages of All Time Languages of All Time • Algol 60 • Basic – 1960 – Early 1960s – Algol 60 Report introduced BNF as a notation for – Created by John Kemeny and Thomaz Kurtz of describing the syntax of a language Dartmouth – Initial focus: general purpose programming – Initial focus: a simple, easy-to-use imperative – First block-structured language language – Influenced Algol 68, Pascal, Modula, Modula 2, – Influenced dozens of dialects, most notably Visual Oberon, Modula 3 Basic, probably the world’s most popular – Revised Algol 60 Report: P.
    [Show full text]
  • A View of the Origins and Development of Prolog
    ARTICLES A VIEW OF THE ORIGINS AND DEVELOPMENT OF PROLOG Dealing with failure is easy: Work hard to improve. Success is also easy to handle: You’ve solved the wrong problem. Work hard to improve. (UNIX “fortune” message aptly describing Prolog’s sequential search mechanism in finding all solutions to ,a query) JACQUES COHEN The birth of logic programming can be viewed as the tives of the significant work done in the described confluence of two different research endeavors: one in areas. This review contrasts and complements these artificial or natural language processing, and the other two references by providing the background and moti- in automatic theorem proving. It is fair to say that both vation that led to the development of Prolog as a pro- these endeavors contributed to the genesis of Prolog. gramming language. Alain Colmerauer’s contribution stemmed mainly from The underlying thesis is that even seemingly abstract his interest in language processing, whereas Robert Ko- and original computer languages are discovered rather walski’s originated in his expertise in logic and theorem than invented. This by no means diminishes t:he formi- proving. (See [26] and the following article.) dable feat involved in discovering a language. It is This paper explores the origins of Prolog based on tempting to paraphrase the path to discovery in terms views rising mainly from the language processing per- of Prolog’s own search mechanism: One has to combine spective. With this intent we first describe the related the foresight needed to avoid blind alleys with the aes- research efforts and their significant computer litera- thetic sense required to achieve the simplest and most ture in the mid-1960s.
    [Show full text]
  • Cs 98 Algol W Implementat Ion by H. Bauer S. Becker S
    CS 98 ALGOL W IMPLEMENTAT ION BY H. BAUER S. BECKER S. GRAHAM TECHNICAL REPORT NO. CS 98 MAY 20, 1968 COMPUTER SC IENCE DEPARTMENT School of Humanities and Sciences STANFORD UNIVERS llTY ALGOL W IMPLEMENTATION* -- H, Bauer S. Becker S. Graham * This research is supported in part by the National Science Foundation under grants GP-4053 and ~~-6844. -ALGOL -W IMPLEMENTATION Table -.of Contents ,, 1, Introduction . ..~.........*0.~.**.e.....*.....".....* XI. General Organization . ..os.*..e.~*....~****.*..*.. 3 lX1. Overall Design . ..*.0~....~..~e~eo~o.e...e.....*~~.... 4 A. Principal Design Considerations . ..*......** 4 B. Run-Time Program and Data Segmentation ., ,,,... 6 C. Pass One . ..~D..O......~e~~.*~.*~.....~.. 7 D. Pass Two . ..*..eOC~O.4....*~~..~...~..~~....~ 8 1. Description of Principles and -=. Main Tasks .*0*.*.......0~,00*..*..* 8 2. Parsing Algorithm . ...*......**.* 8 3* Error Recovery .0....~..~.~.~.,~,~~~, 9 4. Register Analysis . ..*.......*.... 11 L- 5* Tables *.....@.,..*......e..*.*.y...* 13 6. Output ,.......*..*0..00..0*~~..~... 13 E. Pass Three . ..0......*....e...e..e.e........*, 16 L l-v. Compiler Details . ..~..~~~...~~~~.~~.....~..~... 17 A. Run-Time Organization ..~*0**~..*~...~...*~..., 17 1. Program and Data Segmentation ,,.,., 17 2. Addressing Conventions . ..*.9..*..** 20 30 Block Marks and Procedure Marks ,.., 20 4. Array Indexing Conventions . ..I.# 22 5. Base Address Table and Lirikage to System Routines . ..****..o....*.. 23 6. Special Constants and Error Codes ,. 24 Register Usage ..OI.OI.O,,..O..L,..~ 27 ;3** Record Allocation and Storage Reclamation .0.0.~.~*0*~0..~~~.**, 27 B. Pass We r....oc.o....o....o..~.*..~*.,.,.....* 33 1. Table Formats Internal to Pass One . ..0...*ee..o...Q....*.~.* 3c 2. The Output String Representing an ALGOL W Program l .
    [Show full text]
  • 50 Years of Pascal Niklaus Wirth the Programming Language Pascal Has Won World-Wide Recognition
    50 Years of Pascal Niklaus Wirth The programming language Pascal has won world-wide recognition. In celebration of its 50th birthday I shall remark briefly today about its origin, spread, and further development. Background In the early 1960's, the languages Fortran (John Backus, IBM) for scientific, and Cobol (Jean Sammet, IBM and DoD) for commercial applications dominated. Programs were written on paper, then punched on cards, and one waited for a day for the results. Programming languages were recognized as essential aids and accelerators of the hard process of programming. In 1960, an international committee published the language Algol 60. It was the first time that a language was defined by concisely formulated constructs and by a precise, formal syntax. Already two years later it was recognized that a few corrections and improvements were needed. Mainly, however, the range of applications should be widened, because Algol 60 was intended for scientific calculations (numerical mathematics) only. Under the auspices of IFIP a Working Group (WG 2.1) was established to tackle this project. The group consisted of about 40 members with almost the same number of opinions and views about what a successor of Algol should look like. There ensued many discussions, and on occasions the debates ended even violently. Early in 1964 I became a member, and soon was requested to prepare a concrete proposal. Two factions had developed in the committee. One of them aimed at a second, after Algol 60, milestone, a language with radically new, untested concepts and pervasive flexibility. The other faction remained more modest and focused on realistic improvements of known concepts.
    [Show full text]