Software Maintenance: System Restructing
System Restructuring
- Restructuring involves examining the existing system and rewriting parts of it to improve its overall structure.
- Restructuring may be particularly useful when changes are confined to part of the system. Only this part need be restructured. Other parts need not be changed or revalidated.
- If a program is written in a high-level language, it is possible to restructure that program automatically although the computer time required to do so may be great.
- Theorem (The basis for program restructuring [Bohm 1966]) Any program may be rewritten in terms of simple IF-THEN-ELSE conditionals and WHILE loops and that unconditional GOTO statements were not required.
- Method
Step 1. Construct a program flow graph.
Step 2. Apply simplification and transformation techniques to the graph to construct while loops and simple conditional statements.
- It may well be that a combination of automatic and manual system restructuring is the best approach. The control structure could be improved automatically and this makes the system easier to understand. The abstraction and data structures of the program may then be discovered, documented and improved using a manual approach.
- Decisions on whether to restructure or rewrite a program can only be made on a case-by-case basis. Some of the factors which must be taken into account are
- Is a significant proportion of the system stable and not subject to frequent change? If so, this suggests restructuring rather than rewriting as it is only really necessary to restructure that part of the program which is to be changed.
- Does the program rely on obsolete support software such as compilers, etc.? If so, this suggests it should be rewritten in a modern language as the future availability of the support software cannot be guaranteed.
- Are tools available to support the restructuring process? If not, manual restructuring is the only option.
- System restructuring offers an opportunity to control maintenance costs and I believe that it will become increasingly important. The rate of change of hardware development means that many embedded software systems which are still in use must be changed as the hardware on which they execute cannot be supported.
Posted in Computer Science, Information Technology, Software Engineering, Software Engineering |
