Type-Safe 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, represents a design decision and configuration option and, when added to a program, involves the introduction of new structures, such as classes and methods, and the refinement of existing ones, such as extending methods. With feature-oriented decomposition, programs can be generated, solely on the basis of a user's selection of features, by the composition of the corresponding feature code. A key challenge of feature-oriented product line engineering is how to guarantee the correctness of an entire feature-oriented product line, i.e., of all of the member programs generated from different combinations of features. As the number of valid feature combinations grows progressively with the number of features, it is not feasible to check all individual programs. The only feasible approach is to have a type system check the entire code base of the feature-oriented product line. We have developed such a type system on the basis of a formal model of a feature-oriented Java-like language. We demonstrate that the type system ensures that every valid program of a feature-oriented product line is well-typed and that the type system is complete.

[1]  Mira Mezini,et al.  Variability management with feature-oriented programming and aspects , 2004, SIGSOFT '04/FSE-12.

[2]  Yves Bertot,et al.  Interactive Theorem Proving and Program Development: Coq'Art The Calculus of Inductive Constructions , 2010 .

[3]  David Notkin,et al.  Using role components in implement collaboration-based designs , 1996, OOPSLA '96.

[4]  Tetsuo Tamai,et al.  McJava - A Design and Implementation of Java with Mixin-Types , 2004, APLAS.

[5]  Martin Odersky,et al.  A Nominal Theory of Objects with Dependent Types , 2003, ECOOP.

[6]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[7]  Oscar Díaz,et al.  On Refining XML Artifacts , 2007, ICWE.

[8]  Andry Rakotonirainy,et al.  Context-oriented programming , 2003, MobiDe '03.

[9]  Sven Apel,et al.  A Case Study Implementing Features Using AspectJ , 2007, 11th International Software Product Line Conference (SPLC 2007).

[10]  Stephen Pulman,et al.  Using the Framework , 1996 .

[11]  Vitaly Shmatikov,et al.  A Core Calculus of Classes and Mixins , 1999, ECOOP.

[12]  G. Sundholm,et al.  Constructive generalized quantifiers , 1989, Synthese.

[13]  Don S. Batory,et al.  Feature Models, Grammars, and Propositional Formulas , 2005, SPLC.

[14]  Andrew C. Myers,et al.  Scalable extensibility via nested inheritance , 2004, OOPSLA.

[15]  Martin Odersky,et al.  Scalable component abstractions , 2005, OOPSLA '05.

[16]  Krzysztof Czarnecki,et al.  Generative programming - methods, tools and applications , 2000 .

[17]  Klaus Ostermann,et al.  Dynamically Composable Collaborations with Delegation Layers , 2002, ECOOP.

[18]  Luigi Liquori,et al.  FeatherTrait: A modest extension of Featherweight Java , 2008, TOPL.

[19]  Oscar Nierstrasz,et al.  Classbox/J: controlling the scope of change in Java , 2005, OOPSLA '05.

[20]  Sven Apel,et al.  FEATUREHOUSE: Language-independent, automated software composition , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[21]  Gary T. Leavens,et al.  MultiJava: Design rationale, compiler implementation, and applications , 2006, TOPL.

[22]  Reinhard Muskens,et al.  Sense and the Computation of Reference , 2005 .

[23]  William R. Cook,et al.  A virtual class calculus , 2006, POPL '06.

[24]  Don S. Batory,et al.  Scaling step-wise refinement , 2004, IEEE Transactions on Software Engineering.

[25]  Jacques D. Fleuriot,et al.  Inductive Proof Automation for Coq , 2010 .

[26]  Roberto Erick Lopez-Herrejon,et al.  Evaluating Support for Features in Advanced Modularization Technologies , 2005, ECOOP.

[27]  Sven Apel,et al.  Model Superimposition in Software Product Lines , 2009, ICMT@TOOLS.

[28]  G. Sundholm Proof Theory and Meaning , 1986 .

[29]  Sven Apel,et al.  Guaranteeing Syntactic Correctness for All Product Line Variants: A Language-Independent Approach , 2009, TOOLS.

[30]  DeLesley Hutchins,et al.  Eliminating distinctions of class: using prototypes to model virtual classes , 2006, OOPSLA '06.

[31]  Xavier Leroy,et al.  Formal Verification of a C Compiler Front-End , 2006, FM.

[32]  Paul Clements,et al.  Software product lines - practices and patterns , 2001, SEI series in software engineering.

[33]  Thomas Leich,et al.  Aspectual Feature Modules , 2008, IEEE Transactions on Software Engineering.

[34]  Mira Mezini,et al.  Dependent classes , 2007, OOPSLA.

[35]  Gunter Saake,et al.  Code generation to support static and dynamic composition of software product lines , 2008, GPCE '08.

[36]  Roberto Erick Lopez-Herrejon,et al.  A disciplined approach to aspect composition , 2006, PEPM '06.

[37]  Yannis Smaragdakis,et al.  Mixin layers: an object-oriented implementation technique for refinements and collaboration-based designs , 2002, TSEM.

[38]  Martin P. Robillard,et al.  Separating features in source code: an exploratory study , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.

[39]  Zhaohui Luo,et al.  Type-theoretical semantics with coercive subtyping , 2010 .

[40]  Hidehiko Masuhara,et al.  Modeling Crosscutting in Aspect-Oriented Mechanisms , 2003, ECOOP.

[41]  DeLesley Hutchins,et al.  Pure subtype systems : a type theory for extensible software , 2009 .

[42]  William R. Cook,et al.  Safe composition of product lines , 2007, GPCE '07.

[43]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[44]  Matthew J. Parkinson,et al.  The java module system: core design and semantic definition , 2007, OOPSLA.

[45]  Sven Apel,et al.  Towards the Development of Ubiquitous Middleware Product Lines , 2004, SEM.

[46]  Per Martin-Löf,et al.  Intuitionistic type theory , 1984, Studies in proof theory.

[47]  Sven Apel,et al.  Feature featherweight java: a calculus for feature-oriented programming and stepwise refinement , 2008, GPCE '08.

[48]  Aarne Ranta Type-Theoretical Grammar , 1995 .

[49]  Gunter Saake,et al.  Bridging the Gap between Variability in Client Application and Database Schema , 2009, BTW.

[50]  Oscar Nierstrasz,et al.  Traits: A mechanism for fine-grained reuse , 2006, TOPL.

[51]  Thomas Leich,et al.  SQL á la Carte - Toward Tailor-made Data Management , 2009, BTW.

[52]  Kyo Chul Kang,et al.  Feature-Oriented Domain Analysis (FODA) Feasibility Study , 1990 .

[53]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[54]  Zhaohui Luo,et al.  An Implementation of LF with Coercive Subtyping & Universes , 2001, Journal of Automated Reasoning.

[55]  Christian Prehofer,et al.  Feature-Oriented Programming: A Fresh Look at Objects , 1997, ECOOP.

[56]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[57]  Roberto Erick Lopez-Herrejon,et al.  A Standard Problem for Evaluating Product-Line Methodologies , 2001, GCSE.

[58]  Sven Apel,et al.  Type-Checking Software Product Lines - A Formal Approach , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[59]  Claudia Maienborn,et al.  Adverbs and adverbials , 2011 .

[60]  Healfdene Goguen A typed operational semantics for type theory , 1994 .

[61]  Elena Zucca,et al.  Featherweight Jigsaw: A Minimal Core Calculus for Modular Composition of Classes , 2009, ECOOP.

[62]  Thomas Leich,et al.  FeatureC++: on the symbiosis of feature-oriented and aspect-oriented programming , 2005, GPCE'05.

[63]  Stanley M. Sutton,et al.  N degrees of separation: multi-dimensional separation of concerns , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[64]  Krzysztof Czarnecki,et al.  Verifying feature-based model templates against well-formedness OCL constraints , 2006, GPCE '06.

[65]  Christopher D. Manning,et al.  Natural language inference , 2009 .

[66]  William R. Cook,et al.  A machine-checked model of safe composition , 2009, FOAL '09.

[67]  Ole Lehrmann Madsen,et al.  Virtual classes: a powerful mechanism in object-oriented programming , 1989, OOPSLA '89.

[68]  James Pustejovsky,et al.  The Generative Lexicon , 1995, CL.

[69]  Matthias Felleisen,et al.  Classes and mixins , 1998, POPL '98.

[70]  Shirley Dex,et al.  JR 旅客販売総合システム(マルス)における運用及び管理について , 1991 .

[71]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[72]  Ido Dagan,et al.  The Third PASCAL Recognizing Textual Entailment Challenge , 2007, ACL-PASCAL@ACL.

[73]  Sophia Drossopoulou,et al.  Tribe: a simple virtual class calculus , 2007, AOSD.

[74]  Sven Apel,et al.  An Overview of the gDEEP Calculus , 2008 .

[75]  Davide Ancona,et al.  Jam---designing a Java extension with mixins , 2003, TOPL.

[76]  P. Martin-Löf An Intuitionistic Theory of Types: Predicative Part , 1975 .

[77]  Mirko Viroli,et al.  Lightweight Family Polymorphism , 2005, APLAS.

[78]  Sven Apel,et al.  Granularity in software product lines , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[79]  Georges Gonthier A computer-checked proof of the Four Colour Theorem , 2005 .

[80]  Krzysztof Czarnecki,et al.  SAT-based analysis of feature models is easy , 2009, SPLC.

[81]  Guy L. Steele,et al.  Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .

[82]  Zhaohui Luo Contextual Analysis of Word Meanings in Type-Theoretical Semantics , 2011, LACL.