@techreport{R-89-49, TITLE = {Algorithmic Debugging for Imperatives for Languages with Side-effects}, AUTHOR = {Nahid Shahmehri and Peter Fritzson}, YEAR = {1989}, NUMBER = {R-89-49}, INSTITUTION = ida, ADDRESS = idaaddr, ABSTRACTURL = {/publications/cgi-bin/tr-fetch.pl?r-89-49+abstr}, 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 which may contain side-effects and which can be written in imperative languages, e.g. Pascal or object-oriented languages.Our method combines program transformations with results from data flow analysis 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 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. A small 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.}, IDANR = {LiTH-IDA-R-89-49}, NOTE = {Also presented at The 3rd International Workshop on Compiler Compilers, Schwerin, Germany. October 22-24, 1990. The proceedings will be published by Springer Verlag in the LNCS series}