Feature-oriented contract composition

Abstract A software product line comprises a set of products that share a common code base, but vary in specific characteristics called features. Ideally, features of a product line are developed in isolation and composed subsequently. Product lines are increasingly used for safety–critical software, for which quality assurance becomes indispensable. While the verification of product lines gained considerable interest in research over the last decade, the subject of how to specify product lines is only covered rudimentarily. A challenge to overcome is composition; similar to inheritance in object-oriented programming, features of a product line may refine other features along with their specifications. To investigate how refinement and composition of specifications can be established, we derive a notion of feature-oriented contracts comprising preconditions, postconditions, and framing conditions of a method. We discuss six mechanisms to perform contract composition between original and refining contracts. Moreover, we identify and discuss desired properties for contract composition and evaluate which properties are established by which mechanism. Our three main insights are that (a) contract refinement is seldom but crucial, (b) the Liskov principle does not apply to features, and (c) it is sufficient to accommodate techniques from object-orientation in the contract-composition mechanisms for handling frame refinements.

[1]  Gary T. Leavens,et al.  Beyond Assertions: Advanced Specification and Verification with JML and ESC/Java2 , 2005, FMCO.

[2]  Pierre Cointe,et al.  Towards a methodology for explicit composition of metaobjects , 1995, OOPSLA.

[3]  Jia Liu,et al.  Feature oriented refactoring of legacy applications , 2006, ICSE.

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

[5]  Dirk Janssens,et al.  Design by contract for aspects, by aspects , 2012, FOAL '12.

[6]  Johan Dovland,et al.  A transformational proof system for delta-oriented programming , 2012, SPLC '12.

[7]  Sven Apel,et al.  Family-based deductive verification of software product lines , 2012, GPCE '12.

[8]  Don S. Batory,et al.  Feature-oriented programming and the AHEAD tool suite , 2004, Proceedings. 26th International Conference on Software Engineering.

[9]  Yuanyuan Song,et al.  Modular software design with crosscutting interfaces , 2006, IEEE Software.

[10]  Bertrand Meyer,et al.  Applying 'design by contract' , 1992, Computer.

[11]  Sven Apel,et al.  A calculus for uniform feature composition , 2010, TOPL.

[12]  Mahsa Varshosaz,et al.  Basic behavioral models for software product lines: Expressiveness and testing pre-orders , 2016, Sci. Comput. Program..

[13]  Sven Apel,et al.  An algebraic foundation for automatic feature-based program synthesis , 2010, Sci. Comput. Program..

[14]  Gary T. Leavens,et al.  Behavioral interface specification languages , 2012, CSUR.

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

[16]  Elke Pulvermüller,et al.  Aspect Composition Applying the Design by Contract Principle , 2000, GCSE.

[17]  Sérgio Soares,et al.  A JML Compiler Based on AspectJ , 2008, 2008 1st International Conference on Software Testing, Verification, and Validation.

[18]  Sven Apel,et al.  Proof Composition for Deductive Verification of Software Product Lines , 2011, 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops.

[19]  Reiner Hähnle,et al.  Reuse in Software Verification by Abstract Method Calls , 2013, CADE.

[20]  Dirk Janssens,et al.  Modular Reasoning in Aspect-Oriented Languages from a Substitution Perspective , 2015, LNCS Trans. Aspect Oriented Softw. Dev..

[21]  Gunter Saake,et al.  Applying Design by Contract to Feature-Oriented Programming , 2012, FASE.

[22]  Gary T. Leavens,et al.  Observers and Assistants: A Proposal for Modular Aspect-Oriented Reasoning , 2002 .

[23]  Sven Apel,et al.  A model of refactoring physically and virtually separated features , 2009, GPCE '09.

[24]  Paulo Borba,et al.  JML and Aspects: The Benefits of Instrumenting JML Features with AspectJ , 2008 .

[25]  Jaejoon Lee,et al.  An Approach for Developing Service Oriented Product Lines , 2008, 2008 12th International Software Product Line Conference.

[26]  Sven Apel,et al.  The road to feature modularity? , 2011, SPLC '11.

[27]  Daniel M. Zimmerman,et al.  AspectJML: modular specification and runtime checking for crosscutting contracts , 2014, MODULARITY.

[28]  Sam Tobin-Hochstadt,et al.  Gradual typing for first-class classes , 2012, OOPSLA '12.

[29]  Ina Schaefer,et al.  Compositional type-checking for delta-oriented programming , 2011, AOSD '11.

[30]  Matthias Felleisen,et al.  Contracts for first-class classes , 2010, DLS '10.

[31]  Matthias Felleisen,et al.  Behavioral contracts and behavioral subtyping , 2001, ESEC/FSE-9.

[32]  Pierre America,et al.  Designing an Object-Oriented Programming Language with Behavioural Subtyping , 1990, REX Workshop.

[33]  Bernhard Möller,et al.  Foundations of Coloring Algebra with Consequences for Feature-Oriented Programming , 2012, RAMiCS.

[34]  Harold Ossher,et al.  Subject-oriented programming: a critique of pure objects , 1993, OOPSLA '93.

[35]  Sven Apel,et al.  Language-Independent and Automated Software Composition: The FeatureHouse Experience , 2013, IEEE Transactions on Software Engineering.

[36]  Reiner Hähnle,et al.  A Liskov Principle for Delta-Oriented Programming , 2012, ISoLA.

[37]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[38]  Bernhard Möller,et al.  An extension for feature algebra , 2009, FOSD '09.

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

[40]  Mira Mezini,et al.  Adaptive plug-and-play components for evolutionary software development , 1998, OOPSLA '98.

[41]  Thomas Leich,et al.  A Survey on Modeling Techniques for Formal Behavioral Verification of Software Product Lines , 2015, VaMoS.

[42]  Thomas Thüm,et al.  Feature-Oriented Contract Composition , 2019, SPLC.

[43]  Jianjun Zhao,et al.  Pipa: A Behavioral Interface Specification Language for AspectJ , 2003, FASE.

[44]  Gary T. Leavens,et al.  Forcing behavioral subtyping through specification inheritance , 1996, Proceedings of IEEE 18th International Conference on Software Engineering.

[45]  Jeannette M. Wing,et al.  A behavioral notion of subtyping , 1994, TOPL.

[46]  Gunter Saake,et al.  A Classification and Survey of Analysis Strategies for Software Product Lines , 2014, ACM Comput. Surv..

[47]  Sven Apel,et al.  Subclack: feature-oriented programming with behavioral feature interfaces , 2013 .

[48]  Klaus Pohl,et al.  Software Product Line Engineering - Foundations, Principles, and Techniques , 2005 .

[49]  Don Batory,et al.  Scaling Step-Wise Refinement , 2004, IEEE Trans. Software Eng..

[50]  Bernhard Beckert,et al.  Verification of Object-Oriented Software. The KeY Approach - Foreword by K. Rustan M. Leino , 2007, The KeY Approach.

[51]  Vladimir Klebanov,et al.  Verification of Software Product Lines with Delta-Oriented Slicing , 2010, FoVeOOS.

[52]  Jean-Pierre Corriveau,et al.  On Extracting Tests from a Testable Model in the Context of Domain Engineering , 2008, 13th IEEE International Conference on Engineering of Complex Computer Systems (iceccs 2008).

[53]  Sven Apel,et al.  Feature-interaction detection based on feature-based specifications , 2013, Comput. Networks.

[54]  David H. Lorenz,et al.  Extending Design by Contract for Aspect-Oriented Programming , 2005, ArXiv.

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

[56]  Stefanie Bolle Feature-orientiertes Framing für die Verifikation von Software-Produktlinien: Masterarbeit , 2017 .

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

[58]  Sven Apel,et al.  Automatic detection of feature interactions using the Java modeling language: an experience report , 2011, SPLC '11.

[59]  Viviana Bono,et al.  Delta-Oriented Programming of Software Product Lines , 2010, SPLC.

[60]  Gary T. Leavens,et al.  On the interplay of exception handling and design by contract: an aspect-oriented recovery approach , 2011, FTfJP@ECOOP.

[61]  Patrick Th. Eugster,et al.  Can Aspects Implement Contracts? , 2005, RISE.

[62]  K. Rustan M. Leino,et al.  Data groups: specifying the modification of extended state , 1998, OOPSLA '98.

[63]  Thomas Thüm,et al.  Towards modular analysis of multi product lines , 2013, SPLC '13 Workshops.

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

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

[66]  Reiner Hähnle,et al.  Verification of Variable Software: an Experience Report , 2010 .

[67]  Gary T. Leavens,et al.  Modular aspect-oriented design rule enforcement with XPIDRs , 2013, FOAL.

[68]  Cláudio Sant'Anna,et al.  Quantifying the effects of Aspectual Decompositions on Design by Contract Modularization: a Maintenance Study , 2013, Int. J. Softw. Eng. Knowl. Eng..

[69]  Yannis Smaragdakis,et al.  Object-oriented frameworks and product lines , 2000, SPLC.

[70]  Jean-Raymond Abrial,et al.  Modeling in event-b - system and software engineering by Jean-Raymond Abrial , 2010, SOEN.

[71]  Ian M. Holland,et al.  Contracts: specifying behavioral compositions in object-oriented systems , 1990, OOPSLA/ECOOP '90.

[72]  Mahsa Varshosaz,et al.  Basic behavioral models for software product lines: Revisited , 2018, Sci. Comput. Program..

[73]  John D. McGregor,et al.  On strategies for testing software product lines: A systematic literature review , 2014, Inf. Softw. Technol..

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

[75]  Matthew B. Dwyer,et al.  Checking JML specifications using an extensible software model checking framework , 2006, International Journal on Software Tools for Technology Transfer.

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

[77]  Michael D. Ernst,et al.  An overview of JML tools and applications , 2003, International Journal on Software Tools for Technology Transfer.

[78]  Gunter Saake,et al.  Potential synergies of theorem proving and model checking for software product lines , 2014, SPLC.

[79]  Ana Moreira,et al.  Contracts for aspect-oriented design , 2008 .

[80]  Shmuel Katz Aspect Categories and Classes of Temporal Properties , 2006, LNCS Trans. Aspect Oriented Softw. Dev..

[81]  Egon Börger,et al.  Abstract State Machines. A Method for High-Level System Design and Analysis , 2003 .

[82]  Gunter Saake,et al.  Feature-Oriented Software Product Lines , 2013, Springer Berlin Heidelberg.

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

[84]  Mario Kolberg,et al.  Feature interaction: a critical review and considered forecast , 2003, Comput. Networks.

[85]  K. Rustan M. Leino,et al.  Specification and verification , 2011, Commun. ACM.

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

[87]  Matthias Felleisen,et al.  Contracts for higher-order functions , 2002, ICFP '02.

[88]  Gary T. Leavens,et al.  Information Hiding and Visibility in Interface Specifications , 2007, 29th International Conference on Software Engineering (ICSE'07).

[89]  James F. Power,et al.  Specification Clones: An Empirical Study of the Structure of Event-B Specifications , 2017, SEFM.