Skip to main content
Log in

Normal form approach to compiler design

  • Published:
Acta Informatica Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  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 1990

    Google Scholar 

  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 1990

    Google Scholar 

  3. Dijkstra, E.W.: Guarded commands, non-determinacy, and formal derivation of programs. Commun. ACM18(8), 453–457 (1975)

    Google Scholar 

  4. Gardiner, P., Pandya, P.K.: Reasoning algebraically about recursion. Sci. Comput. Programming18, 271–280 (1992)

    Google Scholar 

  5. Goguen, J., et al.: Introducing OBJ. Technical Report, SRI International 1993

  6. Gries, D.: The science of programming. New York: Springer 1981

    Google Scholar 

  7. Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM12 (10), 576–583 (1969)

    Google Scholar 

  8. Hoare, C.A.R., Jifeng, He: The weakest prespecification. Inf. Process. Lett.24(2), 127–132 (1987)

    Google Scholar 

  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. Hoare, C.A.R., et al.: Laws of programming. Commun. ACM30(8), 672–686 (1987)

    Google Scholar 

  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 1991

    Google Scholar 

  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 1986

    Google Scholar 

  13. Jones, C.B.: Software development, a rigorous approach. Englewood Cliffs, NJ: Prentice-Hall 1980

    Google Scholar 

  14. Morgan, C.C.: Data refinement by miracles. Inf. Process. Lett.26, 243–246 (1988)

    Google Scholar 

  15. Morgan, C.C.: Programming from specifications. Englewood Cliffs, NJ: Prentice Hall 1990

    Google Scholar 

  16. Morris, J.M.: A theoretical basis for stepwise refinement and the programming calculus. Sci. Comput. Programming9, 287–306 (1987)

    Google Scholar 

  17. Nelson, G.: A generalization of Dijkstra's calculus. Tech. Rep 16, Digital System Research Center, Palo Alto 1987

    Google Scholar 

  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, 1990

  19. Sampaio, A.: An algebraic approach to compiler design. DPhil Thesis, Oxford University, Computing Laboratory 1993

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Hoare, C.A.R., Jifeng, H. & Sampaio, A. Normal form approach to compiler design. Acta Informatica 30, 701–739 (1993). https://doi.org/10.1007/BF01191809

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01191809

Keywords

Navigation