[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
research-article

A variability-aware module system

Published: 19 October 2012 Publication 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.
[2]
M. Anastasopoules and C. Gacek. Implementing product line variabilities. In Proc. Symposium on Software Reusability (SSR), pages 109--117. ACM Press, 2001.
[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.
[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.
[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.
[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.
[7]
L. Bass, P. Clements, and R. Kazman. Software Architecture in Practice. Addison-Wesley, Boston, MA, 1998.
[8]
D. Batory, J. N. Sarvela, and A. Rauschmayer. Scaling step-wise refinement. IEEE Trans. Softw. Eng. (TSE), 30(6):355--371, 2004.
[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.
[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.
[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.
[12]
D. Beuche, H. Papajewski, and W. Schröder-Preikschat. Variability management with feature models. Sci. Comput. Program., 53(3):333-352, 2004.
[13]
M. Blume and A. W. Appel. Hierarchical modularity. ACM Trans. Program. Lang. Syst. (TOPLAS), 21(4):813--847, 1999.
[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.
[15]
L. Cardelli. Program fragments, linking, and modularization. In Proc. Symp. Principles of Programming Languages (POPL), pages 266--277. ACM Press, 1997.
[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.
[17]
S. Chen, M. Erwig, and E. Walkingshaw. Extending type inference to variational programs. Technical report (draft), School of EECS, Oregon State University, 2012.
[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.
[19]
K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Tools, and Applications. ACM Press/Addison-Wesley, New York, 2000.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[48]
R. Prieto-Diaz and J. M. Neighbors. Module interconnection languages. Journal of Systems and Software, 6:307--334, November 1986.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[58]
R. van Ommering. Building product populations with software components. In Proc. Int'l Conf. Software Engineering (ICSE), pages 255--265. ACM Press, 2002.
[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.

Cited By

View all
  • (2023)Variational satisfiability solving: efficiently solving lots of related SAT problemsEmpirical Software Engineering10.1007/s10664-022-10217-328:1Online publication date: 1-Jan-2023
  • (2023)Verifying consistency of software product line architectures with product architecturesSoftware and Systems Modeling10.1007/s10270-023-01114-423:1(195-221)Online publication date: 8-Jul-2023
  • (2021)Towards heterogeneous multi-dimensional variability modeling in cyber-physical production systemsProceedings of the 25th ACM International Systems and Software Product Line Conference - Volume B10.1145/3461002.3473941(123-129)Online publication date: 6-Sep-2021
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

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
  • 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
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
Published in SIGPLAN Volume 47, Issue 10

Check for updates

Author Tags

  1. #ifdef
  2. C
  3. composition
  4. conditional compilation
  5. linker
  6. module system
  7. preprocessor
  8. software product lines
  9. variability

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)3
Reflects downloads up to 13 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Variational satisfiability solving: efficiently solving lots of related SAT problemsEmpirical Software Engineering10.1007/s10664-022-10217-328:1Online publication date: 1-Jan-2023
  • (2023)Verifying consistency of software product line architectures with product architecturesSoftware and Systems Modeling10.1007/s10270-023-01114-423:1(195-221)Online publication date: 8-Jul-2023
  • (2021)Towards heterogeneous multi-dimensional variability modeling in cyber-physical production systemsProceedings of the 25th ACM International Systems and Software Product Line Conference - Volume B10.1145/3461002.3473941(123-129)Online publication date: 6-Sep-2021
  • (2021)Capturing the diversity of analyses on the Linux kernel variabilityProceedings of the 25th ACM International Systems and Software Product Line Conference - Volume A10.1145/3461001.3471151(160-171)Online publication date: 6-Sep-2021
  • (2021)Variability modules for Java-like languagesProceedings of the 25th ACM International Systems and Software Product Line Conference - Volume A10.1145/3461001.3471143(1-12)Online publication date: 6-Sep-2021
  • (2019)Identifying and Visualizing Variability in Object-Oriented Variability-Rich SystemsProceedings of the 23rd International Systems and Software Product Line Conference - Volume A10.1145/3336294.3336311(231-243)Online publication date: 9-Sep-2019
  • (2019)symfinderProceedings of the 23rd International Systems and Software Product Line Conference - Volume B10.1145/3307630.3342394(5-8)Online publication date: 9-Sep-2019
  • (2019)Understanding Conditional Compilation through Integrated Representation of Variability and Source CodeProceedings of the 23rd International Systems and Software Product Line Conference - Volume B10.1145/3307630.3342387(21-24)Online publication date: 9-Sep-2019
  • (2018)Multi-purpose, multi-level feature modeling of large-scale industrial software systemsSoftware and Systems Modeling (SoSyM)10.1007/s10270-016-0564-717:3(913-938)Online publication date: 1-Jul-2018
  • (2017)Tracing Imperfectly Modular Variability in Software Product Line ImplementationMastering Scale and Complexity in Software Reuse10.1007/978-3-319-56856-0_8(112-120)Online publication date: 5-Apr-2017
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media