A High-Level Separation Logic for Heap Space under Garbage Collection

Author:

Moine Alexandre1ORCID,Charguéraud Arthur2ORCID,Pottier François1ORCID

Affiliation:

1. Inria, France

2. Inria, France / Université de Strasbourg, France / CNRS, France / ICube, France

Abstract

We present a Separation Logic with space credits for reasoning about heap space in a sequential call-by-value lambda-calculus equipped with garbage collection and mutable state. A key challenge is to design sound, modular, lightweight mechanisms for establishing the unreachability of a block. Prior work in this area uses pointed-by assertions to keep track of the predecessors of every block, but is carried out in the setting of an assembly-like programming language. We take up the challenge in the setting of a high-level language, where a key problem is to identify and reason about the memory locations that the garbage collector considers as roots. For this purpose, we propose novel "stackable" assertions, which keep track of the existence of stack-to-heap pointers without explicitly recording their origin. Furthermore, we explain how to reason about closures -- concrete heap-allocated data structures that implement the abstract concept of a first-class function. We demonstrate the expressiveness and tractability of our program logic via a range of examples, including recursive functions on linked lists, objects implemented using closures and mutable internal state, recursive functions in continuation-passing style, and three stack implementations that exhibit different space bounds. These last three examples illustrate reasoning about the reachability of the items stored in a container as well as amortized reasoning about space. All of our results are proved in Coq on top of Iris.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference55 articles.

1. Certified Complexity (CerCo)

2. Andrew W. Appel . 1992. Compiling with Continuations . Cambridge University Press . http://www.cambridge.org/9780521033114 Andrew W. Appel. 1992. Compiling with Continuations. Cambridge University Press. http://www.cambridge.org/9780521033114

3. A program logic for resources

4. David Aspinall and Martin Hofmann . 2002 . Another Type System for In-Place Update. In European Symposium on Programming (ESOP) (Lecture Notes in Computer Science , Vol. 2305). Springer, 36– 52 . https://www.tcs.ifi.lmu.de/mitarbeiter/martin-hofmann/publikationen-pdfs/c22-anothertypesystem.pdf David Aspinall and Martin Hofmann. 2002. Another Type System for In-Place Update. In European Symposium on Programming (ESOP) (Lecture Notes in Computer Science, Vol. 2305). Springer, 36–52. https://www.tcs.ifi.lmu.de/mitarbeiter/martin-hofmann/publikationen-pdfs/c22-anothertypesystem.pdf

5. Robert Atkey . 2011. Amortised Resource Analysis with Separation Logic. Logical Methods in Computer Science, 7, 2:17 ( 2011 ), http://bentnib.org/amortised-sep-logic-journal.pdf Robert Atkey. 2011. Amortised Resource Analysis with Separation Logic. Logical Methods in Computer Science, 7, 2:17 (2011), http://bentnib.org/amortised-sep-logic-journal.pdf

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. DisLog: A Separation Logic for Disentanglement;Proceedings of the ACM on Programming Languages;2024-01-05

2. Melocoton: A Program Logic for Verified Interoperability Between OCaml and C;Proceedings of the ACM on Programming Languages;2023-10-16

3. FP²: Fully in-Place Functional Programming;Proceedings of the ACM on Programming Languages;2023-08-30

4. A High-Level Separation Logic for Heap Space under Garbage Collection;Proceedings of the ACM on Programming Languages;2023-01-09

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3