Debugging Prolog Programs

  • William F. Clocksin
  • Christopher S. Mellish

Abstract

By this point you will have used and modified many of the example programs described earlier, and you will have written programs of your own. The problem of what to do when your program does not behave as expected is now relevant. Problems with programs are known as “bugs”, and the process of removing bugs from programs is known as “debugging”. We believe that a convenient approach to programming is what could be described as “preventative programming”. To paraphrase an old proverb, an ounce of careful programming is worth a pound of debugging. In this chapter we shall attempt to describe some techniques for debugging, but we shall start with a discussion of how to try to prevent bugs from infesting your programs. We realise that such a problem is unsolved in general, but we simply wish to convey some informal techniques that have helped other Prolog programmers.

Keywords

Lution 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 1984

Authors and Affiliations

  • William F. Clocksin
    • 1
  • Christopher S. Mellish
    • 2
  1. 1.Computer LaboratoryUniversity of CambridgeCambridgeEngland
  2. 2.Cognitive Studies ProgrammeUniversity of SussexFalmer, BrightonEngland

Personalised recommendations