Advertisement

Counterexample Explanation by Anomaly Detection

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

Abstract

Since counterexamples generated by model checking tools are only symptoms of faults in the model, a significant amount of manual work is required in order to locate the fault that is the root cause for the presence of counterexamples in the model. In this paper, we propose an automated method for explaining counterexamples that are symptoms of the occurrence of deadlocks in concurrent systems. Our method is based on an analysis of a set of counterexamples that can be generated by a model checking tool such as SPIN. By comparing the set of counterexamples with the set of correct traces that never deadlock, a number of sequences of actions are extracted that aid the model designer in locating the cause of the occurrence of a deadlock. We first argue that the obvious approach to extract such sequences which is by sequential pattern mining and by contrasting patterns that are typical for the deadlocking counterexample traces but not typical for non-deadlocking traces, fails due to the inherent complexity of the problem. We then propose to extract substrings of specific length that only occur in the set of counterexamples for explaining the occurrence of deadlocks. We use a number of case studies to show the effectiveness of our approach and to compare it with an alternative approach to the counterexample explanation problem.

Keywords

model checking deadlocks counterexample explanation anomaly detection concurrency bugs 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Agrawal, R., Srikant, R.: Mining sequential patterns. In: 11th International Conference on Data Engineering, ICDE 1995 (1995)Google Scholar
  2. 2.
    Baier, C., Katoen, J.-P.: Principles of Model Checking. The MIT Press, Cambridge (2008)zbMATHGoogle Scholar
  3. 3.
    Ball, T., Naik, M., Rajamani, S.K.: From symptom to cause: Localizing errors in counterexample traces. In: Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2003)Google Scholar
  4. 4.
    Ball, T., Rajamani, S.K.: The SLAM project: Debugging system software via static analysis. In: POPL 2002: Principles of Programming Languages. ACM (2002)Google Scholar
  5. 5.
    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
  6. 6.
    Dallmeier, V., Lindig, C., Zeller, A.: Lightweight Defect Localization for Java. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 528–550. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  7. 7.
    de Jonge, M., Ruys, T.C.: The SpinJa Model Checker. In: van de Pol, J., Weber, M. (eds.) SPIN 2010. LNCS, vol. 6349, pp. 124–128. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  8. 8.
    Dong, G., Pei, J.: Sequence Data Mining. Springer (2007)Google Scholar
  9. 9.
    Goethals, B.: Survey on frequent pattern mining (2003) (manuscript)Google Scholar
  10. 10.
    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
  11. 11.
    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
  12. 12.
    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
  13. 13.
    Holt, R.C.: Some deadlock properties of computer systems. In: ACM Computing Surveys, CSUR (1972)Google Scholar
  14. 14.
    Holzmann, G.J.: The SPIN Model Checker: Primer and Reference Manual. Addision-Wesley (2003)Google Scholar
  15. 15.
    Clarke, E., Kroning, D., Lerda, F.: A Tool for Checking ANSI-C Programs. In: Jensen, K., Podelski, A. (eds.) TACAS 2004. LNCS, vol. 2988, pp. 168–176. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  16. 16.
    Lewis, D.: Counterfactuals. Wiley-Blackwell (2001)Google Scholar
  17. 17.
    Lo, D., Khoo, S., Liu, C.: Efficient mining of iterative patterns for software specification discovery. In: Proceedings of the 13th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (2007)Google Scholar
  18. 18.
    Nessa, S., Abedin, M., Wong, W.E., Khan, L., Qi, Y.: Software Fault Localization Using N-gram Analysis. In: Li, Y., Huynh, D.T., Das, S.K., Du, D.-Z. (eds.) WASA 2008. LNCS, vol. 5258, pp. 548–559. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  19. 19.
    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
  20. 20.
    Pelanek, R.: Benchmarks for explicit model checkers (2006), http://anna.fi.muni.cz/models
  21. 21.
    Valiant, L.: The Complexity of Computing the Permanent. Theoretical Computer Science (1979)Google Scholar
  22. 22.
    Wang, C., Yang, Z.-J., 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
  23. 23.
    Wang, J., Han, J.: Bide: Efficient mining of frequent closed sequences. In: 20th International Conference on Data Engineering, ICDE 2004 (2004)Google Scholar
  24. 24.
    Yang, G.: The complexity of mining maximal frequent itemsets and maximal frequent patterns. In: Proceedings of the Tenth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (2004)Google Scholar
  25. 25.
    Yang, G.: Computational aspects of mining maximal frequent patterns. Theoretical Computer Science 362(1-3), 63–85 (2006)MathSciNetzbMATHCrossRefGoogle Scholar
  26. 26.
    Zeller, A.: Why Programs Fail: A Guide to Systematic Debugging. Morgan Kaufmann, Burlington (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Stefan Leue
    • 1
  • Mitra Tabaei Befrouei
    • 1
  1. 1.Department of Computer and Information ScienceUniversity of KonstanzKonstanzGermany

Personalised recommendations