From Hoare Logic to Matching Logic Reachability

  • Grigore Roşu
  • Andrei Ştefănescu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7436)

Abstract

Matching logic reachability has been recently proposed as an alternative program verification approach. Unlike Hoare logic, where one defines a language-specific proof system that needs to be proved sound for each language separately, matching logic reachability provides a language-independent and sound proof system that directly uses the trusted operational semantics of the language as axioms. Matching logic reachability thus has a clear practical advantage: it eliminates the need for an additional semantics of the same language in order to reason about programs, and implicitly eliminates the need for tedious soundness proofs. What is not clear, however, is whether matching logic reachability is as powerful as Hoare logic. This paper introduces a technique to mechanically translate Hoare logic proof derivations into equivalent matching logic reachability proof derivations. The presented technique has two consequences: first, it suggests that matching logic reachability has no theoretical limitation over Hoare logic; and second, it provides a new approach to prove Hoare logics sound.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Appel, A.W.: Verified Software Toolchain. In: Barthe, G. (ed.) ESOP 2011. LNCS, vol. 6602, pp. 1–17. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  2. 2.
    Berry, G., Boudol, G.: The chemical abstract machine. Theoretical Computer Science 96(1), 217–248 (1992)MathSciNetMATHCrossRefGoogle Scholar
  3. 3.
    Blazy, S., Leroy, X.: Mechanized semantics for the Clight subset of the C language. Journal of Automated Reasoning 43(3), 263–288 (2009)MathSciNetMATHCrossRefGoogle Scholar
  4. 4.
    Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: All About Maude - A High-Performance Logical Framework. LNCS, vol. 4350. Springer, Heidelberg (2007)MATHGoogle Scholar
  5. 5.
    Cook, S.A.: Soundness and completeness of an axiom system for program verification. SIAM Journal on Computing 7(1), 70–90 (1978)MathSciNetMATHCrossRefGoogle Scholar
  6. 6.
    Ellison, C.: Roşu, G.: An executable formal semantics of C with applications. In: POPL, pp. 533–544 (2012)Google Scholar
  7. 7.
    Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. MIT (2009)Google Scholar
  8. 8.
    George, C., Haxthausen, A.E., Hughes, S., Milne, R., Prehn, S., Pedersen, J.S.: The RAISE Development Method. BCS Practitioner Series. Prentice-Hall (1995)Google Scholar
  9. 9.
    Jacobs, B.: Weakest pre-condition reasoning for Java programs with JML annotations. The Journal of Logic and Algebraic Programming 58(1-2), 61–88 (2004)MathSciNetMATHCrossRefGoogle Scholar
  10. 10.
    Liu, H., Moore, J.S.: Java Program Verification via a JVM Deep Embedding in ACL2. In: Slind, K., Bunker, A., Gopalakrishnan, G.C. (eds.) TPHOLs 2004. LNCS, vol. 3223, pp. 184–200. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  11. 11.
    Mosses, P.D. (ed.): CASL Reference Manual. LNCS, vol. 2960. Springer, Heidelberg (2004)MATHGoogle Scholar
  12. 12.
    Nipkow, T.: Winskel is (almost) right: Towards a mechanized semantics textbook. Formal Aspects of Computing 10, 171–186 (1998)MATHCrossRefGoogle Scholar
  13. 13.
    Roşu, G., Şerbănuţă, T.F.: An overview of the K semantic framework. The Journal of Logic and Algebraic Programming 79(6), 397–434 (2010)MathSciNetMATHCrossRefGoogle Scholar
  14. 14.
    Roşu, G., Ştefănescu, A.: Matching logic: A new program verification approach (NIER track). In: ICSE, pp. 868–871 (2011)Google Scholar
  15. 15.
    Roşu, G., Ştefănescu, A.: From Hoare logic to matching logic reachability. Tech. Rep. Univ. of Illinois (June 2012), http://hdl.handle.net/2142/31335
  16. 16.
    Roşu, G., Ştefănescu, A.: Towards a Unified Theory of Operational and Axiomatic Semantics. In: Czumaj, A., Mehlhorn, K., Pitts, A., Wattenhofer, R. (eds.) ICALP 2012, Part II. LNCS, vol. 7392, pp. 351–363. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  17. 17.
    Roşu, G., Ellison, C., Schulte, W.: Matching Logic: An Alternative to Hoare/Floyd Logic. In: Johnson, M., Pavlovic, D. (eds.) AMAST 2010. LNCS, vol. 6486, pp. 142–162. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  18. 18.
    Sasse, R., Meseguer, J.: Java+ITP: A verification tool based on Hoare logic and algebraic semantics. Electronic Notes in Theoretical Computer Science 176(4), 29–46 (2007)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Grigore Roşu
    • 1
    • 2
  • Andrei Ştefănescu
    • 1
  1. 1.University of Illinois at Urbana-ChampaignUSA
  2. 2.Alexandru Ioan Cuza UniversityIaşiRomania

Personalised recommendations