Abstract
Algorithmic debugging is a technique for semi-automatic localization of program errors. So far, this technique has been limited to programs without side-effects, and has only been applied to Prolog programs. In this paper, we generalize the algorithmic debugging method to programs written in imperative languages, e.g. Pascal, which may contain side-effects.
Our method combines program transformation techniques with data flow analysis techniques to achieve this goal. Programs which contain side-effects are transformed or mapped to programs without side-effects. These transformations are guided by data flow analysis results. The conventional procedure level algorithmic debugging technique is used on the transformed or mapped program, but the debugging process is presented to the user in terms of the original program. The model can be extended to statement level debugging. A prototype for a subset of Pascal has been implemented. A larger prototype including transformations is being implemented within the DICE system — a programming environment based on incremental compilation. Currently we restrict ourselves to bug localization for terminating programs. Also, side-effects related to pointers are currently not considered.
This work was supported by STU, The Swedish Board for Technical Development.
Chapter PDF
Similar content being viewed by others
References
Drabent W., Nadjm-Tehrani S. and Maluszynski J., The Use of Assertions in Algorithmic Debugging. Proceeding of the FGCS Conference, Tokyo. 1988, pp.573–581.
Fritzson P., Symbolic Debugging Through Incremental Compilation in an Integrated Environment. The Journal of Systems and Software 3, 1983, pp.285–294.
Kamkar M., Shahmehri N. and Fritzson P., Bug Localization by Algorithmic Debugging and Program Slicing. Proceeding of the PLILP'90, Linköping, Sweden. LNCS, Vol 456, pp.60–74.
Shahmehri N., Fritzson P., Algorithmic debugging for Imperative Languages with Side-effects, Research Report LiTH-IDA-R-89-49, Linköping University, Sweden, 1989.
Shapiro E. Y., Algorithmic Program Debugging. MIT press, 1983.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Shahmehri, N., Fritzson, P. (1991). Algorithmic debugging for imperative languages with side-effects. In: Hammer, D. (eds) Compiler Compilers. CC 1990. Lecture Notes in Computer Science, vol 477. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-53669-8_92
Download citation
DOI: https://doi.org/10.1007/3-540-53669-8_92
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53669-7
Online ISBN: 978-3-540-46953-7
eBook Packages: Springer Book Archive