A program logic for resources

被引:28
作者
Aspinall, David [1 ]
Beringer, Lennart [1 ]
Hofmann, Martin [2 ]
Loidl, Hans-Wolfgang [2 ]
Momigliano, Alberto [1 ]
机构
[1] Univ Edinburgh, Sch Informat, Lab Fdn Comp Sci, Edinburgh EH9 3JZ, Midlothian, Scotland
[2] Univ Munich, Inst Informat, D-80538 Munich, Germany
关键词
program logic; proof-carrying-code; object-oriented languages; !text type='Java']Java[!/text] virtual machine language; cost modelling; quantitative typesystems; lightweight verification;
D O I
10.1016/j.tcs.2007.09.003
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We introduce a reasoning infrastructure for proving statements about resource consumption in a fragment of the Java Virtual Machine Language (JVML). The infrastructure is based on a small hierarchy of program logics, with increasing levels of abstraction: at the top there is a type system for a high-level language that encodes resource consumption. The infrastructure is designed to be used in a proof-carrying code (PCC) scenario, where mobile programs can be equipped with formal evidence that they have predictable resource behaviour. This article focuses on the core logic in our infrastructure, a VDM-style program logic for partial correctness, which can make statements about resource consumption alongside functional behaviour. We establish some important results for this logic, including soundness and completeness with respect to a resource-aware operational semantics for the JVML. We also present a second logic built on top of the core logic, which is used to express termination; it too is shown to be sound and complete. We then outline how high-level language type systems may be connected to these logics. The entire infrastructure has been formalized in Isabelle/HOL, both to enhance the confidence in our meta-theoretical results, and to provide a prototype implementation for PCC. We give examples to show the usefulness of this approach, including proofs of resource bounds on code resulting from compiling high-level functional programs. (c) 2007 Published by Elsevier B.V.
引用
收藏
页码:411 / 445
页数:35
相关论文
共 83 条
[1]  
ABADI M, 1997, THEORY PRACTICE SOFT, V1214, P682
[2]   An assertion-based proof system for multithreaded Java']Java [J].
Abraham, E ;
de Boer, FS ;
de Roever, WP ;
Steffen, M .
THEORETICAL COMPUTER SCIENCE, 2005, 331 (2-3) :251-290
[3]  
Ahrendt W., 2005, SOFTWARE SYSTEM MODE, V4, P32, DOI [DOI 10.1007/S10270-004-0058-X, 10.1007/s10270-004-0058-x]
[4]  
[Anonymous], POPL 2003
[5]  
Appel Andrew W., 1992, Compiling with Continuations
[6]   Foundational proof-carrying code [J].
Appel, AW .
16TH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 2001, :247-256
[7]  
Aspinall D, 2005, LECT NOTES COMPUT SC, V3362, P1
[8]  
Aspinall D, 2004, LECT NOTES COMPUT SC, V3223, P34
[9]   Optimisation Validation [J].
Aspinall, David ;
Beringer, Lennart ;
Momigliano, Alberto .
ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2007, 176 (03) :37-59
[10]  
Aspinall D, 2006, LECT NOTES COMPUT SC, V3956, P16