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.
- 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 Scholar
- BANNING, J.P. 1978. A method for determining the side effects of procedure calls. Ph.D. thesis, Stanford Univ., Stanford, Calif. Google Scholar
- 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 Scholar
- 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 Scholar
- 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 Scholar
- FRITZSON, P. 1983. Symbolic debugging through incremental compilation in an integrated environment. J. Syst. Softw. 3, 285-294.Google Scholar
- FRITZSON, P., AUGUSTON, M., AND SHAHMEHRI, S. 1993. Using assertions in declarative and operational models for automated debugging. J. Syst. Softw. To appear. Google Scholar
- FRITZSON, P., GYIMOTHY, T., KAMKAR, M., AND SHAHMEHRI, N. 1991. Generalized algorithmic debugging and testing. In Proceedings of PLDI'91,317-326. Google Scholar
- HORWlTZ, S., REPS, T., AND BINKLEY, D. 1990. Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst. 12 (Jan.), 26-61. Google Scholar
- HUNTBACH, M. 1987. Algorithmic Parlog debugging. In Proceedings of the 4th Symposium on Logic Programming.Google Scholar
- 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 Scholar
- 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 Scholar
- 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 Scholar
- KOREL, B., AND LASKI, J. 1988. Dynamic program slicing. Inf. Process. Lett. (Oct.), 155-163. Google Scholar
- 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 Scholar
- LISPER, B. 1989. Single-assignment semantics for imperative programs. In PARLE'89, Vol. H. Lecture Notes in Computer Science, vot. 366, 321-334. Google Scholar
- 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 Scholar
- 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 Scholar
- OSTRAND, T. J., AND BALCER, M.J. 1988. The Category-Partition method for specifying and generating functional tests. Commun. ACM 31, 6 (June). Google Scholar
- PEREIRA, L.M. 1986. Rational debugging in logic programming. In Proceedings of the 3rd Logzc Programming Conference (London, England, July). 203-210. Google Scholar
- SEVIORA, R.E. 1987. Knowledge-based program debugging systems. IEEE Softw. 4, 3 (May).Google Scholar
- SHAHMEHRI, N. 1991. Generalized algorithmic debugging. Ph.D. thesis No. 260, Dept. of Computer Information Science, LinkSping Univ., Sweden.Google Scholar
- 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 Scholar
- 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 Scholar
- SHAPIRO, E.Y. 1983. Algorithmic Program Debugging. MIT Press, Cambridge, Mass. Google Scholar
- Szucs, R., AND GYIMOTHY, T. T-GEN Test Case Generator. User's Gutde. Cogito Ltd., Szeged, Hungary.Google Scholar
- 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 Scholar
- 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 Scholar
- WEISER, M. 1984. Program slicing. IEEE Trans. Softw. Eng. Se-lO, 4 (July), 352-357.Google Scholar
- WEISER, M. 1982. Programmers use slices when debugging. Commun. ACM 25, 7 (July) 446-452. Google Scholar
Index Terms
- Generalized algorithmic debugging and testing
Recommendations
A Survey of Algorithmic Debugging
Algorithmic debugging is a technique proposed in 1982 by E. Y. Shapiro in the context of logic programming. This survey shows how the initial ideas have been developed to become a widespread debugging schema fitting many different programming paradigms ...
Combining algorithmic debugging and program slicing
PPDP '06: Proceedings of the 8th ACM SIGPLAN international conference on Principles and practice of declarative programmingCurrently, program slicing and algorithmic debugging are two of the most relevant debugging techniques for declarative languages. They help programmers to find bugs in a semiautomatic manner. On the one hand, program slicing is a technique to extract ...
Debugging techniques for declarative languages: Profiling, program slicing and algorithmic debugging
There is no doubt about the relevance of debugging in the software development process. However, the scientific community has put little attention on this task and the same debugging techniques used twenty years ago are still being used today. The ...
Comments