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.
Supported in part by a gift from Microsoft Research.
Chapter PDF
Similar content being viewed by others
Keywords
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
Aho, A., Sethi, R., Ullman, J.: Compilers: Principles, Techniques and Tools. Addison-Wesley, Reading (1985)
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)
Liblit, B.: Cooperative Bug Isolation. PhD thesis, University of California, Berkeley (2004)
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)
Lal, A., Reps, T., Balakrishnan, G.: Extended weighted pushdown systems. In: Computer Aided Verification, pp. 434–448 (2005)
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)
Sagiv, M., Reps, T., Horwitz, S.: Precise interprocedural dataflow analysis with applications to constant propagation. Theor. Comp. Sci. 167, 131–170 (1996)
Müller-Olm, M., Seidl, H.: Precise interprocedural analysis through linear algebra. In: Symp. on Princ. of Prog. Lang. (2004)
Müller-Olm, M., Seidl, H.: Analysis of modular arithmetic. In: European Symp. on Programming (2005)
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)
Wegman, M., Zadeck, F.: Constant propagation with conditional branches. In: Symp. On Princ. of Prog. Lang., pp. 291–299 (1985)
Müller-Olm, M., Rüthing, O.: On the complexity of constant propagation. In: European Symp. on Programming, pp. 190–205 (2001)
Lal, A., Lim, J., Polishchuk, M., Liblit, B.: BTRACE: Path optimization for debugging. Technical Report 1535, University of Wisconsin-Madison (2005)
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)
Kidd, N., Reps, T., Melski, D., Lal, A.: WPDS++: A C++ library for weighted pushdown systems (2005), http://www.cs.wisc.edu/wpis/wpds++
Somenzi, F.: Colorado University Decision Diagram package. Technical report, University of Colorado, Boulder (1998)
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)
GrammaTech, Inc.: CodeSurfer Path Inspector (2005), http://www.grammatech.com/products/codesurfer/overview_pi.html
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)
Liblit, B., Aiken, A.: Building a better backtrace: Techniques for postmortem program analysis. Technical Report CSD-02-1203, University of California, Berkeley (2002)
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)
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)
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)
Zheng, A.X.: Statistical Software Debugging. PhD thesis, Univ. of California, Berkeley (2005)
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)
Jiang, L., Su, Z.: Automatic isolation of cause-effect chains with machine learning. Technical Report CSE-2005-32, University of California, Davis (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lal, A., Lim, J., Polishchuk, M., Liblit, B. (2006). Path Optimization in Programs and Its Application to Debugging. In: Sestoft, P. (eds) Programming Languages and Systems. ESOP 2006. Lecture Notes in Computer Science, vol 3924. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11693024_17
Download citation
DOI: https://doi.org/10.1007/11693024_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-33095-0
Online ISBN: 978-3-540-33096-7
eBook Packages: Computer ScienceComputer Science (R0)