English

Automated Synthesis of Asynchronizations

Programming Languages 2022-09-15 v1 Logic in Computer Science

Abstract

Asynchronous programming is widely adopted for building responsive and efficient software, and modern languages such as C# provide async/await primitives to simplify the use of asynchrony. In this paper, we propose an approach for refactoring a sequential program into an asynchronous program that uses async/await, called asynchronization. The refactoring process is parametrized by a set of methods to replace with asynchronous versions, and it is constrained to avoid introducing data races. We investigate the delay complexity of enumerating all data race free asynchronizations, which quantifies the delay between outputting two consecutive solutions. We show that this is polynomial time modulo an oracle for solving reachability in sequential programs. We also describe a pragmatic approach based on an interprocedural data-flow analysis with polynomial-time delay complexity. The latter approach has been implemented and evaluated on a number of non-trivial C# programs extracted from open-source repositories

Keywords

Cite

@article{arxiv.2209.06648,
  title  = {Automated Synthesis of Asynchronizations},
  author = {Sidi Mohamed Beillahi and Ahmed Bouajjani and Constantin Enea and Shuvendu Lahiri},
  journal= {arXiv preprint arXiv:2209.06648},
  year   = {2022}
}

Comments

37 pages, 18 figures, an extended version of a SAS 2022 paper with the same title

R2 v1 2026-06-28T01:17:17.358Z