Software Languages

5,861
-1

Published on

This introduction lecture sets the scene for the course. We introduce the notions of software languages and language software from a bigger, interdisciplinary picture.

We start with a linguistic discussion of language, its properties, and the study of language in philosophy and linguistics. We then investigate natural languages, controlled languages, and artificial languages to emphasise the human ability to control and construct languages. At the end of the first part of the lecture, we arrive at the notion of software languages as means to communicate software between people.

In the second part of the lecture, we extend the notion of software languages as means to realise processes on machines. We give an overview of language software, starting from interpreters and compilers. We then introduce various language processors as basic building blocks of compilers. We continue with a comparison of traditional compilers and modern compilers in IDEs. Finally, we introduce traditional compiler compilers and modern language workbenches as tools to construct compilers.

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

No Downloads
Views
Total Views
5,861
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
354
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • Who printed the slides? Who took it with her?\n\ncontent appreciated (for exams) but boring during lectures\n\nslides in this course: some content much content by speaking\n\nprint out b/w versionmake comments\n
  • strange term\nWho heard of it already?\ncomputer language? programming language?\n
  • not a language but language\n
  • \n
  • old definition, 1921\n\nread it line by line\n
  • old definition, 1921\n\nread it line by line\n
  • old definition, 1921\n\nread it line by line\n
  • old definition, 1921\n\nread it line by line\n
  • old definition, 1921\n\nread it line by line\n
  • old definition, 1921\n\nread it line by line\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • no relation between sign and meaning\nno arbitrary composition but systematic\nsay what never was said\nwalking = instinctive\nsocial agreement\nbecause of arbitrariness\n
  • talk about languagetalk about a language\n\nby using a language\n
  • lexicology: vocabulary in the lexicon \nmorphology: how to build words from parts\nsyntax: how to build sentences from words\n\napplied linguistics: language in every day life, language planning, translation, 2nd lang acquisition\nneurolinguistics: neural mechanisms in brain comprehension, production, acquisition\n
  • lexicology: vocabulary in the lexicon \nmorphology: how to build words from parts\nsyntax: how to build sentences from words\n\napplied linguistics: language in every day life, language planning, translation, 2nd lang acquisition\nneurolinguistics: neural mechanisms in brain comprehension, production, acquisition\n
  • lexicology: vocabulary in the lexicon \nmorphology: how to build words from parts\nsyntax: how to build sentences from words\n\napplied linguistics: language in every day life, language planning, translation, 2nd lang acquisition\nneurolinguistics: neural mechanisms in brain comprehension, production, acquisition\n
  • lexicology: vocabulary in the lexicon \nmorphology: how to build words from parts\nsyntax: how to build sentences from words\n\napplied linguistics: language in every day life, language planning, translation, 2nd lang acquisition\nneurolinguistics: neural mechanisms in brain comprehension, production, acquisition\n
  • \n
  • hard to say what is a language (and not a dialect)\n
  • speakers, not writers\n\ntower reference to misunderstanding\n
  • avoid misunderstandings\nstep 1: language control, planning\nstep 2: artificial languages \n
  • avoid misunderstandings\nstep 1: language control, planning\nstep 2: artificial languages \n
  • avoid misunderstandings\nstep 1: language control, planning\nstep 2: artificial languages \n
  • avoid misunderstandings\nstep 1: language control, planning\nstep 2: artificial languages \n
  • avoid misunderstandings\nstep 1: language control, planning\nstep 2: artificial languages \n
  • made for human communication: just another artificial language?\n\nestablish this stated process\nestablish it by the help of machines\n\n
  • made for human communication: just another artificial language?\n\nestablish this stated process\nestablish it by the help of machines\n\n
  • not only ALGOL: many other languages in SE\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • one example language\n\nused during the lecture to explain tools\n\nconcepts: expressions, functions\n
  • another example language\n\nused during the lab\n\nvery restricted subset of Java\n
  • how fit compilers into the story?\n\nwhat do we need them for?\n
  • remember the second one\n\ncompilers help\n\n\n
  • replace human by artificial language\nhelps for communicating algorithms, ideas, designs\n\nbut still no stated process on machine\ncompiler translates\nuse the machine to establish the process on the machine\n
  • replace human by artificial language\nhelps for communicating algorithms, ideas, designs\n\nbut still no stated process on machine\ncompiler translates\nuse the machine to establish the process on the machine\n
  • replace human by artificial language\nhelps for communicating algorithms, ideas, designs\n\nbut still no stated process on machine\ncompiler translates\nuse the machine to establish the process on the machine\n
  • replace human by artificial language\nhelps for communicating algorithms, ideas, designs\n\nbut still no stated process on machine\ncompiler translates\nuse the machine to establish the process on the machine\n
  • replace human by artificial language\nhelps for communicating algorithms, ideas, designs\n\nbut still no stated process on machine\ncompiler translates\nuse the machine to establish the process on the machine\n
  • replace human by artificial language\nhelps for communicating algorithms, ideas, designs\n\nbut still no stated process on machine\ncompiler translates\nuse the machine to establish the process on the machine\n
  • console interaction\n
  • console interaction\n
  • console interaction\n
  • mysterious AST: internal representation\n
  • mysterious AST: internal representation\n
  • mysterious AST: internal representation\n
  • mysterious AST: internal representation\n
  • mysterious AST: internal representation\n
  • mysterious AST: internal representation\n
  • demo Tiger compiler\n
  • \n
  • feedback loop\n
  • feedback loop\n
  • feedback loop\n
  • feedback loop\n
  • feedback loop\n
  • many language processors\n\nbuild larger language processors from smaller components\n\ntraditional compiler: (scanner +) parser + checker + code generator\n
  • another dimension of term software language\n\nlanguage processors are software\n\nlanguage processors define language\n\nwhat’s accepted by a compiler, is a valid program\n
  • \n
  • how can we build such pieces of software\n\nsomehow special\n
  • software languages to implement software languages\n\nsoftware languages to define software languages\n
  • meta-tooling\n
  • meta-tooling\n
  • meta-tooling\n
  • \n
  • meta-tooling\n
  • \n
  • \n
  • \n
  • \n
  • enrol at blackboard\n\notherwise: no assignments, no grades\n\nassignments are individual\n
  • give the chance to share\n\nmake an appointment\n
  • untraditional\n\nmake you fit for the lab\n
  • \n
  • book alone won’t help\n\nread scientific papers\n\nsee other slides, share\n
  • round-up on every lecture\n\nwhat to take with you\n\ncheck yourself, pre- and post-paration\n
  • \n
  • \n
  • \n
  • \n
  • something just interesting\n\nsomething you should read to manage the lab/course\n
  • something just interesting\n\nsomething you should read to manage the lab/course\n
  • something just interesting\n\nsomething you should read to manage the lab/course\n
  • warning: next lecture theory\n\nget used to Eclipse and MiniJava anyway\n
  • round-up on every lecture\n\nwhat to take with you\n\ncheck yourself, pre- and post-paration\n
  • \n
  • \n
  • \n
  • Software Languages

    1. 1. IN4303 2015/16 Compiler Construction Software Languages language - languages - software Guido Wachsmuth
    2. 2. Software Languages 2
    3. 3. Software Languages 3 language definition properties study languages natural controlled artificial software language software language processors compilers compiler construction
    4. 4. Software Languages 4 language definition
    5. 5. Software Languages 5 Language is the source of misunderstandings. Antoine de Saint-Exupéry: Le Petit Prince.
    6. 6. Software Languages 6 Language is a purely human and non-instinctive method of communicating ideas, emotions, and desires by means of a system of voluntarily produced symbols. Edward Sapir: Language. An Introduction to the Study of Speech.
    7. 7. Software Languages 7 Language is a method of communicating by means of symbols. Edward Sapir: Language. An Introduction to the Study of Speech.
    8. 8. Software Languages 8 Language is a purely human and non-instinctive method of communicating by means of a system of voluntarily produced symbols. Edward Sapir: Language. An Introduction to the Study of Speech.
    9. 9. Software Languages 9 Language is a purely human and non-instinctive method of communicating ideas, emotions, and desires by means of a system of voluntarily produced symbols. Edward Sapir: Language. An Introduction to the Study of Speech.
    10. 10. Software Languages 10 language properties
    11. 11. Software Languages 11 non-instinctive
    12. 12. Software Languages 12 symbolic
    13. 13. Software Languages 13 arbitrary
    14. 14. Software Languages 14 systematic
    15. 15. Software Languages 15 productive
    16. 16. Software Languages 16 conventional
    17. 17. Software Languages 17 modifiable
    18. 18. Software Languages 18 language study
    19. 19. Software Languages 19 meta language facility
    20. 20. Software Languages 20 Philosophy Linguistics lexicology grammar morphology syntax phonology semantics Interdisciplinary applied linguistics computational linguistics historical linguistics neurolinguistics psycholinguistics sociolinguistics
    21. 21. Software Languages 21 natural languages
    22. 22. Software Languages 22 7106 known living languages - 6.3 billion speakers Ethnologue - Languages of the World.
    23. 23. Software Languages 23 A language is a dialect with a navy and an army. Max Weinreich: YVO Bletter 25(1).
    24. 24. Software Languages 24 controlled languages
    25. 25. Software Languages 25 meta language facility
    26. 26. Software Languages 26 Classical Sanskrit
    27. 27. Software Languages 27 German
    28. 28. Software Languages 28 ASD Simplified Technical English
    29. 29. Software Languages 29 artificial languages
    30. 30. Software Languages 30
    31. 31. Software Languages 31
    32. 32. Software Languages 32 Klingon
    33. 33. Software Languages 33 Na'vi
    34. 34. Software Languages 34 software languages
    35. 35. Software Languages 35 8512 programming languages - 18.5 million developers Diarmuid Pigott: History of Programming Languages. IDC: 2014 Worldwide Software Developer and ICT-Skilled Worker Estimates.
    36. 36. Software Languages 36 languages to engineer software
    37. 37. Software Languages 37 to provide a means of communicating numerical methods and other procedures between people John W. Backus: The Syntax and Semantics of the Proposed International Algebraic Language of Zürich ACM-GAMM Conference.
    38. 38. Software Languages 38 to provide a means of communicating numerical methods and other procedures between people John W. Backus: The Syntax and Semantics of the Proposed International Algebraic Language of Zürich ACM-GAMM Conference.
    39. 39. Software Languages 39 software language natural language
    40. 40. Software Languages 40 Philosophy Linguistics lexicology grammar morphology syntax phonology semantics Interdisciplinary Computer Science syntax semantics
    41. 41. Software Languages 41 /* factorial function */ let var x := 0 function fact(n : int) : int = if n < 1 then 1 else (n * fact(n - 1)) in for i := 1 to 3 do ( x := x + fact(i); printint(x); print(" ") ) end Tiger the lecture language
    42. 42. Software Languages 42 #include <stio.h> /* factorial function */ int fac(int num) { if (num < 1) return 1; else return num * fac(num - 1); } int main() { printf(“%d! = %dn”, 10, fac(10)); return 0; } C another lecture language
    43. 43. Software Languages 43 class Main { public static void main(String[] args) { System.out.println(new Fac().fac(10)); } } class Fac { public int fac(int num) { int num_aux; if (num < 1) num_aux = 1; else num_aux = num * this.fac(num - 1); return num_aux; } } MiniJava the lab language
    44. 44. Software Languages 44 language software
    45. 45. Software Languages 45 languages to engineer software
    46. 46. Software Languages 46 pieces of software themselves
    47. 47. Software Languages 47 to provide a means for realising a stated process on a variety of machines John W. Backus: The Syntax and Semantics of the Proposed International Algebraic Language of Zürich ACM-GAMM Conference.
    48. 48. Software Languages 48 to provide a means for realising a stated process on a variety of machines John W. Backus: The Syntax and Semantics of the Proposed International Algebraic Language of Zürich ACM-GAMM Conference.
    49. 49. Software Languages 49 interpreter software language compiler software language machine language
    50. 50. Software Languages natural language natural language translator 50 compiler software language machine language
    51. 51. Software Languages 51 language software language processors
    52. 52. Software Languages 52 language processors scanners & parsers 3 * +7 213 * +7 21 3 * +7 21 Exp ExpExp Exp Exp scanner parser
    53. 53. Software Languages 53 language processors scannerless parsers 3 * +7 21 3 * +7 21 Exp ExpExp Exp Exp parser
    54. 54. Software Languages 54 language processors pretty-printers 3 * +7 21 3 * +7 21 Exp ExpExp Exp Exp pretty- printer
    55. 55. Software Languages 55 language processors type checkers 3 * +7 21 Exp ExpExp Exp Exp type checker errors
    56. 56. Software Languages 56 language processors optimisers 3 * +7 21 Exp ExpExp Exp Exp optimiser 42 Exp
    57. 57. Software Languages 57 language processors generators ldc 3 ldc 7 imul ldc 21 iadd 3 * +7 21 Exp ExpExp Exp Exp generator
    58. 58. Software Languages 58 language software compilers
    59. 59. Software Languages 59 > ls Course.java > javac -verbose Course.java [parsing started Course.java] [parsing completed 8ms] [loading java/lang/Object.class(java/lang:Object.class)] [checking university.Course] [wrote Course.class] [total 411ms] > ls Course.class Course.java traditional compilers example
    60. 60. Software Languages 60 traditional compilers architecture source code
    61. 61. Software Languages 60 traditional compilers architecture source code parse
    62. 62. Software Languages 60 traditional compilers architecture source code errors parse check
    63. 63. Software Languages 60 traditional compilers architecture source code errors parse generate check machine code
    64. 64. Software Languages 61 traditional compilers compilation by transformation backend frontend parse desugar analyse normalise generate optimise format
    65. 65. Software Languages 62 modern compilers in IDEs features
    66. 66. Software Languages 63 modern compilers in IDEs features
    67. 67. Software Languages 64 modern compilers in IDEs features
    68. 68. Software Languages 65 modern compilers in IDEs architecture source code
    69. 69. Software Languages 65 modern compilers in IDEs architecture source code parse
    70. 70. Software Languages 65 modern compilers in IDEs architecture source code parse check
    71. 71. Software Languages 65 modern compilers in IDEs architecture source code parse check
    72. 72. Software Languages 65 modern compilers in IDEs architecture source code parse generate machine code check
    73. 73. Software Languages 66 language software compiler construction
    74. 74. Software Languages 67 meta language facility
    75. 75. Software Languages 68 traditional compiler compilers manual implementation language implementation compile compiler
    76. 76. Software Languages 69 traditional compiler compilers compilation + compilation language implementation compile compiler language definition compile
    77. 77. Software Languages 70 traditional compiler compilers example syntax definition errors parse generate check parser code
    78. 78. Software Languages 71 traditional compiler compilers compilation + interpretation interpreter language definition compile language implementation
    79. 79. Software Languages 72 traditional compiler compilers example syntax definition errors parse generate check parse table generic parser
    80. 80. Software Languages 73 language workbenches architecture language definition parse generate language implementation check
    81. 81. Software Languages 74 Spoofax language workbench
    82. 82. Software Languages Stratego NaBL TS SDF3 ESV editor SPT tests 75 syntax definition concrete syntax abstract syntax static semantics name binding type system dynamic semantics translation interpretation
    83. 83. Software Languages 76 Except where otherwise noted, this work is licensed under
    84. 84. Software Languages 77 attribution slide title author license 1, 35 Programming language textbooks K.lee public domain 2 The Bigger Picture F. Delventhal CC BY 2.0 5 Rose 2 des Kleinen Prinzen Antoine Saint-Exupéry public domain 11 Dog and owner on Ballykinler Beach Jonny Green CC BY 2.0 12 Fashionable melange of English words (1) trialsanderrors public domain 13 Gift asenat29 CC BY 2.0 13 Toxic John Morgan CC BY 2.0 14 Latin Grammar Anthony Nelzin 15 Ginkgo Biloba Johann Wolfgang von Goethe public domain 16 Sub-deb slang genibee CC BY-NC 2.0 17 Wednesday Michael Fawcett CC BY-NC-SA 2.0 19, 25, 67 Thesaurus Enoch Lau CC BY-SA 3.0 22 The captured Swiftsure, Seven Oaks, Loyal George and Convertine brought through Goeree Gat Willem van de Velde the Younger public domain
    85. 85. Software Languages 78 attribution slide title author license 23 Tower of Babel Pieter Bruegel the Elder public domain 26 The Ashtadhyayi translated by Srisa Chandra Vasu public domain 27 Buchdruckerduden public domain 28 Boeing 737-300 -400 -500 Manitenance Manual Alaska Airlines Bill Abbott CC BY-SA 2.0 30 Esperanto public domain 31 Quenya Juanma Pérez Rabasco CC BY 2.0 32 Klingon Dictionary Josh Bancroft CC BY-NC 2.0 33 Overweight Na'vi HARRY NGUYEN CC BY 2.0 36, 45, 46 IBM Electronic Data Processing Machine NASA public domain 41 Tiger Bernard Landgraf CC BY-SA 3.0 42 The C Programming Language Bill Bradford CC BY 2.0 43 Italian Java book cover 49-73 PICOL icons Melih Bilgil CC BY 3.0

    ×