Features, believe it or not! A Design Pattern for First-Class Citizen Features on Stock JVM
Contributo in Atti di convegno
Data di Pubblicazione:
2022
Citazione:
Features, believe it or not! A Design Pattern for First-Class Citizen Features on Stock JVM / F. Bertolotti, W. Cazzola, L. Favalli - In: SPLC '22: Proceedings / [a cura di] A. Felfernig, L. Fuentes. - [s.l] : ACM, 2022 Sep. - ISBN 9781450394437. - pp. 32-42 (( Intervento presentato al 16. convegno International Software Product Line Conference (SPLC'22) tenutosi a Graz nel 2022 [10.1145/3546932.3546989].
Abstract:
Modern software systems must fulfill the needs of an ever-growing customer base. Due to the innate diversity of human needs, software should be highly customizable and reconfigurable. Researchers and practitioners gained interest in software product lines (SPL), mimicking aspects of product lines in industrial production for the engineering of highly-variable systems. There are two main approaches towards the engineering of SPLs. The first uses macros—such as the #ifdef macro in C. The second—called feature-oriented programming (FOP)—uses variability-aware preprocessors called composers to generate a program variant from a set of features and a configuration. Both approaches have disadvantages. Most notably, these approaches are usually not supported by the base language; for instance Java is one of the most commonly used FOP languages among researchers, but it does not support macros rather it relies on the C preprocessor or a custom one to translate macros into actual Java code. As a result, developers must struggle to keep up with the evolution of the base language, hindering the general applicability of SPL engineering. Moreover, to effectively evolve a software configuration and its features, their location must be known. The
problem of recording and maintaining traceability information is considered expensive and error-prone and it is once again handled externally through dedicated modeling languages and tools. Instead, to properly convey the FOP paradigm, software features should be treated as first-class citizens using concepts that are proper to the host language, so that the variability can be expressed and analyzed with the same tools used to develop any other software in the same language. In this paper, we present a simple and flexible design pattern for JVM-based languages—dubbed devise pattern—that can be used to express feature dependencies and behaviors with a light-weight syntax both at domain analysis and at domain implementation level. To showcase the qualities and feasibility of our approach, we present several variability-aware implementations of a MNIST-encoder—including one using the devise pattern—and compare strengths and weaknesses of each approach.
Tipologia IRIS:
03 - Contributo in volume
Keywords:
Software product lines; variability modeling; design patterns
Elenco autori:
F. Bertolotti, W. Cazzola, L. Favalli
Link alla scheda completa:
Titolo del libro:
SPLC '22: Proceedings