Restructuring programs by tucking statements into functions

Citation
A. Lakhotia et Jc. Deprez, Restructuring programs by tucking statements into functions, INF SOFTW T, 40(11-12), 1998, pp. 677-689
Citations number
40
Categorie Soggetti
Computer Science & Engineering
Journal title
INFORMATION AND SOFTWARE TECHNOLOGY
ISSN journal
09505849 → ACNP
Volume
40
Issue
11-12
Year of publication
1998
Pages
677 - 689
Database
ISI
SICI code
0950-5849(19981110)40:11-12<677:RPBTSI>2.0.ZU;2-V
Abstract
Changing the internal structure of a program without changing its behavior is called restructuring. This paper presents a transformation called tuck f or restructuring programs by decomposing large functions into small functio ns. Tuck consists of three steps: Wedge, Split, and Fold. A wedge a subset of statements in a slice - contains computations that are related and that may create a meaningful function. The statements in a wedge are split from the rest of the code and folded into a new function. A call to the new func tion is placed in the now restructured function. That tuck does not alter t he behavior of the original function follows from the semantic preserving p roperties of a slice. (C) 1998 Elsevier Science B.V. All rights reserved.