Inductive Completeness of Logics of Programs

  • Authors:
  • Daniel Leivant

  • Affiliations:
  • Indiana University, Bloomington

  • Venue:
  • Electronic Notes in Theoretical Computer Science (ENTCS)
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose a new approach to delineating logics of programs, based directly on inductive definition of program semantics. The ingredients are elementary and well-known, but their fusion yields a simple yet powerful approach, surprisingly overlooked for decades. The denotational semantics of a regular program can be construed as a relation, easily definable by structural induction on programs. Invoking the framework of canonical theories for (iterated) inductive definitions, we consider the first-order theory for program semantic, i.e. with the generative clauses as construction (introduction) rules, and their dual templates as deconstruction (elimination) rules. We prove that Hoare's logic is inductively complete, in the sense that a partial-correctness assertion is Hoare provable iff it is provable in the inductive theory (with deconstruction for formulas in the base vocabulary). Thus first-order automated theorem-proving can be applied directly to program verification. Proceeding to program termination, we show that a total correctness assertion is valid iff it is provable in the inductive theory without any use of deconstruction. This is yet another take on the first-order nature of total correctness.