Abstract
The aim of this article is to provide a unified mathematical framework for program slicing which places all slicing work for sequential programs on a sound theoretical foundation. The main advantage to a mathematical approach is that it is not tied to a particular representation. In fact the mathematics provides a sound basis for any particular representation. We use the WSL (wide-spectrum language) program transformation theory as our framework. Within this framework we define a new semantic relation, semirefinement, which lies between semantic equivalence and semantic refinement. Combining this semantic relation, a syntactic relation (called reduction), and WSL's remove statement, we can give mathematical definitions for backwards slicing, conditioned slicing, static and dynamic slicing, and semantic slicing as program transformations in the WSL transformation theory. A novel technique of “encoding” operational semantics within a denotational semantics allows the framework to handle “operational slicing”. The theory also enables the concept of slicing to be applied to nondeterministic programs. These transformations are implemented in the industry-strength FermaT transformation system.
- Agrawal, H. and Horgan, J. R. 1990. Dynamic program slicing. SIGPLAN Not. 25, (Jun.), 246--256. Google Scholar
Digital Library
- Back, R. J. R. 1980. Correctness preserving program refinements. Mathematical Centre Tracts No. 131, Mathematisch Centrum, Amsterdam.Google Scholar
- Back, R. J. R. 1988. A calculus of refinements for program derivations. Acta Inf. 25, 593--624. Google Scholar
Digital Library
- Back, R. J. R. and von Wright, J. 1990. Refinement concepts formalised in higher-order logic. Formal Aspects Comput. 2, 247--272.Google Scholar
Cross Ref
- Balzer, R. 1969. EXDAMS---EXtendable debugging and monitoring system. In Proceedings of the AFIPS SJCC.Google Scholar
- Beszedas, A., Farago, C., Szabo, Z. M., Csirik, J., and Gyimothy, T. 2002. Union slices for program maintenance. In 18th International Conference on Software Maintenance (ICSM) (Montreal, Quebec, Oct. 3--6). Google Scholar
Digital Library
- Bilardi, G. and Pingali, K. 1999. The static single assignment form and its computation. Tech. Rep., Cornell University, July. http://www.cs.cornell.edu/Info/Projects/Bernoulli/papers/ssa.ps.Google Scholar
- Binkley, D., Harman, M., and Danicic, S. 2003. Amorphous program slicing. J. Syst. Softw. 68, (Oct.) 45--64. Google Scholar
Digital Library
- Binkley, D. and Gallagher, K. 1996. A survey of program slicing. In Advances in Computers, M. Zelkowitz, ed. Academic Press, San Diego, CA.Google Scholar
- Bohm, C. and Jacopini, G. 1966. Flow diagrams, Turing machines and languages with only two formation rules. Commun. ACM 9, (May), 366--371. Google Scholar
Digital Library
- Canfora, G., Cimitile, A., and de Lucia, A. 1998. Conditioned program slicing. Inf. Softw. Technol. 40, 595--607.Google Scholar
Cross Ref
- Cytron, R., Ferrante, J., Rosen, B. K., Wegman, M. N., and Zadeck, F. K. 1991. Efficiently computing static single assignment form and the control dependance graph. ACM Trans. Program. Lang. Syst. 13, (Jul.), 451--490. Google Scholar
Digital Library
- Danicic, S. 1999. Dataflow minimal slicing. Ph.D. thesis, London University.Google Scholar
- De Lucia., A., Harman, M., Hierons, R., and Krinke, J. 2003. Unions of slices are not slices. In the 7th European Conference on Software Maintenance and Reengineering (Benevento, Italy, Mar.). Google Scholar
Digital Library
- Dijkstra, E. W. 1976. A Discipline of Programming. Prentice-Hall, Englewood Cliffs, NJ. Google Scholar
Digital Library
- Forgacs, I. and Gyimothy, T. 1997. An efficient interprocedural slicing method for large programs. In Proceedings of the SEKE, 9th International Conference on Software Engineering and Knowledge Engineering (Madrid, Spain).Google Scholar
- Harman, M. and Danicic, S. 1997. Amorphous program slicing. In the 5th IEEE International Workshop on Program Comprehension (IWPC) (Dearborn, MI, May). Google Scholar
Digital Library
- Harman, M., Danicic, S., and Hierons, R. M. 2000. ConSIT: A conditioned program slicer. In the 5th IEEE International Conference on Software Maintenance (ICSM) (San Jose, CA, Oct.). Google Scholar
Digital Library
- Harmon, M., Hu, L., Munro, M., and Zhang, X. 2001. GUSTT: An amorphous slicing system which combines slicing and transformation. In Proceedings of the 8th Working Conference on Reverse Engineering (WCRE) (Los Alamitos, CA). Google Scholar
Digital Library
- Horwitz, S., Reps, T., and Binkley, D. 1990. Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst. 12, (Jan.), 26--60. Google Scholar
Digital Library
- Karp, C. R. 1964. Languages with Expressions of Infinite Length. North-Holland, Amsterdam.Google Scholar
- Korel, B. and Laski, J. 1988. Dynamic program slicing. Inf. Process. Lett. 29, (Oct.), 155--163. Google Scholar
Digital Library
- Morgan, C. C. 1994. Programming from Specifications, 2nd ed. Prentice-Hall, Englewood Cliffs, NJ. Google Scholar
Digital Library
- Morgan, C. C. and Robinson, K. 1987. Specification statements and refinements. IBM J. Res. Develop. 31. Google Scholar
Digital Library
- Pingali, K. and Bilardi, G. 1997. Optimal control dependence computation and the Roman Chariots problem. ACM Trans. Program. Lang. Syst., (May). http://www.cs.cornell.edu/Info/Projects/Bernoulli/papers/toplas97.ps. Google Scholar
Digital Library
- Stoy, J. E. 1977. Denotational Semantics: The Scott-Strachy Approach to Programming Language Theory. MIT Press, Cambridge, MA. Google Scholar
Digital Library
- Tennet, R. D. 1976. The denotational semantics of programming languages. Commun. ACM 19, (Aug.), 437--453. Google Scholar
Digital Library
- Tip, F. 1995. A survey of program slicing techniques. J. Program. Lang. 3, (Sept.), 121--189.Google Scholar
- Venkatesh, G. A. 1991. The semantic approach to program slicing. SIGPLAN Not. 26, 107--119. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation (Jun. 26--28). Google Scholar
Digital Library
- Ward, M. 1989. Proving program refinements and transformations. Ph.D. thesis, Oxford University. Google Scholar
Digital Library
- Ward, M. 1990. Derivation of a sorting algorithm. Tech. Rep., Durham University. http://www.cse.dmu.ac.uk/~m-ward/martin/papers/foundation2-t.ps.gz.Google Scholar
- Ward, M. 1993. Abstracting a specification from code. J. Softw. Maintenance Res. Pract. 5, (Jun.), 101--122. http://www.cse.dmu.ac.uk/~m-ward/martin/papers/prog-spec.ps.gz.Google Scholar
Cross Ref
- Ward, M. 1994a. Foundations for a practical theory of program refinement and transformation. Tech. Rep., Durham University. http://www.cse.dmu.ac.uk/~m-ward/martin/papers/foundation2-t.ps.gz.Google Scholar
- Ward, M. 1994b. Reverse engineering through formal transformation Knuth's Polynomial Addition algorithm. Comput. J. 37, 795--813. http://www.cse.dmu.ac.uk/~m-ward/martin/papers/poly-t.ps.gz.Google Scholar
Cross Ref
- Ward, M. 1995. A definition of abstraction. J. Softw. Maintenance Res. Pract. 7, (Nov.), 443--450. http://www.cse.dmu.ac.uk/~m-ward/martin/papers/abstraction-t.ps.gz. Google Scholar
Digital Library
- Ward, M. 1996. Derivation of data intensive algorithms by formal transformation. IEEE Trans. Softw. Eng. 22, (Sept.), 665--686. http://www.cse.dmu.ac.uk/~m-ward/martin/papers/sw-alg.ps.gz. Google Scholar
Digital Library
- Ward, M. 1999. Assembler to C migration using the FermaT transformation system. In the International Conference on Software Maintenance (Oxford, UK, Aug. 30--Sept. 3). Google Scholar
Digital Library
- Ward, M. 2000. Reverse engineering from assembler to formal specifications via program transformations. In Proceedings of the 7th Working Conference on Reverse Engineering (Brisbane, Queensland, Australia, Nov. 23--25). http://www.cse.dmu.ac.uk/~m-ward/martin/papers/wcre2000.ps.gz. Google Scholar
Digital Library
- Ward, M. 2001. The formal transformation approach to source code analysis and manipulation. In the IEEE International Workshop on Source Code Analysis and Manipulation (Florence, Italy, Nov. 10).Google Scholar
Cross Ref
- Ward, M. 2004. Pigs from sausages? Reengineering from assembler to C via FermaT transformations. Sci. Comput. Program. 52, 213--255. Google Scholar
Digital Library
- Ward, M. and Bennett, K. H. 1995. Formal methods to aid the evolution of software. Int. J. Softw. Eng. Knowl. Eng. 5, 25--47. http://www.cse.dmu.ac.uk/~m-ward/martin/papers/evolution-t.ps.gz.Google Scholar
Cross Ref
- Ward, M., Zedan, H., and Hardcastle, T. 2005. Conditioned semantic slicing via abstraction and refinement in FermaT. In the 9th European Conference on Software Maintenance and Reengineering (CSMR) (Manchester, UK, Mar. 21--23). Google Scholar
Digital Library
- Weiser, M. 1984a. Program slicing. IEEE Trans. Softw. Eng. 10, (Jul.), 352--357.Google Scholar
Digital Library
- Weiser, M. 1984b. Programmers use slices when debugging. Commun. ACM 25. (Jul.), 352--357. Google Scholar
Digital Library
- Yang, H. and Ward, M. 2003. Successful Evolution of Software Systems. Artech House. ISBN 1-58053-349-3. Google Scholar
Digital Library
- Younger, E. J. and Ward, M. 1993. Inverse engineering is a simple real time program. J. Softw. Maintenance Res. Pract. 6, 197--234. http://www.cse.dmu.ac.uk/~m-ward/martin/papers/eddy-t.ps.gz.Google Scholar
Cross Ref
- Zhang, X., Munro, M., Harman, M., and Hu, L. 2002. Mechanized operational semantics of WSL. In the IEEE International Workshop on Source Code Analysis and Manipulation (SCAM) (Los Alamitos, CA). Google Scholar
Digital Library
Index Terms
Slicing as a program transformation
Recommendations
Abstract Program Slicing: An Abstract Interpretation-Based Approach to Program Slicing
In the present article, we formally define the notion of abstract program slicing, a general form of program slicing where properties of data are considered instead of their exact value. This approach is applied to a language with numeric and reference ...
Conditioned semantic slicing for abstraction; industrial experiment
One of the most challenging tasks a programmer can face is attempting to analyse and understand a legacy assembler system. Many features of assembler make analysis difficult, and these are the same features that make migration from assembler to a high-...
Formal Program Reversing by Conditioned Slicing
CSMR '03: Proceedings of the Seventh European Conference on Software Maintenance and ReengineeringIn [33 ]we have appl ed [\kern-0.15em[ P ]\kern-0.15em]= \langle[\kern-0.15em[ P_1]\kern-0.15em] , \ldots , [\kern-0.15em[ P_n]\kern-0.15em] \rangle as a conjuncture to reverse calculate the formal specifications of a program P through the application ...






Comments