Academia.eduAcademia.edu

Outline

A compiler generator for semantic grammars

1981

Abstract

For the past three years, John Hennessy has assisted my study of programming languages. He suggested that I investigate semantics, and later noted that the compiler generator might be feasible. As the research progressed, John helped me to focus on the most important problems. He made extensive comments on numerous drafts of this thesis and other papers.

Key takeaways
sparkles

AI

  1. The thesis introduces a compiler generator that simplifies language design and implementation.
  2. Semantic grammars effectively combine syntax and semantics, reducing errors and ambiguities in language definitions.
  3. The generator has produced compilers for languages like Pascal and Fortran, demonstrating transportability.
  4. Static and dynamic semantics are critical for efficient compilation and error reporting in programming languages.
  5. The compiler generator enhances debugging and facilitates formal definitions of programming languages.

References (71)

  1. Alfred V. Aho, Jeffrey 0. Ullman. Principles of CompilerDesign.
  2. Addison-Wesley, 1978. " j American National Standards Institute. Clarification of Fortran Standards: Second Report. Communications of the ACM , October, 1971.
  3. American Standards Association. Fortran vs. Basic Fortran. Communications of the ACM , October, 1964.
  4. F. L. Bauer, J. Eickel (editors).
  5. Compiler Construction: An Advanced Course.
  6. Gregor V. Bochmann. Semantic Evaluation from Left to Right. Communications of the ACM :55 -62, February, 1976.
  7. W. H. Burge. Recursive Programming Techniques.
  8. Addison-Wesley, 1976.
  9. -J. Dahl, E. W. Dijkstra, C. A. R. Hoare. Structured Programming. Academic Press, 1972. Department of Defense.
  10. STEELMAN Requirements for High Order Computer Programming Languages 1978. James E. Donahue. Complementary Definitions of Programming Language Semantics. Springer-Verlag , 1976.
  11. J. H. Eriksen, B. B. Jensen, 6.6. Kristensen, 0. L. Madsen. The BOBS-System.
  12. * - Michael Gordon. The Denotational Description of Programming Languages: An Introduction. Springer-Verlag, 1979.
  13. Michael Gordon, R. Milner, C. Wadsworth.
  14. Edinburgh LCF.
  15. Susan L. Graham, Charles B. Haley, William N. Joy. Practical LR Error Recovery. SIGPLAN Notices 14:168-175, August, 1979. Proceedings of the SIGPLAN Symposium on Compiler Construction. John L. Hennessy. The Stanford Pascal Parser Generator. Technical Report, Stanford University, 1981. In preparation.
  16. C. A. R. Hoare. Hints on Programming Language Design, Technical Report CS-403, Computer Science Department, Stanford University, October, 1 973.
  17. C. A. R. Hoare, N. Wirth. An Axiomatic Definition of the Programming Language Pascal. Acta lnformatica :335 -355,1973.
  18. J. D. Ichbiah et al. Preliminary Ada Reference Manual. SIGPLAN Notices, June, 1979.
  19. Mehdi Jazayeri, William F. Ogden, William C. Rounds. The Intrinsically Exponential Complexity of the Circularity Problem for Attribute Grammars. Communications of the ACM :697 -706, December, 1975.
  20. Kathleen Jensen, Niklaus Wirth. Pascal User Manual and Report.
  21. P. Jesperson, M. Madsen, H. Riis. NEATS, New Extended Attribute Translation System. Technical Report, computer Science Department, Aarhus University, Denmark, 1978. Cited in Watt and Madsen [63].
  22. Stephen C. Johnson. YACC: Yet Another Compiler-Compiler.
  23. Neil D. Jones (editor). Semantics-Directed Compiler Generation. Springer:Verlag, 1980.
  24. Neil D. Jones, Henning Christiansen. Control Flow Treatment in a Simple Semantics-Directed Compiler Generator. Technical Report PB-137, Aarhus University, Denmark, 1981.
  25. 1241 Neil D. Jones, Michael Madsen. Attribute-Influenced LR Parsing. Pages 393 -407 of Jones [22], 1980.
  26. Neil D. Jones, David A. Schmidt. Compiler Generation lrom Denotational Semantics. Pages 70 -93 of Jones [22], 1980. a
  27. D. E. Knuth. The Remaining Trouble Spots in ~lgol60. Communications of the ACM 10:611-618, October, 1967. 1271 D. E. Knuth. Semantics of Context-Free Languages. Mathematical Systems Theory 2:127 -145, February, 1968. Corrected in 1971 volume, pages 95 -96.
  28. C. H. A. Koster. Affix Grammars.
  29. In J. E. L. Peck (editor), Algol 68 Implementation, pages 95 -109. North-Holland, 1971.
  30. C. H. A. Koster. Using the CDL Compiler-Compiler. Pages 366 -426 of Bauer and Eickel[4], 1976. 1301 P.JiLandin. The Mechanical Evaluation of Expressions. Computer Journal 6:308 -320, April, 1964.
  31. Ole L Madsen. On Defining Semantics by Means of Extended Attribute Grammars. Technical Report DAIMI PB-109, Computer Science Department, Aarhus University, Denmark, January, 1980. Pages 259 -299 of Jones [22].
  32. Ole L. Madsen. Towards a Practical and General Translator Writing System. Technical Report, Computer Science Department, Aarhus University, Denmark, March, 1980.
  33. Zohar Mnna. Mathematical Theory of Computation.
  34. McGraw-Hill, 1974.
  35. M. Marcotty, H. F. Ledgard, G. V. Bochmann. A Sampler of Formal Definitions, Computing Surveys :I91 -276, June, 1976.
  36. Brian H. Mayoh. Attribute Grammars and Mathematical Semantics. Technical Report DAIMI PB-90, Computer Science Department, Aarhus University, Denmark, August, 1978.
  37. John McCarthy. Towads a Mathematical Science of Computation. -? .
  38. In C. M. Popplewell (editor), Information Processing 6z1 pages 21 -28. North-Holland, 1963.
  39. R. E. Milne, C. Srachey.
  40. A Theory of Programming Language Semantics.
  41. John Wiley, 1976. Published in Great Britain by Chapman and Hall.
  42. D. R. Milton, L. W. Kirchhoffl B. R. Rowland. An ALL(1) Compiler Generator.
  43. S I G P U N Notices 14~152-157, August, 1979. Proceedings of the SIGPLAN Symposium on Compiler Construction. Peter D. Mosses. The Mathematical Semantics of Algol 60. Technical Report PRG-012, Programming Research Group, Oxford University, 1974. Peter D. Mosses.
  44. S/S: Semantics /mp/ementation System. Reference Manual and User Guide. Technical Report DAIMI MD-33, Computer Science Department, Aarhus University, Denmark, 1 Q79.
  45. Peter D. Mosses. SIS: Semantics Implementation System. Tested Examples. Technical Report DAIMI MD-30, Computer Science Departmentl Aarhus University, Denmark, 1979.
  46. Peter D. Mosses. Mathematical Semantics and Compiler Generation. PhD thesis, Oxford University, 1975.
  47. P. Naur, J. W. Backus, F. 1. Bauer, J. Green, C. Katz, J. McCarthy, A. J. Perlis, H. Rut.Mauser, K. Samuelson, B. Vauquois, J. H. Wegstein, A. van Wijngaardenl M. Woodger. Revised Report on the Algorithmic Language Algol 60. Communications of the ACM 6:l -17, January, 1963. [MI Derek C. Oppen. Pretty Printing. ACM Transactions on Programming Languages and Systems :465 -483, October, 1980. -. Lawrence Paulson, John Hennesy. Semantic Grammars: A Formalism for Defining the Syntax and Semantics of Programming Languages. Technical Report, Stanford University, 1980. Submitted to the Journal of the ACM.
  48. G. D. W i n . Call-byme, Call-byvalue, and the A-~lculus. Theoretical Computer Science : I 25 -159,1975.
  49. Peter C. Poole. Portabk and Adaptable Compilers. Pages 427 -497 of Bauefand Eickel[4], 1976.
  50. D. P. Pozefsky. Building Efficient Pass-Oriented Attribute Grammar Evaluators. PhD thesis, University of North Carolina at Chapel Hill, 1Q79.
  51. Kari-Jouko Raihal Mikko Saarinen, Eljas Soisalon-Soininen, Martti Tienari. The Compiler Writing System HLP &ielsinki Language processor^. Technical Report A-1 978-2, Department of Computer Science, University of Helsinki, Finland, 1978.
  52. Kari-Jouko Riiha. Experiences with the Compiler Writing System HLP. Pages 350 -362 of Jones [22], 1 Q80.
  53. Kari-Jouko Raiha. Bibliography on Attribute Grammars. SIGPUN Notices 15135 -44, March, 1980.
  54. Martin Raskovsky. Step by Step Generation of a Compiler for Flow Diagram Language with Jumps. Technical Report CSM-42, Department of Computer Science, University of €se Junel 1Q81.
  55. Martin Raskovskyl Phil Collier. From standard to Implementation Denotational Semantics. Pages 94 -139 of Jones [22], 1980.
  56. A. H. J. Sale. Pascal Compatibility Report. Technical Report R77-5* Department of Information Science, University of Tasmania, November, 1977.
  57. R. W. Scheifler. A Denotational Semantics of CLU. Technical Rep06 TR-201, ~aboratory for Computer Sciencel M.I.T., 1978. Ravi Sethi. Circular Expressions: Elimination of Static Environments, In S. Even, 0. Kariv (edit~rs)~ Eighth International Colloquium on Automata, Languages and Programming, pages 378 -392. Springer-Verlag, 1981.
  58. Ravi Sethi. Control Flow Aspects of Semantics Directed Compiling. Technical Reportl Bell Laboratories, Murray Hill, New Jersy 07974,1981. Joseph E. Stoy. Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory.
  59. M. I. T. Press, 1978.
  60. R. D. Tennent. Mathematical Semantics of SNOBOL4.
  61. In Symposium on Principles of Programming Languages, pages 95 -107. Association for Computing Machineryl 1973.
  62. R. D. Tennent. The Denotational Semantics of Programming Languages, Communications of the ACM :437 -4m1 August, 1976.
  63. R. D. Tennent.
  64. A Denotational-Definition of the Programming Language Pascal. Technical Report 77-4T1 Department of Computing and Information Science, Queen's Universityl Kingston, Ontario, 1977.
  65. A. van Wijngaarden, 6. J. Maillouxl J. E. L. Peckl C. H. A. Kosterl M. Sirttzoff, C. H. Lindsey, L. G. L. T. Meertens, R. G. Fisker. Revised Report on the Algorithmic Language Algol 68. Springer-Verlag, 1976.
  66. David A. Watt, Ole L. Madsen. Extended Attribute Grammars. Technical Report DAIMI PB-1051 Computer Science Department, Aarhus University, Denmarkl Novemberl 1979.
  67. David A. Watt. An Extended Attribute Grammar for Pascal. SIGPLAN Notices 14:60-74, February, 1979.
  68. David A. Watt. Rule Splitting and Attribute-Directed Parsing. Pages 363 -382 of Jones [22],1980.
  69. J. Welsh, W. JSneeringer, C. A. I?. Hoare. Ambiguities and Insecurities in Pascal. Software Practice and Experience 7:685 -696, November-December, 1977.
  70. Wayne T. Wiiner. Declarative Semantic Definition. PhD thesis, Stanford University, 1971. Computer Science Report STAN-CS-233-71.
  71. 1681 Niklaus Wirth. Algorithms i Data Structures = Programs. Prentice-Hall, 1976. .