Abstraction-guided synthesis of synchronization


We present a novel framework for automatic inference of efficient synchronization in concurrent programs, a task known to be difficult and error-prone when done manually. Our framework is based on abstract interpretation and can infer synchronization for infinite state programs. Given a program, a specification, and an abstraction, we infer synchronization that avoids all (abstract) interleavings that may violate the specification, but permits as many valid interleavings as possible. Combined with abstraction refinement, our framework can be viewed as a new approach for verification where both the program and the abstraction can be modified on-the-fly during the verification process. The ability to modify the program, and not only the abstraction, allows us to remove program interleavings not only when they are known to be invalid, but also when they cannot be verified using the given abstraction. We implemented a prototype of our approach using numerical abstractions and applied it to verify several example programs.

This is a preview of subscription content, log in to check access.


  1. 1

    Attie, P., Emerson, E.: Synthesis of concurrent systems for an atomic read/atomic write model of computation, pp. 111–120. In: PODC ’96, ACM, Berlin (1996)

  2. 2

    Ball, T., Rajamani, S.K.: Automatically validating temporal safety properties of interfaces. In: SPIN, pp. 103–122 (2001)

  3. 3

    Blanchet, B., Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., Rival, X.: A static analyzer for large safety-critical software. In: PLDI, pp. 196–207 (2003)

  4. 4

    Bloem, R., Chatterjee, K., Henzinger, T., Jobstmann, B.: Better quality in synthesis through quantitative objectives. In: CAV, pp. 140–156 (2009)

  5. 5

    Cherem, S., Chilimbi, T., Gulwani, S.: Inferring locks for atomic sections. In: PLDI, pp. 304–315 (2008)

  6. 6

    Clarke, E., Emerson, E.: Design and synthesis of synchronization skeletons using branching-time temporal logic. In: Logic of Programs, Workshop, pp. 52–71 (1982)

  7. 7

    Clarke, E.M., Grumberg, O., Jha, S., Lu, Y., Veith, H.: Counterexample-guided abstraction refinement. In: CAV, pp. 154–169 (2000)

  8. 8

    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction of approximation of fixed points. In: POPL, pp. 238–252 (1977)

  9. 9

    Emmi, M., Fischer, J.S., Jhala, R., Majumdar, R.: Lock allocation. In: POPL, pp. 291–296 (2007)

  10. 10

    Golan-Gueta, G., Bronson, N., Aiken, A., Ramalingam, G., Sagiv, M., Yahav, E.: Automatic fine-grain locking using shape properties. In: Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, pp. 225–242. OOPSLA ’11. ACM, New York (2011)

  11. 11

    Griesmayer, A., Bloem, R.P., Cook, B.: Repair of boolean programs with an application to C. In: CAV, pp. 358–371 (2006)

  12. 12

    Henzinger, T.A., Jhala, R., Majumdar, R., Sutre, G.: Lazy abstraction. In: POPL, pp. 58–70 (2002)

  13. 13

    Jobstmann, B., Griesmayer, A., Bloem, R.: Program repair as a game. In: CAV, pp. 226–238 (2005)

  14. 14

    Jobstmann, B., Staber, S., Griesmayer, A., Bloem, R.: Finding and fixing faults. J. Comput. Syst. Sci. (2008)

  15. 15

    Kuperstein, M.: Preserving correctness under relaxed memory models. Master’s thesis, Technion (2012)

  16. 16

    Kuperstein, M., Vechev, M., Yahav, E.: Automatic fence inference. In: FMCAD’10: Formal Methods in Computer Aided Design (2010)

  17. 17

    Kuperstein, M., Vechev, M., Yahav, E.: Partial-coherence abstractions for relaxed memory models. In: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation. PLDI ’11, pp. 187–198. ACM, New York (2011)

  18. 18

    Liu, F., Nedev, N., Prisadnikov, N., Vechev, M., Yahav, E.: Dynamic synthesis for relaxed memory models. In: PLDI’12: Proceedings of the 2012 ACM SIGPLAN Conference on Programming Language Design and Implementation (2012)

  19. 19

    Manna Z., Wolper P.: Synthesis of communicating processes from temporal logic specifications. ACM Trans. Program. Lang. Syst. 6(1), 68–93 (1984)

    Article  MATH  Google Scholar 

  20. 20

    McCloskey, B., Zhou, F., Gay, D., Brewer, E.: Autolocker: synchronization inference for atomic sections. In: POPL, pp. 346–358 (2006)

  21. 21

    Miné A.: The octagon abstract domain. Higher Order Symbol. Comput. 19(1), 31–100 (2006)

    Article  MATH  Google Scholar 

  22. 22

    Nagpaly, R., Pattabiramanz, K., Kirovski, D., Zorn, B.: Tolerace: Tolerating and detecting races. In: STMCS: Second Workshop on Software Tools for Multi-Core Systems (2007)

  23. 23

    Pnueli, A., Rosner, R.: On the synthesis of a reactive module. In: POPL ’89, pp. 179–190. ACM, New York (1989)

  24. 24

    Rajamani, S., Ramalingam, G., Ranganath, V.-P., Vaswani, K.: Controlling non-determinism for semantic guarantees. In: Exploiting Concurrency Efficiently and Correctly—(EC)2 (2008)

  25. 25

    Rival X., Mauborgne L.: The trace partitioning abstract domain. ACM Trans. Program. Lang. Syst. 29(5), 26 (2007)

    Article  Google Scholar 

  26. 26

    Shavit, N., Touitou, D.: Software transactional memory. In: PODC ’95, pp. 204–213. ACM, New York (1995)

  27. 27

    Solar-Lezama, A., Arnold, G., Tancau, L., Bodík, R., Saraswat, V.A., Seshia, S.A.: Sketching stencils. In: PLDI, pp. 167–178 (2007)

  28. 28

    Solar-Lezama, A., Jones, C.G., Bodik, R.: Sketching concurrent data structures. In: PLDI, pp. 136–148 (2008)

  29. 29

    Solar-Lezama, A., Rabbah, R.M., Bodík, R., Ebcioglu, K.: Programming by Sketching for Bit-Streaming Programs. In: PLDI, pp. 281–294 (2005)

  30. 30

    Staber, S., Jobstmann, B., Bloem, R.: Finding and fixing faults. In: CHARME, pp. 35–49 (2005)

  31. 31

    The SAT4J SAT solver. http://www.sat4j.org/

  32. 32

    Vardi, M.Y., Wolper, P.: An automata-theoretic approach to automatic program verification. In: Proceedings of the Symposium on Logic in Computer Science, pp. 332–344 (1986)

  33. 33

    Vechev, M., Yahav, E.: Deriving linearizable fine-grained concurrent objects. In: PLDI, pp. 125–135 (2008)

  34. 34

    Vechev, M.T., Yahav, E., Bacon, D.F., Rinetzky, N.: Cgcexplorer: a semi-automated search procedure for provably correct concurrent collectors. In: PLDI, pp. 456–467 (2007)

  35. 35

    Vechev, M.T., Yahav, E., Yorsh, G.: Inferring synchronization under limited observability. In: TACAS, pp. 139–154 (2009)

Download references

Author information



Corresponding author

Correspondence to Eran Yahav.

Additional information

E. Yahav is a Deloro Fellow. A preliminary version of this work appeared in the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Vechev, M., Yahav, E. & Yorsh, G. Abstraction-guided synthesis of synchronization. Int J Softw Tools Technol Transfer 15, 413–431 (2013). https://doi.org/10.1007/s10009-012-0232-3

Download citation


  • Concurrency
  • Verification
  • Synthesis
  • Abstract interpretation