Matching Logic: An Alternative to Hoare/Floyd Logic

This paper introduces matching logic, a novel framework for defining axiomatic semantics for programming languages, inspired from operational semantics. Matching logic specifications are particular first-order formulae with constrained algebraic structure, called patterns. Program configurations satisfy patterns iff they match their algebraic structure and satisfy their constraints. Using a simple imperative language (IMP), it is shown that a restricted use of the matching logic proof system is equivalent to IMP's Hoare logic proof system, in that any proof derived using either can be turned into a proof using the other. Extensions to IMP including a heap with dynamic memory allocation and pointer arithmetic are given, requiring no extension of the underlying first-order logic; moreover, heap patterns such as lists, trees, queues, graphs, etc., are given algebraically using fist-order constraints over patterns.

[1]  Neil Immerman,et al.  Simulating Reachability Using First-Order Logic with Applications to Verification of Linked Data Structures , 2005, CADE.

[2]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[3]  David Gries The Schorr-Waite Graph Marking Algorithm , 1978, Program Construction.

[4]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[5]  Tobias Nipkow,et al.  Winskel is (almost) Right: Towards a Mechanized Semantics Textbook , 1996, Formal Aspects of Computing.

[6]  Wolfram Schulte,et al.  A Practical Verification Methodology for Concurrent Programs , 2009 .

[7]  Reinhard Wilhelm,et al.  Parametric shape analysis via 3-valued logic , 1999, POPL '99.

[8]  Peter W. O'Hearn,et al.  The Logic of Bunched Implications , 1999, Bulletin of Symbolic Logic.

[9]  Shuvendu K. Lahiri,et al.  Verifying properties of well-founded linked lists , 2006, POPL '06.

[10]  Thomas W. Reps,et al.  Automated Verification of the Deutsch-Schorr-Waite Tree-Traversal Algorithm , 2006, SAS.

[11]  G. Rosu,et al.  From Rewriting Logic Executable Semantics to Matching Logic Program Verification , 2009 .

[12]  Michael J. C. Gordon,et al.  Forward with Hoare , 2010, Reflections on the Work of C. A. R. Hoare.

[13]  Narciso Martí-Oliet,et al.  All About Maude - A High-Performance Logical Framework, How to Specify, Program and Verify Systems in Rewriting Logic , 2007, All About Maude.

[14]  Stephen Gilmore,et al.  Mobile Resource Guarantees for Smart Devices , 2004, CASSIS.

[15]  José Meseguer,et al.  The Rewriting Logic Semantics Project , 2006, Electron. Notes Theor. Comput. Sci..

[16]  Grigore Rosu,et al.  An overview of the K semantic framework , 2010, J. Log. Algebraic Methods Program..

[17]  K. Rustan M. Leino,et al.  The Spec# Programming System , 2012 .

[18]  Matthew J. Parkinson,et al.  jStar: towards practical verification for java , 2008, OOPSLA.

[19]  Grigore Rosu,et al.  Matching Logic - Extended Report , 2009 .

[20]  Bernhard Beckert,et al.  Verification of Object-Oriented Software. The KeY Approach - Foreword by K. Rustan M. Leino , 2007, The KeY Approach.

[21]  Joseph A. Goguen,et al.  Algebraic semantics of imperative programs , 1996, Foundations of computing series.

[22]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[23]  Robert W. Floyd,et al.  Assigning meaning to programs , 1967 .

[24]  K. Rustan M. Leino,et al.  The Spec# Programming System: An Overview , 2004, CASSIS.

[25]  Dov M. Gabbay,et al.  Handbook of Philosophical Logic , 2002 .

[26]  Graham Steel,et al.  Deduction with XOR Constraints in Security API Modelling , 2005, CADE.

[27]  Dusko Pavlovic,et al.  Composition and refinement of behavioral specifications , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[28]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

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

[30]  Peter W. O'Hearn,et al.  A Local Shape Analysis Based on Separation Logic , 2006, TACAS.

[31]  Claude Marché,et al.  A case study of C source code verification: the Schorr-Waite algorithm , 2005, Third IEEE International Conference on Software Engineering and Formal Methods (SEFM'05).

[32]  Claude Marché,et al.  The Why/Krakatoa/Caduceus Platform for Deductive Program Verification , 2007, CAV.

[33]  Anders Møller,et al.  The Pointer Assertion Logic Engine , 2000 .

[34]  Peter W. O'Hearn,et al.  Symbolic Execution with Separation Logic , 2005, APLAS.

[35]  Mark Lillibridge,et al.  Extended static checking for Java , 2002, PLDI '02.