ACM Home Page
Please provide us with feedback. Feedback
Semantics-preserving procedure extraction
Full text PdfPdf (2.18 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Boston, MA, USA
Pages: 155 - 169  
Year of Publication: 2000
ISBN:1-58113-125-9
Authors
Raghavan Komondoor  Computer Sciences Department, University of Wisconsin-Madison, 1210 West Dayton Street, Madison, WI
Susan Horwitz  Computer Sciences Department, University of Wisconsin-Madison, 1210 West Dayton Street, Madison, WI
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 7,   Downloads (12 Months): 41,   Citation Count: 5
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/325694.325713
What is a DOI?

ABSTRACT

Procedure extraction is an important program transformation that can be used to make programs easier to understand and maintain, to facilitate code reuse, and to convert “monolithic” code to modular or object-oriented code. Procedure extraction involves the following steps: The statements to be extracted are identified (by the programmer or by a programming tool). If the statements are not contiguous, they are moved together so that they form a sequence that can be extracted into a procedure, and so that the semantics of the original code is preserved. The statements are extracted into a new procedure, and are replaced with an appropriate call. This paper addresses step 2: in particular, the conditions under which it is possible to move a set of selected statements together so that they become “extractable”, while preserving semantics. Since semantic equivalence is, in general, undecidable, we identify sufficient conditions based on control and data dependences, and define an algorithm that moves the selected statements together when the conditions hold. We also include an outline of a proof that our algorithm is semantics-preserving. While there has been considerable previous work on procedure extraction, we believe that this is the first paper to provide an algorithm for semantics-preserving procedures extraction given an arbitrary set of selected statements in an arbitrary control-flow graph.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

ABS94
 
And94
L.O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994. (DIKU report 94/19).
BD77
BDFH97
BG98
BH93
CLZ86
 
CY79
L.L. Constantine and E. Yourdon. Structured Design. Prentice-Hall, Englewood Cliffs, New Jersey, 1979.
Fea82
FOW87
GN93
 
KH99
R. Komondoor and S. Horwitz. Semanticspreserving procedure extraction. Technical Report TR-1407, Computer Sciences, University of Wisconsin-Madison, 1999.
KKP+81
 
LD98
A. Lakhotia and J-C. Deprez. Restructuring programs by tucking statements into functions. Information and Software Technology, 40(11- 12):677-689, November 1998.
 
LMW79
LRZ93
 
LS86
S. Letovski and E. Soloway. Delocalized plans and program comprehension. IEEE Software, pages 198-204, May 1986.
 
LV97
 
Pap86
Par72
PP96
Ram88
 
RSW96
 
SJ87
H.M. Sneed and G. Jandrasics. Software recycling. In Proc. Conf. Software Maintenance, pages 82-90, 1987.
WFW+94
WL95
 
WM92
S. Wu and U. Manber. Agrep- a fast approximate pattern-matching tool. In Usenix Winter 1992 Technical Conference, pages 153-162, January 1992.


Collaborative Colleagues:
Raghavan Komondoor: colleagues
Susan Horwitz: colleagues