We examine the use of procedures in the refinement calculus and show that the traditional approach leads to certain problemswhen programs are not constructed in a strictly top-downmanner. These problems arise because a procedure name becomes associated with the implementation when the procedure body is refined, and we examine some ways in which they may be avoided. We argue that, because procedures are not required in order to express procedural abstractions, the primary purpose of using procedures in program refinement is to do with packaging the final program, and that decisions about how a program is packaged into procedures should bemade separately from algorithm design decisions. We present an alternative approach based on this rationale which avoids the aforementioned problems, and discuss ways in which it can be supported by a refinement tool.
Author and article information
Department of Computer Science
Victoria University of Wellington
Wellington, New Zealand