The role of verification in software reusability

This thesis introduces mechanisms for mathematically specifying, efficiently implementing, and formally verifying hierarchically built, generic software components appropriate for reuse in a multiplicity of settings. The development is based on the belief that software components will be reused only when they exhibit certain critical characteristics: easy comprehensibility, appropriate functionality, adequate flexibility, and certified correctness. Current programming languages, such as Ada, do not include adequate mechanisms to achieve these goals, so the thesis develops an appropriate language for reusable software. This language provides syntactic slots for the formal specifications which are necessary to support the comprehensibility, maintainability and correctness goals. It also allows for multiple realizations of the same conceptual object when different performance characteristics are needed in various parts of a program, thereby supporting the efficiency goal. These new features mean that existing program verification technology must be upgraded, and so this thesis presents rules to accommodate correctness proofs for programs, particularly multilayered hierarchical ones, written in this newly prescribed style. As proof of concept for this approach, this work introduces a useful new data structure, the Nested List, which can be used in structured editors, formula manipulation systems, etc. The realization for this data structure uses stacks of stacks, and poses an interesting verification challenge. Moreover, establishing the formal correspondence between the conceptualization and realization of this data structure requires the use of adjunct variables, and this leads to the observation that, for soundness, even as a partial correctness system, all manipulations of adjunct variables must be proven to terminate. Accordingly, this thesis presents, in addition to the module proof rules, total correctness rules for while loops and recursive procedures, and also establishes their soundness and relative completeness. This makes it possible to apply the proof system in either a partial or a total correctness mode. This work is intended to constitute part of a system called REFORMS; Reusable, Efficient, FORmally specified and verified, Modular System.