skip to main content
10.1145/800230.806999acmconferencesArticle/Chapter ViewAbstractPublication PagesplanConference Proceedingsconference-collections
Article
Free Access

Control flow aspects of semantics directed compiling (Summary)

Published:01 June 1982Publication History

ABSTRACT

We focus on the part of a compiler between syntax analysis and code generation. A language is specified by adding semantic rules in a functional notation to the syntax of the language. Starting with a small sublanguage of while statements, the semantics of the statement constructs of C is built up incrementally. Using a small ad hoc code generator, a compiler has automatically been constructed from the semantics. The semantic description is analogous to a syntax directed construction of a flow diagram for a program. In analogy with grammars and parser generators, minimal knowledge of the underlying theory is required.

For the control flow aspects of languages, efficient compilers can quickly be generated.

References

  1. 1.J. A. Goguen, J. W. Thatcher, E. G. Wagner, and J. B. Wright, "Initial algebra semantics and continuous algebras," J. ACM24(1), pp. 68-95 (January 1977). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.J. W. Thatcher, E. G. Wagner, and J. B. Wright, "More on advice on structuring compilers and proving them correct," pp. 165-188 in Semantics Directed Compiler Generation, ed. N. D. Jones, Lecture Notes in Computer Science 94, Springer-Verlag, Berlin (1980). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.A. V. Aho, "Translator writing systems: where do they now stand?," Computer13(8), pp. 9-14 (August 1980). This paper is a guest editor's introduction and overview of a special issue on Translator Writing Systems.Google ScholarGoogle Scholar
  4. 4.A. V. Aho and J. D. Ullman, Principles of Compiler Design, Addison-Wesley, Reading MA (1977). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.E. R. Anderson, F. C. Belz, and E. K. Blum, "SEMANOL (73): A metalanguage for programming the semantics of programming languages," Acta Informatica6, pp. 109-131 (1976).Google ScholarGoogle Scholar
  6. 6.E. R. Anderson, F. C. Belz, and E. K. Blum, "Issues in the formal specification of programming languages," pp. 1-30 in Formal Description of Programming Concepts, ed. E. J. Neuhold, North-Holland, Amsterdam (1978).Google ScholarGoogle Scholar
  7. 7.J. W. Backus et al., "The Fortran automatic coding system," Western Joint Computer Conference, pp. 188-198 (1957).Google ScholarGoogle Scholar
  8. 8.F. L. Bauer, "Historical remarks on compiler construction," pp. 603-621 in Compiler Construction: An Advanced Course, 2nd edition, ed. F. L. Bauer and J. Eickel, Lecture Notes in Computer Science 21, Springer-Verlag, Berlin (1976). Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.F. L. Bauer and J. Eickel (eds), Compiler Construction: An Advanced Course, 2nd edition, Lecture Notes in Computer Science 21, Springer-Verlag, Berlin (1976). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.D. Bjorner, "Programming languages: Formal development of interpreters and compilers," pp. 1-21 in International Computing Symposium 1977, ed. E. Morlet and D. Ribbens, North-Holland, Amsterdam (1977).Google ScholarGoogle Scholar
  11. 11.D. Bjorner and C. B. Jones, The Vienna Development Method: The Meta-Language, Lecture Notes in Computer Science 61, Springer Verlag, Berlin (1978). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.R. G. G. Cattell, "Automatic derivation of code generators from machine descriptions," TOPLAS2(2), pp. 173-190 (April 1980). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.H. Christiansen and N. D. Jones, "Control flow aspects of an algebraic approach to compiler generation," DAIMI IR-27, Computer Science Department, Aarhus University (July 1981).Google ScholarGoogle Scholar
  14. 14.J. W. Davidson and C. W. Fraser, "The design and application of a retargetable peephole optimizer," TOPLAS2(2), pp. 191-202 (April 1980). Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.J. Feldman and D. Gries, "Translator writing systems," Comm. ACM11(2), pp. 77-113 (February 1968). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.H. Ganzinger, "Transforming denotational semantics into practical attribute grammars," pp. 1-69 in Semantics Directed Compiler Generation, ed. N. D. Jones, Lecture Notes in Computer Science 94, Springer-Verlag, Berlin (1980). Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.M. C. Gaudel, "Specification of compilers as abstract data type representations," pp. 140-164 in Semantics Directed Compiler Generation, ed. N. D. Jones, Lecture Notes in Computer Science 94, Springer-Verlag, Berlin (1980). Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.M. C. Gaudel, "Compiler generation from formal definition of programming languages: a survey," pp. 96-114 in Formalization of Programming Concepts, Intl. Colloquium, Peniscola, Spain, Lecture Notes in Computer Science 107, Springer-Verlag, Berlin (April 1981). Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.R. S. Glanville and S. L. Graham, "A new method for compiler code generation (extended abstract)," Fifth Annual ACM Symposium on Principles of Programming Languages, pp. 231-240 (January 1978). Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.H. H. Goldstine and J. von Neumann, "Planning and coding problems for an electronic computing instrument, Part II, Vol 1.," pp. 80-151 in John von Neumann: Collected Works, Vol. V, Macmillan, New York (1963). The report was prepared for the U.S. Army Ordnance Department in April 1947.Google ScholarGoogle Scholar
  21. 21.D. Gries, Compiler Construction for Digital Computers, John Wiley, New York (1971). Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.S. C. Johnson, "Yacc - yet another compiler compiler," CSTR 32, Bell Laboratories, Murray Hill NJ (July 1975). See the UNIX Programmer's Manual2 Section 19 (January 1979)Google ScholarGoogle Scholar
  23. 23.S. C. Johnson, "A tour through the portable C compiler," UNIX Programmer's Manual2 (Section 34) (January 1979).Google ScholarGoogle Scholar
  24. 24.W. L. Johnson, J. H. Porter, S. I. Ackley, and D. T. Ross, "Automatic generation of efficient lexical processors using finite state techniques," Comm. ACM11(12), pp. 805-813 (December 1968). Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.N. D. Jones (ed), Semantics-Directed Compiler Generation, Lecture Notes in Computer Science 94, Springer-Verlag, Berlin (1980). Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26.B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall, Englewood Cliffs NJ (1978). Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.D. E. Knuth, "History of writing compilers," 1962 ACM National Conference, p. 43,126 (September 1962). Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.D. E. Knuth, "Semantics of context-free languages," Math. Systems Theory2(2), pp. 127-145 (June 1968). Correction in 5(1) pp. 95-96 (1971).Google ScholarGoogle Scholar
  29. 29.M. E. Lesk, "Lex - a lexical analyzer generator," CSTR 39, Bell Laboratories, Murray Hill NJ (October 1975). See the version by M. E. Lesk and E. Schmidt in the UNIX Programmer's Manual2 Section 20 (January 1979)Google ScholarGoogle Scholar
  30. 30.P. M. Lewis II, D. J. Rosenkrantz, and R. E. Stearns, Compiler Design Theory, Addison-Wesley, Reading MA (1976). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31.J. McCarthy, "Towards a mathematical science of computation," pp. 21-28 in Information Processing 1962, ed. C. M. Popplewell, North-Holland, Amsterdam (1963).Google ScholarGoogle Scholar
  32. 32.F. L. Morris, "Advice on structuring compilers and proving them correct," ACM Symposium on Principles of Programming Languages, Boston MA, pp. 144-152 (October 1973). Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33.P. D. Mosses, "SIS - semantics implementation system: Reference manual and user guide," DAIMI MD-30, Department of Computer Science, University of Aarhus, Denmark (August 1979).Google ScholarGoogle Scholar
  34. 34.P. D. Mosses, "A constructive approach to compiler correctness," pp. 449-469 in Automata, Languages and Programming, 7th Colloquium, Noordwijkerhout, Lecture Notes in Computer Science 85, Springer-Verlag, Berlin (July 1980). Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. 35.P. D. Mosses, "A semantic algebra for binding constructs," pp. 408-418 in Formalization of Programming Concepts, Intl. Colloquium, Peniscola, Spain, Lecture Notes in Computer Science 107,| Springer-Verlag, Berlin (April 1981). Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. 36.L. Paulson, "A semantics-directed compiler generator," manuscript (to appear).Google ScholarGoogle Scholar
  37. 37.K.-J. Raiha, "Bibliography on attribute grammars," SIGPLAN Notices15(3), pp. 35-44 (March 1980).Google ScholarGoogle Scholar
  38. 38.J.-C. Raoult and R. Sethi, "Properties of a notation for combining functions," in Automata, Languages and Programming, 9th Colloquium, Aarhus, Lecture Notes in Computer Science, Springer-Verlag, Berlin (July 1982). Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. 39.M. Raskovsky and P. Collier, "From standard to implementation denotational semantics," pp. 94-139 in Semantics Directed Compiler Generation, ed. N. D. Jones, Lecture Notes in Computer Science 94, Springer-Verlag, Berlin (1980). Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. 40.D. M. Ritchie, "A tour through, the UNIX C compiler," UNIX Programmer's Manual2(Section 33) January 1979).Google ScholarGoogle Scholar
  41. 41.D. S. Scott and C. Strachey, Towards a mathematical semantics for computer languages, Polytechnic Press, Brooklyn, New York (April 1971).Google ScholarGoogle Scholar
  42. 42.R. Sethi, "Control flow aspects of semantics directed compiling," TR 98, Bell Laboratories, Murray Hill NJ (September 1981).Google ScholarGoogle Scholar
  43. 43.R. Sethi, "Circular expressions: elimination of static environments," Science of Computer Programming1(3), For an earlier version, see Lecture Notes in Computer Science 115, (1982).Google ScholarGoogle Scholar
  44. 44.J. E. Stoy, Denotational Semantics, MIT Press, Cambridge MA (1977).Google ScholarGoogle Scholar
  45. 45.C. Strachey and C. Wadsworth, "Continuations: a mathematical semantics which can deal with full jumps," Technical Monograph PRG-11, Programming Research Group, Oxford University (1974).Google ScholarGoogle Scholar
  46. 46.R. D. Tennent, "The denotational semantics of programming languages," Comm. ACM19(8), pp. 437-453 (August 1976). Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. 47.D. A. Turner, "A new implementation technique for applicative languages," Software - Practice and Experience9(1), pp. 31-49 January 1979).Google ScholarGoogle Scholar
  48. 48.M. Wand, "Deriving target code as a representation of continuation semantics," TR 94, Computer Science Department, Indiana University, Bloomington IN (July 1980).Google ScholarGoogle Scholar
  49. 49.M. Wand, "Different advice on structuring compilers and proving them correct," TR 95, Computer Science Department, Indiana University, Bloomington IN (September 1980).Google ScholarGoogle Scholar

Index Terms

  1. Control flow aspects of semantics directed compiling (Summary)

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          SIGPLAN '82: Proceedings of the 1982 SIGPLAN symposium on Compiler construction
          June 1982
          357 pages
          ISBN:0897910745
          DOI:10.1145/800230
          • cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 17, Issue 6
            Proceedings of the 1982 SIGPLAN symposium on Compiler construction
            June 1982
            347 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/872726
            Issue’s Table of Contents

          Copyright © 1982 Author

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 June 1982

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader