Analyzing the Impact of Change in Multi-threaded Programs

  • Krishnendu Chatterjee
  • Luca de Alfaro
  • Vishwanath Raman
  • César Sánchez
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6013)


We introduce a technique for debugging multi-threaded C programs and analyzing the impact of source code changes, and its implementation in the prototype tool DIRECT. Our approach uses a combination of source code instrumentation and runtime management. The source code along with a test harness is instrumented to monitor Operating System (OS) and user defined function calls. DIRECT tracks all concurrency control primitives and, optionally, data from the program. DIRECT maintains an abstract global state that combines information from every thread, including the sequence of function calls and concurrency primitives executed. The runtime manager can insert delays, provoking thread interleavings that may exhibit bugs that are difficult to reach otherwise. The runtime manager collects an approximation of the reachable state space and uses this approximation to assess the impact of change in a new version of the program.


Global State Observable Statement Random Delay Change Impact Analysis Proportional Delay 
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.


  1. 1.
  2. 2.
    Arnold, R.S.: Software Change Impact Analysis. IEEE Computer Society Press, Los Alamitos (1996)Google Scholar
  3. 3.
    Bohnet, J., Voigt, S., Döllner, J.: Projecting code changes onto execution traces to support localization of recently introduced bugs. In: Proc. of the 2009 ACM Symposium on Applied Computing (SAC 2009), pp. 438–442. ACM, New York (2009)CrossRefGoogle Scholar
  4. 4.
    Burns, R.C., Long, D.D.: A linear time, constant space differencing algorithm. In: Performance, Computing, and Communication Conference (IPCCC 1997), pp. 429–436. IEEE International, Los Alamitos (1997)CrossRefGoogle Scholar
  5. 5.
    Edelstein, O., Farchi, E., Goldin, E., Nir, Y., Ratsaby, G., Ur, S.: Framework for testing multi-threaded Java programs. Concurrency and Computation: Practice and Experience 15(3-5), 485–499 (2003)zbMATHCrossRefGoogle Scholar
  6. 6.
    Harrold, M.J.: Testing evolving software. Journal of Systems and Software 47(2-3), 173–181 (1999)CrossRefGoogle Scholar
  7. 7.
    Kim, S., James Whitehead, J.E., Zhang, Y.: Classifying software changes: Clean or buggy? IEEE Transactions on Software Engineering 34(2), 181–196 (2008)CrossRefGoogle Scholar
  8. 8.
    Knuth, D.E.: The Art of Computer Programming, 2nd edn. Sorting and Searching, vol. 3. ch. 6.4. Addison-Wesley, Reading (1998)Google Scholar
  9. 9.
    Law, J., Rothermel, G.: Whole program path-based dynamic impact analysis. In: ICSE 2003, pp. 308–318 (2003)Google Scholar
  10. 10.
    Marlowe, T.J., Ryder, B.G.: An efficient hybrid algorithm for incremental data flow analysis. In: Proc.of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 1990), pp. 184–196. ACM, New York (1990)CrossRefGoogle Scholar
  11. 11.
    Mitzenmacher, M., Upfal, E.: Probability and Computing. Cambridge University Press, Cambridge (2005)zbMATHGoogle Scholar
  12. 12.
    Musuvathi, M., Qadeer, S., Ball, T., Basler, G., Nainar, P.A., Neamtiu, I.: Finding and reproducing Heisenbugs in concurrent programs. In: OSDI 2008, pp. 267–280 (2008)Google Scholar
  13. 13.
    Myers, E.W.: An O(ND) difference algorithm and its variations. Algorithmica 1(2), 251–266 (1986)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Necula, G.C., McPeak, S., Rahul, S.P., Weimer, W.: CIL: Infrastructure for C program analysis and transformation. In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, pp. 213–228. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  15. 15.
    Ren, X., Chesley, O.C., Ryder, B.G.: Identifying failure causes in Java programs: An application of change impact analysis. IEEE Trans. Softw. Eng. 32(9), 718–732 (2006)CrossRefGoogle Scholar
  16. 16.
    Ren, X., Shah, F., Tip, F., Ryder, B.G., Chesley, O.: Chianti: a tool for change impact analysis of Java programs. SIGPLAN Not. 39(10), 432–448 (2004)CrossRefGoogle Scholar
  17. 17.
    Ryder, B.G., Tip, F.: Change impact analysis for object-oriented programs. In: PASTE 2001: Proceedings of the 2001 ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering, pp. 46–53. ACM, New York (2001)CrossRefGoogle Scholar
  18. 18.
    Tichy, W.F.: The string-to-string correction problem with block move. ACM Trans. on Computer Systems 2(4) (1984)Google Scholar
  19. 19.
    Tip, F.: A survey of program slicing techniques. J. Prog. Lang. 3(3) (1995)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Krishnendu Chatterjee
    • 1
  • Luca de Alfaro
    • 2
  • Vishwanath Raman
    • 2
  • César Sánchez
    • 3
  1. 1.Institute of Science and TechnologyViennaAustria
  2. 2.Computer Science DepartmentUniversity of CaliforniaSanta CruzUSA
  3. 3.IMDEA-SoftwareMadridSpain

Personalised recommendations