Abstract
Software maintenance is frequently mischaracterized as the process of fixing errors; in reality, the primary challenge lies in evolving a system's structure as domain understanding matures. This paper introduces a framework for Automated Structural Enhancement. By leveraging explicit, declarative domain models, the system automatically propagates schema changes down to the underlying data (frames) and the code (operations) that manipulates it, mitigating the "ripple effect" common in software evolution.
Introduction: The Challenge of Enhancement
In the early 1980s, software maintenance accounted for the vast majority of lifecycle costs. Robert Balzer identified that the most persistent difficulty was not implementation bugs, but enhancement. As users interact with a system, they gain insights that necessitate new features or altered data structures. In Knowledge-Based (KB) systems, which rely on "exploratory programming," these changes are constant. However, modifying a core data type typically creates a ripple effect that breaks existing data and code. Manually identifying and fixing every site affected by a schema change is tedious and error-prone. Balzer’s work seeks to automate this "propagation of effects."
Methodology
The proposed approach to automation is based on a three-tiered strategy utilizing an explicit, declarative domain model:
- Structural Enhancement Language: Developers use high-level tools (e.g.,
REFINE-TYPE) to capture the intent of a change, such as splitting a general object into specific subtypes. - Frame Propagation: When the model changes, the system identifies "assumption violations" in existing data. For instance, if an optional attribute becomes required, the tool prompts the user for missing values or uses predicates to reclassify objects.
- Operation Propagation: The system updates the code (operations). If a type is refined, the system can automatically insert
TYPECASEstatements or conditional guards to ensure code only accesses valid attributes for specific subtypes.
Case Study: The FSD Environment
The approach was evaluated using the FSD (File System Development) environment at USC/ISI. A primary example involves refining a generic PROGRAM-OBJECT into more specialized INDIVIDUAL-PROGRAM-OBJECT and MODULE types.
As shown in Figure 1, the transformation redistributes attributes and relationships. Attributes like source-text move to the INDIVIDUAL-PROGRAM-OBJECT, while component moves to the module type. This structural shift requires the system to re-map existing data to the new hierarchy.
Key Insights and Taxonomy of Change
Balzer argues that the "softness" of software—its primary advantage—is its ability to be enhanced. By making domain assumptions declarative (e.g., "this attribute is unique"), the system can mechanically determine where those assumptions are relied upon in the code.
The paper provides a comprehensive taxonomy of structural enhancements, categorized into four main areas: changing the count (cardinality), range, or domain of an attribute, or modifying set membership (adding, deleting, or refining types).
Results and Implementation
At the time of publication, tools for modifying the domain model and propagating changes to existing frames were fully implemented. The paper successfully mapped out the logic for updating "consumer," "producer," and "creator" code segments, providing a roadmap for automated code refactoring. This systematic approach ensures that the knowledge base remains consistent even as the underlying model evolves.
Limitations
The framework focuses strictly on structural enhancements. Functional enhancements—changing the actual logic or procedural components—remain significantly more difficult because they require tools to "understand" the underlying intent of the code. Additionally, this approach requires a highly structured, model-driven environment and is difficult to apply to systems where the data model is implicit or poorly defined.
Summary updated