TypeDis:一种解缠类型系统
TypeDis: A Type System for Disentanglement
AI总结:
TypeDis是一种基于时间戳的类型系统,用于自动验证并行程序的解缠属性,通过类型检查确保程序正确性,减少手动证明的工作量。
摘要:
解缠是并行程序的一个运行时属性,保证并行任务对彼此的分配保持无知。如MaPLe编译器和运行时系统所展示的,解缠可以用于快速自动内存管理,尤其是无同步的本地任务垃圾回收。然而,作为一种低级属性,解缠对于程序员来说难以推理。迄今为止,唯一静态验证解缠的方法是DisLog,一种基于Iris的分离逻辑变种,在Rocq证明助手中机械实现。DisLog是一种功能齐全的程序逻辑,允许证明功能正确性以及验证解缠。然而,其使用需要显著的专业知识和每程序的证明努力。本文探讨了通过类型系统进行自动验证的途径,确保任何正确类型化的程序都是解缠的,并将手动证明的负担从程序员身上转移。它贡献了TypeDis,一种受区域类型启发的类型系统,其中每个类型都带有时间戳注解,标识分配它的任务。TypeDis支持等递归类型以及在类型和时间戳上的多态性。关键的是,时间戳在类型检查过程中允许更改,在连接点以及通过一种称为子时间的子类型形式。本文在一系列示例上展示了TypeDis及其特性。TypeDis的正确性和示例在Rocq证明助手中机械实现,使用改进版的DisLog,称为DisLog2。
英文摘要:
Disentanglement is a runtime property of parallel programs guaranteeing that parallel tasks remain oblivious to each other's allocations. As demonstrated in the MaPLe compiler and run-time system, disentanglement can be exploited for fast automatic memory management, especially task-local garbage collection with no synchronization between parallel tasks. However, as a low-level property, disentanglement can be difficult to reason about for programmers. The only means of statically verifying disentanglement so far has been DisLog, an Iris-fueled variant of separation logic, mechanized in the Rocq proof assistant. DisLog is a fully-featured program logic, allowing for proof of functional correctness as well as verification of disentanglement. Yet its employment requires significant expertise and per-program proof effort. This paper explores the route of automatic verification via a type system, ensuring that any well-typed program is disentangled and lifting the burden of carrying out manual proofs from the programmer. It contributes TypeDis, a type system inspired by region types, where each type is annotated with a timestamp, identifying the task that allocated it. TypeDis supports iso-recursive types as well as polymorphism over both types and timestamps. Crucially, timestamps are allowed to change during type-checking, at join points as well as via a form of subtyping, dubbed subtiming. The paper illustrates TypeDis and its features on a range of examples. The soundness of TypeDis and the examples are mechanized in the Rocq proof assistant, using an improved version of DisLog, dubbed DisLog2.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。