skip to main content
10.1145/2384616.2384673acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

A variability-aware module system

Published:19 October 2012Publication History

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Anastasopoules and C. Gacek. Implementing product line variabilities. In Proc. Symposium on Software Reusability (SSR), pages 109--117. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. Bass, P. Clements, and R. Kazman. Software Architecture in Practice. Addison-Wesley, Boston, MA, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Batory, J. N. Sarvela, and A. Rauschmayer. Scaling step-wise refinement. IEEE Trans. Softw. Eng. (TSE), 30(6):355--371, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Beuche, H. Papajewski, and W. Schröder-Preikschat. Variability management with feature models. Sci. Comput. Program., 53(3):333-352, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Blume and A. W. Appel. Hierarchical modularity. ACM Trans. Program. Lang. Syst. (TOPLAS), 21(4):813--847, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. L. Cardelli. Program fragments, linking, and modularization. In Proc. Symp. Principles of Programming Languages (POPL), pages 266--277. ACM Press, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Chen, M. Erwig, and E. Walkingshaw. Extending type inference to variational programs. Technical report (draft), School of EECS, Oregon State University, 2012.Google ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Tools, and Applications. ACM Press/Addison-Wesley, New York, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle Scholar
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  45. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  46. 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 ScholarGoogle ScholarCross RefCross Ref
  47. 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 ScholarGoogle ScholarCross RefCross Ref
  48. R. Prieto-Diaz and J. M. Neighbors. Module interconnection languages. Journal of Systems and Software, 6:307--334, November 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  50. 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 ScholarGoogle Scholar
  51. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  52. 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 ScholarGoogle Scholar
  53. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  54. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  55. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  56. 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 ScholarGoogle Scholar
  57. 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 ScholarGoogle ScholarCross RefCross Ref
  58. R. van Ommering. Building product populations with software components. In Proc. Int'l Conf. Software Engineering (ICSE), pages 255--265. ACM Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. 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 ScholarGoogle Scholar

Index Terms

  1. A variability-aware module system

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
          October 2012
          1052 pages
          ISBN:9781450315616
          DOI:10.1145/2384616
          • cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 47, Issue 10
            OOPSLA '12
            October 2012
            1011 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2398857
            Issue’s Table of Contents

          Copyright © 2012 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 19 October 2012

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate268of1,244submissions,22%

          Upcoming Conference

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader