Abstract
Program slicing is a useful technique for debugging, testing, and analyzing programs. A program slice consists of the parts of a program which (potentially) affect the values computed at some point of interest. With rare exceptions, program slices have hitherto been computed and defined in ad-hoc and language-specific ways. The principal contribution of this paper is to show that general and semantically well-founded notions of slicing and dependence can be derived in a simple, uniform way from term rewriting systems (TRSs). Our slicing technique is applicable to any language whose semantics is specified in TRS form. Moreover, we show that our method admits an efficient implementation.
Supported in part by the European Union under Esprit project # 5399 (Compiler Generation for Parallel Machines—Compare). Part of this work was done when the second author was at IBM.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aceto, L., Bloom, B., and Vaandrager, F. Turning SOS rules into equations. In Proc. IEEE Symp. on Logic in Computer Science (Santa Cruz, CA, June 1992), pp. 113–124.
Bertot, Y. Occurrences in debugger specifications. In Proc. ACM SIGPLAN '91 Conf. on Programming Language Design and Implementation (Toronto, June 1991), pp. 327–336.
Bertot, Y. Origin functions in λ-calculus and term rewriting systems. In Proc. Seventeenth CAAP (1992), J.-C. Raoult, Ed., pp. 49–64. (Springer-Verlag LNCS 581).
Cartwright, R., and Felleisen, M. The semantics of program dependence. In Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation (Portland, OR, 1989), pp. 13–27.
Deursen, A. van, Klint, P., and Tip, F. Origin tracking. J. Symbolic Computation 15 (1993), 523–545.
Ferrante, J., Ottenstein, K. J., and Warren, J. D. The program dependence graph and its use in optimization. ACM Trans. on Programming Languages and Systems 9, 3 (July 1987), 319–349.
Field, J. On laziness and optimality in lambda interpreters: Tools for specification and analysis. In Proc. Seventeenth ACM Symp. on Principles of Programming Languages (San Francisco, January 1990), pp. 1–15.
Field, J. A simple rewriting semantics for realistic imperative programs and its application to program analysis. In Proc. ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (San Francisco, June 1992), pp. 98–107. Published as Yale University Technical Report YALEU/DCS/RR-909.
Field, J., and Tip, F. Dynamic dependence in term rewriting systems and its application to program slicing. Report CS-R94xx, CWI, Amsterdam, 1994. Forthcoming.
Kahn, G. Natural semantics. In Fourth Annual Symp. on Theoretical Aspects of Computer Science (1987), vol. 247 of LNCS, Springer-Verlag, pp. 22–39.
Klint, P. A meta-environment for generating programming environments. ACM Trans. on Software Engineering and Methodology 2, 2 (1993), 176–201.
Klop, J. Term rewriting systems. Tech. Rep. CS-R9073, CWI, Amsterdam, The Netherlands, 1990.
Maranget, L. Optimal derivations in weak lambda-calculi and in orthogonal term rewriting systems. In Proc. Eighteenth ACM Symp. on Principles of Programming Languages (Orlando, FL, January 1991), pp. 255–269.
Maranget, L. La Stratégie Paresseuse. PhD thesis, Université de Paris VIII, 1992. (in French).
Ottenstein, K. J., and Ottenstein, L. M. The program dependence graph in a software development environment. In Proc. ACM SIGPLAN/SIGSOFT Symp. on Practical Programming Development Environments (April 1984), pp. 177–184. SIGPLAN Notices 19(5).
Tip, F. A survey of program slicing methods. Forthcoming CWI technical report, 1994.
Venkatesh, G. The semantic approach to program slicing. In Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation (Toronto, June 1991), pp. 80–91.
Wadler, P., and Hughes, R. Projections for strictness analysis. In Proc. Conf. on Functional Programming and Computer Architecture (Portland, OR, September 1987), pp. 385–406. (Springer-Verlag LNCS 274).
Weiser, M. Program slicing. IEEE Trans. on Software Engineering SE-10, 4 (1989), 352–357.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Field, J., Tip, F. (1994). Dynamic dependence in term rewriting systems and its application to program slicing. In: Hermenegildo, M., Penjam, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1994. Lecture Notes in Computer Science, vol 844. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58402-1_29
Download citation
DOI: https://doi.org/10.1007/3-540-58402-1_29
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58402-5
Online ISBN: 978-3-540-48695-4
eBook Packages: Springer Book Archive