AMORTISED RESOURCE ANALYSIS WITH SEPARATION LOGIC

被引:28
作者
Atkey, Robert [1 ]
机构
[1] Univ Strathclyde, Glasgow G1 1XQ, Lanark, Scotland
基金
英国工程与自然科学研究理事会;
关键词
resource bounded computing; amortised analysis; separation logic; !text type='java']java[!/text] bytecode; program logic; resource models;
D O I
10.2168/LMCS-7(2:17)2011
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Type-based amortised resource analysis following Hofmann and Jost where resources are associated with individual elements of data structures and doled out to the programmer under a linear typing discipline-have been successful in providing concrete resource bounds for functional programs, with good support for inference. In this work we translate the idea of amortised resource analysis to imperative pointer-manipulating languages by embedding a logic of resources, based on the affine intuitionistic Logic of Bunched Implications, within Separation Logic. The Separation Logic component allows us to assert the presence and shape of mutable data structures on the heap, while the resource component allows us to state the consumable resources associated with each member of the structure. We present the logic on a small imperative language, based on Java bytecode, with procedures and mutable heap. We have formalised the logic and its soundness property within the Coq proof assistant and extracted a certified verification condition generator. We also describe an proof search procedure that allows generated verification conditions to be discharged while using linear programming to infer consumable resource annotations. We demonstrate the logic on some examples, including proving the termination of in-place list reversal on lists with cyclic tails.
引用
收藏
页数:33
相关论文
共 25 条
[1]  
Albert E, 2008, LECT NOTES COMPUT SC, V5382, P113, DOI 10.1007/978-3-540-92188-2_5
[2]  
[Anonymous], 1998, Purely Functional Data Structures
[3]   A program logic for resources [J].
Aspinall, David ;
Beringer, Lennart ;
Hofmann, Martin ;
Loidl, Hans-Wolfgang ;
Momigliano, Alberto .
THEORETICAL COMPUTER SCIENCE, 2007, 389 (03) :411-445
[4]  
Aspinall D, 2010, LECT NOTES COMPUT SC, V6084, P1, DOI 10.1007/978-3-642-15640-3_1
[5]  
Aspinall D, 2008, LECT NOTES COMPUT SC, V5382, P52, DOI 10.1007/978-3-540-92188-2_3
[6]  
Atkey R, 2010, LECT NOTES COMPUT SC, V6012, P85, DOI 10.1007/978-3-642-11957-6_6
[7]  
Berdine J, 2005, LECT NOTES COMPUT SC, V3780, P52
[8]   Cyclic Proofs of Program Termination in Separation Logic [J].
Brotherston, James ;
Bornat, Richard ;
Calcagno, Cristiano .
POPL'08: PROCEEDINGS OF THE 35TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2008, :101-112
[9]   AN EFFICIENT FUNCTIONAL IMPLEMENTATION OF FIFO QUEUES [J].
BURTON, FW .
INFORMATION PROCESSING LETTERS, 1982, 14 (05) :205-206
[10]   Efficient resource management for linear logic proof search [J].
Cervesato, I ;
Hodas, JS ;
Pfenning, F .
THEORETICAL COMPUTER SCIENCE, 2000, 232 (1-2) :133-163