Advertisement

An implementation from a direct semantics definition

  • David A. Schmidt
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 217)

Abstract

We have developed an implementation from a direct semantics definition, focussing upon the operational properties that arise in the reduction of denotations. Since the structure of a denotation is dictated by the structure of the semantic equations, we were able to tune the equations to produce denotations that are easier to reduce. The target architecture was a consequence of the reduction strategy taken on the denotations.

The transformation steps outlined in this paper are not definitive. The implementation process must be based on common sense and can be directed towards a specific target architecture. It seems disadvantageous to completely automate the process, for there are too many variants that can be profitably exploited by human ingenuity. The direct semantics method of language definition appears useful precisely because it gives the implementor the freedom to choose data structures and evaluation strategies. We hope to study this issue further in a later version of this paper.

Keywords

Reduction Rule Semantic Notation Denotational Semantic Store Variable Instruction Counter 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

6. References

  1. [1]
    Bauer, F.L., and Wossner, H. Algorithmic Language and Program Development. Springer-Verlag, Berlin, 1982.Google Scholar
  2. [2]
    Berry, G., and Levy, J.-J. A survey of some syntactic results of the lambda-calculus. In Proc. 8th Symp. on Math. Foundations of Comp. Sci., Lecture Notes in Computer Science 74, Springer, Berlin, 1979.Google Scholar
  3. [3]
    Bjorner, D., and Jones, C.B. Formal Specification and Software Development, Prentice-Hall, Englewood Cliffs, N.J., 1982.Google Scholar
  4. [4]
    Burge, W. Recursive Programming Techniques. Addison-Wesley, Reading, Mass., 1976.Google Scholar
  5. [5]
    Curry, H.B., and Feys, R. Combinatory Logic, Vol. 1. North-Holland, Amsterdam, 1958.Google Scholar
  6. [6]
    Ershov, E.P. On the essence of compilation. In Formal description of programming concepts, E.J. Neuhold, ed., North-Holland, Amsterdam, 1978.Google Scholar
  7. [7]
    Georgeff, M. Transformations and reduction strategies for typed lambda expressions. ACM TOPLAS 6 (1984) 603–631.Google Scholar
  8. [8]
    Goguen, J., Thatcher, J., Wagner, E., and Wright, J. Initial algebra semantics and continuous algebras. Journal of the ACM 24(1977) 68–95.Google Scholar
  9. [9]
    Guessarian, I. Algebraic Semantics. Lecture Notes in Computer Science 99, Springer, Berlin, 1981.Google Scholar
  10. [10]
    Jones, N.D., Muchnick, S.S., and Schmidt, D.A. A universal compiler. Tech. report DAIMI IR-17, Computer science dept., University of Aarhus, Denmark, 1979.Google Scholar
  11. [11]
    Jones, N.D., and Christiansen, H. Control flow treatment in a simple semantics-directed compiler generator. In Formal Description of Programming Concepts II, North-Holland, Amsterdam, 1982, pp. 38–62.Google Scholar
  12. [12]
    Landin, P.J. The mechanical evaluation of expressions. Computer Journal 6 (1964) 308–320.Google Scholar
  13. [13]
    Milne, R. and Strachey, C. A Theory of Programming Language Semantics. Chapman and Hall, London, 1976.Google Scholar
  14. [14]
    Mosses, P.D. SIS— reference manual and user's guide. Tech. report DAIMI MD-30, Computer science dept., University of Aarhus, Denmark, 1979.Google Scholar
  15. [15]
    Paulson, L. A semantics-directed compiler generator. Proc. 9th ACM POPL, Albuquerque, N.M., Jan. 1982, pp. 224–239.Google Scholar
  16. [16]
    Pleban, U.F. Compiler prototyping using formal semantics. Proc. ACM SIGPLAN 84 Symp. on Compiler Construction, SIGPLAN Notices 17-6 (1982) pp. 94–105.Google Scholar
  17. [17]
    Raskovsky, M. Denotational semantics as a specification of code generators. Proc. ACM SIGPLAN 82 Conf. on Compiler Construction, SIGPLAN Notices 17-6 (1982) 230–244.Google Scholar
  18. [18]
    Raoult, J.-C., and Sethi, R. The global storage needs of a subcomputation. In Proc. ACM Symp. on Prin. of Prog. Lang. Salt Lake City, Utah, 1984, pp. 148–157.Google Scholar
  19. [19]
    Reynolds, J.C. Definitional interpreters for higher order programming languages. In Proceedings, Twenty-fifth ACM National Conference, Boston, 1972, pp. 717–740.Google Scholar
  20. [20]
    Reynolds, J.C. Semantics of the domain of flow diagrams. J. ACM 24 (1977) 484–503.Google Scholar
  21. [21]
    Schmidt, D.A. Detecting global variables in denotational specifications. ACM TOPLAS 7-2 (1985) 299–310.Google Scholar
  22. [22]
    Schmidt, D.A. Denotational Semantics: An Introduction. Allyn and Bacon, Boston, in press.Google Scholar
  23. [23]
    Scott, D.S. The lattice of flow diagrams. In Semantics of Algorithmic Languages, E. Engeler, ed. Lecture Notes Math. 188, Springer, Berlin, 1970, pp. 311–366.Google Scholar
  24. [24]
    Sethi, R. Pebble games for studying storage sharing. Theoretical Comp. Sci. 19-1 (1982) 69–84.Google Scholar
  25. [25]
    Sethi, R. Control flow aspects of semantics-directed compiling. ACM TOPLAS 5-4 (1983) 554–595.Google Scholar
  26. [26]
    Sethi, R., and Tang, A. Constructing call by value continuation semantics. Journal of the ACM 27 (1980) 580–597.Google Scholar
  27. [27]
    Steele, G.L. RABBIT: A compiler for SCHEME. M.S. Thesis, EECS Dept., MIT, Cambridge, Mass., May, 1977.Google Scholar
  28. [28]
    Stoy, J. Denotational Semantics. MIT Press, Cambridge, Mass., 1977.Google Scholar
  29. [29]
    Turner, D. A new implementation technique for applicative languages. Software: Practice and Experience 9(1979) 31–49.Google Scholar
  30. [30]
    Wand, M. First order identities as a defining language. Acta Informatica 14 (1980) 337–357.Google Scholar
  31. [31]
    Wand, M. Continuation-based program transformation strategies. Journal of the ACM 27 (1980) 164–180.Google Scholar
  32. [32]
    Wand, M. Semantics-directed computer architecture. In Proceedings, Ninth ACM Symposium on Principles of Programming Languages, Albuquerque, N.M., 1982, pp. 234–241.Google Scholar
  33. [33]
    Wand, M. Deriving target code as a representation of continuation semantics. ACM Trans. Prog. Lang. and Systems 4 (1982) 496–517.Google Scholar
  34. [34]
    Wand, M. From interpreter to compiler: a representational derivation. This proceedings.Google Scholar
  35. [35]
    Wegner, P. Programming language semantics. In Formal Semantics of Programming Languages, R. Rustin, ed., Prentice-Hall, Englewood Cliffs, N.J., 1972, pp. 149–248.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1986

Authors and Affiliations

  • David A. Schmidt
    • 1
  1. 1.Computer Science DepartmentIowa State UniversityAmesUSA

Personalised recommendations