Much recent research has been devoted to modeling effects within type theory. Building on this work, we observe that effectful type theories can provide a foundation on which to build semantics for more complex programming constructs and program logics, extending the reasoning principles that apply within the host effectful type theory itself. Concretely, our main contribution is a semantics for concurrent separation logic (CSL) within the F* proof assistant in a manner that enables dependently typed, effectful F* programs to make use of concurrency and to be specified and verified using a full-featured, extensible CSL. In contrast to prior approaches, we directly derive the partial-correctness Hoare rules for CSL from the denotation of computations in the effectful semantics of non-deterministically interleaved atomic actions. Demonstrating the flexibility of our semantics, we build generic, verified libraries that support various concurrency constructs, ranging from dynamically allocated, storable spin locks, to protocol-indexed channels. We conclude that our effectful semantics provides a simple yet expressive basis on which to layer domain-specific languages and logics for verified, concurrent programming.
翻译:最近的许多研究都致力于类型理论中的模型效应。基于这项工作,我们观察到,有效果的理论可以提供一个基础,用来为更复杂的编程结构和程序逻辑构建语义学,扩展在主机有效类型理论本身范围内适用的推理原则。具体地说,我们的主要贡献是F* 验证助理内部同时分离逻辑的语义学。我们建立通用的、经过核实的图书馆,支持各种共算结构,从动态分配、可储存的开关到协议索引化的渠道。我们的结论是,与以前的做法不同,我们的效果性语义学提供了简单而明确的基础,可以用来验证同一层的具体语言和逻辑。