Chapter 1 A Resource-aware Program Logic for a JVM-like Language

We present a resource-aware program logic for a JVM-like language and prove its soundness and completeness. We first define Grail, an abstraction over a subset of the JVM bytecode language to facilitate formalisation while retaining a close correspondence to JVM’s cost model. For Grail we then define an operational semantics, and on top of that a VDM-style program logic that additionally tracks resource consumption such as execution time and heap allocation. Finally, we prove soundness and completeness of this program logic, with respect to the operational semantics. All formalisations and proofs have been done in the Isabelle theorem prover.