Deductive program development: Evaluation in reverse Polish notation as an example

  • Manfred Broy
Part II. Deductive Program Development
Part of the Lecture Notes in Computer Science book series (LNCS, volume 544)


A style of program construction which consists of alternating successive steps of specification, derivation and verification is demonstrated by a simple example. All steps are carried out within a purely axiomatic framework. The demonstration example is the evaluation of expressions in reverse Polish notation. Expressions given in the form of trees can easily be evaluated by a function specified by a straightforward recursive function declaration the correctness of which is obvious and therefore can be taken as initial specification. The recursive function declaration is transformed to one working on reverse Polish notation that is derived from the trees by postorder tree traversal. Constructive proofs are given that show the correctness of the produced program.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [Berghammer et. al. 87]
    Berghammer R., Ehler H., Zierer H.: Towards an algebraic specification of code generation. Report TUM-18707, Institut für Informatik, Technische Universität München (1987)Google Scholar
  2. [Bauer, Wössner 81]
    Bauer F. L., Wössner H.: Algorithmische Sprache und Programmentwicklung. Springer: Berlin-Heidelberg-New York (1981). English translation: Algorithmic language and program development. Springer: Berlin-Heidelberg-New York (1982)Google Scholar
  3. [Broy 87]
    Broy M.: Predicative specification for functional programs describing communicating networks. Information Processing Letters 25, 1987, 93–101Google Scholar
  4. [Geser, Hußmann 85]
    Geser A., Hußmann H.: Rapid prototyping for algebraic specifications — Examples of the use of the RAP system. Report MIP-8517, Fakultät für Mathematik und Informatik, Universität Passau (1985)Google Scholar
  5. [George 88]
    George Ch.: Practical aspects of development. RAISE Document, STC 1988Google Scholar
  6. [Hußmann 85]
    Hußmann H.: Unification in conditional-equational theories. Proc. EUROCAL '85, Springer LNCS 204 543–553 (1985). Also: Report MIP-8502, Fakultät für Mathematik und Informatik, Universität Passau (1985)Google Scholar
  7. [Hehner 84]
    Hehner E.C.R.: Predicative specification Part I+II. CACM 27:2 (1984) 134–151Google Scholar
  8. [McCarthy 67]
    McCarthy J., Painter J.: Correctness of a compiler for arithmetic expressions. In: Schwartz J.T. (ed.): Mathematical aspects of computer science. Proc. of symposia in applied mathematics 19, 33–41 (1967)Google Scholar
  9. [Samelson, Bauer 60]
    Samelson K., Bauer F. L.: Sequentielle Formelübersetzung. Elektronische Rechenanlagen 1, 176–182 (1959). English translation: Sequential formula translation. CACM 3, 76–83 (1960)Google Scholar
  10. [Wirsing et al. 83]
    Wirsing M., Pepper P., Partsch H., Dosch W., Broy M.: On hierarchies of abstract data types. Acta Informatica 20, 1983, 1–33Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Manfred Broy
    • 1
  1. 1.Institut für InformatikTechnische Universität MünchenD-8 München

Personalised recommendations