Abstract
In a model-based software product line (MSPL), the variability of the domain is characterized in a variability model and the core artifacts are base models conforming to a modeling language (also called metamodel). A realization model connects the features of the variability model to the base model elements, triggering operations over these elements based on a configuration. The design space of an MSPL is extremely complex to manage for the engineer, since the number of variants may be exponential and the derived product models have to be conforming to numerous well-formedness and business rules. In this paper, the objective is to provide a way to generate MSPLs, called counterexamples (also called antipatterns), that can produce invalid product models despite a valid configuration in the variability model. We describe the foundations and motivate the usefulness of counterexamples (e.g., inference of guidelines or domain-specific rules to avoid earlier the specification of incorrect mappings; testing oracles for increasing the robustness of derivation engines given a modeling language). We provide a generic process, based on the common variability language (CVL) to randomly search the space of MSPLs for a specific modeling language. We develop LineGen a tool on top of CVL and modeling technologies to support the methodology and the process. LineGen targets different scenarios and is flexible to work either with just a domain metamodel as input or also with pre-defined variability models and base models. We validate the effectiveness of this process for three formalisms at different scales (up to 247 metaclasses and 684 rules). We also apply the approach in the context of a real industrial scenario involving a large-scale metamodel.
Similar content being viewed by others
Notes
CVL uses the term materialization to refer to the derivation of a model. Also, a selected/unselected feature corresponds to a positively/negatively decided VSpec. We adopt the well-known vocabulary of SPLE for the sake of understandability.
The Meta-Object Facility (MOF) is an OMG standard for modeling technologies. For instance, the Eclipse Modeling Framework is more or less aligned to OMG’s MOF.
Realization layer in the current CVL specification.
Resolution model in CVL specification.
Source code for the experiment is available at http://goo.gl/PgkrL.
References
Acher, M., Collet, P., Lahire, P., France, R.: Familiar: a domain-specific language for large scale management of feature models. Science of Computer Programming (SCP). Special Issue on Programming Languages, p. 22. doi:10.1016/j.scico.2012.12.004 (2013)
Alférez, M., Lopez-Herrejon, R.E., Moreira, A., Amaral, V., Egyed, A.: Supporting consistency checking between features and software product line use scenarios. In: Schmid, K. (ed.) ICSR, Lecture Notes in Computer Science, vol. 6727, pp. 20–35. Springer (2011)
Apel, S., Batory, D., Kstner, C., Saake, G.: Feature-Oriented Software Product Lines. Springer, Berlin (2013)
Apel, S., Janda, F., Trujillo, S., Kästner, C.: Model superimposition in software product lines. In: Paige, R.F. (ed.) ICMT, Lecture Notes in Computer Science, vol. 5563, pp. 4–19. Springer (2009)
Apel, S., Rhein, A.v., Wendler, P., Grosslinger, A., Beyer, D.: Strategies for product-line verification: Case studies and experiments. In: Proceedings of the 2013 International Conference on Software Engineering, ICSE ’13, pp. 482–491. IEEE Press, Piscataway. http://dl.acm.org/citation.cfm?id=2486788.2486852 (2013)
Asirelli, P., ter Beek, M.H., Gnesi, S., Fantechi, A.: Formal description of variability in product families. In: de Almeida, E.S., Kishi, T., Schwanninger, C., John I., Schmid K. (eds.) SPLC, pp. 130–139. IEEE (2011)
Baudry, B., Ghosh, S., Fleurey, F., France, R.B., Traon, Y.L., Mottu, J.M.: Barriers to systematic model transformation testing. Commun. ACM 53(6), 139–143 (2010)
Benavides, D., Segura, S., Ruiz-cort, A.: Automated analysis of feature models 20 years later: a literature review. Inf. Syst. 35(6), 615–636 (2010)
Cadavid, J.J., Baudry, B., Sahraoui, H.A.: Searching the boundaries of a modeling space to test metamodels. In: ICST, pp. 131–140 (2012)
Chen, L., Babar, M.A., Ali, N.: Variability management in software product lines: a systematic review. In: SPLC’09, pp. 81–90 (2009)
Clarke, D., Helvensteijn, M., Schaefer, I.: Abstract delta modeling. In: Proceedings of the 9th GPCE’10 Conference, GPCE ’10, pp. 13–22. ACM, New York. doi:10.1145/1868294.1868298 (2010)
Classen, A., Heymans, P., Schobbens, P.Y., Legay, A.: Symbolic model checking of software product lines. In: ICSE’11, pp. 321–330. ACM (2011)
Classen, A., Heymans, P., Schobbens, P.Y., Legay, A., Raskin, J.F.: Model checking lots of systems: efficient verification of temporal properties in software product lines. In: ICSE’10, pp. 335–344. ACM (2010)
Clements, P., Northrop, L.M.: Software Product Lines: Practices and Patterns. Addison-Wesley Professional, Reading (2011)
Czarnecki, K., Antkiewicz, M.: Mapping features to models: a template approach based on superimposed variants. In: GPCE’05, LNCS, vol. 3676, pp. 422–437 (2005)
Czarnecki, K., Bednasch, T., Unger, P., Eisenecker, U.W.: Generative programming for embedded software: An industrial experience report. In: Proceedings of the 1st ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering. GPCE ’02, pp. 156–172. Springer, London (2002)
Czarnecki, K., Grünbacher, P., Rabiser, R., Schmid, K., Wasowski, A.: Cool features and tough decisions: a comparison of variability modeling approaches. In: Proceedings of the Sixth International Workshop on Variability Modeling of Software-Intensive Systems, VaMoS ’12, pp. 173–182. ACM, New York. doi:10.1145/2110147.2110167 (2012)
Czarnecki, K., Pietroszek, K.: Verifying feature-based model templates against well-formedness ocl constraints. In: GPCE’06, pp. 211–220, ACM. doi:10.1145/1173706.1173738 (2006)
Dhungana, D., Grünbacher, P., Rabiser, R., Neumayer, T.: Structuring the modeling space and supporting evolution in software product line engineering. J. Syst. Softw. 83(7), 1108–1122 (2010)
Egyed, A.: Automatically detecting and tracking inconsistencies in software design models. IEEE Trans. Softw. Eng. 37(2), 188–204 (2011)
FAMILIAR: FeAture Model scrIpt Language for manIpulation and Automatic Reasonning. http://nyx.unice.fr/projects/familiar/. Accessed 13 Aug 2014
Filho, J.B.F., Barais, O., Acher, M., Baudry, B., Noir, J.L.: Generating counterexamples of model-based software product lines: an exploratory study. In: T. Kishi, S. Jarzabek, S. Gnesi (eds.) SPLC, pp. 72–81. ACM (2013)
Filho, J.B.F., Barais, O., Baudry, B., Le Noir, J.: Leveraging variability modeling for multi-dimensional model-driven software product lines. In: Product Line Approaches in Software Engineering (PLEASE), 2012 3rd International Workshop on, pp. 5–8. doi:10.1109/PLEASE.2012.6229774 (2012)
Filho, J.B.F., Barais, O., Le Noir, J., Jézéquel, J.M.: Customizing the common variability language semantics for your domain models. In: Proceedings of the VARiability for You Workshop, VARY ’12, pp. 3–8. ACM, New York. doi:10.1145/2425415.2425417 (2012)
Fleurey, F., Haugen, Ø., Møller-Pedersen, B., Svendsen, A., Zhang, X.: Standardizing variability—challenges and solutions. In: SDL Forum, pp. 233–246 (2011)
Gotlieb, A., Hervieu, A., Baudry, B.: Minimum pairwise coverage using constraint programming techniques. In: Antoniol, G., Bertolino, A., Labiche, Y. (eds.) ICST, pp. 773–774. IEEE (2012)
Group, O.M.: OMG unified modeling language (OMG UML), infrastructure, V2.1.2. Technical Report. http://www.omg.org/spec/UML/2.1.2/Infrastructure/PDF (2007)
Haugen, O., Møller-Pedersen, B., Oldevik, J., Olsen, G.K., Svendsen, A.: Adding standardized variability to domain specific languages. In: Proceedings of the 2008 12th International Software Product Line Conference, SPLC ’08, pp. 139–148. IEEE Computer Society, Washington, DC. doi:10.1109/SPLC.2008.25 (2008)
Heidenreich, F., Sanchez, P., Santos, J., Zschaler, S., Alferez, M., Araujo, J., Fuentes, L., amd Ana Moreira, U.K., Rashid, A.: Relating feature models to other models of a software product line: a comparative study of featuremapper and vml*. Transactions on Aspect-Oriented Software Development VII, Special Issue on A Common Case Study for Aspect-Oriented Modeling, vol. 6210, pp. 69–114 (2010)
ISO: International organization for standardization: Iso/iec fcd 42010: systems and software engineering—architecture description (2010)
Johansen, M.F., Haugen, Ø., Fleurey, F.: An algorithm for generating t-wise covering arrays from large feature models. In: E.S. de Almeida, C. Schwanninger, D. Benavides (eds.) SPLC (1), pp. 46–55. ACM (2012)
Perrouin, G., Klein, J., Guelfi, N., Jézéquel, J.M.: Reconciling automation and flexibility in product derivation. In: SPLC’08, pp. 339–348. IEEE. doi:10.1109/SPLC.2008.38 (2008)
Perrouin, G., Oster, S., Sen, S., Klein, J., Baudry, B., Traon, Y.L.: Pairwise testing for software product lines: comparison of two approaches. Softw. Qual. J. 20(3–4), 605–643 (2012)
Pohl, K., Böckle, G., van der Linden, F.J.: Software Product Line Engineering: Foundations, Principles and Techniques. Springer, Berlin (2005)
Schaefer, I., Bettini, L., Damiani, F., Tanzarella, N.: Delta-oriented programming of software product lines. In: Proceedings of the 14th International Conference on Software Product Lines: Going Beyond, SPLC’10, pp. 77–91. Springer, Berlin, Heidelberg. http://dl.acm.org/citation.cfm?id=1885639.1885647 (2010)
Schmidt, D.C.: Model-driven engineering. IEEE Comput. 39(2), 25–31 (2006)
Svahnberg, M., van Gurp, J., Bosch, J.: A taxonomy of variability realization techniques: research articles. Softw. Pract. Exper. 35(8), 705–754 (2005). doi:10.1002/spe.v35:8
Svendsen, A., Haugen, Ø., Møller-Pedersen, B.: Specifying a testing oracle for train stations—going beyond with product line technology. In: Kienzle, J. (ed.) MoDELS Workshops, LNCS, vol. 7167, pp. 187–201. Springer (2011)
Svendsen, A., Zhang, X., Lind-Tviberg, R., Fleurey, F., Haugen, Ø., Møller-Pedersen, B., Olsen, G.K.: Developing a software product line for train control: a case study of cvl. In: Bosch, J., Lee, J. (eds.) SPLC, Lecture Notes in Computer Science, vol. 6287, pp. 106–120. Springer (2010)
Thaker, S., Batory, D., Kitchin, D., Cook, W.: Safe composition of product lines. In: GPCE ’07, pp. 95–104. ACM, New York. doi:10.1145/1289971.1289989 (2007)
Thüm, T., Apel, S., Kästner, C., Schaefer, I., Saake, G.: A classification and survey of analysis strategies for software product lines. In: Computing Surveys, 2014. ACM, Accepted 30 January 2014 (2014)
Voelter, M., Groher, I.: Product line implementation using aspect-oriented and model-driven software development. In: SPLC’07, pp. 233–242. IEEE. doi:10.1109/SPLC.2007.28 (2007)
Voirin, J.L.: Method and tools to secure and support collaborative architecting of constrained systems. In: 18th International Symposium of the INCOSE. International Council on Systems Engineering, Utrecht, Netherlands (2008)
Zhang, X., Møller-Pedersen, B.: Towards correct product derivation in model-driven product lines. In: Haugen Ø., Reed R., Gotzhein, R. (eds.) SAM, Lecture Notes in Computer Science, vol. 7744, pp. 179–197. Springer (2012)
Ziadi, T., Jézéquel, J.M.: Software product line engineering with the uml: deriving products. In: Käkölä T., Dueñas J.C. (eds.) Software Product Lines, pp. 557–588. Springer, Berlin (2006)
Author information
Authors and Affiliations
Corresponding author
Additional information
This work was developed in the VaryMDE project, a bilateral collaboration between the Diverse team at INRIA and the Thales Research and Technology. A preliminary version of this paper was published in the International Software Product Line Conference.
Rights and permissions
About this article
Cite this article
Filho, J.B.F., Barais, O., Acher, M. et al. Generating counterexamples of model-based software product lines. Int J Softw Tools Technol Transfer 17, 585–600 (2015). https://doi.org/10.1007/s10009-014-0341-2
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10009-014-0341-2