Reflexive transitive invariant relations: A basis for computing loop functions
Journal of Symbolic Computation
Hi-index | 0.00 |
Given a "DO WHILE" program P and a function F on a domain D, we investigate the problem of proving (or disproving) if P computes F over D. We show that if P satisfies certain natural constraints (well behaved), then there is a loop assertion, independent of the structure of the loop body, that is both necessary and sufficient for proving the hypothesis. We extend these results to classes of loop programs which are not well behaved and to FOR loops. We show the sufficiency of Hoare's DO WHILE axiom for well-behaved loop programs. Applications of these ideas to the problem of mechanical generation of assertions is discussed.