Design pattern-based extension of class hierarchies to support runtime invariant checks
FASE'13 Proceedings of the 16th international conference on Fundamental Approaches to Software Engineering
Hi-index | 0.00 |
In this paper, techniques are presented that exploit two design patterns, the Visitor pattern and the Decorator pattern, to validate invariants about the data attributes in a C++ class automatically. To investigate the pragmatics involved in using the two patterns, a study of an existing, well-tested application, keystone, a parser and front-end for the C++ language, is presented. Results from the study indicate that these two patterns provide flexibility in terms of the frequency and level of granularity of validation of the class invariants, which are expressed in the Object Constraint Language (OCL). The quantitative results measure the impact of these approaches and the additional faults uncovered through validation of the case study. Copyright © 2005 John Wiley & Sons, Ltd.