Mining Sequential Patterns to Explain Concurrent Counterexamples

  • Stefan Leue
  • Mitra Tabaei Befrouei
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7976)


Concurrent systems are often modeled using an interleaving semantics. Since system designers tend to think sequentially, it is highly probable that they do not foresee some interleavings that their model encompasses. As a consequence, one of the main sources of failure in concurrent systems is unforeseen interleavings. In this paper, we devise an automated method for revealing unforeseen interleavings in the form of sequences of actions derived from counterexamples obtained by explicit state model checking. In order to extract such sequences we use a data mining technique called sequential pattern mining. Our method is based on contrasting the patterns of a set of counterexamples with the patterns of a set of correct traces that do not violate a desired property. We first argue that mining sequential patterns from the dataset of counterexamples fails due to the inherent complexity of the problem. We then propose a reduction technique designed to reduce the length of the execution traces in order to make the problem more tractable. We finally demonstrate the effectiveness of our approach by applying it to a number of sample case studies.


concurrency bugs counterexample explanation sequential pattern mining model checking 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Agrawal, R., Srikant, R.: Mining sequential patterns. In: ICDE (1995)Google Scholar
  2. 2.
    Baier, C., Katoen, J.-P.: Principles of Model Checking. The MIT Press, Massachusetts (2008)zbMATHGoogle Scholar
  3. 3.
    Beer, I., Ben-David, S., Chockler, H., Orni, A., Trefler, R.: Explaining counterexamples using causality. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 94–108. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  4. 4.
    Dong, G., Pei, J.: Sequence Data Mining. Springer (2007)Google Scholar
  5. 5.
    Fatta, G.D., Leue, S., Stegantova, E.: Discriminative pattern mining in software fault detection. In: Proceedings of the 3rd International Workshop on Software Quality Assurance (2006)Google Scholar
  6. 6.
    Groce, A., Chaki, S., Kroening, D., Strichman, O.: Error explanation with distance metrics. In: International Journal on Software Tools for Technology Transfer (STTT) (2006)Google Scholar
  7. 7.
    Groce, A., Visser, W.: What went wrong: Explaining counterexamples. In: Ball, T., Rajamani, S.K. (eds.) SPIN 2003. LNCS, vol. 2648, pp. 121–135. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Halpern, J., Pearl, J.: Causes and explanations: A structural-model approach. part I: Causes. The British Journal for the Philosophy of Science (2005)Google Scholar
  9. 9.
    Holzmann, G.J.: The SPIN Model Checker: Primer and Reference Manual. Addision-Wesley (2003)Google Scholar
  10. 10.
    Kamel, M., Leue, S.: VIP: A visual editor and compiler for v-promela. In: Graf, S., Schwartzbach, M. (eds.) TACAS/ETAPS 2000. LNCS, vol. 1785, pp. 471–486. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  11. 11.
    Leitner-Fischer, F., Leue, S.: Causality checking for complex system models. In: Giacobazzi, R., Berdine, J., Mastroeni, I. (eds.) VMCAI 2013. LNCS, vol. 7737, pp. 248–267. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  12. 12.
    Leue, S., Tabaei Befrouei, M.: Counterexample explanation by anomaly detection. In: Donaldson, A., Parker, D. (eds.) SPIN 2012. LNCS, vol. 7385, pp. 24–42. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  13. 13.
    Lewis, D.: Counterfactuals. Wiley-Blackwell (2001)Google Scholar
  14. 14.
    Liu, C., Yan, X., Yu, H., Han, J., Yu, P.S.: Mining behavior graphs for backtrace of noncrashing bugs. In: Proceedings of the Fifth SIAM International Conference on Data Mining (2005)Google Scholar
  15. 15.
    Lo, D., Khoo, S., Liu, C.: Efficient mining of iterative patterns for software specification discovery. In: KDD (2007)Google Scholar
  16. 16.
    Lu, S., Tucek, J., Qin, F., Zhou, Y.: Avio: Detecting atomicity violations via access interleaving invariants. In: ASPLOS (2006)Google Scholar
  17. 17.
    Lucia, B., Ceze, L.: Finding concurrency bugs with context-aware communication graphs. In: Proceedings of the 42nd Annual IEEE/ACM International Symposium on Microarchitecture (2009)Google Scholar
  18. 18.
    Netzer, R., Miller, B.: Improving the accuracy of data race detection. In: Proceedings of the 3rd ACM Symposium on Principles and Practice of Parallel Programming. ACM Press (1991)Google Scholar
  19. 19.
    Parsa, S., Naree, S.A., Koopaei, N.E.: Software fault localization via mining execution graphs. In: Murgante, B., Gervasi, O., Iglesias, A., Taniar, D., Apduhan, B.O. (eds.) ICCSA 2011, Part II. LNCS, vol. 6783, pp. 610–623. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  20. 20.
    Pei, J., Han, J., Mortazavi-Asl, B., Pinto, H., Chen, Q., Dayal, U., Hsu, M.: Prefixspan: Mining sequential patterns efficiently by prefix-projected pattern growth. In: 17th International Conference on Data Engineering (ICDE 2001) (2001)Google Scholar
  21. 21.
    Pelanek, R.: Benchmarks for explicit model checkers (2006),
  22. 22.
    Ramanathan, M.K., Grama, A., Jagannathan, S.: Path-sensitive inference of function precedence protocols. In: Proceedings of the 29th International Conference on Software Engineering (ICSE) (2007)Google Scholar
  23. 23.
    Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: a dynamic data race detector for multithreaded programs. ACM Transactions on Computer Systems (TOCS) 15(4) (1997)Google Scholar
  24. 24.
    Wang, C., Yang, Z., Ivančić, F., Gupta, A.: Whodunit? causal analysis for counterexamples. In: Graf, S., Zhang, W. (eds.) ATVA 2006. LNCS, vol. 4218, pp. 82–95. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  25. 25.
    Wang, J., Han, J.: Bide: Efficient mining of frequent closed sequences. In: ICDE (2004)Google Scholar
  26. 26.
    Yan, X., Han, J., Afshar, R.: Clospan: Mining closed sequential patterns in large datasets. In: Proceedings of 2003 SIAM International Conference on Data Mining (SDM 2003) (2003)Google Scholar
  27. 27.
    Zeller, A.: Why Programs Fail: A Guide to Systematic Debugging. Morgan Kaufmann, Burlington (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Stefan Leue
    • 1
  • Mitra Tabaei Befrouei
    • 2
  1. 1.University of KonstanzGermany
  2. 2.Vienna University of TechnologyAustria

Personalised recommendations