skip to main content
article
Free Access

Generalized algorithmic debugging and testing

Published:01 December 1992Publication History
Skip Abstract Section

Abstract

This paper presents a method for semi-automatic bug localization, generalized algorithmic debugging, which has been integrated with the category partition method for functional testing. In this way the efficiency of the algorithmic debugging method for bug localization can be improved by using test specifications and test results. The long-range goal of this work is a semi-automatic debugging and testing system which can be used during large-scale program development of nontrivial programs.

The method is generally applicable to procedural langua ges and is not dependent on any ad hoc assumptions regarding the subject program. The original form of algorithmic debugging, introduced by Shapiro, was however limited to small Prolog programs without side-effects, but has later been generalized to concurrent logic programming languages. Another drawback of the original method is the large number of interactions with the user during bug localization.

To our knowledge, this is the first method which uses category partition testing to improve the bug localization properties of algorithmic debugging. The method can avoid irrelevant questions to the programmer by categorizing input parameters and then match these against test cases in the test database. Additionally, we use program slicing, a data flow analysis technique, to dynamically compute which parts of the program are relevant for the search, thus further improving bug localization.

We believe that this is the first generalization of algorithmic debugging for programs with side-effects written in imperative languages such as Pascal. These improvements together makes it more feasible to debug larger programs. However, additional improvements are needed to make it handle pointer-related side-effects and concurrent Pascal programs.

A prototype generalized algorithmic debugger for a Pascal subset without pointer side-effects and a test case generator for application programs in Pascal, C, dBase, and LOTUS have been implemented.

References

  1. BANNING, J.P. 1979. An efficient way to find the side-effects of procedure calls and the aliases of variables. In Conference Record of the 6th Annual ACM SIGPLAN / SIGSOFT Symposium on POPL. ACM, New York, 29-41. Google ScholarGoogle Scholar
  2. BANNING, J.P. 1978. A method for determining the side effects of procedure calls. Ph.D. thesis, Stanford Univ., Stanford, Calif. Google ScholarGoogle Scholar
  3. CHOI, J-D., MILLER, B., AND NETZER, R. 1991. Techniques for debugging parallel programs with flowback analysis. ACM Trans. Program. Lang. Syst. 13, 4 (Oct.), 491-530. Google ScholarGoogle Scholar
  4. DRABENT, W., NADJM-TEHRANI, S., AND MALUSZYNSKI, J. 1988. The use of assertions in algorithmic debugging. In Proceedings of the FGCS Conference (Tokyo), 573-581.Google ScholarGoogle Scholar
  5. DUCASSE, M., AND EMDE, A.-M. 1988. A review of automated debugging systems: Knowledge, strategies, and techniques. In Proceedings of the l Oth International Conference on Software Engineering. IEEE Press, New York. Google ScholarGoogle Scholar
  6. FRITZSON, P. 1983. Symbolic debugging through incremental compilation in an integrated environment. J. Syst. Softw. 3, 285-294.Google ScholarGoogle Scholar
  7. FRITZSON, P., AUGUSTON, M., AND SHAHMEHRI, S. 1993. Using assertions in declarative and operational models for automated debugging. J. Syst. Softw. To appear. Google ScholarGoogle Scholar
  8. FRITZSON, P., GYIMOTHY, T., KAMKAR, M., AND SHAHMEHRI, N. 1991. Generalized algorithmic debugging and testing. In Proceedings of PLDI'91,317-326. Google ScholarGoogle Scholar
  9. HORWlTZ, S., REPS, T., AND BINKLEY, D. 1990. Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst. 12 (Jan.), 26-61. Google ScholarGoogle Scholar
  10. HUNTBACH, M. 1987. Algorithmic Parlog debugging. In Proceedings of the 4th Symposium on Logic Programming.Google ScholarGoogle Scholar
  11. KAMKAR, M. 1991. An overview and comparative classification of ~tatic ~nd dynamic program slicing. Res. Rep. LITH-IDA-R-91-19, Dept. of Computer and Information Science, LinkSping Univ,, Sweden. To appear in J. Syst. Softw.Google ScholarGoogle Scholar
  12. KAMKAR, M., SHAHMEHRI, N., AND FRITZSON, P. 1992. Interprocedural dynamic slicing. In Proceedings of PLILP'92--Conference on Programming Language Implementation and Logic Programming. Lecture Notes in Computer Science, vol. 631. Springer-Vertag, New York. Google ScholarGoogle Scholar
  13. KAMKAR, M{., SHAHMEHRI, N., AND FRITZSON, P. 1990. Bug localization by algorithmic debugging and program slicing. In Proceedings of the International Conference on Programming Language Implementation and Logic Programming. Lecture Notes in Computer Science, voI. 456. Springer-Verlag, New York. Google ScholarGoogle Scholar
  14. KOREL, B., AND LASKI, J. 1988. Dynamic program slicing. Inf. Process. Lett. (Oct.), 155-163. Google ScholarGoogle Scholar
  15. LICHTENSTEIN, Y., AND SHAPIRO, E. 1989. Concurrent algorithmic debugging. In Proceedtngs of the ACM Workshop on Parallel and Distributed Debugging. SIGPLAN Not. 24, 1 (Jan.). Google ScholarGoogle Scholar
  16. LISPER, B. 1989. Single-assignment semantics for imperative programs. In PARLE'89, Vol. H. Lecture Notes in Computer Science, vot. 366, 321-334. Google ScholarGoogle Scholar
  17. LYLE, J. R., AND WEISER, M. 1987. Automatic program bug location by program slicing. In the 2nd IEEE Symposium on Computers and Apphcations (Peking, June). IEEE, New York, 877-883.Google ScholarGoogle Scholar
  18. NILSSON, H., AND FRITZSON, P. 1992. Algorithmic debugging for lazy functional languages. In Proceedings of PLILP'92--Conference on Programming Language Implementation and Logic Programming. Lecture Notes in Computer Science, Vol. 631, Springer-Verlag, New York. Also to appear in J. Functional Program. Google ScholarGoogle Scholar
  19. OSTRAND, T. J., AND BALCER, M.J. 1988. The Category-Partition method for specifying and generating functional tests. Commun. ACM 31, 6 (June). Google ScholarGoogle Scholar
  20. PEREIRA, L.M. 1986. Rational debugging in logic programming. In Proceedings of the 3rd Logzc Programming Conference (London, England, July). 203-210. Google ScholarGoogle Scholar
  21. SEVIORA, R.E. 1987. Knowledge-based program debugging systems. IEEE Softw. 4, 3 (May).Google ScholarGoogle Scholar
  22. SHAHMEHRI, N. 1991. Generalized algorithmic debugging. Ph.D. thesis No. 260, Dept. of Computer Information Science, LinkSping Univ., Sweden.Google ScholarGoogle Scholar
  23. SHAHMEHRI, N., AND FRITZSON, P. 1989. Algorithmic debugging for imperative languages with side-effects. Res. Rep. LiTH-IDA-R-89-49, Dept. of Computer and Information Science, Linkoping Univ., Sweden.Google ScholarGoogle Scholar
  24. SHAHMEHRI, N., KAMKAR, M., AND FRITZSON, P. 1990. Semi-automatic bug localization in software maintenance. In Proceedings of the IEEE Conference on Software Maintenance (San Diego, Nov 26-29). IEEE, New York.Google ScholarGoogle Scholar
  25. SHAPIRO, E.Y. 1983. Algorithmic Program Debugging. MIT Press, Cambridge, Mass. Google ScholarGoogle Scholar
  26. Szucs, R., AND GYIMOTHY, T. T-GEN Test Case Generator. User's Gutde. Cogito Ltd., Szeged, Hungary.Google ScholarGoogle Scholar
  27. TAKEUCm, A. 1987. Algorithmic debugging of GHC programs and its implementation in GHC. In Concurrent Prolog: Collected Papers. Vol. 2. MIT Press, Cambrldge. Mass., 180-196. Google ScholarGoogle Scholar
  28. ToczKI, J., KocsIs, F., GYIMOTHY, T., DANYI, G., AND KOKAI, G. 1990. SYS/3--A software development tool. In Proceedings of CC'90. Lecture Notes in Computer Science, vol. 477. Springer-Verlag, New York, 193-207. Google ScholarGoogle Scholar
  29. WEISER, M. 1984. Program slicing. IEEE Trans. Softw. Eng. Se-lO, 4 (July), 352-357.Google ScholarGoogle Scholar
  30. WEISER, M. 1982. Programmers use slices when debugging. Commun. ACM 25, 7 (July) 446-452. Google ScholarGoogle Scholar

Index Terms

  1. Generalized algorithmic debugging and testing

      Recommendations

      Comments

      Login options

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

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader