Using patterns to develop consistent design constraints
Michael Wahler · Repository for Publications and Research Data (ETH Zurich) · 2008
Developing constraint specifications for class models is a time-consuming and error-prone task because typical specifications contain numerous constraints, which in addition often state complex facts about the elements of the model. As the size and the complexity of constraint specifications grow, so does the probability of inadvertently specifying inconsistent models that cannot be instantiated because of contradictory constraints. In this thesis, we introduce a novel approach to developing consistent constraint specifications based on constraint patterns. The input for this approach is an unconstrained class model and the output is a formal constraint specification. The approach comprises four phases. First, class models are automatically analyzed to elicit potentially missing constraints. Second, a library of composable constraint patterns allows developers to write concise constraint specifications based on the results from the elicitation phase. Third, this approach contains consistency assertions on the constraint pattern library that enable automatic consistency analysis of pattern-based constraint specifications. As basis for these consistency observations, we provide formal definitions of consistency properties of constrained class models. Fourth, pattern-based constraint specifications are transformed into logical expressions or code in a programming language. The focus of the approach is on effectiveness and practicability. Therefore, we introduce a tool that allows model developers to follow the theoretic approach in a guided way and effectively apply it in modeling projects. We use this tool to conduct several case studies in which we validate that our approach improves the state-of-the-art constraint development in terms of detecting missing constraints, shortening development time, avoiding inconsistencies, and yielding more comprehensible constraints.