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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
Á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)
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)
Beringer, L., MacKenzie, K., Stark, I.: Grail: a Functional Form for Imperative Mobile Code. Electronic Notes in Theoretical Computer Science 85(1) (2003)
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)
Burdy, L., Requet, A.: Jack: Java applet correctness kit. In: 4th Gemplus Developer Conference (2002)
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)
de Boer, F.: A WP-calculus for OO. In: Thomas, W. (ed.) FOSSACS 1999. LNCS, vol. 1578, pp. 135–149. Springer, Heidelberg (1999)
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
Hofmann, M.: Semantik und Verifikation. Lecture Notes, WS 97/98. TU Darmstadt (1998)
Hofmann, M.: A Type System for Bounded Space and Functional In-place Update. Nordic. Journal of Computing 7(4), 258–289 (2000)
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)
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)
Jones, C.: Systematic Software Development Using VDM. Prentice-Hall, Englewood Cliffs (1990)
Kleymann, T.: Hoare Logic and VDM: Machine-Checked Soundness and Completeness Proofs. PhD thesis, LFCS, University of Edinburgh (1999)
Leino, R.: Recursive Object Types in a Logic of Object-oriented Programs. Nordic Journal of Computing 5(4), 330–360 (1998)
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)
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)
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)
Meyer, J., Müller, P., Poetzsch-Heffter, A.: The JIVE system–implementation description (2000); available from www.informatik.fernuni-hagen.de/pi5/publications.html
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)
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)
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)
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)
Pierik, C., Boer, F.d.: A rule of adaptation for OO. Technical Report UU-CS-2003-032, Utrecht University (2004)
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)
Sannella, D., Hofmann, M.: Mobile Resource Guarantees. EU OpenFET Project (2002), http://www.dcs.ed.ac.uk/home/mrg/
Tang, F.: Towards feasible, machine assisted verification of object-oriented programs. PhD thesis, School of Informatics, University of Edinburgh (2002)
von Oheimb, D.: Hoare logic for Java in Isabelle/HOL. Concurrency and Computation: Practice and Experience 13(13), 1173–1214 (2001)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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