Advertisement

Path Optimization in Programs and Its Application to Debugging

  • Akash Lal
  • Junghee Lim
  • Marina Polishchuk
  • Ben Liblit
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3924)

Abstract

We present and solve a path optimization problem on programs. Given a set of program nodes, called critical nodes, we find a shortest path through the program’s control flow graph that touches the maximum number of these nodes. Control flow graphs over-approximate real program behavior; by adding dataflow analysis to the control flow graph, we narrow down on the program’s actual behavior and discard paths deemed infeasible by the dataflow analysis. We derive an efficient algorithm for path optimization based on weighted pushdown systems. We present an application for path optimization by integrating it with the Cooperative Bug Isolation Project CBI, a dynamic debugging system. CBI mines instrumentation feedback data to find suspect program behaviors, called bug predictors, that are strongly associated with program failure. Instantiating critical nodes as the nodes containing bug predictors, we solve for a shortest program path that touches these predictors. This path can be used by a programmer to debug his software. We present some early experience on using this hybrid static/dynamic system for debugging.

Keywords

Path Optimization Critical Node Control Flow Graph Failure Path Exit Node 
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.

References

  1. 1.
    Aho, A., Sethi, R., Ullman, J.: Compilers: Principles, Techniques and Tools. Addison-Wesley, Reading (1985)zbMATHGoogle Scholar
  2. 2.
    Reps, T., Schwoon, S., Jha, S., Melski, D.: Weighted pushdown systems and their application to interprocedural dataflow analysis. Sci. of Comp. Prog. 58, 206–263 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Liblit, B.: Cooperative Bug Isolation. PhD thesis, University of California, Berkeley (2004)Google Scholar
  4. 4.
    Liblit, B., Naik, M., Zheng, A.X., Aiken, A., Jordan, M.I.: Scalable statistical bug isolation. In: SIGPLAN Conf. on Prog. Lang. Design and Impl. (2005)Google Scholar
  5. 5.
    Lal, A., Reps, T., Balakrishnan, G.: Extended weighted pushdown systems. In: Computer Aided Verification, pp. 434–448 (2005)Google Scholar
  6. 6.
    Bouajjani, A., Esparza, J., Touili, T.: A generic approach to the static analysis of concurrent programs with procedures. In: Symp. on Princ. of Prog. Lang., pp. 62–73 (2003)Google Scholar
  7. 7.
    Sagiv, M., Reps, T., Horwitz, S.: Precise interprocedural dataflow analysis with applications to constant propagation. Theor. Comp. Sci. 167, 131–170 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Müller-Olm, M., Seidl, H.: Precise interprocedural analysis through linear algebra. In: Symp. on Princ. of Prog. Lang. (2004)Google Scholar
  9. 9.
    Müller-Olm, M., Seidl, H.: Analysis of modular arithmetic. In: European Symp. on Programming (2005)Google Scholar
  10. 10.
    Das, M., Lerner, S., Seigle, M.: ESP: Path-sensitive program verification in polynomial time. In: SIGPLAN Conf. on Prog. Lang. Design and Impl., pp. 57–68 (2002)Google Scholar
  11. 11.
    Wegman, M., Zadeck, F.: Constant propagation with conditional branches. In: Symp. On Princ. of Prog. Lang., pp. 291–299 (1985)Google Scholar
  12. 12.
    Müller-Olm, M., Rüthing, O.: On the complexity of constant propagation. In: European Symp. on Programming, pp. 190–205 (2001)Google Scholar
  13. 13.
    Lal, A., Lim, J., Polishchuk, M., Liblit, B.: BTRACE: Path optimization for debugging. Technical Report 1535, University of Wisconsin-Madison (2005)Google Scholar
  14. 14.
    Liblit, B., Aiken, A., Zheng, A.X., Jordan, M.I.: Bug isolation via remote program sampling. In: SIGPLAN Conf. on Prog. Lang. Design and Impl. (2003)Google Scholar
  15. 15.
    Kidd, N., Reps, T., Melski, D., Lal, A.: WPDS++: A C++ library for weighted pushdown systems (2005), http://www.cs.wisc.edu/wpis/wpds++
  16. 16.
    Somenzi, F.: Colorado University Decision Diagram package. Technical report, University of Colorado, Boulder (1998)Google Scholar
  17. 17.
    Hutchins, M., Foster, H., Goradia, T., Ostrand, T.: Experiments on the effectiveness of dataflow- and control-flow-based test adequacy criteria. In: Proc. of the 16th Int. Conf. on Softw. Eng., pp. 191–200. IEEE Computer Society Press, Los Alamitos (1994)Google Scholar
  18. 18.
    GrammaTech, Inc.: CodeSurfer Path Inspector (2005), http://www.grammatech.com/products/codesurfer/overview_pi.html
  19. 19.
    Balakrishnan, G., Reps, T., Kidd, N., Lal, A., Lim, J., Melski, D., Gruian, R., Yong, S., Chen, C.H., Teitelbaum, T.: Model checking x86 executables with CodeSurfer/x86 and WPDS++. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 158–163. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  20. 20.
    Liblit, B., Aiken, A.: Building a better backtrace: Techniques for postmortem program analysis. Technical Report CSD-02-1203, University of California, Berkeley (2002)Google Scholar
  21. 21.
    Manevich, R., Sridharan, M., Adams, S., Das, M., Yang, Z.: PSE: explaining program failures via postmortem static analysis. In: Found. Softw. Eng., pp. 63–72 (2004)Google Scholar
  22. 22.
    Lengauer, T., Theune, D.: Unstructured path problems and the making of semirings (preliminary version). In: WADS. LNCS, vol. 519, pp. 189–200. Springer, Heidelberg (1991)Google Scholar
  23. 23.
    Zheng, A.X., Jordan, M.I., Liblit, B., Aiken, A.: Statistical debugging of sampled programs. In: Thrun, S., Saul, L., Schölkopf, B. (eds.) Advances in Neural Information Processing Systems 16. MIT Press, Cambridge (2004)Google Scholar
  24. 24.
    Zheng, A.X.: Statistical Software Debugging. PhD thesis, Univ. of California, Berkeley (2005)Google Scholar
  25. 25.
    Liu, C., Yan, X., Fei, L., Han, J., Midkiff, S.P.: SOBER: Statistical mmodel-based bug localization. In: Found. Softw. Eng., pp. 286–295. ACM Press, New York (2005)Google Scholar
  26. 26.
    Jiang, L., Su, Z.: Automatic isolation of cause-effect chains with machine learning. Technical Report CSE-2005-32, University of California, Davis (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Akash Lal
    • 1
  • Junghee Lim
    • 1
  • Marina Polishchuk
    • 1
  • Ben Liblit
    • 1
  1. 1.Computer Sciences DepartmentUniversity of Wisconsin-MadisonUSA

Personalised recommendations