Asynchronous programming is a ubiquitous systems programming idiom to manage concurrent interactions with the environment. In this style, instead of waiting for time-consuming operations to complete, the programmer makes a non-blocking call to the operation and posts a callback task to a task buffer that is executed later when the time-consuming operation completes. A co-operative scheduler mediates the interaction by picking and executing callback tasks from the task buffer to completion (and these callbacks can post further callbacks to be executed later). Writing correct asynchronous programs is hard because the use of callbacks, while efficient, obscures program control flow.
We provide a formal model underlying asynchronous programs and study verification problems for this model. We show that the safety verification problem for finite-data asynchronous programs is expspace-complete. We show that liveness verification for finite-data asynchronous programs is decidable and polynomial-time equivalent to Petri Net reachability. Decidability is not obvious, since even if the data is finite-state, asynchronous programs constitute infinite-state transition systems: both the program stack and the task buffer of pending asynchronous calls can be potentially unbounded.
Our main technical construction is a polynomial-time semantics-preserving reduction from asynchronous programs to Petri Nets and conversely. The reduction allows the use of algorithmic techniques on Petri Nets to the verification of asynchronous programs.
We also study several extensions to the basic models of asynchronous programs that are inspired by additional capabilities provided by implementations of asynchronous libraries, and classify the decidability and undecidability of verification questions on these extensions.
(Quantified) Horn Constraint Solving for Program Verification and Synthesis
我们展示了如何自动工具的验证线性和分支的时间属性的程序,多线程,和功能的程序,以及程序合成可以自然地和统一地被视为求解器的约束条件的形式(量化)霍恩条款的背景逻辑理论。这样的观点可以提供各种优势,例如。例如,在一个实施例中,约束生成(也称为证明义务的生成)和约束求解(也称为证明发现)之间的关注点的逻辑分离、跨不同验证任务的求解器的重用、以及证明设计者从低级算法关注点中解放出来,反之亦然。逻辑程序设计理论与实践(Theory and Practice of Logic Programming,TPLP)
Synthesis and Verification of Transformer Programs (Technical Report)
University of Kaiserslautern-Landau, Germany(凯斯比尔拉特大学);Royal Holloway, University of London, England(伦敦皇家霍洛威大学);Uppsala University, Sweden(乌普萨拉大学);University of Regensburg, Germany(莱比锡-乌尔姆大学);MPI-SWS, Germany(德国马克斯·普朗克所)