A Program Logic for Resource Verification

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.

[1]  M. Hofmann A Type System for Bounded Space and Functional In-Place Update , 2000, Nord. J. Comput..

[2]  Martin Hofmann,et al.  Another Type System for In-Place Update , 2002, ESOP.

[3]  David von Oheimb Hoare logic for Java in Isabelle/HOL , 2001, Concurr. Comput. Pract. Exp..

[4]  Thomas Kleymann,et al.  Hoare logic and VDM : machine-checked soundness and completeness proofs , 1998 .

[5]  Martín Abadi,et al.  A Logic of Object-Oriented Programs , 1997, Verification: Theory and Practice.

[6]  Lilian Burdy,et al.  Jack: Java applet correctness kit , 2002 .

[7]  George C. Necula,et al.  A certifying compiler for Java , 2000, PLDI '00.

[8]  James Moore,et al.  Proving Theorems about Java and the JVM with ACL2 , 2002 .

[9]  Cliff B. Jones,et al.  Systematic software development using VDM , 1986, Prentice Hall International Series in Computer Science.

[10]  Martin Hofmann,et al.  Static prediction of heap space usage for first-order functional programs , 2003, POPL '03.

[11]  Frank S. de Boer,et al.  A Tool-Supported Proof System for Multithreaded Java , 2002, FMCO.

[12]  Claude Marché,et al.  The KRAKATOA tool for certificationof JAVA/JAVACARD programs annotated in JML , 2004, J. Log. Algebraic Methods Program..

[13]  Arnd Poetzsch-Heffter,et al.  A Programming Logic for Sequential Java , 1999, ESOP.

[14]  Francis Hin-Lun Tang Towards feasible, machine-assisted verification of object-oriented programs , 2002 .

[15]  K. Rustan M. Leino Recursive Object Types in a Logic of Object-Oriented Programs , 1998, Nord. J. Comput..

[16]  Tobias Nipkow,et al.  Proving pointer programs in higher-order logic , 2005, Inf. Comput..

[17]  Wolfgang Thomas Semantik und Verifikation , 1993, Perspektiven der Informatik.

[18]  Frank S. de Boer,et al.  A WP-calculus for OO , 1999, FoSSaCS.

[19]  Bart Jacobs,et al.  Java Program Verification via a Hoare Logic with Abrupt Termination , 2000, FASE.

[20]  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.

[21]  Tobias Nipkow,et al.  Hoare Logics for Recursive Procedures and Unbounded Nondeterminism , 2002, CSL.

[22]  Cees Pierik,et al.  A Rule of Adaptation for OO , 2003 .

[23]  Kevin Barraclough,et al.  I and i , 2001, BMJ : British Medical Journal.

[24]  Frank S. de Boer,et al.  Computer-aided Specification and Verification of Annotated Object-Oriented Programs , 2002, FMOODS.

[25]  Kenneth MacKenzie,et al.  Grail: a functional form for imperative mobile code , 2003, Electron. Notes Theor. Comput. Sci..