| Semantics-preserving procedure extraction |
| Full text |
Pdf
(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 |
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 6, Downloads (12 Months): 39, Citation Count: 5
|
|
|
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
|
Todd M. Austin , Scott E. Breach , Gurindar S. Sohi, Efficient detection of all pointer and array access errors, Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, p.290-301, June 20-24, 1994, Orlando, Florida, United States
|
| |
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
|
D. J. Kuck , R. H. Kuhn , D. A. Padua , B. Leasure , M. Wolfe, Dependence graphs and compiler optimizations, Proceedings of the 8th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.207-218, January 26-28, 1981, Williamsburg, Virginia
[doi> 10.1145/567532.567555]
|
| |
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
|
William Landi , Barbara G. Ryder , Sean Zhang, Interprocedural modification side effect analysis with pointer aliasing, Proceedings of the ACM SIGPLAN 1993 conference on Programming language design and implementation, p.56-67, June 21-25, 1993, Albuquerque, New Mexico, United States
|
| |
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
|
Robert P. Wilson , Robert S. French , Christopher S. Wilson , Saman P. Amarasinghe , Jennifer M. Anderson , Steve W. K. Tjiang , Shih-Wei Liao , Chau-Wen Tseng , Mary W. Hall , Monica S. Lam , John L. Hennessy, SUIF: an infrastructure for research on parallelizing and optimizing compilers, ACM SIGPLAN Notices, v.29 n.12, p.31-37, Dec. 1994
[doi> 10.1145/193209.193217]
|
 |
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.
|
|