Abstract
This paper presents a semi-automated methodology for reengineering legacy, character-based user interfaces into modern graphical user interfaces (GUIs). By employing static analysis on Cobol/CICS source code, the authors extract an abstract model of the UI, enabling the generation of a PC-based frontend without modifying the original mainframe backend. The approach utilizes a custom specification language, AUIDL, and advanced static analysis techniques to ensure functional equivalence between the legacy and modernized interfaces.
Introduction
In the mid-1990s, organizations were heavily reliant on legacy data-processing systems featuring character-based interfaces. While users increasingly demanded intuitive, mouse-driven GUIs, completely rewriting these massive, mission-critical systems was prohibitively expensive and risky. The primary challenge was modernizing the frontend without breaking the backend. To achieve this, developers needed to understand exactly how the old interface was implemented, extract its constraints, and map its behavior to a graphical paradigm. This paper addresses the lack of automated tools for this process, proposing a reverse-engineering pipeline to safely and systematically extract UI logic embedded deep within legacy code.
Methodology
The authors propose a cyclical reengineering model consisting of reverse engineering, abstraction, and forward engineering. This structured approach ensures that the logic of the original system is preserved while being translated into a modern format.
Extraction and Analysis
The system begins by parsing legacy Cobol/CICS code into an Abstract Syntax Tree (AST). It uses program slicing, control-flow analysis, and data-flow analysis to separate interface code from application logic. A standout technique used here is Multi-Valued Constant Propagation (MVCP). In legacy code, the specific screen (map) to be displayed is often stored in a variable rather than hardcoded. MVCP traces the data flow across procedural calls to determine all possible constant values a variable might hold, allowing the system to accurately map dynamic screen transitions.
Abstract User Interface Description Language (AUIDL)
The authors designed a custom specification language, AUIDL, to represent the UI. Structure is modeled using object-oriented concepts like containment and importation. Behavior is modeled using Milner’s process algebra, which represents the UI as an "agent" reacting to stimuli (user inputs) via state transitions. This mathematical foundation allows for a compact description of complex, non-deterministic state transitions.
Transformation and Generation
The system infers a graphical AUIDL specification from the basic character-based AUIDL. Finally, a code generator translates this abstract graphical model into actual GUI code (using Easel Corp.'s environment) for PCs.
Case Study and Results
The authors tested their prototype on a real-world, proprietary industrial system managed by the DMR Group Inc. The test system consisted of a subset of a larger management-information system, totaling 6 programs and 24,000 lines of Cobol/CICS code.
Key results from this case study include:
- Successful Extraction: The system successfully processed the codebase, identifying 13 distinct CICS maps (screens) and 178 combinations of data exchanges, function keys, and error messages.
- Working Prototype: The team automatically generated a working PC-based GUI (running on OS/2) for a subset of the system, comprising 6 data-exchange screens and 1 error screen.
- Verified Compatibility: The generated interface was validated against strict coverage criteria. The authors proved that every interaction and navigation path possible in the old character-based screen was preserved in the new GUI.
Discussion
The research highlights several critical insights for legacy modernization:
- Separation of Concerns: By isolating interface code from application code, it is possible to generate a new interface without altering the mainframe backend.
- Intermediate Languages: Creating AUIDL decoupled the reverse-engineering phase from the forward-engineering phase, making the core abstraction universally applicable regardless of the source or target languages.
- Static Analysis Requirements: Because legacy systems often use variables to dictate control flow, advanced static analysis like MVCP is mandatory to untangle UI behavior.
Limitations and Future Work
The methodology relies on static analysis, which can over-approximate behavior by identifying UI transition paths that exist in code but are never executable at runtime. Additionally, the prototype required manual intervention for highly dynamic variables and assembly code.
Future work aims to combine static analysis with dynamic analysis (execution tracing) to eliminate false paths. Furthermore, the authors suggest incorporating modern UI paradigms like multi-threading and migrating client-side functions, such as data validation, from the mainframe to the new PC frontend.
Summary updated