skip to main content
10.1145/1368088.1368130acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Debugging reinvented: asking and answering why and why not questions about program behavior

Published:10 May 2008Publication History

ABSTRACT

When software developers want to understand the reason for a program's behavior, they must translate their questions about the behavior into a series of questions about code, speculating about the causes in the process. The Whyline is a new kind of debugging tool that avoids such speculation by instead enabling developers to select a question about program output from a set of why did and why didn't questions derived from the program's code and execution. The tool then finds one or more possible explanations for the output in question, using a combination of static and dynamic slicing, precise call graphs, and new algorithms for determining potential sources of values and explanations for why a line of code was not reached. Evaluations of the tool on one task showed that novice programmers with the Whyline were twice as fast as expert programmers without it. The tool has the potential to simplify debugging in many software development contexts.

References

  1. Abraham R. & Erwig M. (2005). Goal-directed debugging of spreadsheets, IEEE Symposium on Visual Languages and Human-Centric Computing, Dallas, Texas, 37--44. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Baowen X., Ju Q., Xiaofang Z., Zhongqiang W., & Lin C. (2005). A brief survey of program slicing, SIGSOFT Software Engineering Notes, 30, 2, 1--36. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Clause J. & Orso A. (2007). A technique for enabling and supporting debugging of field failures, International Conference on Software Engineering, Minneapolis, MN, 261--270. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Cleve H. & Zeller A. (2005). Locating causes of program failures. International Conference on Software Engineering, St. Louis, MI, 342--351. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Cooper K.D., Harvey T.J. & Kennedy K. (2001). A simple, fast dominance algorithm. Available at http://www.hipersoft.rice.edu/grads/publications/dom14.pdf.Google ScholarGoogle Scholar
  6. Eisenberg A. & De Volder K. (2005). Dynamic feature traces: finding features in unfamiliar code. International Conference on Software Maintenance, Budapest, Hungary, 337--346. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Ko, A.J. DeLine, R., & Venolia, G. (2007). Information needs in collocated software development teams. International Conference on Software Engineering, Minneapolis, MN, 344--353. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Ko, A.J. & Myers, B.A. (2004). Designing the Whyline: a debugging interface for asking questions about program failures. ACM Conference on Human Factors in Computing Systems, Vienna, Austria, 151--158. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ko. A. J., Myers, B.A., Chau, D.H. (2006). A linguistic analysis of how people describe software problems. IEEE Visual Languages and Human-Centric Computing, Brighton, UK, 127--134. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Ko. A.J., Myers, B.A., Coblenz, M. & Aung, H.H. (2006). An exploratory study of how developers seek, relate, and collect relevant information during software maintenance tasks. IEEE Transactions on Software Engineering, 32(12), 971--987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Lencevicius R., Holzle U., & Singh A.K. (2003). Dynamic query-based debugging of object-oriented Programs, Journal of Automated Software Engineering, 10(1), 367--370. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Lewis B. (2003). Debugging backwards in time, International Workshop on Automated Debugging, 225--235.Google ScholarGoogle Scholar
  13. Liblit B., Naik M., Zheng A., Aiken A. & Jordan M. (2005). Scalable statistical bug isolation. Programming Design and Implementation, Chicago, IL, USA, 15--26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Myers B.A., Weitzman D., Ko A.J., & Chau D. H. (2006). Answering why and why not questions in user interfaces. ACM Conference on Human Factors in Computing Systems, Montreal, Canada, 397--406. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Potanin A., Noble J., & Biddle R. (2004). Snapshot query-based debugging. Australian Software Engineering Conference, 251. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Sridharan M., Fink S.J., & Bodik R. (2007). Thin slicing. Programming Language Design and Implementation, San Diego, CA, 112--122. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Tassey, G. (2002). The economic impacts of inadequate infrastructure for software testing. National Institute of Standards and Technology, RTI Project Number 7007.011, 2002.Google ScholarGoogle Scholar
  18. Ungar D., Lieberman H., & Fry C. (1997). Debugging and the experience of immediacy. Communications of the ACM, 40(4) 39--43. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Wang T. & Roychoudhury A. (2004). Using compressed bytecode traces for slicing Java programs, International Conference on Software Engineering, Scotland, UK, 512--521. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Zhang X. & Gupta R. (2005). Whole execution traces and their applications. ACM Transactions on Architecture and Code Optimization, 2(3), 301--334. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Debugging reinvented: asking and answering why and why not questions about program behavior

        Recommendations

        Reviews

        Andrew Brooks

        Are we witnessing the birth of a new interaction paradigm that is not only for software debugging, but also for working with software in general__?__ Whyline is a debugging tool for Java that allows the user to view and get answers to "Why did..." and "Why didn't..." questions about program output. During program execution, Whyline captures a trace that is then used to construct a user interface for navigating output history. Users move a slider back and forward in time and select screen elements of interest to expose "Why did..." and "Why didn't..." questions. In the provided proof-of-concept painting application, the user can view questions, such as "Why did thickness = 5__?__" and "Why didn't thickness change__?__" Whyline is nontrivial and makes use of static and dynamic slicing techniques, called graphs, and various other algorithms. Performance measurements indicate that Whyline is practical for program executions of no more than a few minutes. In a pilot evaluation study, when asked to locate a bug, Whyline subjects were twice as fast as a group of Java experts using Eclipse 2.1. Ko and Myers concede, however, that this study has limited generality, since it involves only one task and relatively few subjects. Importantly, Ko and Myers draw attention to the difficulties of adapting the Whyline approach to applications written in several languages and those that cross machine boundaries. A new generation of languages and architectures is required in order to fully realize the potential of the "Why did..." and "Why didn't..." capabilities. I strongly recommend this paper to all computer scientists. Online Computing Reviews Service

        Access critical reviews of Computing literature here

        Become a reviewer for Computing Reviews.

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          ICSE '08: Proceedings of the 30th international conference on Software engineering
          May 2008
          558 pages
          ISBN:9781605580791
          DOI:10.1145/1368088

          Copyright © 2008 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 10 May 2008

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Author Tags

          Qualifiers

          • research-article

          Acceptance Rates

          ICSE '08 Paper Acceptance Rate56of370submissions,15%Overall Acceptance Rate276of1,856submissions,15%

          Upcoming Conference

          ICSE 2025

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader