Techreport,

Beyond Traditional Program Slicing

, and .
JCU-CS-95/8. Department of Computer Science, James Cook University, (August 1995)

Abstract

Traditional program slices are based on variables and statements. Slices consist of statements that potentially affect (or are affected by) the value of a particular variable at a given statement. Two assumptions are implicit in this definition: 1) that variables and statements are concepts of the programming language in which the program is written, and 2) that slices consist solely of statements. $<$p$>$ Generalised slicing is an extension of traditional slicing where variables are replaced by arbitrary named program entities and statements by arbitrary program constructs. A model of generalised slicing is presented that allows the essence of any slicing tool to be reduced to a node marking process operating on a program syntax tree. Slicing tools can thus be implemented in a straight-forward way as reusable modules using tree-based techniques such as attribute grammars. $<$p$>$ A variety of useful program decompositions are shown to be instances of generalised slicing. Examples include call graph generation and interface extraction. To show the wide applicability of generalised slicing examples are also given of how slicing can enhance understanding of formal compiler specifications and make it possible to create subset language specifications. $<$p$>$

Tags

Users

  • @dparigot

Comments and Reviews