Abstract#
Background: Traditional compiler architectures, typically built with tightly coupled parsers and code generators, are difficult and expensive to maintain, especially when adapting to frequent changes or multiple variants of a programming language. This is particularly problematic for languages like IEEE-STD-716 ATLAS, which is widely used in test quality assurance and is subject to frequent modifications and customizations across different test stations and equipment.
Objective: The primary objective of this work is to develop an object-oriented compiler design that simplifies maintenance, enhances flexibility, and reduces costs when supporting multiple variants of the ATLAS language. The approach aims to make it easier to add, delete, or modify language elements without duplicating code or introducing errors, thus streamlining the process of adapting the compiler to evolving standards and requirements.
Method: The proposed solution decomposes the compiler into modular object-oriented classes that separate the lexical and syntactical analyzers, allowing each to be extended or modified independently. By implementing core components—such as the Lexical Analysis (Lex) class and Syntax Analysis (Syntax) class—as base classes, new language variants can be supported by deriving new classes that inherit and selectively override or extend existing functionality. This approach was applied in the development of a new front-end for the Expert System for Test Program Set Quality Assurance (ESQA), which processes ATLAS source code and its variants.
Results: Implementing the object-oriented compiler architecture led to significant reductions in both development and maintenance efforts. The time and cost required to create new front-end variant parsers for ESQA were reduced by 60%, and the size of the source code base decreased by more than 90%. The modular structure enabled rapid adaptation to new ATLAS variants by simply modifying or extending relevant classes, rather than rewriting large portions of code.
Conclusion: The adoption of object-oriented design principles in compiler construction offers substantial benefits in terms of maintainability, extensibility, and cost-effectiveness, especially for languages with frequent updates and numerous variants like ATLAS. By enabling easy addition, deletion, or modification of language elements, this approach not only reduces complexity and risk but also delivers significant operational and economic advantages for organizations relying on evolving language standards.
Downloads#
Download PDFMeta#
- Published in: Proceedings of AUTOTESTCON'94
- DOI: 10.1109/AUTEST.1994.381610