Abstract

The model of asynchronous programming arises in many contexts, from low-level systems software to high-level web programming. We take a language-theoretic perspective and show general decidability and undecidability results for asynchronous programs that capture all known results as well as show decidability of new and important classes. As a main consequence, we show decidability of safety, termination and boundedness verification for higher-order asynchronous programs—such as OCaml programs using Lwt—and undecidability of liveness verification already for order-2 asynchronous programs. We show that under mild assumptions, surprisingly, safety and termination verification of asynchronous programs with handlers from a language class are decidable iff emptiness is decidable for the underlying language class. Moreover, we show that configuration reachability and liveness (fair termination) verification are equivalent, and decidability of these problems implies decidability of the well-known “equal-letters” problem on languages. Our results close the decidability frontier for asynchronous programs.

Highlights

  • Asynchronous programming is a common way to manage concurrent requests in a system. In this style of programming, rather than waiting for a time-consuming operation to complete, the programmer can make asynchronous procedure calls which are stored in a task buffer pending later execution

  • Using the Parikh approach, safety, termination, and boundedness are all decidable for asynchronous programs with recursive handlers, by reduction to corresponding problems on Petri nets [30,12]

  • We show decidability of these problems implies the decidability of a well-known combinatorial problem on languages: given a language over the alphabet {a, b}, decide if it contains a word with an equal number of as and bs

Read more

Summary

Introduction

Asynchronous programming is a common way to manage concurrent requests in a system. In this style of programming, rather than waiting for a time-consuming operation to complete, the programmer can make asynchronous procedure calls which are stored in a task buffer pending later execution. Using the Parikh approach, safety (formulated as reachability of a global state), termination (whether all executions terminate), and boundedness (whether there is an a priori upper bound on the task buffer) are all decidable for asynchronous programs with recursive handlers, by reduction to corresponding problems on Petri nets [30,12]. Configuration reachability (reachability of a specific global state and task buffer configuration), fair termination (termination under a fair scheduler), and fair non-starvation (every pending handler instance is eventually executed) are decidable, by separate ad hoc reductions to Petri net reachability [12]. One replaces each handler with a finite-data program that is equivalent up to “losing” handlers in the task buffer. This requires that one can compute equivalent finite-data programs for given handler programs This has been applied to checking safety for recursive handler programs [3].

Preliminaries
Decision Problems on Asynchronous Programs
General Decidability Results
Safety and termination
Boundedness
Configuration reachability and liveness properties
Higher-Order Asynchronous Programs
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.