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.
Supplemental Material
Available for Download
Online appendix to a calculus for uniform feature composition on article 19.
- Abadi, M. and Cardelli, L. 1996. A Theory of Objects. Springer-Verlag, Berlin, Germany. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Apel, S. and Hutchins, D. 2007. An overview of the gDeep calculus. Tech. rep. MIP-0712, University of Passau.Google Scholar
- 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 Scholar
Digital Library
- Apel, S. and Kästner, C. 2009. An overview of feature-oriented software development. Journal of Object Technology 8, 5, 49--84.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- Apel, S., Kästner, C., Grösslinger, A., and Lengauer, C. 2010a. Type safety for feature-oriented product lines. Automat. Softw. Eng. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Apel, S., Leich, T., and Saake, G. 2008b. Aspectual feature modules. IEEE Trans. Softw. Eng. 34, 2, 162--180. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Batory, D., Sarvela, J., and Rauschmayer, A. 2004. Scaling step-wise refinement. IEEE Trans. Softw. Eng. 30, 355--371. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Bosch, J. 1999. Super-imposition: A component adaptation technique. Inf. Softw. Tech. 41, 5, 257--273.Google Scholar
Cross Ref
- Boudol, G. 2004. The recursive record semantics of objects revisited. J. Funct. Prog. 14, 3, 263--315. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Cardelli, L. and Wegner, P. 1985. On understanding types, data abstraction, and polymorphism. ACM Comput. Surv. 17, 4, 471--522. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Compagnoni, A. and Goguen, H. 2003. Typed operational semantics for higher order subtyping. Inf. Computation 184, 2, 242--297. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Hutchins, D. 2009. Pure Subtype Systems: A Type Theory For Extensible Software. Ph.D. dissertation, University of Edinburgh, Edinburgh, UK.Google Scholar
- Hutchins, D. 2010. Pure Subtype Systems. In Proceedings of the International Symposium on Principles of Programming Languages (POPL). ACM, New York, 287--298. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Millstein, T. and Chambers, C. 2002. Modular statically typed multimethods. Inf. Comput. 175, 1, 76--118.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- Pierce, B. 1994. Bounded quantification is undecidable. Inf. Comput. 112, 1, 131--165. Google Scholar
Digital Library
- Pierce, B. 2002. Types and Programming Languages. MIT Press, Cambridge, MA. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Steffen, M. 1997. Polarized higher-order subtyping. Ph.D. dissertation, University of Erlangen-Nuremberg, Nuremberg, Germany.Google Scholar
- Steffen, M. and Pierce, B. 1994. Higher-order subtyping. Tech. rep. ECS-LFCS-94-280, University of Edinburgh, Edinburgh, UK.Google Scholar
- 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 Scholar
Digital Library
- Terese. 2003. Term rewriting systems. In Cambridge Tracts in Theoretical Computer Science. Vol. 55. Cambridge University Press.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- Wright, A. and Felleisen, M. 1994. A syntactic approach to type soundness. Inf. Comput. 115, 1, 38--94. Google Scholar
Digital Library
- 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 Scholar
Index Terms
A calculus for uniform feature composition
Recommendations
Feature featherweight java: a calculus for feature-oriented programming and stepwise refinement
GPCE '08: Proceedings of the 7th international conference on Generative programming and component engineeringFeature-oriented programming (FOP) is a paradigm that incorporates programming language technology, program generation techniques, and stepwise refinement. In their GPCE'07 paper, Thaker et al. suggest the development of a type system for FOP to ...
Type safety for feature-oriented product lines
A feature-oriented product line is a family of programs that share a common set of features. A feature implements a stakeholder's requirement and represents a design decision or configuration option. When added to a program, a feature involves the ...
Semantic reasoning about feature composition via multiple aspect-weavings
GPCE '06: Proceedings of the 5th international conference on Generative programming and component engineeringIn this paper, we consider semantic refinement for feature-oriented programming where components are built from features and weavings, which we use to adapt one feature to the context of another one. We address the question of semantic reasoning about ...






Comments