Advertisement

Acta Informatica

, Volume 30, Issue 8, pp 701–739 | Cite as

Normal form approach to compiler design

  • C. A. R. Hoare
  • He Jifeng
  • A. Sampaio
Article

Abstract

This paper demonstrates how reduction to normal form can help in the design of a correct compiler for Dijkstra's guarded command language. The compilation strategy is to transform a source program, by a series of algebraic manipulations, into a normal form that describes the behaviour of a stored-program computer. Each transformation eliminates high-level language constructs in favour of lower-level constructs. The correctness of the compiler follows from the correctness of each of the algebraic transformations.

Keywords

Computational Mathematic Computer System Normal Form System Organization Algebraic Manipulation 
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.

References

  1. 1.
    Back, R.J.R., von Wright, J.: Refinement calculus, part 1: sequential nondeterministic programs. (Lect. Notes Comput. Sci., vol. 430, pp. 42–67) Berlin Heidelberg New York: Springer 1990Google Scholar
  2. 2.
    Back, R.J.R.: Refinement calculus, part 2: Parallel and reactive programs. (Lect. Notes Comput. Sci., vol. 430, pp. 68–94) Berlin Heidelberg New York: Springer 1990Google Scholar
  3. 3.
    Dijkstra, E.W.: Guarded commands, non-determinacy, and formal derivation of programs. Commun. ACM18(8), 453–457 (1975)Google Scholar
  4. 4.
    Gardiner, P., Pandya, P.K.: Reasoning algebraically about recursion. Sci. Comput. Programming18, 271–280 (1992)Google Scholar
  5. 5.
    Goguen, J., et al.: Introducing OBJ. Technical Report, SRI International 1993Google Scholar
  6. 6.
    Gries, D.: The science of programming. New York: Springer 1981Google Scholar
  7. 7.
    Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM12 (10), 576–583 (1969)Google Scholar
  8. 8.
    Hoare, C.A.R., Jifeng, He: The weakest prespecification. Inf. Process. Lett.24(2), 127–132 (1987)Google Scholar
  9. 9.
    Hoare, C.A.R., Jifeng, He, Sanders, J.W.: Prespecification in data refinement. Inf. Process. Lett.25(2), 71–76 (1987)Google Scholar
  10. 10.
    Hoare, C.A.R., et al.: Laws of programming. Commun. ACM30(8), 672–686 (1987)Google Scholar
  11. 11.
    Hoare, C.A.R.: Refinement algebra proves the correctness of compiling specification. In: Morgan, C.C., Woodcock, J.C.P. (eds.) 3rd Refinement Workshop, pp. 34–48. Berlin Heidelberg New York: Springer 1991Google Scholar
  12. 12.
    He, J., Hoare, C.A.R., Sanders, J.W.: Data refinement refined. (Lect. Notes Comput. Sci. vol. 213, pp. 187–196) Berlin Heidelberg New York: Springer 1986Google Scholar
  13. 13.
    Jones, C.B.: Software development, a rigorous approach. Englewood Cliffs, NJ: Prentice-Hall 1980Google Scholar
  14. 14.
    Morgan, C.C.: Data refinement by miracles. Inf. Process. Lett.26, 243–246 (1988)Google Scholar
  15. 15.
    Morgan, C.C.: Programming from specifications. Englewood Cliffs, NJ: Prentice Hall 1990Google Scholar
  16. 16.
    Morris, J.M.: A theoretical basis for stepwise refinement and the programming calculus. Sci. Comput. Programming9, 287–306 (1987)Google Scholar
  17. 17.
    Nelson, G.: A generalization of Dijkstra's calculus. Tech. Rep 16, Digital System Research Center, Palo Alto 1987Google Scholar
  18. 18.
    Nelson, G., Manasse, M.: The proof of a second step of a factored compiler. (Lecture Notes for International Summer School on Programming and Mathematical Method), Marktoberdorf, Germany, 1990Google Scholar
  19. 19.
    Sampaio, A.: An algebraic approach to compiler design. DPhil Thesis, Oxford University, Computing Laboratory 1993Google Scholar

Copyright information

© Springer-Verlag 1993

Authors and Affiliations

  • C. A. R. Hoare
    • 1
  • He Jifeng
    • 1
  • A. Sampaio
    • 1
  1. 1.Oxford University Computing Laboratory Programming Research GroupOxfordEngland

Personalised recommendations