Life and Work of Dr. John Backus | Turing100@Persistent

1,457 views

Published on

Dr. Abhijat Vichare, Independent Consultant talks about Life and Work of Dr. John Backus ,1977 ACM Turing Award Recipien

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,457
On SlideShare
0
From Embeds
0
Number of Embeds
351
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Thanks to the [email_address]
  • The economic history – the great depression and WW2 Salient features of evolution of info proc tech
  • Life and Work of Dr. John Backus | Turing100@Persistent

    1. 1. FORTRAN, BNF, FP John Backus Turing Award 1977 For profound, influential, and lasting contributions to the design of practical highlevel programming systems, notably through his work on FORTRAN, and for seminal publication of formal procedures for the specification of programming languages. Turing Centenary Celebrations Persistent Systems Ltd. February 2013 abhijatv@gmail.com
    2. 2. Our StoryScience & Technology in the 50sHigh Level Language – HLL the ideasThe Backus-Naur-Form – BNFFortran and FP abhijatv@gmail.com
    3. 3. History: The 1950sComputer ScienceTechnology @ IBMBackus work in this talk WW 2 1930 1940 1950 1960 abhijatv@gmail.com
    4. 4. History: Computer Science Turing (1936) Grace Hart & Shannon Levin Hopper (1937) (1962) Turing (1952) Machines McCarthy Information (1958) Self hosting First Theory Compiler Post (1936) Compiler von Neumann + LISP (Lisp) Post Architecture Idea of HLL machines (1945) BNF Chomsky Fortran (1959) Eckert & (~ 1955) (1957) MauchlyTuring (1937) (1943) CFG ENIACEquivalence Proof WW 2 ALGOL 1930 1940 1950 1960 abhijatv@gmail.com
    5. 5. History: Technology @ IBM http://en.wikipedia.org/wiki/History_of_IBMType IVTabulator IBM 801 (1928) Cheque Clearing machine IBM 603 (1934) Multiplier (1946) IBM SSEC (1948) IBM 701 (1952) IBM 1401 Transistor Computer (1959) WW 2 1930 1940 1950 1960 abhijatv@gmail.com
    6. 6. History: Technology @ IBM IBM 701 IBM 704• 2048 words of 36 bits each • Full 36 bit instructions• Williams tubes memory • Magnetic core memory, 4096 36-bit words• 18 bit instructions • 4000 instructions per second (Bits: 1 Sign, 5 Opcodes, 12 Address)• 2 programmer accessible registers • 5 programmer accessible registers • Fortran and Lisp available (Lisp CAR/CDR originate here) abhijatv@gmail.com
    7. 7. Backus work: 1950-1980 Fortran BNF FP1950 1960 1970 1980 abhijatv@gmail.com
    8. 8. abhijatv@gmail.com
    9. 9. The Fortran Story abhijatv@gmail.com
    10. 10. High Level LanguagesThe idea and the 1950s technologyJohn Backus and the SpeedCode interpreterJohn Backus and FORTRAN for the IBM 704The (probable) reasons for success abhijatv@gmail.com
    11. 11. HLL: The Idea and Solution Programs should be written in a language that is close to English rather than in machine code or languages close to machine code abhijatv@gmail.com
    12. 12. Backus SpeedCode HLLInspired by difficulties on the SSEC – the Selective Sequence Electronic CalculatorFirst HLL on an IBM machineSupport floating point computation in decimalSpeedcode was an interpreter – ease of use over system resourcesUsed about 30% of system memory!Ran 10-20 times slower than machine code abhijatv@gmail.com
    13. 13. HLL: Backus and FORTRANSpeedCode experienceHardware costs override Software costsCompile to machine codeNOTE: No scanner, parser, assembler, linker, etc.Complete definition, design and implementation abhijatv@gmail.com
    14. 14. HLL: Backus and FORTRAN abhijatv@gmail.com
    15. 15. HLL: Backus and FORTRAN Source: Wikipedia abhijatv@gmail.com
    16. 16. HLL: Backus and FORTRAN abhijatv@gmail.com
    17. 17. HLL: The Idea and Solution Example Fortran Program and its CompilationC ---6-----------------------------------------------------------------|C Compute the Madelung energy. PROGRAM Madelung IMPLICIT NONEC Ref: Bagno et. al. Adv. Phys.C ---|-----------------------------------------------------------------| INTEGER*4 MaxAtm ! Max ions PARAMETER (MaxAtm = 10) REAL*8 SigmaC, SqrSigmaC, CellVol COMPLEX*16 Ionic_structure_factor REAL*8 XIon (MaxAtm), YIon (MaxAtm) REAL*8 SqDist (MaxAtm, MaxAtm, 0:(MaxL - 1))C Program start: 10 FORMAT (A50, F19.10) ! Display a STRING + DOUBLE PREC. number CALL Initialise (XIon, MaxAtm) Eii = 0.0D0 READ (5, *) nAtom READ (5, *) Ks2Max SqrSigmaC = SigmaC * SigmaC CellVol = Box_length * Box_length * Box_length DO I = 1, nAtom READ (5, *) XIon (I), YIon (I), ZIon (I), Ion_Type (I) ENDDO CALL GPERMK (IGX, IGY, IGZ) STOP END abhijatv@gmail.com
    18. 18. HLL: The Idea and Solution Example Fortran Program and its CompilationC ---6-----------------------------------------------------------------|C Compute the Madelung energy. PROGRAM Madelung IMPLICIT NONEC Ref: Bagno et. al. Adv. Phys.C ---|-----------------------------------------------------------------| INTEGER*4 MaxAtm ! Max ions PARAMETER (MaxAtm = 10) REAL*8 SigmaC, SqrSigmaC, CellVol COMPLEX*16 Ionic_structure_factor Mark REAL*8 REAL*8 XIon (MaxAtm), YIon (MaxAtm) SqDist (MaxAtm, MaxAtm, 0:(MaxL - 1)) Individual TokensC Program start: 10 FORMAT (A50, F19.10) ! Display a STRING + DOUBLE PREC. number CALL Initialise (XIon, MaxAtm) Eii = 0.0D0 READ (5, *) nAtom READ (5, *) Ks2Max SqrSigmaC = SigmaC * SigmaC CellVol = Box_length * Box_length * Box_length DO I = 1, nAtom READ (5, *) XIon (I), YIon (I), ZIon (I), Ion_Type (I) ENDDO CALL GPERMK (IGX, IGY, IGZ) STOP END abhijatv@gmail.com
    19. 19. HLL: The Idea and Solution Example Fortran Program and its CompilationC ---6-----------------------------------------------------------------|C Compute the Madelung energy. PROGRAM Madelung IMPLICIT NONEC Ref: Bagno et. al. Adv. Phys.C ---|-----------------------------------------------------------------| INTEGER*4 MaxAtm ! Max ions PARAMETER (MaxAtm = 10) Organize REAL*8 SigmaC, SqrSigmaC, CellVol COMPLEX*16 Ionic_structure_factor into REAL*8 XIon (MaxAtm), YIon (MaxAtm) “sentences” REAL*8 SqDist (MaxAtm, MaxAtm, 0:(MaxL - 1))C Program start: 10 FORMAT (A50, F19.10) ! Display a STRING + DOUBLE PREC. number Find Structure CALL Initialise (XIon, MaxAtm) Eii = 0.0D0 and READ (5, *) nAtom READ (5, *) Ks2Max Operations SqrSigmaC = SigmaC * SigmaC CellVol = Box_length * Box_length * Box_length DO I = 1, nAtom READ (5, *) XIon (I), YIon (I), ZIon (I), Ion_Type (I) ENDDO CALL GPERMK (IGX, IGY, IGZ) STOP END abhijatv@gmail.com
    20. 20. HLL: The Idea and Solution Example Fortran Program and its CompilationC ---6-----------------------------------------------------------------| Map to H/W OpsC Compute the Madelung energy. PROGRAM Madelung IMPLICIT NONE # STRUCTUREC Ref: Bagno et. al. Adv. Phys. # ...C ---|-----------------------------------------------------------------| # MaxAtm: 4 Bytes at 0x00AC89021 INTEGER*4 MaxAtm ! Max ions # … PARAMETER (MaxAtm = 10) # Eii: 8 bytes at 0x00C098AF4 REAL*8 SigmaC, SqrSigmaC, CellVol # ... COMPLEX*16 Ionic_structure_factor # I: 4 bytes at 0x00000001 REAL*8 XIon (MaxAtm), YIon (MaxAtm) # ... REAL*8 SqDist (MaxAtm, MaxAtm, 0:(MaxL - 1)) # # OPERATIONSC Program start: # 10 FORMAT (A50, F19.10) ! Display a STRING + DOUBLE PREC. number call Initialise movf 0x00C098AF4, 0 CALL Initialise (XIon, MaxAtm) ... Eii = 0.0D0 mov 0x00000001, 1 READ (5, *) nAtom L1: cmp 0x00000001, nAtom READ (5, *) Ks2Max je L2 SqrSigmaC = SigmaC * SigmaC # I/O Operations CellVol = Box_length * Box_length * Box_length inc 0x00000001 DO I = 1, nAtom jmp L1 READ (5, *) XIon (I), YIon (I), ZIon (I), Ion_Type (I) ENDDO L2: call GPERMK CALL GPERMK (IGX, IGY, IGZ) # ... STOP leave END abhijatv@gmail.com
    21. 21. HLL: FORTRAN Success – Why?SpeedCode: Ease of use vs. Execution speedHardware costs > Software costsIn tune with: “Computers = Number crunching”Solved a pressing problem of the users Efficient use of investment in H/WLarge user base (and hence code) was created abhijatv@gmail.com
    22. 22. The BNF Story abhijatv@gmail.com
    23. 23. Backus Naur Form (BNF)The IdeaThe HistoryBNF – an example abhijatv@gmail.com
    24. 24. abhijatv@gmail.com
    25. 25. abhijatv@gmail.com
    26. 26. Catabhijatv@gmail.com
    27. 27. िबिलीabhijatv@gmail.com
    28. 28. abhijatv@gmail.com
    29. 29. abhijatv@gmail.com
    30. 30. Why Generative Grammars? abhijatv@gmail.com
    31. 31. BNF – Generative Grammars abhijatv@gmail.com
    32. 32. BNF – Generative Grammars abhijatv@gmail.com
    33. 33. BNF – Generative Grammars The ProblemProduce “new symbols from finite symbols” → “a set of rules to how to” abhijatv@gmail.com
    34. 34. BNF – Generative Grammars The Solution Describe the structure of production BNF: Syntax to describe the structureGiven: “Set of alphabets” & “Set of punctuations”Word :: concatenation of one or more alphabetsWordSeparators :: Subset (Space, comma, …)Sentence :: One or more of Word + WordSeparatorsSentenceSeparator :: Subset (Period, Question, …)Paragraph :: One or more of Sentence + SentenceSeparator abhijatv@gmail.com
    35. 35. BNF – Some History First known description: Panini for Sanskrit BNF = PBF (CACM, 10(3), 137, 1967)(www-history.mcs.st-and.ac.uk/Biographies/Panini.html)Devised for Algol 58 by Backus and simplified for Algol 60 by Peter NaurIs NOT a “Normal” formLinguists (e.g. Bloomfield, Chomsky): formalizing languageMathematicians (Thue, Post, Turing): formal abstract rewrite systems abhijatv@gmail.com
    36. 36. Grammar – Example Example Grammar Fragment: (The C Programming Language, Appendix, K&R)translation-unit := external-declaration | translation-unit external-declarationexternal-declaration := function-definition | declarationfunction-definition := declaration-specsopt declarator declaration-listopt compound-statementdeclaration := declaration-specs init-declarator-listopt ;declaration-list := declaration | declaration-list declarationdeclaration-specs := storage-class-spec declaration-specsopt | type-spec declaration-specsopt | type-qualifier declaration-specsoptstorage-class-spec := one of [auto | register | static | extern | typedef ]type-spec := one of [void | char | short | int | long | float | double | signed | unsigned …]type-qualifier := one of [const | volatile]... abhijatv@gmail.com
    37. 37. Grammar – Example Production rule Example Grammar Fragment: (The C Programming Language, Appendix, K&R)translation-unit := external-declaration | translation-unit external-declarationexternal-declaration := function-definition | declarationfunction-definition := declaration-specsopt declarator declaration-listopt compound-statementdeclaration := declaration-specs init-declarator-listopt ;declaration-list := declaration | declaration-list declarationdeclaration-specs := storage-class-spec declaration-specsopt | type-spec declaration-specsopt | type-qualifier declaration-specsoptstorage-class-spec := one of [auto | register | static | extern | typedef ]type-spec := one of [void | char | short | int | long | float | double | signed | unsigned …]type-qualifier := one of [const | volatile]... abhijatv@gmail.com
    38. 38. Grammar – Example Production rule Example Grammar Fragment: (The C Programming Language, Appendix, K&R)translation-unit := external-declaration | translation-unit external-declarationexternal-declaration := function-definition | declarationfunction-definition := declaration-specsopt declarator declaration-listopt compound-statementdeclaration := declaration-specs init-declarator-listopt ;declaration-list := declaration | declaration-list declarationdeclaration-specs := storage-class-spec declaration-specsopt | type-spec declaration-specsopt | type-qualifier declaration-specsoptstorage-class-spec := one of [auto | register | static | extern | typedef ]type-spec := one of [void | char | short | int | long | float | double | signed | unsigned …]type-qualifier := one of [const | volatile]... Terminal abhijatv@gmail.com
    39. 39. Grammar – Example Non terminal Production rule Example Grammar Fragment: (The C Programming Language, Appendix, K&R)translation-unit := external-declaration | translation-unit external-declarationexternal-declaration := function-definition | declarationfunction-definition := declaration-specsopt declarator declaration-listopt compound-statementdeclaration := declaration-specs init-declarator-listopt ;declaration-list := declaration | declaration-list declarationdeclaration-specs := storage-class-spec declaration-specsopt | type-spec declaration-specsopt | type-qualifier declaration-specsoptstorage-class-spec := one of [auto | register | static | extern | typedef ]type-spec := one of [void | char | short | int | long | float | double | signed | unsigned …]type-qualifier := one of [const | volatile]... Terminal abhijatv@gmail.com
    40. 40. The FP Story abhijatv@gmail.com
    41. 41. Backus and FP abhijatv@gmail.com
    42. 42. Backus and FPThe problem as Backus saw itSome background to see Backus solutionThe FP language abhijatv@gmail.com
    43. 43. Backus: Why FP Scalar product programc = 0for i := 1 step 1 to n do c := c + a[i] * b[i]IP = (/ +) • (α *) • (Trans) abhijatv@gmail.com
    44. 44. Backus: Why FP Scalar product program Points to ponder Statements operate on “invisible” state according to complex rules. Not hierarchical Dynamic and Repetitivec = 0 Word-at-a-Time computation using repetition and modificationfor i := 1 step 1 to n do c := c + a[i] * b[i] Part of data (n) is in program. Hence no generality (works for vectors of length n)IP = (/ +) • (α *) • (Trans) Names its arguments, i.e. works for vectors a and b only. “Housekeeping” is scattered e.g. for i := …. Difficult to separate abhijatv@gmail.com
    45. 45. Backus: Why FP Scalar product program Execute assignment many times to gradually achieve desired result Word-at-a-time thinking = Assignment! Word-at-a-time transition rulesc = 0 von Neumann bottleneck = assignmentfor i := 1 step 1 to n do Statements: c := c + a[i] * b[i] Few useful mathematical propertiesIP = (/ +) • (α *) • (Trans) PL = % framework + % changeable parts Conventional PL: High, rigid % framework Conventional PL = High level von Neumann computer abhijatv@gmail.com
    46. 46. Backus: Why FP“In fact, conventional languages create unnecessary confusion in the way we think about programs.”– John Backus abhijatv@gmail.com
    47. 47. Models of Computation λλ Turing Turing CalculusMachines Calculus Machines Partial Partial MarkovRecursive Markov Recursive Algorithms AlgorithmsFunctions Functions abhijatv@gmail.com
    48. 48. Models of Computation λλ Turing Turing CalculusMachines Calculus Machines Partial Partial MarkovRecursive Markov Recursive Algorithms AlgorithmsFunctions Functions All are equivalent abhijatv@gmail.com
    49. 49. abhijatv@gmail.com
    50. 50. PRF: Core IdeaPRF: Partial (µ) Recursive Functions How to get the set of all computable functions? Functions = Some simple functions + Function forming operationsPRF: Set of all functions generated as prescribed abhijatv@gmail.com
    51. 51. λCalculus: Core IdeaAn algorithm requires answers to four questions:1. Who are the participants? Variable2. What is the transformation? Abstraction3. When to transform? Application4. How to transform? βReductionNote: The “where” question is not relevant! abhijatv@gmail.com
    52. 52. Backus Language Proposal: FPBuild programs by combining functions as in PRFConventional programming: value level manipulate values to eventually obtain resultBackus proposal: function level new programs from other programs & functionals abhijatv@gmail.com
    53. 53. Backus Language Proposal: FP FP programs, f, map a value to another value Functions are either primitive or built fromprogram forming operations – functionals Some primitive functions: constant functions - constant: x = x selector functions - i:<x1, …,xi, …, xn> = xi abhijatv@gmail.com
    54. 54. Backus Language Proposal: FP Some functionals: composition - f∗g:x = f:(g:x) construction - [f1,...,fn]:x = <f1:x,...,fn:x> conditional - (h => f;g) apply-to-all - αf:<x1, …, xn> = <f:x1, …, f:xn>insert-right - /f: <x>=x /f: <x1, …, xn>=f:<x1, /f:<x1, …, xn>> /f: < > = unit f abhijatv@gmail.com
    55. 55. Backus Language Proposal: FP Scalar product program Points to ponder Statements operate on “invisible” state according to complex rules. Not hierarchical Dynamic and Repetitivec = 0 Word-at-a-Time computation using repetition and modificationfor i := 1 step 1 to n do c := c + a[i] * b[i] Part of data (n) is in program. Hence no generality (works for vectors of length n)IP = (/ +) • (α *) • (Trans) Names its arguments, i.e. works for vectors a and b only.(Trans): Transpose(α *) : Apply “*” “Housekeeping” is scattered e.g. for i := …. Difficult to separate(/ +) : Insert “+” abhijatv@gmail.com
    56. 56. Backus Language Proposal: FP Scalar product program How does IP work? IP:<<1,2,3>, <6,5,4>> = (/ +) • (α *) • Trans: <<1,2,3>, <6,5,4>>c = 0 = (/ +) • (α *):for i := 1 step 1 to n do <<1,6>, <2,5>, <3,4>> c := c + a[i] * b[i] = (/ +) • <*:<1,6>, *:<2,5>, *:<3,4>>IP = (/ +) • (α *) • (Trans) = (/ +) <6,10,12> = +:<6, +:<10,12>>(Trans): Transpose = +:<6,22> = 28(α *) : Apply “*”(/ +) : Insert “+” abhijatv@gmail.com
    57. 57. Backus Language Proposal: FPc = 0for i := 1 step 1 to n do IP = (/ +) • (α *) • (Trans) c := c + a[i] * b[i] Statements operate on “invisible” state No hidden states or complex rulesaccording to complex rules. Hierarchical: Built from simpler ones Not hierarchical Static and non-repetitive: structure helps Dynamic and Repetitive understanding it; no mental execution Word-at-a-Time computation using Operates on whole conceptual unitsrepetition and modification No useless data is part of the program. Part of data (n) is in program. Hence no Hence completely general.generality (works for vectors of length n) Does not name arguments. Names its arguments, i.e. works for No extra substitution rules required.vectors a and b only. “Housekeeping” forms are minimal. “Housekeeping” is scatterede.g. for i := …. Difficult to separate abhijatv@gmail.com
    58. 58. Backus: Why FP“In fact, conventional languages create unnecessary confusion in the way we think about programs.”– John Backus abhijatv@gmail.com
    59. 59. John Backus & Computation Today Fortran Still in use – “Favourite” HPC language Looks very much like C/C++ today PBNF In active use, but usually indirectly in YACC/Bison code FP Encouraged R&D in functional programming von Neumann bottleneck? We still suffer from it abhijatv@gmail.com
    60. 60. Thank youQuestions abhijatv@gmail.com

    ×