Abstract
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.
Published Version
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have