yi? Restructuring previous columns, restructuring involves automatically converting unstructured source code into structured code; re-engi- neering is used to standardize data defi: . nitions, remove redundancies and anom: — alies in existing systems, and ice reimplement the application in a new form; and reverse-engineering is con- cerned with extracting highlevel specifi-.. cations from existing code in the form ha of data and process models. Most computer-aided software engi- neering (CASE) tools currently don't provide facilities to restructure or re-en- gineer existing code; they are focused on ; automating the production of new appli- cations. However, as much as 80 percent of the programming effort in many in-' formation-systems (IS) organizations is directed toward the enhancement of ex-.. isting applications. . me Tackling a Thorny Task. ':-" Forward-engineering from graphical .. design specifications using a convention:: al CASE tool is much simpler to enact than true reverse-engineering, which de: mands the extraction of specifications -— Iza xi 4 up s: k "ih kare že from existing systems. For instance, ' more than 200 CASE vendors support '''» the conventional forward-engineering |. process, although very few vendors ' /''' have tackled the thorny task of reverse: engineering existing applications. In fact, no vendor has yet solved this problem .. - for both the data and process sides of s UJEEKNAPPLIGATION DEVELOPMENT APPLIED INTELLIGENCE code is typically 20 ses to 25 per: tenance costs substantially by using | g nated tools to analyze its portfolio ng the - cent less expensive to maintaln. automated 4 greiegi pe tis Hi emo zjne the restructuring tool ex- ae oi pl ikaly su ASE, - ecutes a complex algorithm to automati: ' struevia! these program pev udav is ' cally structure the spaghetti code. First, restructure these o a valiauoH o£ the need to devel- ... it reduces the program to an abstract tools provide an obJjec ovi K of eschi'pro: 'op better tools control-flow design. This design is then the RUD and guality ol eaf restructuring, | analyzed and redesigned to achieve a ' gram m O | banski cleanly structured control graph, which As illustrated in the nan sli si |. and reverse-engi- |. is then run through a COBOL generator structuring process does no pi s — neering existing "to reimplement the structured design. specifications from the V, ur ma applications code Documentation is produced in the form | code; it stops short oi making žbe za into more easily. of structure charts, control-flow dia-" flow information accessible to the p expandabl« grams and reports on problem areasin < Bramme'. ne ANO | ikeennih the code, such as unreachable code, end-. Some restructuring tools do kme , systems. less loops and poor structure. interactive access to the control-flow di- As outlined in Specialized versions of these products agrams produced as part of the restruc: Restructuring and Reverse Engineering Of Software Processes Multiple Vendors Support Restructuring of Process Code; No Vendor Yet Supports Its Complete Reverse Engineering [sevi Restructured Redesigned code Reverse engineering code and documentatioti E zaj J 7 kli am Restructuring a sh Ke ik k kos J sli l a dode Unstructured code k, pi Mal A k. k. ba," stik) s k k k Es nei ie poi zaj iza A! k, l pika Restructuring veste Siaun Code | Documen- | Project engine mrzemi gener- tation manage- > ator | generator | ment tool o zrem S re a a! MM ka ee EM a ea k S, a JE a ak A z, TJ Ni " di ral LA a a MA ap an. Me id S ae a a JS Ans, , AL j m New specifications Čeč Extracted (op, |. specifications Me ERM | Addition of system-design and business know- | ledge through human programming experts ska | KARO OGRE VSOTA NEOJE ZME JAR VEE lk te LE ea NEBI Repository E .Goals . Report designs $ |. screen designs (Process (Process uglejel-ih model) « Data models » Process models . Specifications » Rules » Data structures » Strategies a a a — PE an s m »"—— a o oj m opo Ee, Ra » Program structures MITE NE II ———— Z ENE IE MA LA O a OE DE OE EM MO JE in naken Organizations are beginning to recog-'" smo Mi bin jine ešij im odo mn er tir [Sie v, kuh tedini idoli io nize the increasing importance of pre- :|:.' 4 tEn ira ji | a - serving the value of past softwarein- <<: peče vestment through re-engineering the ex- — ganiz ns are ginning to recognize the increasing isting software base. Many organizations have 10 million to 20 million lines of code that must, be maintained and en- -!. hanced for many more years; replacing this large body of code using only fon ward-engineering technigues is impracti: ' cal at best. The restructuring of existing code is one of the simplest methods available to : - reduce the cost of maintenance. Using ' > products such as Language Technology: Ines Recoder or IBM's COBOL Structur- ing Facility permits existing unstruc- . tured COBOL programs to be restruc- < tured automatically. — As shown in the figure, these pro- grams take spaghetti-code input and produce cleanly structured code and documentation as output. The resulting structured programs are identical in : functionality to the original unstruc- tured programs; however, the structured sem Cia Li mm: me da ča ne ma, 5 s I sh a ri Be nei, — " Mm, ee... arm s k 4 tt pet a uči! ii ča m | ol ion a a J k aj € mi — z mr TREM OH ; krone h PA NE EN O Z A NA Ne ra, z h Pa ea Pi Por REN i" A V a TT ra ee ze s ii s PF JA ed H pri - ge - J "are available to restructure IBM's Cus- ', den control-flow jumps whenever a par- — support of an applications-maintenance — importance of preserving the value of past software — investment through reengineering the exi id EEyG RE ai % t idi ! Bd Hi ia s m" AM ie. il, k mi be ča] ] kia ' | | A Č P ri? j š turing process. These tools, among them a new product called Chrysalis from Language Technology and the Via/Center product set from Viasoft len Ci inc., extract control-flow informati ticular type of error occurs. To provide : : from the code and ZE ih ran ke. an objective measurement of the guality . tion available to programmers on line. of the code, additional tools such as the .— Using this information, programmers Inspector from Language Technology. '...' can evaluate the structure and organiza- can be used to apply structure and com- tion of the program, how control is plexity metrics to existing code. | passed between modules and how logic Organizations such as the Hartford In:. and data flow through the program. Th surance Group of Hartford, Conn., have ' programmer can use this toati to used restructuring and metrics tools in enhance and maintain the program z. the structure-chart level. kle As shown in the figure, a desirable | | - tomer Information Control System pro- ' gram (CICS) commands, such as the : Handle construct, which can cause hid- /' center. The company has reduced main- z PLE kinih Ne ul a Ta aje — s pet po a a Ee na Mal dana. la. ——a —. : ni sa zet piš skalje dd Polani roča eko TREE —— me i za ši ; EJ di tel ee? xE ppateig leče — ml om z Code Js a Sound Investment inthe Future next step in the extraction of control in- formation from existing code is to pro- duce higher-level control abstractions, "such as design tables, action diagrams and data-flow diagrams. The ultimate ob- jective is to support reverse-engineering by extracting process specifications in the form of process models that are inde- pendent of the implementation environ- ment. These process specifications can then be combined with high-level data . models, which are stored in the reposi- tory of a CASE tool, and then enhanced at the design level and reimplemented in inv supported environment. a is esto bi to build systems that will be easy to change in the future. A major goal of software engineering is to make systems easy to enhance and maintain. Applications built today should be fully based on normalized data models in a CASE repository. To design systems that will ease fu- ture enhancement, and migration, the following technigues are recomimended: 6 Use CASE tools for planning, analysis, design and construction. 6 Use a code generator driven by the CASE design tools. e Adhere to the principles and prac- tices of information engineering. 6 Create procedure designs that are in- dependent of technology, which is likely to change. e Employ a code generator that can translate the designs into implementa- tions with different technology (for ex- ample, a tool that can generate code and data descriptions for different data- base environments). € Use fully normalized data models. € Use fully structured code built with an action-diagram editor that is part of. a CASE environment. € Use a relational database whenever possible. | € Use application standards such as IBM's Systems Application Architecture. € Use a database-management system with field independence and features that enable changes to be made without, rewriting existing programs. e Avoid unusual hardware, operating systems or facilities that could make fu- ture migration difficult. e Plan to do future maintenance by re- generation. ' Make upper-level management, fully aware of the business reasons for using soitware-engineering technigues and automation in applications development. Next week begins a series of articles on key industry trends in computer hardware, software, database environ- - ment, communications and methodolo- gies that are having a profound impact on the computer industry. B The concepts embodied, in reverse-engi- neertng are described in the CASE volume in The James Martin Report Series. For more information on this volume, call (800) 242-1240. For in- formation on seminars, contact (in the United States and Canada) Technology Transfer Imstitute, 741 10th St., Santa Monica, Calif. 90402 (213) 394-8305. In Europe, contact Savant, 2 New St,, Carn, forth, Lancs., LA5 9BX United Kingdom (0524) 734 505.