Abstract
As program slicing is a technique for computing a subprogram that preserves a subset of the original program’s functionality, program sliding is a new technique for computing two such subprograms, a slice and its complement, the co-slice. A composition of the slice and co-slice in a sequence is expected to preserve the full functionality of the original code.
The co-slice generated by sliding is designed to reuse the slice’s results, correctly, in order to avoid re-computation causing excessive code duplication. By isolating coherent slices of code, making them extractable and reusable, sliding is shown to be an effective step in performing advanced code refactorings.
A practical sliding algorithm, based on the program dependence graph representation, is presented and evaluated through a manual sliding-based refactoring experiment on real Java code.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
An online refactoring catalog, http://www.refactoring.com/catalog/
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques and Tools. Addison-Wesley (1988)
Cimitile, A., Lucia, A.D., Munro, M.: Identifying reusable functions using specification driven program slicing: a case study. In: ICSM, pp. 124–133 (1995)
Ettinger, R.: Refactoring via Program Slicing and Sliding. Ph.D. thesis, University of Oxford, Oxford, United Kingdom (2006)
Ettinger, R., Verbaere, M.: Untangling: a slice extraction refactoring. In: AOSD 2004: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, pp. 93–101. ACM Press, New York (2004)
Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9(3), 319–349 (1987), http://doi.acm.org/10.1145/24039.24041
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison Wesley (2000)
Griswold, W., Notkin, D.: Automated assistance for program restructuring. ACM Transactions on Software Engineering 2(3), 228–269 (1993)
Horwitz, S., Reps, T.W., Binkley, D.: Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst. 12(1), 26–60 (1990)
Komondoor, R., Horwitz, S.: Effective automatic procedure extraction. In: Proceedings of the 11th IEEE International Workshop on Program Comprehension (2003)
Komondoor, R., Horwitz, S.: Semantics-preserving procedure extraction. In: POPL 2000: Proceedings of the 27th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 155–169. ACM Press, New York (2000)
Lakhotia, A., Deprez, J.C.: Restructuring programs by tucking statements into functions. Information and Software Technology 40(11-12), 677–690 (1998), citeseer.nj.nec.com/lakhotia99restructuring.html
Lanubile, F., Visaggio, G.: Extracting reusable functions by flow graph-based program slicing. IEEE Trans. Software Eng. 23(4), 246–259 (1997)
Maruyama, K.: Automated method-extraction refactoring by using block-based slicing, pp. 31–40. ACM Press (2001)
Opdyke, W.F.: Refactoring Object-Oriented Frameworks. Ph.D. thesis, University of Illinois at Urbana-Champaign, IL, USA (1992), citeseer.nj.nec.com/opdyke92refactoring.html
Ottenstein, K., Ottenstein, L.: The program dependence graph in a software development environment. In: Proc. of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, pp. 177–184 (1984)
Tsantalis, N., Chatzigeorgiou, A.: Identification of extract method refactoring opportunities. In: CSMR 2009: Proceedings of the 2009 European Conference on Software Maintenance and Reengineering, pp. 119–128. IEEE Computer Society, Washington, DC (2009)
Verbaere, M., Ettinger, R., de Moor, O.: JunGL: a scripting language for refactoring. In: ICSE, pp. 172–181 (2006)
Weiser, M.: Program slicing. In: ICSE, pp. 439–449 (1981)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ettinger, R. (2012). Program Sliding. In: Noble, J. (eds) ECOOP 2012 – Object-Oriented Programming. ECOOP 2012. Lecture Notes in Computer Science, vol 7313. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-31057-7_31
Download citation
DOI: https://doi.org/10.1007/978-3-642-31057-7_31
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-31056-0
Online ISBN: 978-3-642-31057-7
eBook Packages: Computer ScienceComputer Science (R0)