Property Checking for Design Patterns

L. Feng, X. Yu, G. Pu, S. Jiang, H. Zhu, and B. Gu (PRC)


Design Patterns, Property Checking, Relational Calculus, rCOS


Design patterns have been widely employed as a useful object-oriented technique in software engineering. In this paper, we present an approach to property checking for the application of design patterns in rCOS, which is known as a refinement calculus for object oriented systems. A relational calculus is proposed to specify the pattern properties we would like to check. To construct the abstract model from rCOS instead of analyzing directly on source code, we combine static and dynamic analysis together to achieve better checking efficiency. Class diagrams and object diagrams are obtained with the analysis of rCOS program. The extended operational semantics for rCOS with the object graph is given as the basis for representing object relationships. A general algorithm for calculating relational predicates is presented to perform the property checking. The examples of design patterns from GoF [7], such as abstract factory, builder etc, are also provided to illustrate the effectiveness of our approach from which we can tell whether some patterns are used correctly.

Important Links:

Go Back