A practical method of documenting and verifying Ada programs with packages

  • Authors:
  • David C. Luckham;Wolfgang Polak

  • Affiliations:
  • -;-

  • Venue:
  • SIGPLAN '80 Proceedings of the ACM-SIGPLAN symposium on The ADA programming language
  • Year:
  • 1980

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a method of formal specification of Ada programs containing packages. The method suggests concepts and guidelines useful for giving adequate informal documentation of packages by means of comments. The method depends on (1) the standard inductive assertion technique for subprograms, (2) the use of history sequences in assertions specifying the declaration and use of packages, and (3) the addition of three categories of specifications to Ada package declarations: (a) visible specifications, (b) boundary specifications, (c) internal specifications. Axioms and proof rules for the Ada package constructs (declaration, instantiation, and function and procedure call) are given in terms of history sequences and package specifications. These enable us to construct formal proofs of the correctness of Ada programs with packages. The axioms and proof rules are easy to implement in automated program checking systems. The use of history sequences in both informal documentation and formal specifications and proofs is illustrated by examples.