skip to main content
article
Free Access

Automated assistance for program restructuring

Published:01 July 1993Publication History
Skip Abstract Section

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. 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). Google ScholarGoogle Scholar
  2. 2 ~AHO, A. V., SETHI, a., AND ULLMAN, J. D. Comptlers, Prznciples, Techniques, and Tools. ~Addison-Wesley, Reading, Mass., 1986. Google ScholarGoogle Scholar
  3. 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.Google ScholarGoogle Scholar
  4. 4 ~ARNOLD, R. S. An introduction to software restructuring. In Tutorial on Software Restruc- ~turing. Society Press (IEEE), Washington~ D.C., 1986.Google ScholarGoogle Scholar
  5. 5 ~BALZER, R. Automated enhancement of knowledge representations. In Proceedings of the ~9th International Joint Conference on Arttficial Intelligence (Aug. 1985), 203 207.Google ScholarGoogle Scholar
  6. 6 ~BARSTOW, D. On convergence toward a database of program transformations. ACM Trans. ~Program. Lang. Syst. 7~ i (Jan. 1985), I 9. Google ScholarGoogle Scholar
  7. 7 ~BELADY, L. A., AND LE~MAN, M.M. A model of large program development. IBM Syst. J. 15, ~3 (1976), 225-252.Google ScholarGoogle Scholar
  8. 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. Google ScholarGoogle Scholar
  9. 9 ~BOEHM, B. W. Software Engineering Economics. Prentice-Hall, Englewood Cliffs. N.J., ~1981. Google ScholarGoogle Scholar
  10. 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. Google ScholarGoogle Scholar
  11. 11 ~BURSTALL, R. M., AND DARLINGTON, J. A transformation system for developing recursive ~programs. J. ACM 24, i (Jan. 1977), 44-67. Google ScholarGoogle Scholar
  12. 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). Google ScholarGoogle Scholar
  13. 13 ~CLEVELAND, L. A program understanding support environment. IBM Syst. d. 28, 2 (1989). Google ScholarGoogle Scholar
  14. 14 ~COLLOFELLO, J. S., AND BUCK, J. J. Software quality assurance for maintenance. IEEE ~Comput. (Sept. 1987), 46 51.Google ScholarGoogle Scholar
  15. 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. Google ScholarGoogle Scholar
  16. 16 ~DOWNEY, P. J., AND SETm, R. Assignment commands with array references. J. ACM 25, 4 ~(Oct. 1978), 652-666. Google ScholarGoogle Scholar
  17. 17 ~DYBVIG, R.K. The Scheme Programming Language. Prentice-Hall, Englewood Cliffs, N.J., ~1987. Google ScholarGoogle Scholar
  18. 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. Google ScholarGoogle Scholar
  19. 19 ~FEATHER, M.S. Specification evolution and program (re)transformation. In Proceedtngs of ~the 5th RADC Knowledge-Based Software Assistant Conference (Sept. 1990).Google ScholarGoogle Scholar
  20. 20 ~FEATHER, M. S. A system for assisting program transformation. ACM Trans. Program. ~Lang. Syst. 4, 1 (Jan. 1984), I 20. Google ScholarGoogle Scholar
  21. 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.Google ScholarGoogle Scholar
  22. 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. Google ScholarGoogle Scholar
  23. 23 ~GALLAGHER, K. B., AND LYLE, J.R. Using program slicing in software maintenance. IEEE ~Trans. Softw. Eng. 17, 8 (Aug. 1991), 751 761. Google ScholarGoogle Scholar
  24. 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.Google ScholarGoogle Scholar
  25. 25 ~GRISWOLD, W. G., AND NOTKIN, D Computer-aided vs. manual program restructuring. ACM ~SIGSOFT Softw. Eng. Notes 17, 1 (Jan. 1992). Google ScholarGoogle Scholar
  26. 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.Google ScholarGoogle Scholar
  27. 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. Google ScholarGoogle Scholar
  28. 28 ~HORWITZ, S , REPS, T, AND BINKLEY, D. Interprocedural slicing using dependence graphs. ~ACM Trons. Progrom Long Syst. 12, 3 (Jan. 1990), 26-60. Google ScholarGoogle Scholar
  29. 29 ~HORWITZ, S., PRINS, J., AND REPS, T. Integrating noninterfering versions of programs. ACM ~Trans. Program. Lang. Syst. (July 1989), 345 387. Google ScholarGoogle Scholar
  30. 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. Google ScholarGoogle Scholar
  31. 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. Google ScholarGoogle Scholar
  32. 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. Google ScholarGoogle Scholar
  33. 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. Google ScholarGoogle Scholar
  34. 34 ~LEwis, T. IEEE Computer (Jan. 1990). Special Issue on Software Engineering.Google ScholarGoogle Scholar
  35. 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. Google ScholarGoogle Scholar
  36. 36 ~LDVEMAN, D.B. Program improvement by source-to-source transfbrmation J. ACM 24, 1 ~(Jan. 1977), 121-145. Google ScholarGoogle Scholar
  37. 37 ~MORGAN, H. W. Evolution of a software maintenance tool. In Proceedzngs of the 2nd ~National Colzference EDP Software Mozntenance (1984), 268 278.Google ScholarGoogle Scholar
  38. 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.Google ScholarGoogle Scholar
  39. 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 Google ScholarGoogle Scholar
  40. 40 ~PARNAS, D.L. Designing software for ease of extension and contraction. IEEE Trans. So{tw ~Eng. SE-5, 2 (Mar. 1979), 128 138.Google ScholarGoogle Scholar
  41. 41 ~PARNAS, D. L. On the criteria to be used in decomposing systems into modules. Commun. ~ACM 15, 12 (Dec. 1972), 1053 1058. Google ScholarGoogle Scholar
  42. 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 Google ScholarGoogle Scholar
  43. 43 ~RAMSHAW, L. Eliminating go to's while preserving program structure. J. ACM 35, 4 (Oct. ~1988), 893 920. Google ScholarGoogle Scholar
  44. 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. Google ScholarGoogle Scholar
  45. 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. Google ScholarGoogle Scholar
  46. 46 ~SELKE, R. P. Transforming program dependence graphs. Tech. Rep. TR90-131, Dept. of ~Computer Science, Rice Univ., Houston, Tex., 1990.Google ScholarGoogle Scholar
  47. 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. Google ScholarGoogle Scholar
  48. 48 ~STANKOVIC, J. Good system structure features: Their complexity and execution time cost. ~IEEE Trans. Softw. Eng. SE-8, 4 (July 1982), 306-318.Google ScholarGoogle Scholar
  49. 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. Google ScholarGoogle Scholar
  50. 50 ~STEVENS, W., MYERS, G., AND CONSTANTINE, L. Structured design. IBM Syst. J. 13, 2 (1974). Google ScholarGoogle Scholar
  51. 51 ~SULLIVAN, K., AND NOTKIN, n. Reconciling environment integration and component indepen- ~dence. ACM Trans Softw. Eng. Method. 1, 3 (July 1992), 229-268. Google ScholarGoogle Scholar
  52. 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). Google ScholarGoogle Scholar
  53. 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. Google ScholarGoogle Scholar
  54. 54 ~WEISER, M. Program slicing. IEEE Trans. Softw. Eng. SE-IO, 4 (July 1984), 352-357.Google ScholarGoogle Scholar
  55. 55 ~WmHAMS, M. H., AND OSSHER, H. L. Conversion of unstructured flow diagrams to struc- ~tured form. Comput. J. 21, 2 (1977), 161-167.Google ScholarGoogle Scholar
  56. 56 ~YANG, W. A new algorithm for semantics-based program integration. Ph.D. dissertation, ~Univ. of Wisconsin, 1990. Computer Sciences Tech. Rep. No. 962. Google ScholarGoogle Scholar
  57. 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.Google ScholarGoogle Scholar

Index Terms

  1. Automated assistance for program restructuring

                  Recommendations

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in

                  Full Access

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader