SlideShare une entreprise Scribd logo
1  sur  36
A Commutative Model Composition
Operator to Support Software Adaptation
Sébastien Mosser, Mireille Blay-Fornarino & Laurence Duchien

(1) SINTEF IKT, NSS Dept, MOD group, Oslo, Norway
(2) I3S (UMR CNRS UNS 7071), Univ. of Nice Sophia Antipolis, France
(3) Inria Lille-Nord Europe, LIFL (UMR CNRS USTL 8022), Univ. of Lille1, France

8th European Conference on Modelling Foundations and Applications
Copenhagen, Denmark - 05.07.2012
Adapting Software ...




                        System




T0
                                 2
Adapting Software ...




                        System




T0        T1
                                 2
Adapting Software ...




                        System




T0        T1        T2
                                 2
Adapting Software ...




                        System




T0        T1        T2           T3
                                      2
Adapting Software ...




                        System




T0        T1        T2           T3   ...
                                            2
Separated Artefacts, but Shared Knowledge




                                            3
Separated Artefacts, but Shared Knowledge




                                            3
Separated Artefacts, but Shared Knowledge




                                            3
Outline
Software Adaptation

Proposition

Validation (CCCMS)

Conclusions & Perspectives



4
                             (c) bschwehn
Context:
                      Need for commutativity
Software Adaptation                            5
Big Picture: Adaptation Loop

              «monitors»       Adaptation
                                Engine
                                             F1
    System                                   F2
                               Composition
F1 F2 F3 F4                      Engine      F3
    Context                                  F4




                                                  6
Big Picture: Adaptation Loop

               «monitors»         Adaptation
                                   Engine
                            {F1,F2,F3}   «triggers»   F1
    System                                            F2
                                 Composition
F1 F2 F3 F4                        Engine             F3
    Context’                             «yields»     F4

                                    System
                              F1 F2 F3 F4
                                                           6
Big Picture: Adaptation Loop

               «monitors»      Adaptation
                                Engine
                                             F1
    System                     Composition   F2
F1 F2 F3 F4                      Engine      F3
    Context’                                 F4




                                                  6
Big Picture: Adaptation Loop

                «monitors»     Adaptation
                                Engine
                                             F1
    System                     Composition   F2
F1 F2 F3 F4                      Engine      F3
    Context’’                                F4




                                                  6
Toy Example

• A simple model «m»
                                     m
    • Two classes, «C1» & «C2»
                                         C1            C2
    • No inheritance (top-level)


• Two «adaptations»


    • «S»: adds a super-class
                                         Observable

    • «A»: adds an aggregation
                                         Persistence
    • Works on «top-level» classes
7
Functional Representation of Adaptation

adaptations                       mS                  [Batory04]
as functions,
                                            SC
                S: m ↦ mS
 producing
   models

                                       C1        C2
                     models are                           S(m)
                     constants

                                  mA
  m
                                       C1        C2
      C1        C2

                                                          A(m)
                                            AC
                A: m ↦ mA          a1            a2           8
Problem: {A,S} selected simultaneously
                                    mAS
               mS
                                            SC
                          SC

                                      C1         C2
                     C1        C2
                                            AC
                                                  a3
m                     S(m)            A(S(m))
    C1   C2
                                    mSA
                mA
                                            SC
                     C1        C2

                                      C1         C2
                          AC
                 a1            a2           AC
                                     a1
                      A(m)
                                                 a2


                                          S(A(m))      9
The problem is not «interactions» or «ordering»

mSA               mAS

        SC                SC



  C1         C2     C1         C2

        AC                AC
 a1          a2                   a3


      A(S(m))           S(A(m))



                                                   10
The problem is not «interactions» or «ordering»

mSA                mAS                  m'

        SC                 SC                     SC



  C1         C2       C1         C2          C1        C2

        AC                 AC                     AC
 a1          a2                    a3        a1        a2


      A(S(m))            S(A(m))             (A||S)(m)
  e.g., critical pair analysis
We need a «commutative composition operator»
                                                            10
Objectives

• Reusability

     • Allow quantifiers (e.g., ∀)

• Retro-compatibility

     • Must support «sequence»

• Determinism

     • Ordering «when required»

• Inconsistency Detection

     • Detect problems on the fly

11
(c) lokaltog




          Action Set Representation   Operators as set composition
                                                                     12
From Action Sequences ...


   «Every model can be expressed as a sequence of
elementary construction operation» [Blanc et al, ICSE’08]


                           m = [ add(C1, Class),
    m                            add(C2, Class) ]
        C1      C2
                           m’ = [ add(C2, Class),
                                  add(C1, Class) ]

                                   m’ ≠ m !           13
... to Action Sets

   Added relations       Deleted relations


   m = (An, Ar, Dn, Dr)                      m

                                                 C1   C2
Added nodes           Deleted nodes




   m = ( { add(C1, Class), add(C2, Class)}, ∅, ∅, ∅)


m ∪ m’= (An∪A’n, Ar∪A’r, Dn∪D’n, Dr∪D’r)                   14
Relation with Adaptation Functions
                                  mS
    m                                       SC
        C1        C2

                                       C1        C2



mS = S(m) = m ∪        s(m)

   = ( {add(C1, Class), add(C2, Class)}, ∅, ∅, ∅)
      ∪( {add(SC, Class)},
             {add(C1,SC,In...), add(C2,SC, In...)}, ∅, ∅)   15
Modelling Sequential Composition


    S(m) = m ∪        S(m)



    A(S(m)) = S(m) ∪         A(S(m))

              =m∪       S(m)    ∪      A(m     ∪   S(m))



         Identity            Id(F(m)) = F(m)         ✔

      Idempotence            F(F(m)) = F(m)          ✘

      Commutativity      F(G(m)) = G(F(m))           ✘
                                                           16
Modelling Parallel Composition (||)


    S(m) = m ∪        S(m)         A(m) = m ∪          A(m)




       (S||A)(m) = S(m) ∪ A(m)
                    =m∪         S(m)   ∪        A(m)


         Identity             Id(F(m)) = F(m)          ✔

       Idempotence            F(F(m)) = F(m)           ✔

      Commutativity          F(G(m)) = G(F(m))         ✔
                                                              17
Inconsistency detected => Ordering needed!
                     Added relations              Deleted relations


                     m = (An, Ar, Dn, Dr)

               Added nodes                   Deleted nodes

• A model «m» is detected as inconsistent if (among others):


   • a relation added in Ar is defined between elements deleted in Dn


   • a node deleted in Dn is still involved in relations added in Ar


• It identifies situations where the parallel composition is not suitable (ordered).
                                                                                18
The Car Crash Crisis
                       Implementation & Validation
Management System                                    19
Implementation: A Composition DSL

composition ordered(m) {
  a(model: m)   => (output: m_a);
  s(model: m_a) => (output: m_sa);                            S(A(m))
} => (m_sa);
composition parallel(m) {
  s(model: m) => (output: m_p);
  a(model: m) => (output: m_p);                               (A||S)(m)
} => (m_p);

• Language compiler implemented with ANTLR

• Adaptation functions as Prolog (SWI) predicate (quantifiers, unification)

• Run-time link with Java/EMF through the SWI-PL framework

                     http://code.google.com/p/gcoke/                        20
The Car Crash Crisis Management System

• Common case study to compare Aspect-oriented Modelling approaches


  • TAOSD special issue + ECMFA’11 paper (9 approaches described)


• Domain: Modelling of a Crisis Management System


  • 8 main success scenario (e.g., «capture witness report»)


  • 27 business extensions (e.g., «interrupted call», «fake information»)


  • 3 non-functional requirements (i.e., «security», «persistence», «statistics»)


• Huge artefacts (hundreds of elements, thousands of relations)
                                                                                    21
Implementing the CCCMS [TAOSD’10]

• Facts:


   • 29 features to be composed to produce the system


   • 146 composition directives, (up to 5 features on shared points)


• Feedback:                                   120 possibilities

   • 73% of the composition were not ordered (i.e., obtained through ||)


   • The remaining 27% were ordered «by requirements»


      • Some were identified by the inconsistency detection mechanisms!
                                                                           22
Conclusions   & Perspectives
Summary


                        Quantifiers can be used
     Reusability                                    ✔
                           «independently»

                       Supports both sequential &
 Retro-compatibility                                ✔
                         parallel compositions

                        Ordering only if needed,
    Determinism                                     ✔
                        Commutativity elsewhere

   Inconsistency           Identify adaptation
                                                    ✔
     detection               inconsistencies


                                                        24
Perspectives

• Short term: strengthen validation!


  • Run-time adaptation still at the PoC level, application to the REMICS UC


• Long-term: enlarge application domains


  • Cloud-Computing: models@run.time & adaptation


     • EU funded projects (Call 8): MODAClouds, PaaSage, Broker@Cloud


  • Internet of Things: on-the-fly re-configuration


     • Internal project (MODERATES)
                                                                               25
Thanks for your attention!




   A Commutative Model Composition
   Operator to Support Software Adaptation

   Sébastien Mosser, Mireille Blay-Fornarino & Laurence Duchien




graphics by C.Line & sxc.hu

Contenu connexe

Plus de Sébastien Mosser

Towards CloudML, a Model-Based Approach to Provision Resources in the Clouds
Towards CloudML, a Model-Based Approach  to Provision Resources in the CloudsTowards CloudML, a Model-Based Approach  to Provision Resources in the Clouds
Towards CloudML, a Model-Based Approach to Provision Resources in the CloudsSébastien Mosser
 
Tools For Software Engineering
Tools For Software EngineeringTools For Software Engineering
Tools For Software EngineeringSébastien Mosser
 
Using Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature InteractionsUsing Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature InteractionsSébastien Mosser
 
Cloud Computing: From Revolution to Evolution
Cloud Computing: From Revolution to EvolutionCloud Computing: From Revolution to Evolution
Cloud Computing: From Revolution to EvolutionSébastien Mosser
 
Introducing Security Access Control Policies into Legacy Business Processes
Introducing Security Access Control Policies into Legacy Business ProcessesIntroducing Security Access Control Policies into Legacy Business Processes
Introducing Security Access Control Policies into Legacy Business ProcessesSébastien Mosser
 
Undoing Event-driven Adaptation of Business Processes
Undoing Event-driven Adaptation of Business ProcessesUndoing Event-driven Adaptation of Business Processes
Undoing Event-driven Adaptation of Business ProcessesSébastien Mosser
 
Talk Session COSMAL du GDR GPL 2011
Talk Session COSMAL du GDR GPL 2011Talk Session COSMAL du GDR GPL 2011
Talk Session COSMAL du GDR GPL 2011Sébastien Mosser
 
Behavioral Compositions in Service-Oriented Architecture
Behavioral Compositions in Service-Oriented ArchitectureBehavioral Compositions in Service-Oriented Architecture
Behavioral Compositions in Service-Oriented ArchitectureSébastien Mosser
 
jSeduite "Quickies" au Riviera JUG
jSeduite "Quickies" au Riviera JUGjSeduite "Quickies" au Riviera JUG
jSeduite "Quickies" au Riviera JUGSébastien Mosser
 
Taming Orchestration Design Using ADORE
Taming Orchestration Design Using ADORETaming Orchestration Design Using ADORE
Taming Orchestration Design Using ADORESébastien Mosser
 
Adore Demonstration (AOSD'10)
Adore Demonstration (AOSD'10)Adore Demonstration (AOSD'10)
Adore Demonstration (AOSD'10)Sébastien Mosser
 

Plus de Sébastien Mosser (18)

Towards CloudML, a Model-Based Approach to Provision Resources in the Clouds
Towards CloudML, a Model-Based Approach  to Provision Resources in the CloudsTowards CloudML, a Model-Based Approach  to Provision Resources in the Clouds
Towards CloudML, a Model-Based Approach to Provision Resources in the Clouds
 
Tools For Software Engineering
Tools For Software EngineeringTools For Software Engineering
Tools For Software Engineering
 
La Thèse ...
La Thèse ...La Thèse ...
La Thèse ...
 
Using Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature InteractionsUsing Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature Interactions
 
Cloud Computing: From Revolution to Evolution
Cloud Computing: From Revolution to EvolutionCloud Computing: From Revolution to Evolution
Cloud Computing: From Revolution to Evolution
 
Introducing Security Access Control Policies into Legacy Business Processes
Introducing Security Access Control Policies into Legacy Business ProcessesIntroducing Security Access Control Policies into Legacy Business Processes
Introducing Security Access Control Policies into Legacy Business Processes
 
Undoing Event-driven Adaptation of Business Processes
Undoing Event-driven Adaptation of Business ProcessesUndoing Event-driven Adaptation of Business Processes
Undoing Event-driven Adaptation of Business Processes
 
Talk Session COSMAL du GDR GPL 2011
Talk Session COSMAL du GDR GPL 2011Talk Session COSMAL du GDR GPL 2011
Talk Session COSMAL du GDR GPL 2011
 
Behavioral Compositions in Service-Oriented Architecture
Behavioral Compositions in Service-Oriented ArchitectureBehavioral Compositions in Service-Oriented Architecture
Behavioral Compositions in Service-Oriented Architecture
 
ADAM Seminary
ADAM SeminaryADAM Seminary
ADAM Seminary
 
Software Composition 2010
Software Composition 2010Software Composition 2010
Software Composition 2010
 
jSeduite "Quickies" au Riviera JUG
jSeduite "Quickies" au Riviera JUGjSeduite "Quickies" au Riviera JUG
jSeduite "Quickies" au Riviera JUG
 
jSeduite @UNICE Foundation
jSeduite @UNICE FoundationjSeduite @UNICE Foundation
jSeduite @UNICE Foundation
 
Taming Orchestration Design Using ADORE
Taming Orchestration Design Using ADORETaming Orchestration Design Using ADORE
Taming Orchestration Design Using ADORE
 
Adore Demonstration (AOSD'10)
Adore Demonstration (AOSD'10)Adore Demonstration (AOSD'10)
Adore Demonstration (AOSD'10)
 
Builsing DSL using MDE
Builsing DSL using MDEBuilsing DSL using MDE
Builsing DSL using MDE
 
Entrepôt'Lytech JM2L
Entrepôt'Lytech JM2LEntrepôt'Lytech JM2L
Entrepôt'Lytech JM2L
 
Le Framework jSeduite
Le Framework jSeduiteLe Framework jSeduite
Le Framework jSeduite
 

Dernier

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 

Dernier (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 

A commutative model composition operator to support software adaptation

  • 1. A Commutative Model Composition Operator to Support Software Adaptation Sébastien Mosser, Mireille Blay-Fornarino & Laurence Duchien (1) SINTEF IKT, NSS Dept, MOD group, Oslo, Norway (2) I3S (UMR CNRS UNS 7071), Univ. of Nice Sophia Antipolis, France (3) Inria Lille-Nord Europe, LIFL (UMR CNRS USTL 8022), Univ. of Lille1, France 8th European Conference on Modelling Foundations and Applications Copenhagen, Denmark - 05.07.2012
  • 2. Adapting Software ... System T0 2
  • 3. Adapting Software ... System T0 T1 2
  • 4. Adapting Software ... System T0 T1 T2 2
  • 5. Adapting Software ... System T0 T1 T2 T3 2
  • 6. Adapting Software ... System T0 T1 T2 T3 ... 2
  • 7. Separated Artefacts, but Shared Knowledge 3
  • 8. Separated Artefacts, but Shared Knowledge 3
  • 9. Separated Artefacts, but Shared Knowledge 3
  • 11. Context: Need for commutativity Software Adaptation 5
  • 12. Big Picture: Adaptation Loop «monitors» Adaptation Engine F1 System F2 Composition F1 F2 F3 F4 Engine F3 Context F4 6
  • 13. Big Picture: Adaptation Loop «monitors» Adaptation Engine {F1,F2,F3} «triggers» F1 System F2 Composition F1 F2 F3 F4 Engine F3 Context’ «yields» F4 System F1 F2 F3 F4 6
  • 14. Big Picture: Adaptation Loop «monitors» Adaptation Engine F1 System Composition F2 F1 F2 F3 F4 Engine F3 Context’ F4 6
  • 15. Big Picture: Adaptation Loop «monitors» Adaptation Engine F1 System Composition F2 F1 F2 F3 F4 Engine F3 Context’’ F4 6
  • 16. Toy Example • A simple model «m» m • Two classes, «C1» & «C2» C1 C2 • No inheritance (top-level) • Two «adaptations» • «S»: adds a super-class Observable • «A»: adds an aggregation Persistence • Works on «top-level» classes 7
  • 17. Functional Representation of Adaptation adaptations mS [Batory04] as functions, SC S: m ↦ mS producing models C1 C2 models are S(m) constants mA m C1 C2 C1 C2 A(m) AC A: m ↦ mA a1 a2 8
  • 18. Problem: {A,S} selected simultaneously mAS mS SC SC C1 C2 C1 C2 AC a3 m S(m) A(S(m)) C1 C2 mSA mA SC C1 C2 C1 C2 AC a1 a2 AC a1 A(m) a2 S(A(m)) 9
  • 19. The problem is not «interactions» or «ordering» mSA mAS SC SC C1 C2 C1 C2 AC AC a1 a2 a3 A(S(m)) S(A(m)) 10
  • 20. The problem is not «interactions» or «ordering» mSA mAS m' SC SC SC C1 C2 C1 C2 C1 C2 AC AC AC a1 a2 a3 a1 a2 A(S(m)) S(A(m)) (A||S)(m) e.g., critical pair analysis We need a «commutative composition operator» 10
  • 21. Objectives • Reusability • Allow quantifiers (e.g., ∀) • Retro-compatibility • Must support «sequence» • Determinism • Ordering «when required» • Inconsistency Detection • Detect problems on the fly 11
  • 22. (c) lokaltog Action Set Representation Operators as set composition 12
  • 23. From Action Sequences ... «Every model can be expressed as a sequence of elementary construction operation» [Blanc et al, ICSE’08] m = [ add(C1, Class), m add(C2, Class) ] C1 C2 m’ = [ add(C2, Class), add(C1, Class) ] m’ ≠ m ! 13
  • 24. ... to Action Sets Added relations Deleted relations m = (An, Ar, Dn, Dr) m C1 C2 Added nodes Deleted nodes m = ( { add(C1, Class), add(C2, Class)}, ∅, ∅, ∅) m ∪ m’= (An∪A’n, Ar∪A’r, Dn∪D’n, Dr∪D’r) 14
  • 25. Relation with Adaptation Functions mS m SC C1 C2 C1 C2 mS = S(m) = m ∪ s(m) = ( {add(C1, Class), add(C2, Class)}, ∅, ∅, ∅) ∪( {add(SC, Class)}, {add(C1,SC,In...), add(C2,SC, In...)}, ∅, ∅) 15
  • 26. Modelling Sequential Composition S(m) = m ∪ S(m) A(S(m)) = S(m) ∪ A(S(m)) =m∪ S(m) ∪ A(m ∪ S(m)) Identity Id(F(m)) = F(m) ✔ Idempotence F(F(m)) = F(m) ✘ Commutativity F(G(m)) = G(F(m)) ✘ 16
  • 27. Modelling Parallel Composition (||) S(m) = m ∪ S(m) A(m) = m ∪ A(m) (S||A)(m) = S(m) ∪ A(m) =m∪ S(m) ∪ A(m) Identity Id(F(m)) = F(m) ✔ Idempotence F(F(m)) = F(m) ✔ Commutativity F(G(m)) = G(F(m)) ✔ 17
  • 28. Inconsistency detected => Ordering needed! Added relations Deleted relations m = (An, Ar, Dn, Dr) Added nodes Deleted nodes • A model «m» is detected as inconsistent if (among others): • a relation added in Ar is defined between elements deleted in Dn • a node deleted in Dn is still involved in relations added in Ar • It identifies situations where the parallel composition is not suitable (ordered). 18
  • 29. The Car Crash Crisis Implementation & Validation Management System 19
  • 30. Implementation: A Composition DSL composition ordered(m) { a(model: m) => (output: m_a); s(model: m_a) => (output: m_sa); S(A(m)) } => (m_sa); composition parallel(m) { s(model: m) => (output: m_p); a(model: m) => (output: m_p); (A||S)(m) } => (m_p); • Language compiler implemented with ANTLR • Adaptation functions as Prolog (SWI) predicate (quantifiers, unification) • Run-time link with Java/EMF through the SWI-PL framework http://code.google.com/p/gcoke/ 20
  • 31. The Car Crash Crisis Management System • Common case study to compare Aspect-oriented Modelling approaches • TAOSD special issue + ECMFA’11 paper (9 approaches described) • Domain: Modelling of a Crisis Management System • 8 main success scenario (e.g., «capture witness report») • 27 business extensions (e.g., «interrupted call», «fake information») • 3 non-functional requirements (i.e., «security», «persistence», «statistics») • Huge artefacts (hundreds of elements, thousands of relations) 21
  • 32. Implementing the CCCMS [TAOSD’10] • Facts: • 29 features to be composed to produce the system • 146 composition directives, (up to 5 features on shared points) • Feedback: 120 possibilities • 73% of the composition were not ordered (i.e., obtained through ||) • The remaining 27% were ordered «by requirements» • Some were identified by the inconsistency detection mechanisms! 22
  • 33. Conclusions & Perspectives
  • 34. Summary Quantifiers can be used Reusability ✔ «independently» Supports both sequential & Retro-compatibility ✔ parallel compositions Ordering only if needed, Determinism ✔ Commutativity elsewhere Inconsistency Identify adaptation ✔ detection inconsistencies 24
  • 35. Perspectives • Short term: strengthen validation! • Run-time adaptation still at the PoC level, application to the REMICS UC • Long-term: enlarge application domains • Cloud-Computing: models@run.time & adaptation • EU funded projects (Call 8): MODAClouds, PaaSage, Broker@Cloud • Internet of Things: on-the-fly re-configuration • Internal project (MODERATES) 25
  • 36. Thanks for your attention! A Commutative Model Composition Operator to Support Software Adaptation Sébastien Mosser, Mireille Blay-Fornarino & Laurence Duchien graphics by C.Line & sxc.hu

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n
  126. \n
  127. \n
  128. \n
  129. \n
  130. \n
  131. \n
  132. \n
  133. \n
  134. \n
  135. \n
  136. \n
  137. \n
  138. \n
  139. \n
  140. \n