rbFeatures: Feature-oriented programming with Ruby

Features are pieces of core functionality of a program that is relevant to particular stakeholders. Features pose dependencies and constraints among each other. These dependencies and constraints describe the possible number of variants of the program: A valid feature configuration generates a specific variant with unique behavior. Feature-Oriented Programming is used to implement features as program units. This paper introduces rbFeatures, a feature-oriented programming language implemented on top of the dynamic programming language Ruby. With rbFeatures, programmers use software product lines, variants, and features as first-class entities. This allows several runtime reflection and modification capabilities, including the extension of the product line with new features and the provision of multiple variants. The paper gives a broad overview to the implementation and application of rbFeatures. We explain how features as first-class entities are designed and implemented, and discuss how the semantics of features are carefully added to Ruby programs. We show two case studies: The expression product line, a common example in feature-oriented programming, and a web application.

[1]  Romain Robbes,et al.  Recovering inter-project dependencies in software ecosystems , 2010, ASE.

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

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

[4]  Oscar Nierstrasz,et al.  Proceedings of the First International Workshop on Feature-Oriented Software Development , 2009 .

[5]  Thomas Leich,et al.  FeatureIDE: A tool framework for feature-oriented software development , 2009, 2009 IEEE 31st International Conference on Software Engineering.

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

[7]  Dave Thomas,et al.  Programming Ruby 1.9 & 2.0: The Pragmatic Programmers' Guide , 2013 .

[8]  Robert Hirschfeld,et al.  International Workshop on Context-Oriented Programming , 2009, ECOOP 2009.

[9]  Michael Haupt,et al.  A comparison of context-oriented programming languages , 2009, COP@ECOOP.

[10]  Paul Hudak,et al.  Modular domain specific languages and tools , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[11]  Ruzanna Chitchyan,et al.  A Model for Dynamic Hyperspaces , 2003 .

[12]  James Withey Investment Analysis of Software Assets for Product Lines. , 1996 .

[13]  Thomas Leich,et al.  Access control in feature-oriented programming , 2012, Sci. Comput. Program..

[14]  Andy Hunt,et al.  Programming Ruby 1.9: The Pragmatic Programmers' Guide , 2009 .

[15]  Arie van Deursen,et al.  Domain-specific language design requires feature descriptions , 2002 .

[16]  Matthew B. Dwyer,et al.  Proceedings of the 30th international conference on Software engineering , 2008, ICSE 2008.

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

[18]  Sven Apel,et al.  A Case Study Implementing Features Using AspectJ , 2007 .

[19]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[20]  Arie van Deursen,et al.  Domain-specific languages: an annotated bibliography , 2000, SIGP.

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

[22]  Sebastian Günther,et al.  Dynamically adaptable software product lines using Ruby metaprogramming , 2010, FOSD '10.

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

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

[25]  Sergio Segura,et al.  A Survey on the Automated Analyses of Feature Models , 2006, JISBD.

[26]  Sergio Segura,et al.  Automated analysis of feature models 20 years later: A literature review , 2010, Inf. Syst..

[27]  Sven Apel,et al.  Virtual Separation of Concerns - A Second Chance for Preprocessors , 2009, J. Object Technol..

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

[29]  Don Batory Feature-oriented programming and the AHEAD tool suite , 2004, ICSE 2004.

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

[31]  Walter F. Tichy,et al.  Proceedings 25th International Conference on Software Engineering , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[32]  Sven Apel,et al.  The role of features and aspects in software development: similarities, differences, and synergetic potential , 2007 .

[33]  Marco Sinnema,et al.  Classifying variability modeling techniques , 2007, Inf. Softw. Technol..

[34]  Sebastian Günther Multi-DSL Applications with Ruby , 2010, IEEE Software.

[35]  Lidia Fuentes,et al.  Language Support for Managing Variability in Architectural Models , 2008, SC@ETAPS.

[36]  Gunter Saake,et al.  Features as First-class Entities – Toward a Better Representation of Features , 2008 .

[37]  David Flanagan,et al.  The Ruby Programming Language , 2007 .

[38]  Oscar Nierstrasz,et al.  Classboxes: controlling visibility of class extensions , 2005, Comput. Lang. Syst. Struct..

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

[40]  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).

[41]  Krzysztof Czarnecki,et al.  Formalizing cardinality-based feature models and their specialization , 2005, Softw. Process. Improv. Pract..

[42]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[43]  Danilo Beuche,et al.  Variability management with feature models , 2004, Sci. Comput. Program..

[44]  Theo D'Hondt,et al.  Feature Descriptions for Context-oriented Programming , 2008, SPLC.

[45]  Stan Jarzabek,et al.  XVCL: a mechanism for handling variants in software product lines , 2004, Sci. Comput. Program..

[46]  Krzysztof Czarnecki,et al.  Feature and Meta-Models in Clafer: Mixed, Specialized, and Coupled , 2010, SLE.

[47]  Oscar Nierstrasz,et al.  Context-oriented Programming , 2008, J. Object Technol..

[48]  H. Rajan,et al.  Classpects: unifying aspect- and object-oriented language design , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

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

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

[51]  Stephan Herrmann,et al.  A precise model for contextual roles: The programming language ObjectTeams/Java , 2007, Appl. Ontology.

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

[53]  Jan Heering,et al.  Application Software, Domain-Specific Languages, and Language Design Assistants , 2000, ArXiv.

[54]  Tomi Männistö,et al.  A Koala-Based Approach for Modelling and Deploying Configurable Software Product Families , 2003, PFE.

[55]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[56]  Mira Mezini,et al.  An Overview of CaesarJ , 2006, LNCS Trans. Aspect Oriented Softw. Dev..

[57]  Don Batory,et al.  Scaling step-wise refinement , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[58]  Sven Apel,et al.  An Overview of Feature-Oriented Software Development , 2009, J. Object Technol..

[59]  Andreas Classen,et al.  Tag and prune: a pragmatic approach to software product line implementation , 2010, ASE.