Inductive Completeness of Logics of Programs

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.

[1]  Jerzy Tiuryn,et al.  Dynamic logic , 2001, SIGA.

[2]  Thomas L. Saaty,et al.  Lectures on modern mathematics , 1963 .

[3]  R O Gibson Lectures on Modern Mathematics Volume II , 1964 .

[4]  Andreas Blass,et al.  The Underlying Logic of Hoare Logic , 2000, Bull. EATCS.

[5]  Daniel Leivant,et al.  Logical and Mathematical Reasoning about Imperative Programs. , 1985 .

[6]  L. Csirmaz Programs and Program Verifications in a General Setting , 1981, Theor. Comput. Sci..

[7]  John C. Mitchell,et al.  Termination Assertions for Recursive Programs: Completeness and Axiomatic Definability , 1983, Inf. Control..

[8]  J. Fenstad Proceedings of the Second Scandinavian Logic Symposium , 1971 .

[9]  Daniel Leivant Logical and mathematical reasoning about imperative programs: preliminary report , 1985, POPL '85.

[10]  S. Feferman Formal Theories for Transfinite Iterations of Generalized Inductive Definitions and Some Subsystems of Analysis , 1970 .

[11]  D. Prawitz Natural Deduction: A Proof-Theoretical Study , 1965 .

[12]  Daniel Leivant,et al.  Matching Explicit and Modal Reasoning about Programs: A Proof Theoretic Delineation of Dynamic Logic , 2006, 21st Annual IEEE Symposium on Logic in Computer Science (LICS'06).

[13]  Yde Venema,et al.  Dynamic Logic by David Harel, Dexter Kozen and Jerzy Tiuryn. The MIT Press, Cambridge, Massachusetts. Hardback: ISBN 0–262–08289–6, $50, xv + 459 pages , 2002, Theory and Practice of Logic Programming.

[14]  P. Martin-Löf Hauptsatz for the Intuitionistic Theory of Iterated Inductive Definitions , 1971 .

[15]  Joseph R. Shoenfield,et al.  Mathematical logic , 1967 .

[16]  Joseph Y. Halpern,et al.  Axiomatic definitions of programming languages: a theoretical assessment (preliminary report) , 1980, POPL '80.

[17]  Akiko Kino,et al.  Intuitionism and Proof Theory , 1970 .

[18]  Michael Rathjen,et al.  Generalized Inductive Definitions in Constructive Set Theory , 2005, From sets and types to topology and analysis.

[19]  Stephen A. Cook,et al.  Soundness and Completeness of an Axiom System for Program Verification , 1978, SIAM J. Comput..

[20]  W. Buchholz Iterated Inductive Definitions and Subsystems of Analysis: Recent Proof-theoretical Studies , 1981 .

[21]  Andrei Voronkov,et al.  Current Trends in Theoretical Computer Science , 2001 .

[22]  Daniel Leivant,et al.  Reasoning in Dynamic Logic about Program Termination , 2008, Pillars of Computer Science.

[23]  Peter H. Schmitt,et al.  Diamond Formulas: A Fragment of Dynamic Logic with Recursively Enumerable Validity Problem , 1984, Inf. Control..

[24]  Ildikó Sain An Elementary Proof for Some Semantic Characterizations of Nondeterministic Floyd-Hoare Logic , 1989, Notre Dame J. Formal Log..