skip to main content
article
Free access

Automated assistance for program restructuring

Published: 01 July 1993 Publication History

Abstract

Maintenance tends to degrade the structure of software, ultimately making maintenance more costly. At times, then, it is worthwhile to manipulate the structure of a system to make changes easier. However, manual restructuring is an error-prone and expensive activity. By separating structural manipulations from other maintenance activities, the semantics of a system can be held constant by a tool, assuring that no errors are introduced by restructuring. To allow the maintenance team to focus on the aspects of restructuring and maintenance requiring human judgment, a transformation-based tool can be provided—based on a model that exploits preserving data flow dependence and control flow dependence—to automate the repetitive, error-prone, and computationally demanding aspects of restructuring. A set of automatable transformations is introduced; their impact on structure is described, and their usefulness is demonstrated in examples. A model to aid building meaning-preserving restructuring transformations is described, and its realization in a functioning prototype tool for restructuring Scheme programs is discussed.

References

[1]
~AGRAWAL, H., AND HORGAN, J.R. Dynamic program slicing. In Proceedings of the SIGPLAN ~'90 Conference on Programming Languages Design and Implementatton (June 1990). ~SIGPLAN Not. 25, 6 (1990).
[2]
~AHO, A. V., SETHI, a., AND ULLMAN, J. D. Comptlers, Prznciples, Techniques, and Tools. ~Addison-Wesley, Reading, Mass., 1986.
[3]
~ALLEN, F. E., AND COCKE, J. A catalogue of optimizing transformations. In R. Rustin, editor, ~Design and Opttmization of Compilers. Prentice-Hall, Englewood Cliffs, N J, 1972.
[4]
~ARNOLD, R. S. An introduction to software restructuring. In Tutorial on Software Restruc- ~turing. Society Press (IEEE), Washington~ D.C., 1986.
[5]
~BALZER, R. Automated enhancement of knowledge representations. In Proceedings of the ~9th International Joint Conference on Arttficial Intelligence (Aug. 1985), 203 207.
[6]
~BARSTOW, D. On convergence toward a database of program transformations. ACM Trans. ~Program. Lang. Syst. 7~ i (Jan. 1985), I 9.
[7]
~BELADY, L. A., AND LE~MAN, M.M. A model of large program development. IBM Syst. J. 15, ~3 (1976), 225-252.
[8]
~BELADY, L. h., AND LEHMAN, M.M. Programming system dynamics or the metadynamlcs of ~systems in maintenance and growth. Res. Rep. RC3546, IBM, 1971. Page citations from ~reprint in M. M. Lehman, L. A. Belady~ Editors, Program Evolution: Processes of Software ~Change, Ch. 5, APIC Studies in Data Processing, No. 27, Academic Press, London, 1985.
[9]
~BOEHM, B. W. Software Engineering Economics. Prentice-Hall, Englewood Cliffs. N.J., ~1981.
[10]
~B()HM, C., AND JACOPINI, G. Flow diagrams, Turing machines and languages with only two ~formation rules. Commun. ACM 9, 5 (May 1966), 366 371.
[11]
~BURSTALL, R. M., AND DARLINGTON, J. A transformation system for developing recursive ~programs. J. ACM 24, i (Jan. 1977), 44-67.
[12]
~CARTWRIGHT R., AND FELLEISEN, M. The semantics of program dependence. In Proceedings ~of the SIGPLA2V '89 Conference on Programming Languages Design and Implementation ~(July 1989). SIGPLANNot. 24, 7 (1989).
[13]
~CLEVELAND, L. A program understanding support environment. IBM Syst. d. 28, 2 (1989).
[14]
~COLLOFELLO, J. S., AND BUCK, J. J. Software quality assurance for maintenance. IEEE ~Comput. (Sept. 1987), 46 51.
[15]
~CYTRON, R., FERRANTE, J., ROSEN, B., WEGMAN, M., AND ZADECK, K. An efficient method of ~computing static single assignment form. In Proceedings of the 16th Symposium on Prmci- ~ples of Programming Languages (Jan. 1988), 25-35.
[16]
~DOWNEY, P. J., AND SETm, R. Assignment commands with array references. J. ACM 25, 4 ~(Oct. 1978), 652-666.
[17]
~DYBVIG, R.K. The Scheme Programming Language. Prentice-Hall, Englewood Cliffs, N.J., ~1987.
[18]
~EMBLEY, D. W., AND WOODFmLD, S.N. Assessing the quality of abstract data types written ~in Ada. In Proceedings of the lOth International Conference on Software Engtneertng (Apr. ~1988), 144 153.
[19]
~FEATHER, M.S. Specification evolution and program (re)transformation. In Proceedtngs of ~the 5th RADC Knowledge-Based Software Assistant Conference (Sept. 1990).
[20]
~FEATHER, M. S. A system for assisting program transformation. ACM Trans. Program. ~Lang. Syst. 4, 1 (Jan. 1984), I 20.
[21]
~FEDERAL SOFTWARE MANAGEMENT SUPPORT CENTER. Parallel test and productivity evalua- ~tion of a commercially supplied COBOL restructuring tool. Tech. Rep., Office of Software ~Development and Information Technology, Washington, D.C., 1987.
[22]
~FERRANTE, J., OTTENSTEIN, K. J., AND WARREN, J.D. The program dependence graph and its ~use in optimization. ACM Trans Program. Lang. Syst. 9, 3 (July 1987), 319-349.
[23]
~GALLAGHER, K. B., AND LYLE, J.R. Using program slicing in software maintenance. IEEE ~Trans. Softw. Eng. 17, 8 (Aug. 1991), 751 761.
[24]
~GRISWOLD, W G. Program restructuring to aid software maintenance. Ph.D. dissertation, ~Univ. of Washington, Dept. of Computer Science and Engineering, Seattle, Wash., 1991. ~Tech. Rep. No. 91-08-04.
[25]
~GRISWOLD, W. G., AND NOTKIN, D Computer-aided vs. manual program restructuring. ACM ~SIGSOFT Softw. Eng. Notes 17, 1 (Jan. 1992).
[26]
~GRISWOLD, W. G., AND NOTKIN, D. Semantic manipulation of program source. Tech. Rep ~91-08-03, Univ. of Washington, Dept of Computer Science and Engineering, Seattle, Wash., ~1991.
[27]
~HOARE, C. A. R., HAVES, I. J., Ji?ENG, H., MORGAN, C. C., ROSCOE, A. W., SANDERS, J. W., ~SORENSEN, I. H., SPIVEY, J. M., AND SUFRIN, B.h. Laws of programming. Commun ACM 30, ~2 (Aug. 1987), 672 686.
[28]
~HORWITZ, S, REPS, T, AND BINKLEY, D. Interprocedural slicing using dependence graphs. ~ACM Trons. Progrom Long Syst. 12, 3 (Jan. 1990), 26-60.
[29]
~HORWITZ, S., PRINS, J., AND REPS, T. Integrating noninterfering versions of programs. ACM ~Trans. Program. Lang. Syst. (July 1989), 345 387.
[30]
~HORWITZ, S., PRINS, J, AND REPS, T. On the adequacy of program dependence graphs for ~representing programs. In Proceedings of the 15th Symposium on Principles of Programming ~Languages (Jan 1988), 146-157.
[31]
~KUCK, D. J., KUHN, a. H., LEASURE, B., PADUA, D. A., AND WOLFE, M. Dependence graphs ~and compiler optimizations. In Proceedzngs of the 8th SymposLum on Principles of Program- ~ming Languages (Jan. 1981), 207-218.
[32]
~LARUS, J R. Restructuring symbolic programs for concurrent execution on muir(proces- ~sors. Ph.D. dissertation, UC Berkeley Computer Science, 1989. Also Tech. Rep No. UCB/ ~CSD89/502.
[33]
~LEHMAN, M.M. On understanding laws, evolution and conservation in the large-program ~life cycle. J. Syst. Softw. 1, 3 (1980). Page citations from reprint in Program Evolutton' ~Processes of So{tware Change. APIC Studies m Data Processing, No. 27, Academic Press, ~London, 1985.
[34]
~LEwis, T. IEEE Computer (Jan. 1990). Special Issue on Software Engineering.
[35]
~LIENTZ, B., AND SWANSON, E. Software Mazntenance Management: A Study of the Mai,te- ~nance of Computer Appl~catmn Software zn 487 Data Processing Organizatzons. Addison- ~Wesley, Reading, Mass., 1980.
[36]
~LDVEMAN, D.B. Program improvement by source-to-source transfbrmation J. ACM 24, 1 ~(Jan. 1977), 121-145.
[37]
~MORGAN, H. W. Evolution of a software maintenance tool. In Proceedzngs of the 2nd ~National Colzference EDP Software Mozntenance (1984), 268 278.
[38]
~NARAYANASWAMY, K., AND COHEN, D. An assessment of the AP5 programming ~language theory and experience. Tech Rep., Information Sciences Inst., Univ. of Southern ~California, Los Angeles, 1991.
[39]
~OSSHEg, H. L. A mechanism for specifying the structure of large, layered programs In ~Research D~rections tn Ol~lect-Oriented Pro, grammz,~. MIT Press. Cambridge, Mass. 1987
[40]
~PARNAS, D.L. Designing software for ease of extension and contraction. IEEE Trans. So{tw ~Eng. SE-5, 2 (Mar. 1979), 128 138.
[41]
~PARNAS, D. L. On the criteria to be used in decomposing systems into modules. Commun. ~ACM 15, 12 (Dec. 1972), 1053 1058.
[42]
~PODGURSKI, A., AND CLARKE, L.A. A formal model of program dependences and its implica- ~tions for software testing, debugging, and maintenance. JEEE Trans. Softw. Eng. SE-26, 9 ~(1990), 965-979
[43]
~RAMSHAW, L. Eliminating go to's while preserving program structure. J. ACM 35, 4 (Oct. ~1988), 893 920.
[44]
~RICH, C., AND WATERS, R. C. The programmer's apprentice: A research overview. IEEE ~Comput. (Nov. 1988), 11 25. ~ACM Transactmns on Software Engineering and Methodology, Vol. 2, No. 3, July 1993.
[45]
~SCHWANKE, R.W. An intelligent tool for re-engineering software modularity. In Proceedings ~of the 13th International Conference on Software Engineering (May 1991), 83 92.
[46]
~SELKE, R. P. Transforming program dependence graphs. Tech. Rep. TR90-131, Dept. of ~Computer Science, Rice Univ., Houston, Tex., 1990.
[47]
~SHIVERS, O. Control flow analysis in scheme. In Proceedings of the SIGPLAN '88 Conference ~on Programming Languages Design and Implementation (July 1988). SIGPLAN Not. 23, 7.
[48]
~STANKOVIC, J. Good system structure features: Their complexity and execution time cost. ~IEEE Trans. Softw. Eng. SE-8, 4 (July 1982), 306-318.
[49]
~STANKOVIC, J.A. Structured systems and their performance improvement through vertical ~migration. Ph.D. dissertation, Brown Univ., 1979. Dept. of Computer Science Tech. Rep. ~CS-41.
[50]
~STEVENS, W., MYERS, G., AND CONSTANTINE, L. Structured design. IBM Syst. J. 13, 2 (1974).
[51]
~SULLIVAN, K., AND NOTKIN, n. Reconciling environment integration and component indepen- ~dence. ACM Trans Softw. Eng. Method. 1, 3 (July 1992), 229-268.
[52]
~SULLIVAN, K. J., AND NOTKIN, D. Reconciling environment integration and component inde- ~pendence. In Proceedings of the S{GSOFT '90 4th Symposium on Software Development ~Environments (Dec. 1990).
[53]
~VENKATESa, G.A. The semantic approach to program slicing. In Proceedings of the SIG- ~PLAN '91 Co~2ference on Programming Languages Design and Implementation (June 1991). ~SIGPLAN Not. 26, 6.
[54]
~WEISER, M. Program slicing. IEEE Trans. Softw. Eng. SE-IO, 4 (July 1984), 352-357.
[55]
~WmHAMS, M. H., AND OSSHER, H. L. Conversion of unstructured flow diagrams to struc- ~tured form. Comput. J. 21, 2 (1977), 161-167.
[56]
~YANG, W. A new algorithm for semantics-based program integration. Ph.D. dissertation, ~Univ. of Wisconsin, 1990. Computer Sciences Tech. Rep. No. 962.
[57]
~YANG, W., HORWITZ, S., AND REPS, T. Detecting program components with equivalent ~behaviors. Tech. Rep. 840, Computer Sciences Dept., Univ. of Wisconsin, Madison, 1989.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Software Engineering and Methodology
ACM Transactions on Software Engineering and Methodology  Volume 2, Issue 3
July 1993
101 pages
ISSN:1049-331X
EISSN:1557-7392
DOI:10.1145/152388
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 July 1993
Published in TOSEM Volume 2, Issue 3

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. CASE
  2. flow analysis
  3. meaning-preserving transformations
  4. software engineering
  5. software evolution
  6. software maintenance
  7. software restructuring
  8. source-level restructuring

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)61
  • Downloads (Last 6 weeks)10
Reflects downloads up to 22 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media