Using Constraint Satisfaction and Optimization for Pattern-Based Software Design
Sriharsha Vathsavayi, Outi Sievi-Korte, Kai Koskimies, Kari Systä · 2014
Patterns are proven solutions that are applied to solve a recurring problem in a specific context. Pattern-based software design applies a suitable set of patterns to create a software structure that fulfills the requirements of the system to be built. The challenge is to find the useful patterns and apply them in an optimal way. This paper views pattern-based software design as a constraint satisfaction optimization problem (CSOP). A general method of formulating pattern-based software design as a CSOP is presented, expressing the design rules associated with patterns as constraints and the quality requirements as the objective function. Using standard tools for constraint satisfaction, a pattern-based design of a software system can be generated automatically with proper pattern allocation, optimizing the chosen quality properties. The benefits of the CSOP approach include the possibility to produce an explanation of the proposed pattern applications, and the ability to extend the available pattern set, the design rules, and the optimization criteria easily using the modeling languages of the constraint satisfaction tools. The approach is studied by generating the pattern-based software design of an embedded home automation system. The initial results suggest that constraint satisfaction and optimization is a viable technique for automating pattern-based software design.