Skip to main content

TS

Efficient synthesis for concurrency by semantics-preserving transformations

Authors

Pavol Cerny, Thomas Henzinger, Arjun Radhakrishna, Leonid Ryzhyk and Thorsten Tarrach

University of Colorado Boulder

IST Austria

NICTA

Abstract

We develop program synthesis techniques that can help programmers fix concurrency-related bugs. We make two new contributions to synthesis for concurrency, the first improving the efficiency of the synthesized code, and the second improving the efficiency of the synthesis procedure itself. The first contribution is to have the synthesis procedure explore a variety of (sequential) semantics-preserving program transformations, in order to obtain efficient concurrent code. Classically, only one such transformation has been considered, namely, the insertion of synchronization primitives (such as locks) in order to create atomic sections of sequential code. Based on common manual bug-fixing techniques used by Linux device-driver developers, we explore additional, more efficient transformations, such as the reordering of independent instructions. This proves to be surprisingly effective in practice: many concurrency bugs can be eliminated simply by instruction reordering. Our second contribution is to speed up the counterexample-guided removal of concurrency bugs within the synthesis procedure by considering partial-order traces (instead of linear traces) as counterexamples. A partial-order error trace represents a set of linear (interleaved) traces of a concurrent program all of which lead to the same error. By eliminating a partial-order error trace through a semantics-preserving program transformation, we eliminate in a single iteration of the synthesis procedure all linearizations of the partial-order trace. We evaluated our techniques on several simplified examples of real concurrency bugs that occurred in Linux device drivers.

BibTeX Entry

  @inproceedings{Cerny_HRRT_13,
    author           = {Cerny, Pavol and Henzinger, Thomas and Radhakrishna, Arjun and Ryzhyk, Leonid and Tarrach, Thorsten},
    month            = jul,
    year             = {2013},
    title            = {Efficient Synthesis for Concurrency by Semantics-Preserving Transformations},
    booktitle        = {25th International Conference on Computer Aided Verification},
    pages            = {1--16},
    address          = {Saint Petersburg, Russia}
  }

Download