Advertisement

Abstraction-guided synthesis of synchronization

  • Martin Vechev
  • Eran YahavEmail author
  • Greta Yorsh
Synthesis

Abstract

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.

Keywords

Concurrency Verification Synthesis Abstract interpretation 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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)Google Scholar
  2. 2.
    Ball, T., Rajamani, S.K.: Automatically validating temporal safety properties of interfaces. In: SPIN, pp. 103–122 (2001)Google Scholar
  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)Google Scholar
  4. 4.
    Bloem, R., Chatterjee, K., Henzinger, T., Jobstmann, B.: Better quality in synthesis through quantitative objectives. In: CAV, pp. 140–156 (2009)Google Scholar
  5. 5.
    Cherem, S., Chilimbi, T., Gulwani, S.: Inferring locks for atomic sections. In: PLDI, pp. 304–315 (2008)Google Scholar
  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)Google Scholar
  7. 7.
    Clarke, E.M., Grumberg, O., Jha, S., Lu, Y., Veith, H.: Counterexample-guided abstraction refinement. In: CAV, pp. 154–169 (2000)Google Scholar
  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)Google Scholar
  9. 9.
    Emmi, M., Fischer, J.S., Jhala, R., Majumdar, R.: Lock allocation. In: POPL, pp. 291–296 (2007)Google Scholar
  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)Google Scholar
  11. 11.
    Griesmayer, A., Bloem, R.P., Cook, B.: Repair of boolean programs with an application to C. In: CAV, pp. 358–371 (2006)Google Scholar
  12. 12.
    Henzinger, T.A., Jhala, R., Majumdar, R., Sutre, G.: Lazy abstraction. In: POPL, pp. 58–70 (2002)Google Scholar
  13. 13.
    Jobstmann, B., Griesmayer, A., Bloem, R.: Program repair as a game. In: CAV, pp. 226–238 (2005)Google Scholar
  14. 14.
    Jobstmann, B., Staber, S., Griesmayer, A., Bloem, R.: Finding and fixing faults. J. Comput. Syst. Sci. (2008)Google Scholar
  15. 15.
    Kuperstein, M.: Preserving correctness under relaxed memory models. Master’s thesis, Technion (2012)Google Scholar
  16. 16.
    Kuperstein, M., Vechev, M., Yahav, E.: Automatic fence inference. In: FMCAD’10: Formal Methods in Computer Aided Design (2010)Google Scholar
  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)Google Scholar
  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)Google Scholar
  19. 19.
    Manna Z., Wolper P.: Synthesis of communicating processes from temporal logic specifications. ACM Trans. Program. Lang. Syst. 6(1), 68–93 (1984)CrossRefzbMATHGoogle Scholar
  20. 20.
    McCloskey, B., Zhou, F., Gay, D., Brewer, E.: Autolocker: synchronization inference for atomic sections. In: POPL, pp. 346–358 (2006)Google Scholar
  21. 21.
    Miné A.: The octagon abstract domain. Higher Order Symbol. Comput. 19(1), 31–100 (2006)CrossRefzbMATHGoogle 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)Google Scholar
  23. 23.
    Pnueli, A., Rosner, R.: On the synthesis of a reactive module. In: POPL ’89, pp. 179–190. ACM, New York (1989)Google Scholar
  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)Google Scholar
  25. 25.
    Rival X., Mauborgne L.: The trace partitioning abstract domain. ACM Trans. Program. Lang. Syst. 29(5), 26 (2007)CrossRefGoogle Scholar
  26. 26.
    Shavit, N., Touitou, D.: Software transactional memory. In: PODC ’95, pp. 204–213. ACM, New York (1995)Google Scholar
  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)Google Scholar
  28. 28.
    Solar-Lezama, A., Jones, C.G., Bodik, R.: Sketching concurrent data structures. In: PLDI, pp. 136–148 (2008)Google Scholar
  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)Google Scholar
  30. 30.
    Staber, S., Jobstmann, B., Bloem, R.: Finding and fixing faults. In: CHARME, pp. 35–49 (2005)Google Scholar
  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)Google Scholar
  33. 33.
    Vechev, M., Yahav, E.: Deriving linearizable fine-grained concurrent objects. In: PLDI, pp. 125–135 (2008)Google Scholar
  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)Google Scholar
  35. 35.
    Vechev, M.T., Yahav, E., Yorsh, G.: Inferring synchronization under limited observability. In: TACAS, pp. 139–154 (2009)Google Scholar

Copyright information

© Springer-Verlag 2012

Authors and Affiliations

  1. 1.ETH ZürichZurichSwitzerland
  2. 2.Technion-Israel Institute of TechnologyHaifaIsrael
  3. 3.ARMCambridgeUK

Personalised recommendations