Exploiting design patterns to automate validation of class invariants: Research Articles

  • Authors:
  • Brian A. Malloy;James F. Power

  • Affiliations:
  • Computer Science Department, Clemson University, Clemson, SC 29634, U.S.A.;Computer Science Department, National University of Ireland, Maynooth, Co. Kildare, Ireland

  • Venue:
  • Software Testing, Verification & Reliability
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.