Advertisement

Hitting Families of Schedules for Asynchronous Programs

  • Dmitry Chistikov
  • Rupak MajumdarEmail author
  • Filip Niksic
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9780)

Abstract

We consider the following basic task in the testing of concurrent systems. The input to the task is a partial order of events, which models actions performed on or by the system and specifies ordering constraints between them. The task is to determine if some scheduling of these events can result in a bug. The number of schedules to be explored can, in general, be exponential.

Empirically, many bugs in concurrent programs have been observed to have small bug depth; that is, these bugs are exposed by every schedule that orders d specific events in a particular way, irrespective of how the other events are ordered, and d is small compared to the total number of events. To find all bugs of depth d, one needs to only test a d-hitting family of schedules: we call a set of schedules a d-hitting family if for each set of d events, and for each allowed ordering of these events, there is some schedule in the family that executes these events in this ordering. The size of a d-hitting family may be much smaller than the number of all possible schedules, and a natural question is whether one can find d-hitting families of schedules that have small size.

In general, finding the size of optimal d-hitting families is hard, even for d = 2. We show, however, that when the partial order is a tree, one can explicitly construct d-hitting families of schedules of small size. When the tree is balanced, our constructions are polylogarithmic in the number of events.

Keywords

Partial Order Hasse Diagram Event Handler Complete Binary Tree Double Tree 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Notes

Acknowledgements

We thank Madan Musuvathi for insightful discussions and comments.

References

  1. 1.
    Alon, N., Spencer, J.H.: The Probabilistic Method, 3rd edn. Wiley, New York (2008)CrossRefzbMATHGoogle Scholar
  2. 2.
    Ambühl, C., Mastrolilli, M., Mutsanas, N., Svensson, O.: Precedence constraint scheduling and connections to dimension theory of partial orders. Bull. EATCS 95, 37–58 (2008)MathSciNetzbMATHGoogle Scholar
  3. 3.
    Burckhardt, S., Kothari, P., Musuvathi, M., Nagarakatte, S.: A randomized scheduler with probabilistic guarantees of finding bugs. In: Proceedings of the 15th International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS 2010, Pittsburgh, Pennsylvania, USA, March 13–17, 2010, pp. 167–178 (2010)Google Scholar
  4. 4.
    Chalermsook, P., Laekhanukit, B., Nanongkai, D.: Graph products revisited: Tight approximation hardness of induced matching, poset dimension and more. In: Sanjeev Khanna, editor, Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2013, New Orleans, Louisiana, USA, January 6–8, 2013, pp. 1557–1576. SIAM (2013)Google Scholar
  5. 5.
    Dushnik, B., Miller, E.W.: Partially ordered sets. Am. J. Math. 63(3), 600–610 (1941)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Emmi, M., Qadeer, S., Rakamaric, Z.: Delay-bounded scheduling. In: Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2011, Austin, TX, USA, January 26–28, 2011, pp. 411–422 (2011)Google Scholar
  7. 7.
    Fomin, F.V., Lokshtanov, D., Misra, N., Saurabh, S.: Planar \(\cal {F}\)-deletion: Approximation, kernelization and optimal FPT algorithms. In: 53rd Annual IEEE Symposium on Foundations of Computer Science, FOCS 2012, New Brunswick, NJ, USA, October 20–23, 2012, pp. 470–479. IEEE Computer Society (2012)Google Scholar
  8. 8.
    Ganty, P., Majumdar, R.: Algorithmic verification of asynchronous programs. ACM Trans. Program. Lang. Syst. 34(1), 6 (2012)CrossRefGoogle Scholar
  9. 9.
    Hegde, R., Jain, K.: The hardness of approximating poset dimension. Electron. Notes Discrete Math. 29, 435–443 (2007)CrossRefzbMATHGoogle Scholar
  10. 10.
    Jensen, C.S., Møller, A., Raychev, V., Dimitrov, D., Vechev, M.T.: Stateless model checking of event-driven applications. In: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2015, part of SLASH 2015, Pittsburgh, PA, USA, October 25–30, 2015, pp. 57–73 (2015)Google Scholar
  11. 11.
    Jhala, R., Majumdar, R.: Interprocedural analysis of asynchronous programs. In: POPL 2007: Proceedings 34th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pp. 339–350. ACM Press (2007)Google Scholar
  12. 12.
    Lovász, L.: On the ratio of optimal integral and fractional covers. Discrete Math. 13(4), 383–390 (1975)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In: Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS 2008, Seattle, WA, USA, March 1–5, 2008, pp. 329–339 (2008)Google Scholar
  14. 14.
    Musuvathi, M., Qadeer, S.: CHESS: systematic stress testing of concurrent software. In: Puebla, G. (ed.) LOPSTR 2006. LNCS, vol. 4407, pp. 15–16. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  15. 15.
    Petrov, B., Vechev, M.T., Sridharan, M., Dolby, J.: Race detection for web applications. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2012, Beijing, China - June 11–16, 2012, pp. 251–262 (2012)Google Scholar
  16. 16.
    Qadeer, S., Rehof, J.: Context-bounded model checking of concurrent software. In: Halbwachs, N., Zuck, L.D. (eds.) TACAS 2005. LNCS, vol. 3440, pp. 93–107. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  17. 17.
    Raychev, V., Vechev, M.T., Sridharan, M.: Effective race detection for event-driven programs. In: Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA 2013, part of SPLASH 2013, Indianapolis, IN, USA, October 26–31, 2013, pp. 151–166 (2013)Google Scholar
  18. 18.
    Sapozhenko, A.A.: On the complexity of disjunctive normal forms obtained with a gradient algorithm. In: Diskretnyj Analiz (Discrete Analysis), vol. 21, pp. 62–71. Institute for Mathematics in the Siberian Section of the Academy of Sciences, Novosibirsk (1972, In Russian)Google Scholar
  19. 19.
    Schröder, B.S.W.: Ordered Sets: An Introduction. Springer, New York (2003)CrossRefzbMATHGoogle Scholar
  20. 20.
    Sen, K., Viswanathan, M.: Model checking multithreaded programs with asynchronous atomic methods. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 300–314. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  21. 21.
    Stein, S.K.: Two combinatorial covering theorems. J. Comb. Theory Ser. A 16(3), 391–397 (1974)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Trotter, W.T.: A generalization of Hiraguchi’s: Inequality for posets. J. Comb. Theory Ser. A 20(1), 114–123 (1976)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Trotter, W.T.: Combinatorics and Partially Ordered Sets: Dimension Theory. Johns Hopkins Studies in the Mathematical Sciences. Johns Hopkins University Press, Baltimore (2001)zbMATHGoogle Scholar
  24. 24.
    Yannakakis, M.: The complexity of the partial order dimension problem. SIAM J. Algebraic Discrete Methods 3(3), 351–358 (1982)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Dmitry Chistikov
    • 1
    • 2
  • Rupak Majumdar
    • 1
    Email author
  • Filip Niksic
    • 1
  1. 1.Max Planck Institute for Software Systems (MPI-SWS)Kaiserslautern and SaarbrückenGermany
  2. 2.Department of Computer ScienceUniversity of OxfordOxfordUK

Personalised recommendations