Abstract
Module systems enable a divide and conquer strategy to software development. To implement compile-time variability in software product lines, modules can be composed in different combinations. However, this way, variability dictates a dominant decomposition. As an alternative, we introduce a variability-aware module system that supports compile-time variability inside a module and its interface. So, each module can be considered a product line that can be type checked in isolation. Variability can crosscut multiple modules. The module system breaks with the antimodular tradition of a global variability model in product-line development and provides a path toward software ecosystems and product lines of product lines developed in an open fashion. We discuss the design and implementation of such a module system on a core calculus and provide an implementation for C as part of the TypeChef project. Our implementation supports variability inside modules from #ifdef preprocessor directives and variable linking at the composition level. With our implementation, we type check all configurations of all modules of the open source product line Busybox with 811~compile-time options, perform linker check of all configurations, and report found type and linker errors -- without resorting to a brute-force strategy.
- M. Acher, P. Collet, P. Lahire, and R. France. Comparing approaches to implement feature model composition. In Proc. European Conf. Modelling Foundations and Applications (ECMFA), volume 6138 of LNCS, pages 3--19. Springer-Verlag, 2010. Google Scholar
Digital Library
- M. Anastasopoules and C. Gacek. Implementing product line variabilities. In Proc. Symposium on Software Reusability (SSR), pages 109--117. ACM Press, 2001. Google Scholar
Digital Library
- S. Apel, C. Kästner, A. Größlinger, and C. Lengauer. Type safety for feature-oriented product lines. Automated Software Engineering, 17(3):251--300, 2010. Google Scholar
Digital Library
- S. Apel, C. Kästner, and C. Lengauer. Research challenges in the tension between features and services. In Proc. ICSE Workshop on Systems Development in SOA Environments (SDSOA), pages 53--58. ACM Press, 2008. Google Scholar
Digital Library
- S. Apel, C. Lengauer, B. Möller, and C. Kästner. An algebraic foundation for automatic feature-based program synthesis. Science of Computer Programming (SCP), 75(11):1022--1047, 2010. Google Scholar
Digital Library
- L. Aversano, M. D. Penta, and I. D. Baxter. Handling preprocessor-conditioned declarations. In Proc. Int'l Work-shop Source Code Analysis and Manipulation (SCAM), pages 83--92. IEEE CS, 2002. Google Scholar
Digital Library
- L. Bass, P. Clements, and R. Kazman. Software Architecture in Practice. Addison-Wesley, Boston, MA, 1998. Google Scholar
Digital Library
- D. Batory, J. N. Sarvela, and A. Rauschmayer. Scaling step-wise refinement. IEEE Trans. Softw. Eng. (TSE), 30(6):355--371, 2004. Google Scholar
Digital Library
- D. Benavides, S. Seguraa, and A. Ruiz-Cortés. Automated analysis of feature models 20 years later: A literature review. Inf. Systems, 35(6):615--636, 2010. Google Scholar
Digital Library
- A. Bergel, S. Ducasse, and O. Nierstrasz. Classbox/J: Controlling the scope of change in Java. In Proc. Int'l Conf. Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 177--189. ACM Press, 2005. Google Scholar
Digital Library
- T. Berger, S. She, R. Lotufo, A. Wasowski, and K. Czarnecki. Variability modeling in the real: A perspective from the operating systems domain. In Proc. Int'l Conf. Automated Software Engineering (ASE), pages 73-82. ACM Press, 2010. Google Scholar
Digital Library
- D. Beuche, H. Papajewski, and W. Schröder-Preikschat. Variability management with feature models. Sci. Comput. Program., 53(3):333-352, 2004. Google Scholar
Digital Library
- M. Blume and A. W. Appel. Hierarchical modularity. ACM Trans. Program. Lang. Syst. (TOPLAS), 21(4):813--847, 1999. Google Scholar
Digital Library
- C. Brabrand, M. Ribeiro, T. Tolêdo, and P. Borba. Intraprocedural dataflow analysis for software product lines. In Proc. Int'l Conf. Aspect-Oriented Software Development (AOSD), 2012. to appear. Google Scholar
Digital Library
- L. Cardelli. Program fragments, linking, and modularization. In Proc. Symp. Principles of Programming Languages (POPL), pages 266--277. ACM Press, 1997. Google Scholar
Digital Library
- W. Chae and M. Blume. Building a family of compilers. In Proc. Int'l Software Product Line Conference (SPLC), pages 307--316. IEEE CS, 2008. Google Scholar
Digital Library
- S. Chen, M. Erwig, and E. Walkingshaw. Extending type inference to variational programs. Technical report (draft), School of EECS, Oregon State University, 2012.Google Scholar
- A. Classen, P. Heymans, P.-Y. Schobbens, and A. Legay. Symbolic model checking of software product lines. In Proc. Int'l Conf. Software Engineering (ICSE), pages 321--330. ACM Press, 2011. Google Scholar
Digital Library
- K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Tools, and Applications. ACM Press/Addison-Wesley, New York, 2000. Google Scholar
Digital Library
- K. Czarnecki and K. Pietroszek. Verifying feature-based model templates against well-formedness OCL constraints. In Proc. Int'l Conf. Generative Programming and Component Engineering (GPCE), pages 211--220. ACM Press, 2006. Google Scholar
Digital Library
- M. de Jonge. Source tree composition. In Proc. Int'l Conf. Software Reuse (ICSR), volume 2319 of LNCS, pages 261--282. Springer-Verlag, 2002. Google Scholar
Digital Library
- B. Delaware, W. R. Cook, and D. Batory. Fitting the pieces together: A machine-checked model of safe composition. In Proc. Foundations of Software Engineering (ESEC/FSE), pages 243--252. ACM Press, 2009. Google Scholar
Digital Library
- B. Emir, A. Kennedy, C. Russo, and D. Yu. Variance and generalized constraints for C# generics. In Proc. Europ. Conf. Object-Oriented Programming (ECOOP), volume 4067 of LNCS, pages 279--303. Springer-Verlag, 2006. Google Scholar
Digital Library
- E. Ernst, K. Ostermann, and W. Cook. A virtual class calculus. In Proc. Symp. Principles of Programming Languages (POPL), pages 270--282. ACM Press, 2006. Google Scholar
Digital Library
- M. Ernst, C. Kaplan, and C. Chambers. Predicate dispatching: A unified theory of dispatch. In Proc. Europ. Conf. Object-Oriented Programming (ECOOP), pages 186--211. Springer-Verlag, 1998. Google Scholar
Digital Library
- M. Erwig and E. Walkingshaw. The choice calculus: A representation for software variation. ACM Trans. Softw. Eng. Methodol. (TOSEM), 21(1):6.--27, 2011. Google Scholar
Digital Library
- M. Erwig and E. Walkingshaw. Variation programming with the choice calculus. In Generative and Transformational Techniques in Software Engineering. Springer-Verlag, 2012. to appear.Google Scholar
- V. Gasiunas, M. Mezini, and K. Ostermann. Dependent classes. In Proc. Int'l Conf. Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 133--152. ACM Press, 2007. Google Scholar
Digital Library
- M. Griss. Implementing product-line features by composing aspects. In Proc. Int'l Software Product Line Conference (SPLC), pages 271--288. Kluwer Academic Publishers, 2000. Google Scholar
Digital Library
- S. S. Huang and Y. Smaragdakis. Expressive and safe static reflection withMorphJ. In Proc. Conf. Programming Language Design and Implementation (PLDI), pages 79--89. ACM Press, 2008. Google Scholar
Digital Library
- S. S. Huang, D. Zook, and Y. Smaragdakis. cJ: Enhancing Java with safe type conditions. In Proc. Int'l Conf. Aspect-Oriented Software Development (AOSD), pages 185--198. ACM Press, 2007. Google Scholar
Digital Library
- C. Kästner, S. Apel, and K. Ostermann. The road to feature modularity? In Proc. SPLC Workshop on Feature-Oriented Software Development (FOSD). ACM Press, 2011. Google Scholar
Digital Library
- C. Kästner, S. Apel, T. Thüm, and G. Saake. Type checking annotation-based product lines. ACM Trans. Softw. Eng. Methodol. (TOSEM), 21(3):14.1--39, 2012. Google Scholar
Digital Library
- C. Kästner, P. G. Giarrusso, T. Rendel, S. Erdweg, K. Ostermann, and T. Berger. Variability-aware parsing in the presence of lexical macros and conditional compilation. In Proc. Int'l Conf. Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 805--824. ACM Press, 2011. Google Scholar
Digital Library
- J. Kienzle and R. Guerraoui. AOP: Does it make sense? The case of concurrency and failures. In Proc. Europ. Conf. Object-Oriented Programming (ECOOP), volume 2374 of LNCS, pages 37--61. Springer-Verlag, 2002. Google Scholar
Digital Library
- K. Klose and K. Ostermann. Modular logic metaprogramming. In Proc. Int'l Conf. Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 484--503. ACM Press, 2010. Google Scholar
Digital Library
- C. W. Krueger. New methods in software product line development. In Proc. Int'l Software Product Line Conference (SPLC), pages 95--102. IEEE CS, 2006. Google Scholar
Digital Library
- H. C. Li, S. Krishnamurthi, and K. Fisler. Interfaces for modular feature verification. In Proc. Int'l Conf. Automated Software Engineering (ASE), pages 195--204. IEEE CS, 2002. Google Scholar
Digital Library
- J. Liebig, S. Apel, C. Lengauer, C. Kästner, andM. Schulze. An analysis of the variability in forty preprocessor-based software product lines. In Proc. Int'l Conf. Software Engineering (ICSE), pages 105--114. ACM Press, 2010. Google Scholar
Digital Library
- B. Liskov, R. Atkinson, T. Bloom, E. Moss, J. C. Schaffert, R. Scheifler, and A. Snyder. CLU Reference Manual, volume 114 of LNCS. Springer-Verlag, Berlin/Heidelberg, 1981. Google Scholar
Digital Library
- J. Liu, D. Batory, and C. Lengauer. Feature oriented refac-toring of legacy applications. In Proc. Int'l Conf. Software Engineering (ICSE), pages 112--121. ACM Press, 2006. Google Scholar
Digital Library
- M. Mendonça, A. Wasowski, and K. Czarnecki. SAT-based analysis of feature models is easy. In Proc. Int'l Software Product Line Conference (SPLC), pages 231--240. ACM Press, 2009. Google Scholar
Digital Library
- T. Millstein, C. Frost, J. Ryder, and A. Warth. Expressive and modular predicate dispatch for Java. ACM Trans. Program. Lang. Syst. (TOPLAS), 31(2):7.1--54, 2009. Google Scholar
Digital Library
- T. Millstein, M. Reay, and C. Chambers. Relaxed MultiJava: Balancing extensibility and modular typechecking. In Proc. Int'l Conf. Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 224--240. ACM Press, 2003. Google Scholar
Digital Library
- A. C. Myers, J. A. Bank, and B. Liskov. Parameterized types for Java. In Proc. Symp. Principles of Programming Languages (POPL), pages 132--145. ACM Press, 1997. Google Scholar
Digital Library
- J. Pérez, J. Díaz, C. Costa-Soria, and J. Garbajosa. Plastic partial components: A solution to support variability in architectural components. In Proc. European Conf. Software Architecture (ECSA), pages 221--230. IEEE CS, 2009.Google Scholar
Cross Ref
- C. Prehofer. Feature-oriented programming: A fresh look at objects. In Proc. Europ. Conf. Object-Oriented Programming (ECOOP), volume 1241 of LNCS, pages 419--443. Springer-Verlag, 1997.Google Scholar
Cross Ref
- R. Prieto-Diaz and J. M. Neighbors. Module interconnection languages. Journal of Systems and Software, 6:307--334, November 1986. Google Scholar
Digital Library
- E. Reisner, C. Song, K.-K. Ma, J. S. Foster, and A. Porter. Us-ing symbolic evaluation to understand behavior in configurable software systems. In Proc. Int'l Conf. Software Engineering (ICSE), pages 445--454. ACM Press, 2010. Google Scholar
Digital Library
- M. Rosenmüller and N. Siegmund. Automating the configura-tion of multi software product lines. In Proc. Int'l Workshop on Variability Modelling of Software-intensive Systems (VaMoS), pages 123--130, 2010.Google Scholar
- I. Schaefer, L. Bettini, and F. Damiani. Compositional type-checking for delta-oriented programming. In Proc. Int'l Conf. Aspect-Oriented Software Development (AOSD), pages 43--56. ACM Press, 2011. Google Scholar
Digital Library
- H. Spencer and G. Collyer. #ifdef considered harmful or portability experience with C news. In Proc. USENIX Conf., pages 185--198. USENIX Association, 1992.Google Scholar
- P. Tarr, H. Ossher, W. Harrison, and S. M. Sutton, Jr. N degrees of separation: Multi-dimensional separation of concerns. In Proc. Int'l Conf. Software Engineering (ICSE), pages 107--119. IEEE CS, 1999. Google Scholar
Digital Library
- R. Tartler, D. Lohmann, J. Sincero, and W. Schröder-Preikschat. Feature consistency in compile-time-configurable system software: Facing the Linux 10,000 feature problem. In Proc. European Conference on Computer Systems (EuroSys), pages 47--60. ACM Press, 2011. Google Scholar
Digital Library
- S. Thaker, D. Batory, D. Kitchin, and W. Cook. Safe composition of product lines. In Proc. Int'l Conf. Generative Programming and Component Engineering (GPCE), pages 95--104. ACM Press, 2007. Google Scholar
Digital Library
- T. Thüm, S. Apel, C. Kästner, M. Kuhlemann, I. Schaefer, and G. Saake. Analysis strategies for software product lines. Technical Report FIN-004-2012, School of Computer Science, University of Magdeburg, 2012.Google Scholar
- T. van der Storm. Variability and component composition. In Proc. Int'l Conf. Software Reuse (ICSR), volume 3107 of LNCS, pages 157--166. Springer-Verlag, 2004.Google Scholar
Cross Ref
- R. van Ommering. Building product populations with software components. In Proc. Int'l Conf. Software Engineering (ICSE), pages 255--265. ACM Press, 2002. Google Scholar
Digital Library
- D. Walker. Substructural type systems. In B. C. Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 1, pages 3--43. MIT Press, 2005.Google Scholar
Index Terms
A variability-aware module system
Recommendations
Variability-aware parsing in the presence of lexical macros and conditional compilation
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsIn many projects, lexical preprocessors are used to manage different variants of the project (using conditional compilation) and to define compile-time code transformations (using macros). Unfortunately, while being a simple way to implement variability,...
A variability-aware module system
OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsModule systems enable a divide and conquer strategy to software development. To implement compile-time variability in software product lines, modules can be composed in different combinations. However, this way, variability dictates a dominant ...
Variability-aware parsing in the presence of lexical macros and conditional compilation
OOPSLA '11In many projects, lexical preprocessors are used to manage different variants of the project (using conditional compilation) and to define compile-time code transformations (using macros). Unfortunately, while being a simple way to implement variability,...







Comments