skip to main content
research-article
Free Access

A calculus for uniform feature composition

Published:24 May 2008Publication History
Skip Abstract Section

Abstract

The goal of feature-oriented programming (FOP) is to modularize software systems in terms of features. A feature refines the content of a base program. Both base programs and features may contain various kinds of software artifacts, for example, source code in different languages, models, build scripts, and documentation. We and others have noticed that when composing features, different kinds of software artifacts can be refined in a uniform way, regardless of what they represent. We present gDeep, a core calculus for feature composition, which captures the language independence of FOP; it can be used to compose features containing many different kinds of artifact in a type-safe way. The calculus allows us to gain insight into the principles of FOP and to define general algorithms for feature composition and validation. We provide the formal syntax, operational semantics, and type system of gDeep and outline how languages like Java, Haskell, Bali, and XML can be plugged in.

Skip Supplemental Material Section

Supplemental Material

References

  1. Abadi, M. and Cardelli, L. 1996. A Theory of Objects. Springer-Verlag, Berlin, Germany. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ancona, D., Lagorio, G., and Zucca, E. 2003. Jam—Designing a Java extension with mixins. ACM Trans. Prog. Lang. Syst. 25, 5, 641--712. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Anfurrutia, F., Díaz, O., and Trujillo, S. 2007. On refining XML artifacts. In Proceedings of International Conference on Web Engineering (ICWE). Lecture Notes in Computer Science, vol. 4607. Springer-Verlag, 473--478. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Apel, S. and Hutchins, D. 2007. An overview of the gDeep calculus. Tech. rep. MIP-0712, University of Passau.Google ScholarGoogle Scholar
  5. Apel, S., Janda, F., Trujillo, S., and Kästner, C. 2009a. Model superimposition in software product lines. In Proceedings of the International Conference on Model Transformation (ICMT). Lecture Notes in Computer Science, vol. 5563. Springer-Verlag, Berlin, Germany, 4--19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Apel, S. and Kästner, C. 2009. An overview of feature-oriented software development. Journal of Object Technology 8, 5, 49--84.Google ScholarGoogle ScholarCross RefCross Ref
  7. Apel, S., Kästner, C., Grösslinger, A., and Lengauer, C. 2009b. Feature (De)composition in functional programming. In Proceedings of the International Conference on Software Composition (SC). Lecture Notes in Computer Science, vol. 5634. Springer-Verlag, Berlin, Germany, 9--26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Apel, S., Kästner, C., Grösslinger, A., and Lengauer, C. 2010a. Type safety for feature-oriented product lines. Automat. Softw. Eng. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Apel, S., Kästner, C., and Lengauer, C. 2008a. Feature Featherweight Java: A calculus for feature-oriented programming and stepwise refinement. In Proceedings of the International Conference on Generative Programming and Component Engineering (GPCE). ACM, New York, 101--112. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Apel, S., Kästner, C., and Lengauer, C. 2009c. FeatureHouse: Language-independent, automated software composition. In Proceedings of the International Conference on Software Engineering (ICSE). IEEE Computer Society Press, Los Alamitos, CA, 221--231. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Apel, S., Leich, T., Rosenmüller, M., and Saake, G. 2005. FeatureC++: On the symbiosis of feature-oriented and aspect-oriented programming. In Proceedings of the International Conference on Generative Programming and Component Engineering (GPCE). Lecture Notes in Computer Science, vol. 3676. Springer-Verlag, Berlin, Germany, 125--140. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Apel, S., Leich, T., and Saake, G. 2008b. Aspectual feature modules. IEEE Trans. Softw. Eng. 34, 2, 162--180. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Apel, S. and Lengauer, C. 2008. Superimposition: A language-independent approach to software composition. In Proceedings of the International Symposium on Software Composition (SC). Lecture Notes in Computer Science, vol. 4954. Springer-Verlag, Berlin, Germany, 20--35. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Apel, S., Lengauer, C., Möller, B., and Kästner, C. 2008c. An algebra for features and feature composition. In Proceedings of the International Conference on Algebraic Methodology and Software Technology (AMAST). Lecture Notes in Computer Science, vol. 5140. Springer-Verlag, Berlin, Germany, 36--50. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Apel, S., Lengauer, C., Möller, B., and Kästner, C. 2010b. An algebraic foundation for automatic feature-based program synthesis. Sci. Comput. Prog. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Batory, D. 2007. From implementation to theory in product synthesis. In Proceedings of the International Symposium on Principles of Programming Languages (POPL). ACM, New York, 135--136. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Batory, D., Sarvela, J., and Rauschmayer, A. 2004. Scaling step-wise refinement. IEEE Trans. Softw. Eng. 30, 355--371. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Bergel, A., Ducasse, S., Nierstrasz, O., and Wuyts, R. 2008. Stateful traits and their formalization. Comput. Lang. Syst. Struct. 34, 2--3, 83--108. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Bono, V., Patel, A., and Shmatikov, V. 1999. A core calculus of classes and mixins. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP). Lecture Notes in Computer Science, vol. 1628. Springer-Verlag, Berlin, Germanym 43--66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Bosch, J. 1999. Super-imposition: A component adaptation technique. Inf. Softw. Tech. 41, 5, 257--273.Google ScholarGoogle ScholarCross RefCross Ref
  21. Boudol, G. 2004. The recursive record semantics of objects revisited. J. Funct. Prog. 14, 3, 263--315. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Bouge, L. and Francez, N. 1988. A compositional approach to superimposition. In Proceedings of the International Symposium on Principles of Programming Languages (POPL). ACM, New York, 240--249. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Bracha, G. and Cook, W. 1990. Mixin-based inheritance. In Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) and of the European Conference on Object-Oriented Programming (ECOOP). ACM, New York, 303--311. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Cardelli, L. and Wegner, P. 1985. On understanding types, data abstraction, and polymorphism. ACM Comput. Surv. 17, 4, 471--522. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Clarke, D., Drossopoulou, S., Noble, J., and Wrigstad, T. 2007. Tribe: A simple virtual class calculus. In Proceedings of the International Conference on Aspect-Oriented Software Development (AOSD). ACM, New York, 121--134. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Compagnoni, A. and Goguen, H. 2003. Typed operational semantics for higher order subtyping. Inf. Computation 184, 2, 242--297. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Cook, W. 1991. Object-oriented programming versus abstract data types. In Proceedings of the REX School/Workshop on Foundations of Object-Oriented Languages. Lecture Notes in Computer Science, vol. 489. Springer-Verlag, Berlin, Germany, 151--178. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Delaware, B., Cook, W., and Batory, D. 2009. Fitting the pieces together: A machine-checked model of safe composition. In Proceedings of the International Symposium on Foundations of Software Engineering (FSE). ACM, New York, 243--252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Ducasse, S., Nierstrasz, O., Schärli, N., Wuyts, R., and Black, A. 2006. Traits: A mechanism for fine-grained reuse. ACM Trans. Prog. Lang. Syst. 28, 2, 331--388. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Ernst, E. 2001. Family polymorphism. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP). Lecture Notes in Computer Science, vol. 2072. Springer-Verlag, Berlin, Germany, 303--326. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Ernst, E. 2003. Higher-order hierarchies. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP). Lecture Notes in Computer Science, vol. 2743. Springer-Verlag, Berlin, Germany, 303--329.Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Ernst, E., Ostermann, K., and Cook, W. 2006. A virtual class calculus. In Proceedings of the International Symposium on Principles of Programming Languages (POPL). ACM, New York, 270--282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Findler, R. and Flatt, M. 1998. Modular object-oriented programming with units and mixins. In Proceedings of the International Conference on Functional Programming (ICFP). ACM, New York, 94--104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Flatt, M., Krishnamurthi, S., and Felleisen, M. 1998. Classes and mixins. In Proceedings of the International Symposium on Principles of Programming Languages (POPL). ACM, New York, 171--183. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Hutchins, D. 2006. Eliminating distinctions of class: Using prototypes to model virtual classes. In Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). ACM, New York, 1--19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Hutchins, D. 2009. Pure Subtype Systems: A Type Theory For Extensible Software. Ph.D. dissertation, University of Edinburgh, Edinburgh, UK.Google ScholarGoogle Scholar
  37. Hutchins, D. 2010. Pure Subtype Systems. In Proceedings of the International Symposium on Principles of Programming Languages (POPL). ACM, New York, 287--298. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Igarashi, A., Pierce, B., and Wadler, P. 1999. Featherweight Java: A minimal core calculus for Java and GJ. In Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). ACM, New York, 132--146. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Johnsson, T. 1985. Lambda lifting: Transforming programs to recursive equations. In Proceedings of the International Conference on Functional Programming Languages and Computer Architecture (FPCA). Springer-Verlag, Berlin, Germany, 190--203. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Kamina, T. and Tamai, T. 2004. McJava—A design and implementation of Java with mixin-types. In Proceedings of the Asian Symposium on Programming Languages and Systems (APLAS). Lecture Notes in Computer Science, vol. 3302. Springer-Verlag, Berlin, Germany, 398--414.Google ScholarGoogle Scholar
  41. Kästner, C. and Apel, S. 2008. Type-checking software product lines—A formal approach. In Proceedings of the International Conference on Automated Software Engineering (ASE). IEEE Computer Society Press, Los Alamitos, CA, 258--267. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Kästner, C., Apel, S., ur Rahman, S., Rosenmüller, M., Batory, D., and Saake, G. 2009. On the impact of the optional feature problem: Analysis and case studies. In Proceedings of the International Software Product Line Conference (SPLC). Carnegie Mellon University, Pittsburgh, PA, 181--190. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., and Irwin, J. 1997. Aspect-oriented programming. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP). Lecture Notes in Computer Science, vol. 1241. Springer-Verlag, Berlin, Germany, 220--242.Google ScholarGoogle Scholar
  44. Krishnamurthi, S., Felleisen, M., and Friedman, D. 1998. Synthesizing object-oriented and functional design to promote re-use. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP). Lecture Notes in Computer Science, vol. 1445. Springer-Verlag, Berlin, Germany, 91--113. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Li, H., Krishnamurthi, S., and Fisler, K. 2002. Verifying cross-cutting features as open systems. In Proceedings of the International Symposium on Foundations of Software Engineering (FSE). ACM, New York, 89--98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Li, H., Krishnamurthi, S., and Fisler, K. 2005. Modular verification of open features using three-valued model checking. Automat. Softw. Eng. 12, 3, 349--382. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Liu, J., Batory, D., and Lengauer, C. 2006. Feature-oriented refactoring of legacy applications. In Proceedings of the International Conference on Software Engineering (ICSE). ACM, New York, 112--121. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Lopez-Herrejon, R., Batory, D., and Lengauer, C. 2006. A disciplined approach to aspect composition. In Proceedings of the International Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM). ACM, New York, 68--77. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Madsen, O. and Moller-Pedersen, B. 1989. Virtual classes: A powerful mechanism in object-oriented programming. In Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). ACM, New York, 397--406. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. McDirmid, S. and Hsieh, W. 2003. Aspect-oriented programming with Jiazzi. In Proceedings of the International Conference on Aspect-Oriented Software Development (AOSD). ACM, New York, 70--79. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. McDirmid, S., Hsieh, W., and Flatt, M. 2006. A framework for modular linking in OO languages. In Proceedings of the Joint Modular Languages Conference (JMLC). Lecture Notes in Computer Science, vol. 4228. Springer-Verlag, Berlin, Germany, 116--135. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Mezini, M. and Ostermann, K. 2004. Variability management with feature-oriented programming and aspects. In Proceedings of the International Symposium on Foundations of Software Engineering (FSE). ACM, New York, 127--136. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Millstein, T. and Chambers, C. 2002. Modular statically typed multimethods. Inf. Comput. 175, 1, 76--118.Google ScholarGoogle ScholarCross RefCross Ref
  54. Nystrom, N., Chong, S., and Myers, A. 2004. Scalable extensibility via nested inheritance. In Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). ACM, New York, 99--115. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Odersky, M., Cremet, V., Röckl, C., and Zenger, M. 2003. A nominal theory of objects with dependent types. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP). Lecture Notes in Computer Science, vol. 2743. Springer-Verlag, Berlin, Germany, 201--224.Google ScholarGoogle Scholar
  56. Ossher, H. and Harrison, W. 1992. Combination of inheritance hierarchies. In Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). ACM, New York, 25--40. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. Pierce, B. 1994. Bounded quantification is undecidable. Inf. Comput. 112, 1, 131--165. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. Pierce, B. 2002. Types and Programming Languages. MIT Press, Cambridge, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Prehofer, C. 1997. Feature-oriented programming: A fresh look at objects. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP). Lecture Notes in Computer Science, vol. 1241. Springer-Verlag, Berlin, Germany, 419--443.Google ScholarGoogle Scholar
  60. Reynolds, J. 1994. User-defined types and procedural data structures as complementary approaches to data abstraction. In Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design. MIT Press, Cambridge, MA, 13--23. Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Smaragdakis, Y. and Batory, D. 2002. Mixin layers: An object-oriented implementation technique for refinements and collaboration-based designs. ACM Trans. Softw. Eng. Method. 11, 2, 215--255. Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. Steffen, M. 1997. Polarized higher-order subtyping. Ph.D. dissertation, University of Erlangen-Nuremberg, Nuremberg, Germany.Google ScholarGoogle Scholar
  63. Steffen, M. and Pierce, B. 1994. Higher-order subtyping. Tech. rep. ECS-LFCS-94-280, University of Edinburgh, Edinburgh, UK.Google ScholarGoogle Scholar
  64. Tarr, P., Ossher, H., Harrison, W., and Sutton, Jr., S. 1999. N degrees of separation: Multi-dimensional separation of concerns. In Proceedings of the International Conference on Software Engineering (ICSE). IEEE Computer Society Press, Los Alamitos, CA, 107--119. Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. Terese. 2003. Term rewriting systems. In Cambridge Tracts in Theoretical Computer Science. Vol. 55. Cambridge University Press.Google ScholarGoogle Scholar
  66. Thaker, S., Batory, D., Kitchin, D., and Cook, W. 2007. Safe composition of product lines. In Proceedings of the International Conference on Generative Programming and Component Engineering (GPCE). ACM, New York, 95--104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  67. Torgersen, M. 2004. The expression problem revisited. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP). Lecture Notes in Computer Science, vol. 3086. Springer-Verlag, Berlin, Germany, 123--143.Google ScholarGoogle Scholar
  68. Trujillo, S., Batory, D., and Diaz, O. 2006. Feature refactoring a multi-representation program into a product line. In Proceedings of the International Conference on Generative Programming and Component Engineering (GPCE). ACM, New York, 191--200. Google ScholarGoogle ScholarDigital LibraryDigital Library
  69. Wright, A. and Felleisen, M. 1994. A syntactic approach to type soundness. Inf. Comput. 115, 1, 38--94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  70. Zenger, M. and Odersky, M. 2005. Independently extensible solutions to the expression problem. In Proceedings of the International Workshop on Foundations of Object-Oriented Languages (FOOL). ACM, New York.Google ScholarGoogle Scholar

Index Terms

  1. A calculus for uniform feature composition

        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

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!