Model Composition Contracts

The state-of-the-art in aspect-oriented programming and modeling provides flexible querying and composition mechanisms that allow virtually unrestricted modifications to base code or models using static or dynamic weaving. There is, however, a lack of support for specifying and controlling the permitted effects of compositions with respect to the base models involved. We present model composition contracts, which govern access to the base models via aspects; in essence, the contracts control how aspect compositions may or may not access and change the models, or the underlying code reflected by models. The composition contracts define constraints in terms of pre- and post-conditions restricting the eligibility for composition. We argue that composition contracts improve reliability of model composition in software engineering, and evaluate their effects on model designs and implementations using a case study. We support the approach with a prototype tool for specifying and checking contracts.

[1]  Satoshi Matsuoka,et al.  ECOOP'97 — Object-Oriented Programming , 1997, Lecture Notes in Computer Science.

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

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

[4]  Sheldon B. Akers,et al.  Binary Decision Diagrams , 1978, IEEE Transactions on Computers.

[5]  David Walker,et al.  Harmless advice , 2006, POPL '06.

[6]  Ingolf Krüger,et al.  Runtime Verification of Interactions: From MSCs to Aspects , 2007, RV.

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

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

[9]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[10]  Raffaela Mirandola,et al.  The Common Component Modeling Example: Comparing Software Component Models [result from the Dagstuhl research seminar for CoCoME, August 1-3, 2007] , 2007, CoCoME.

[11]  MeyerBertrand,et al.  Design by Contract , 1997 .

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

[13]  Ingolf Krüger,et al.  Distributed system design with message sequence charts , 2000 .

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

[15]  Siobhán Clarke,et al.  Composition patterns: an approach to designing reusable aspects , 2001, ICSE 2001.

[16]  Ingolf Krüger,et al.  A Rich Services Approach to CoCoME , 2007, CoCoME.

[17]  Jørgen Lindskov Knudsen ECOOP 2001 — Object-Oriented Programming , 2001, Lecture Notes in Computer Science.

[18]  Daniel P. Friedman,et al.  Aspect-Oriented Programming is Quantification and Obliviousness , 2000 .

[19]  Øystein Haugen,et al.  From sequence diagrams to Java-stairs aspects , 2009, AOSD '09.