Open-access article

Verifying liveness for asynchronous programs

Verifying liveness for asynchronous programs

Abstract

Asynchronous or 'event-driven' programming is a popular technique to efficiently and flexibly manage concurrent interactions. In these programs, the programmer can post tasks that get stored in a task buffer and get executed atomically by a non-preemptive scheduler at a future point. We give a decision procedure for the fair termination property of asynchronous programs. The fair termination problem asks, given an asynchronous program and a fairness condition on its executions, does the program always terminate on fair executions? The fairness assumptions rule out certain undesired bad behaviors, such as where the scheduler ignores a set of posted tasks forever, or where a non-deterministic branch is always chosen in one direction. Since every liveness property reduces to a fair termination property, our decision procedure extends to liveness properties of asynchronous programs. Our decision procedure for the fair termination of asynchronous programs assumes all variables are finite-state. Even though variables are finite-state, asynchronous programs can have an unbounded stack from recursive calls made by tasks, as well as an unbounded task buffer of pending tasks. We show a reduction from the fair termination problem for asynchronous programs to fair termination problems on Petri Nets, and our main technical result is a reduction of the latter problem to Presburger satisfiability. Our decidability result is in contrast to multithreaded recursive programs, for which liveness properties are undecidable. While we focus on fair termination, we show our reduction to Petri Nets can be used to prove related properties such as fair nonstarvation (every posted task is eventually executed) and safety properties such as boundedness (find a bound on the maximum number of posted tasks that can be in the task buffer at any point).

Similar items

  • Errata to the Popl’09 Paper “verifying Liveness of Asynchronous Programs” Pierre Ganty, Rupak Majumdar, and Andrey Rybalchenko

    Scholarly record2009ANDREY RYBALCHENKO, Pierre Ganty, Rupak Majumdar, Andrey Rybalchenko

    An error was discovered by M.F. Atig in the coverability graph based decision procedure we defined in [2]. We thank him for bringing the error to our knowledge. We refer the interested reader to [1] for updated results about the verification of liveness properties for asynchronou

  • Verifying Robustness of Event-Driven Asynchronous Programs Against Concurrency

    Scholarly record2017ESOPAhmed Bouajjani, Michael Emmi, Constantin Enea, Burcu Kulahcioglu Ozkan

    We define a correctness criterion, called robustness against concurrency, for a class of event-driven asynchronous programs that are at the basis of modern UI frameworks in Android, iOS, and Javascript. A program is robust when all possible behaviors admitted by the program under

  • Algorithmic verification of asynchronous programs

    Open-access article2012ACM Transactions on Programming Languages and SystemsPierreGanty, RupakMajumdar

    Asynchronous programming is a ubiquitous systems programming idiom for managing 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 callbac

  • Rely/Guarantee Reasoning for Asynchronous Programs

    Scholarly record2015CONCURIvan Gavran, Filip Niksic, Aditya Kanade, Rupak Majumdar

    Asynchronous programming has become ubiquitous in smartphone and web application development, as well as in the development of server-side and system applications. Many of the uses of asynchrony can be modeled by extending programming languages with asynchronous procedure calls—p

  • Finding Non-terminating Executions in Distributed Asynchronous Programs

    Scholarly record2012SASMichael Emmi, Akash Lal

    Programming distributed and reactive asynchronous systems is complex due to the lack of synchronization between concurrently executing tasks, and arbitrary delay of message-based communication. As even simple programming mistakes have the capability to introduce divergent behavio

  • Asynchronous Programming in a Prioritized Form

    Scholarly record2015CoRRMohamed A. El-Zawawy

    Asynchronous programming has appeared as a programming style that overcomes undesired properties of concurrent programming. Typically in asynchronous models of programming, methods are posted into a post list for latter execution. The order of method executions is serial, but non