Skip to main content

Model-Based Debugging or How to Diagnose Programs Automatically

  • Conference paper
  • First Online:
Developments in Applied Artificial Intelligence (IEA/AIE 2002)

Abstract

We describe the extension of the well-known model-based diagnosis approach to the location of errors in imperative programs (exhibited on a subset of the Java language). The source program is automatically converted to a logical representation (called model). Given this model and a particular test case or set of test cases, a program-independent search algorithm determines a the minimal sets of statements whose incorrectness can explain incorrect outcomes when the program is executed on the test cases, and which can then be indicated to the developer by the system. We analyze example cases and discuss empirical results from a Java debugger implementation incorporating our approach. The use of AI techniques is more flexible than traditional debugging techniques such as algorithmic debugging and program slicing.

Work was partially supported by Austrian Science Fund projects P12344-INF and N Z29-INF.

Authors are listed in reverse alphabetical order.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Lieberman, H.: The debugging scandal and what to do about it. Communications of the ACM 40 (1997)

    Google Scholar 

  2. Weiser, M.: Programmers use slices when debugging. Communications of the ACM 25 (1982)446–452

    Article  Google Scholar 

  3. Shapiro, E.: Algorithmic Program Debugging. MIT Press, Cambridge, Massachusetts (1983)

    Google Scholar 

  4. Reiter, R.: A theory of diagnosis from first principles. Artificial Intelligence 32 (1987) 57–95

    Article  MATH  MathSciNet  Google Scholar 

  5. de Kleer, J., Williams, B. C.: Diagnosing multiple faults. Artificial Intelligence 32 (1987) 97–130

    Article  MATH  Google Scholar 

  6. Mateis, C., Stumptner, M., Wotawa, F.: Modeling Java Programs for Diagnosis. In: Proceedings of the European Conference on Artificial Intelligence (ECAI), Berlin, Germany (2000)

    Google Scholar 

  7. Stumptner, M., Wotawa, F.: Debugging Functional Programs. In: Proceedings 16th International Joint Conf. on Artificial Intelligence, Stockholm, Sweden (1999) 1074–1079

    Google Scholar 

  8. Friedrich, G., Stumptner, M., Wotawa, F.: Model-based diagnosis of hardware designs. Artificial Intelligence 111 (1999) 3–39

    Article  MATH  MathSciNet  Google Scholar 

  9. de Kleer, J., Mackworth, A. K., Reiter, R.: Characterizing diagnosis and systems. Artificial Intelligence 56 (1992)

    Google Scholar 

  10. Tip, F.: A Survey of Program Slicing Techniques. Journal of Programming Languages 3 (1995) 121–189

    Google Scholar 

  11. Murray, W. R.: Automatic Program Debugging for Intelligent Tutoring Systems. Pitman Publishing (1988)

    Google Scholar 

  12. Kuper, R. I.: Dependency-directed localization of software bugs. Technical Report AI-TR 1053, MIT AI Lab (1989)

    Google Scholar 

  13. Lloyd, J. W.: Declarative Error Diagnosis. New Generation Computing 5 (1987) 133–154

    Article  MATH  MathSciNet  Google Scholar 

  14. Console, L., Friedrich, G., Dupré, D. T.: Model-based diagnosis meets error diagnosis in logic programs. In: Proceedings 13th International Joint Conf. on Artificial Intelligence, Chambery (1993) 1494–1499

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Wotawa, F., Stumptner, M., Mayer, W. (2002). Model-Based Debugging or How to Diagnose Programs Automatically. In: Hendtlass, T., Ali, M. (eds) Developments in Applied Artificial Intelligence. IEA/AIE 2002. Lecture Notes in Computer Science(), vol 2358. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48035-8_72

Download citation

  • DOI: https://doi.org/10.1007/3-540-48035-8_72

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43781-9

  • Online ISBN: 978-3-540-48035-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics