4 research outputs found
Exploiting design patterns to automate validation of class invariants
In this paper, techniques are presented that exploit two design patterns, the Visitor
pattern and the Decorator pattern, to automatically validate invariants about the data
attributes in a C++ class. To investigate the pragmatics involved in using the two
patterns, a study of an existing, well-tested application, keystone, a parser and frontend
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