一句话:提出一种模块化规约与验证方法,用方法名多重集等层级表达式证明面向对象程序(含堆修改与并发)的终止性与活性。
论文研究面向对象程序全正确性(终止性)的模块化规约与验证。核心是一种规约风格:为每个方法赋予层级表达式,要求被调用方法的层级低于调用者,即便存在动态绑定也能隐藏实现细节。作者以方法名多重集作为层级,并为对象关联抽象层级,从而由方法名和实参对象层级定义方法层级。方法先处理不修改对象字段的程序,随后结合分离逻辑与抽象谓词族支持堆修改,最后融入已有的通道与锁死锁自由验证,用终止层级进行锁排序并引入调用权限,支持线程池、细粒度并发算法等跨线程工作验证,也可用于非终止程序的活性。
We propose an approach for the modular specification and verification of total correctness properties of object-oriented programs. The core of our approach is a specification style that prescribes a way to assign a level expression to each method such that each callee’s level is below the caller’s, even in the presence of dynamic binding. The specification style yields specifications that properly hide implementation details. The main idea is to use multisets of method names as levels, and to associate with each object levels that abstractly reflect the way the object is built from other objects. A method’s level is then defined in terms of the method’s own name and the levels associated with the objects passed as arguments. We first present the specification style in the context of programs that do not modify object fields. We then combine it with separation logic and abstract predicate families to obtain an approach for programs with heap mutation. In a third step, we address concurrency, by incorporating an existing approach for verifying deadlock freedom of channels and locks. Our main contribution here is to achieve information hiding by using the proposed termination levels for lock ordering as well. Also, we introduce call permissions to enable elegant verification of termination of programs where threads cause work in other threads, such as in thread pools or fine-grained concurrent algorithms involving compare-and-swap loops. We explain how our approach can be used also to verify the liveness of nonterminating programs.
@article{paperbot318,
title = {Modular Termination Verification of Single-Threaded and Multithreaded Programs},
author = {Bart Jacobs and Dragan Bosnacki and Ruurd Kuiper},
journal = {ACM Transactions on Programming Languages and Systems},
volume = {40},
number = {3},
year = {2018},
doi = {10.1145/3210258}
}