Abstract

A Software Product Line (SPL) is an approach to reuse in-the-large that models closely related software systems in terms of commonalities and variabilities. Design patterns are best practices for addressing recurring design problems. When implementing an SPL, instances of certain design patterns are employed to handle variability, which makes these variability-aware design patterns a best practice for SPL design. However, a proactive SPL development method with design patterns is lacking. In our paper [1], we present a method to perform generative SPL development with design patterns.To specify a design pattern (see Fig. 1 1 -- 3), we use role models to capture a design pattern's elements and its relation to a variability model in a Design Pattern Role Model (DPRM) and a Family Role Model (FRM), respectively. To associate the aspects specified in each of these role models, i.e., design and variability, we define an FRM to DPRM mapping. To apply a design pattern (see Fig. 1 4 -- 6), a user has to select a variability-aware design pattern, variability realization mechanism and target language to have the implementation generated-potentially by merging it into existing realization artifacts. In the process, a user has to map individual FRM roles to existing features and DPRM roles to (parts of) implementation elements to be generated (e.g., classes, methods). To assure correct instantiation, we check both these mappings for conformance with the specification of the pattern by formulating a satisfiability problem and applying a SAT solver.In the paper, we provide definitions for the variability-aware versions of the design patterns Observer, Strategy, Template Method and Composite. Furthermore, we support generation of realizations in Java, C++ and UML class diagrams utilizing annotative, compositional and transformational variability realization mechanisms, see Fig. 2. Through these mechanisms, we support proactive development of SPLs using design patterns to apply best practices for the realization of variability. We realize our concepts within the Eclipse IDE and demonstrate them within a case study.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call