Locating Bugs in Java Programs — First Results of the Java Diagnosis Experiments Project

  • Cristinel Mateis
  • Markus Stumptner
  • Franz Wotawa
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1821)


This paper describes the use of model-based reasoning for locating bugs in Java programs. Model-based diagnosis is a technology that uses a declarative, generic description of the behavior of the components occurring in a domain to construct a model of the overall system which can then be used at the desired level of abstraction to predict a system’s behavior and derive assumptions about which parts of the system are incorrect. This approach is particularly enticing when applied to software since the model can be constructed from the program automatically. However, the actual choice of models poses interesting challenges. We show a simple model based on dependencies that can be used to diagnose very large programs, and walk through an example debugging session.


Functional Dependency Java Program Reference Type Iteration Statement Variable Occurrence 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Gregory W. Bond. Logic Programs for Consistency-Based Diagnosis. PhD thesis, Carleton University, Faculty of Engineering, Ottawa, Canada, 1994.Google Scholar
  2. 2.
    Luca Console, Gerhard Friedrich, and Daniele Theseider Dupré. Model-based diagnosis meets error diagnosis in logic programs. In Proc. IJCAI, pages 1494–1499, Chambery, August 1993. Morgan Kaufmann.Google Scholar
  3. 3.
    Johan de Kleer and Brian C. Williams. Diagnosing multiple faults. Artificial Intelligence, 32(1):97–130, 1987.zbMATHCrossRefGoogle Scholar
  4. 4.
    Gerhard Friedrich, Markus Stumptner, and Franz Wotawa. Model-based diagnosis of hardware designs. Artificial Intelligence, 111(2):3–39, July 1999.zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Peter Fritzson and Henrik Nilsson. Algorithmic debugging for lazy functional languages. Journal of Functional Programming, 4(3), 1994.Google Scholar
  6. 6.
    Daniel Jackson. Aspect: Detecting Bugs with Abstract Dependences. ACM Transactions on Software Engineering and Methodology, 4(2):109–145, April 1995.CrossRefGoogle Scholar
  7. 7.
    Bogdan Korel. PELAS-Program Error-Locating Assistant System. IEEE Transactions on Software Engineering, 14(9):1253–1260, 1988.CrossRefGoogle Scholar
  8. 8.
    Ron I. Kuper. Dependency-directed localization of software bugs. Technical Report AI-TR 1053, MIT AI Lab, May 1989.Google Scholar
  9. 9.
    Cristinel Mateis, Markus Stumptner, and Franz Wotawa. Debugging of Java Programs using a Model-Based Approach. In Proceedings of the Tenth International Workshop on Principles of Diagnosis, Loch Awe, Scotland, 1999.Google Scholar
  10. 10.
    William R. Murray. Automatic Program Debugging for Intelligent Tutoring Systems. Pitman Publishing, 1988.Google Scholar
  11. 11.
    Henrik Nilsson. Declarative Debugging for Lazy Functional Languages. PhD thesis, Linköping University, April 1998.Google Scholar
  12. 12.
    Raymond Reiter. A theory of diagnosis from first principles. Artificial Intelligence, 32(1):57–95, 1987.zbMATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Ehud Shapiro. Algorithmic Program Debugging. MIT Press, Cambridge, Massachusetts, 1983.Google Scholar
  14. 14.
    Markus Stumptner and Franz Wotawa. Debugging Functional Programs. In Proc. 16th IJCAI, Stockholm, Sweden, August 1999.Google Scholar
  15. 15.
    Markus Stumptner and Franz Wotawa. Detecting and locating faults in hardware designs. In AAAI 99 Workshop on Intelligent Software Engineering, Orlando, Florida, 1999.Google Scholar
  16. 16.
    Mark Weiser. Program slicing. IEEE Transactions on Software Engineering, 10(4):352–357, July 1984.CrossRefGoogle Scholar
  17. 17.
    Franz Wotawa. New Directions in Debugging Hardware Designs. In Proceedings IEA/AIE, 1999.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Cristinel Mateis
    • 1
  • Markus Stumptner
    • 1
  • Franz Wotawa
    • 1
  1. 1.Institut für Informationssysteme, Database and Artificial Intelligence GroupTechnische Universität WienWienAustria

Personalised recommendations