Skip to main content

A Program Logic for Resource Verification

  • Conference paper
Theorem Proving in Higher Order Logics (TPHOLs 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3223))

Included in the following conference series:

Abstract

We present a program logic for reasoning about resource consumption of programs written in Grail, an abstract fragment of the Java Virtual Machine Language. Serving as the target logic of a certifying compiler, the logic exploits Grail’s dual nature of combining a functional interpretation with object-oriented features and a cost model for the JVM. We present the resource-aware operational semantics of Grail, the program logic, and prove soundness and completeness. All of the work described has been formalised in the theorem prover Isabelle/HOL, which provides us with an implementation of the logic as well as confidence in the results. We conclude with examples of using the logic for proving resource bounds on code resulting from compiling high-level functional programs.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M., Leino, R.: A Logic of Object-Oriented Programs. In: Bidoit, M., Dauchet, M. (eds.) TAPSOFT 1997. LNCS, vol. 1214, pp. 682–696. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  2. Ábrahám, E., de Boer, F.S., de Roever, W.-P., Steffen, M.: A tool-supported proof system for multithreaded java. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2002. LNCS, vol. 2852, pp. 1–32. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  3. Aspinall, D., Hofmann, M.: Another Type System for In-Place Update. In: Le Métayer, D. (ed.) ESOP 2002. LNCS, vol. 2305, pp. 36–52. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  4. Beringer, L., MacKenzie, K., Stark, I.: Grail: a Functional Form for Imperative Mobile Code. Electronic Notes in Theoretical Computer Science 85(1) (2003)

    Google Scholar 

  5. Boer, F.D., Pierik, C.: Computer-aided specification and verification of annotated objectoriented programs. In: Jacobs, B., Rensink, A. (eds.) FMOODS 2002. IFIP Conference Proceedings, vol. 209, pp. 163–177. Kluwer, Dordrecht (2002)

    Google Scholar 

  6. Burdy, L., Requet, A.: Jack: Java applet correctness kit. In: 4th Gemplus Developer Conference (2002)

    Google Scholar 

  7. Colby, C., Lee, P., Necula, G., Blau, F., Plesko, M., Cline, K.: A Certifying Compiler for Java. In: PLDI 2000 – Conference on Programming Language Design and Implementation, pp. 95–107. ACM Press, New York (2000)

    Chapter  Google Scholar 

  8. de Boer, F.: A WP-calculus for OO. In: Thomas, W. (ed.) FOSSACS 1999. LNCS, vol. 1578, pp. 135–149. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  9. Filliâtre, J.-C.: Why: a multi-language multi-prover verification tool. Research Report 1366, LRI, Université Paris Sud (March 2003), http://www.lri.fr/filliatr/ftp/publis/why-tool.ps.gz

  10. Hofmann, M.: Semantik und Verifikation. Lecture Notes, WS 97/98. TU Darmstadt (1998)

    Google Scholar 

  11. Hofmann, M.: A Type System for Bounded Space and Functional In-place Update. Nordic. Journal of Computing 7(4), 258–289 (2000)

    MATH  MathSciNet  Google Scholar 

  12. Hofmann, M., Jost, S.: Static Prediction of Heap Space Usage for First-Order Functional Programs. In: POPL 2003 – Symposium on Principles of Programming Languages, New Orleans, LA, USA, January 2003, pp. 185–197. ACM Press, New York (2003)

    Chapter  Google Scholar 

  13. Huisman, M., Jacobs, B.: Java Program Verification via a Hoare Logic with Abrupt Termination. In: Maibaum, T. (ed.) FASE 2000. LNCS, vol. 1783, pp. 284–303. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  14. Jones, C.: Systematic Software Development Using VDM. Prentice-Hall, Englewood Cliffs (1990)

    MATH  Google Scholar 

  15. Kleymann, T.: Hoare Logic and VDM: Machine-Checked Soundness and Completeness Proofs. PhD thesis, LFCS, University of Edinburgh (1999)

    Google Scholar 

  16. Leino, R.: Recursive Object Types in a Logic of Object-oriented Programs. Nordic Journal of Computing 5(4), 330–360 (1998)

    MATH  MathSciNet  Google Scholar 

  17. MacKenzie, K., Wolverson, N.: Camelot and Grail: Compiling a Resource-aware Functional Language for the Java Virtual Machine. In: TFP 2003, Symposium on Trends in Functional Languages, Edinburgh, September 11-12 (2003)

    Google Scholar 

  18. Marche, C., Paulin-Mohring, C., Urbain, X.: The KRAKATOA tool for certification of JAVA/JAVACARD programs annotated in JML. Journal of Logic and Algebraic Programming 58, 89 (2004)

    Article  MATH  Google Scholar 

  19. Mehta, F., Nipkow, T.: Proving pointer programs in higher-order logic. In: Baader, F. (ed.) CADE 2003. LNCS (LNAI), vol. 2741, pp. 121–135. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  20. Meyer, J., Müller, P., Poetzsch-Heffter, A.: The JIVE system–implementation description (2000); available from www.informatik.fernuni-hagen.de/pi5/publications.html

  21. Moore, J.S.: Proving theorems about Java and the JVM with ACL2. NATO Science Series Sub Series III Computer and Systems Sciences 191, 227–290 (2003)

    Google Scholar 

  22. Müller, P., Poetzsch-Heffter, A.: A Programming Logic for Sequential Java. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, pp. 162–176. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  23. Necula, G.: Proof-carrying Code. In: POPL 1997 – Symposium on Principles of Programming Languages, Paris, France, January 15–17, pp. 106–116. ACM Press, New York (1997)

    Chapter  Google Scholar 

  24. Nipkow, T.: Hoare Logics for Recursive Procedures and Unbounded Nondeterminism. In: Bradfield, J.C. (ed.) CSL 2002 and EACSL 2002. LNCS, vol. 2471, pp. 103–119. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  25. Pierik, C., Boer, F.d.: A rule of adaptation for OO. Technical Report UU-CS-2003-032, Utrecht University (2004)

    Google Scholar 

  26. Reynolds, J.: Separation Logic: A Logic for Shared Mutable Data Structures. In: LICS 2002 – Symposium on Logic in Computer Science, Copenhagen, Denmark, July 22–25 (2002)

    Google Scholar 

  27. Sannella, D., Hofmann, M.: Mobile Resource Guarantees. EU OpenFET Project (2002), http://www.dcs.ed.ac.uk/home/mrg/

  28. Tang, F.: Towards feasible, machine assisted verification of object-oriented programs. PhD thesis, School of Informatics, University of Edinburgh (2002)

    Google Scholar 

  29. von Oheimb, D.: Hoare logic for Java in Isabelle/HOL. Concurrency and Computation: Practice and Experience 13(13), 1173–1214 (2001)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Aspinall, D., Beringer, L., Hofmann, M., Loidl, HW., Momigliano, A. (2004). A Program Logic for Resource Verification. In: Slind, K., Bunker, A., Gopalakrishnan, G. (eds) Theorem Proving in Higher Order Logics. TPHOLs 2004. Lecture Notes in Computer Science, vol 3223. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30142-4_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30142-4_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23017-5

  • Online ISBN: 978-3-540-30142-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics