Linear Capabilities for Fully Abstract Compilation of Separation-Logic-Verified Code

被引:12
|
作者
Van Strydonck, Thomas [1 ]
Piessens, Frank [1 ]
Devriese, Dominique [2 ]
机构
[1] Katholieke Univ Leuven, Leuven, Belgium
[2] Vrije Univ Brussel, Brussels, Belgium
关键词
fully abstract compilation; capabilities; verification; separation logic;
D O I
10.1145/3341688
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Separation logic is a powerful program logic for the static modular verification of imperative programs. However, dynamic checking of separation logic contracts on the boundaries between verified and untrusted modules is hard, because it requires one to enforce (among other things) that outcalls from a verified to an untrusted module do not access memory resources currently owned by the verified module. This paper proposes an approach to dynamic contract checking by relying on support for capabilities, a well-studied form of unforgeable memory pointers that enables fine-grained, efficient memory access control. More specifically, we rely on a form of capabilities called linear capabilities for which the hardware enforces that they cannot be copied. We formalize our approach as a fully abstract compiler from a statically verified source language to an unverified target language with support for linear capabilities. The key insight behind our compiler is that memory resources described by spatial separation logic predicates can be represented at run time by linear capabilities. The compiler is separation-logic-proof-directed: it uses the separation logic proof of the source program to determine how memory accesses in the source program should be compiled to linear capability accesses in the target program. The full abstraction property of the compiler essentially guarantees that compiled verified modules can interact with untrusted target language modules as if they were compiled from verified code as well.
引用
收藏
页数:29
相关论文
共 2 条
  • [1] Linear capabilities for fully abstract compilation of separation-logic-verified code
    Van Strydonck, Thomas
    Piessens, Frank
    Devriese, Dominique
    [J]. JOURNAL OF FUNCTIONAL PROGRAMMING, 2021, 31
  • [2] An Abstract Stack Based Approach to Verified Compositional Compilation to Machine Code
    Wang, Yuting
    Wilke, Pierre
    Shao, Zhong
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL):