Hoare Logic for ARM Machine Code

  • Magnus O. Myreen
  • Anthony C. J. Fox
  • Michael J. C. Gordon
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4767)

Abstract

This paper shows how a machine-code Hoare logic is used to lift reasoning from the tedious operational model of a machine language to a manageable level of abstraction without making simplifying assumptions. A Hoare logic is placed on top of a high-fidelity model of the ARM instruction set. We show how the generality of ARM instructions is captured by specifications in the logic and how the logic can be used to prove loops and procedures that traverse pointer-based data structures. The presented work has been mechanised in the HOL4 theorem prover and is currently being used to verify ARM machine code implementations of arithmetic and cryptographic operations.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Boyer, R.S., Yu, Y.: Automated proofs of object code for a widely used microprocessor. J. ACM 43(1), 166–192 (1996)MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Tan, G., Appel, A.W.: A compositional logic for control flow. In: Emerson, E.A., Namjoshi, K.S. (eds.) VMCAI 2006. LNCS, vol. 3855, Springer, Heidelberg (2005)CrossRefGoogle Scholar
  3. 3.
    Hardin, D.S., Smith, E.W., Young, W.D.: A robust machine code proof framework for highly secure applications. In: Manolios, P., Wilding, M. (eds.) ACL2, pp. 11–20. ACM Press, New York (2006)CrossRefGoogle Scholar
  4. 4.
    Tuch, H., Klein, G., Norrish, M.: Types, bytes, and separation logic. In: Hofmann, M., Felleisen, M. (eds.) POPL. Proc. 34th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 97–108. ACM Press, New York (2007)Google Scholar
  5. 5.
    Myreen, M.O., Gordon, M.J.: Hoare logic for realistically modelled machine code. In: TACAS. LNCS, pp. 568–582. Springer, Heidelberg (2007)Google Scholar
  6. 6.
    Gordon, M.J.C., Melham, T.F. (eds.): Introduction to HOL (A theorem-proving environment for higher-order logic). Cambridge University Press, Cambridge (1993)MATHGoogle Scholar
  7. 7.
    Fox, A.: Formal specification and verification of ARM6. In: Basin, D., Wolff, B. (eds.) TPHOLs 2003. LNCS, vol. 2758, Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Reynolds, J.: Separation logic: A logic for shared mutable data structures. In: LICS. Proceedings of Logic in Computer Science, IEEE Computer Society, Los Alamitos (2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Magnus O. Myreen
    • 1
  • Anthony C. J. Fox
    • 1
  • Michael J. C. Gordon
    • 1
  1. 1.Computer Laboratory, University of Cambridge, CambridgeUK

Personalised recommendations