Exits in the refinement calculus |
| |
Authors: | Steve King Carroll Morgan |
| |
Affiliation: | (1) Programming Research Group, Oxford University Computing Laboratory, Wolfson Building, Parks Rd, OX1 3QD Oxford, UK |
| |
Abstract: | Although many programming languages contain exception handling mechanisms, their formal treatment — necessary for rigorous development — can be complex. Nevertheless, this paper presents a simple incorporation ofexit commands and exception blocks into a rigorous program development method. The refinement calculus, chosen for the exercise, is a method of developing imperative programs. It is based on weakest preconditions, although they are not used explicitly during program construction; they merely justify the general method. In the style of the refinement calculus, program development laws are given that introduce and allow the manipulation ofexits. The soundness of the new laws is shown using weakest preconditions (as for the existing refinement calculus laws). The extension of weakest preconditions needed to handleexits is a variation on earlier work of Cristian; the variation is necessary to handle nondeterminism. |
| |
Keywords: | Exceptions Refinement calculus Exception handling Weakest preconditions |
本文献已被 SpringerLink 等数据库收录! |
|