Abstract
This paper presents a generalized version of algorithmic debugging, a method for semi-automatic bug localization. The method is generally applicable to procedural languages, and is not dependent on any ad hoc assumptions regarding the subject program. The original form of algorithmic debugging, introduced by Shapiro [Shapiro-83], is however limited to small Prolog programs without side-effects. Another drawback of the original method is the large number of interactions with the user during bug localization.
To our knowledge, this work is the first generalization of algorithmic debugging for programs with side-effects written in imperative languages such as Pascal. Also, we have improved the search method in a way that eliminates many irrelevant questions to the programmer during bug localization. This makes it feasible to debug larger programs. The focusing of the localization process is achieved by using program slicing, a data flow analysis technique, to dynamically compute which parts of the program are relevant for the search. A prototype generalized algorithmic debugger for Pascal has been implemented in Pascal.
This work is supported by STU, the Swedish National Board for Technical Development.
Preview
Unable to display preview. Download preview PDF.
References
W. Drabent, S. Nadjm-Tehrani and J. Maluszynski: The Use of Assertions in Algorithmic Debugging. Proceeding of the FGCS conference, Tokyo, pages 573–581, 1988.
M. Ducasse and A. M. Emde: State of the Art in Automated Program Debugging. TR-LP-25, European Computer-Industry, Research Center GmbH, West Germany, September 1987.
P. Fritzson: Symbolic Debugging Through Incremental Compilation in an Integrated Environment. The Journal of Systems and Software 3, pages 285–294, 1983.
Susan Horwitz, Thomas Reps and David Binkley: Interprocedural Slicing using Dependence Graphs. ACM Transactions on Programming Languages and Systems, Vol. 12, No. 1, pages 26–61, January 1990.
M. Kamkar, N. Shahmehri and P. Fritzson: Affect-chaining and Dependency Oriented Flow Analysis Applied to Queries of Programs. Proceeding of the ACM symposium on Personal and Small Computers, Cannes, France, May 1988.
B. Lisper: Single-Assignment Semantics for Imperative Programs. Lecture Notes in Computer Science, No. 366 PARLE'89, Vol. II, pages 321–334.
James R. Lyle: Evaluating Variations on Program Slicing for Debugging. Ph.D Dissertation, Computer Science Dept. University of Maryland, Dec 1984.
James R. Lyle and Mark Weiser: Automatic Program Bug Location by Program Slicing. In 2:nd IEEE Symp. on Computers and Applications, Peking, pages 877–883, June 1987.
Rudolph E. Seviora: Knowledge-Based Program Debugging Systems, IEEE Software, Vol. 4 No. 3, May 1987.
Nahid Shahmehri and Peter Fritzson: Algorithmic Debugging for Imperative Languages with Side-effects, LiTH-IDA-R-89-49, Department of Computer and Information Science, Linköping University, Sweden, November 1989.
E. Y. Shapiro: Algorithmic Program Debugging. MIT press. 1983.
Mark Weiser: Program Slicing. IEEE Transactions on Software Engineering, Vol. Se-10, No. 4, pages 352–357, July 1984.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1990 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kamkar, M., Shahmehri, N., Fritzson, P. (1990). Bug localization by algorithmic debugging and program slicing. In: Deransart, P., Maluszyński, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1990. Lecture Notes in Computer Science, vol 456. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0024176
Download citation
DOI: https://doi.org/10.1007/BFb0024176
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53010-7
Online ISBN: 978-3-540-46298-9
eBook Packages: Springer Book Archive