Architecture-Driven Programming
for Sense/Compute/Control Applications


  Damien Cassou, Émilie Balland, Charles Consel, ...
1.Design

•   facilitates communication

•   documents decisions

•   guides development
                                2
1.Design

•   facilitates communication

•   documents decisions
                     Architecture Description Languages
•...
2.Implement

based on the design as a
contemplative document
                               General Purpose Languages
    ...
3.Check conformance




               4
3.Check conformance




 4
3.Check conformance




 4
3.Check conformance




 4
3.Check conformance




 4
3.Check conformance




manual operation    4
3.Check conformance
                    • costly
                    • slow
                    • error-prone




manual o...
Our Approach



     5
3.Check conformance
                    • costly
                    • slow
                    • error-prone




manual o...
3.Check conformance
                          • costly
                          • slow
                          • error-...
3.Check conformance
                          • costly      • free
                          • slow        • immediate
   ...
compiler
           7
compiler


      builds a programming framework which
        • guides the implementation
        • provides high-level su...
compiler
                  dedicated to
                 the application

      builds a programming framework which
     ...
compiler
                   dedicated to
                  the application

      builds a programming framework which
   ...
Our Approach


        an ADL
           +
generation of a dedicated
programming framework



            8
Our Approach


 a domain-specific ADL
           +
generation of a dedicated
programming framework



            8
The Domain


Sense/Compute/Control applications (SCC)




                  9
The Domain


Sense/Compute/Control applications (SCC)

                 “applications that interact
                  with...
The Domain
Sense/Compute/Control applications (SCC)
                        “applications that interact
                  ...
The Domain
     Sense/Compute/Control applications (SCC)
                                 “applications that interact
    ...
The Domain
Sense/Compute/Control applications (SCC)




                      environment




                 11
The Domain
Sense/Compute/Control applications (SCC)




                      environment




            sensors
        ...
The Domain
Sense/Compute/Control applications (SCC)




                      environment




            sensors      Sen...
The Domain
  Sense/Compute/Control applications (SCC)




                          environment

 context
operators


    ...
The Domain
      Sense/Compute/Control applications (SCC)




                               environment

     context
   ...
The Domain
        Sense/Compute/Control applications (SCC)



      control
     operators
  context                     ...
The Domain
        Sense/Compute/Control applications (SCC)


              orders   actuators
      control
     operator...
The Domain
        Sense/Compute/Control applications (SCC)


              orders   actuators
      control
     operator...
The Domain
        Sense/Compute/Control applications (SCC)

        Control
              orders   actuators
      contro...
The Domain

            orders   actuators
    control
   operators
context
  data

    context
   operators


          r...
The Domain
  actuators
          orders

   control
  operators
         context
           data

   context
  operators

...
The Domain
         actuators

          control
         operators



          context
         operators




    12    ...
Web Server Monitoring
                actuators

                 control
                operators



                 co...
Web Server Monitoring
                           actuators

                            control
                          ...
Web Server Monitoring
                actuators

                 control
                operators



                 co...
Web Server Monitoring
                          actuators

                           control
 IntrusionInformer
         ...
Web Server Monitoring
      Mailer              actuators

                           control
 IntrusionInformer
         ...
Web Server Monitoring
      Mailer                        actuators

                                     control
 Intrusi...
Web Server Monitoring
      Mailer           Logger       actuators

                                     control
 Intrusi...
Web Server Monitoring
      Mailer               Logger    actuators

                                      control
 Intru...
Web Server Monitoring
      Mailer               Logger    actuators

                                      control
 Intru...
Web Server Monitoring
      Mailer                Logger    actuators

                                       control
 Int...
Web Server Monitoring
      Mailer                Logger    actuators

                                       control
 Int...
Web Server Monitoring
      Mailer                Logger    actuators

                                       control
 Int...
Web Server Monitoring
      Mailer                 Logger     actuators

                                         control
...
Web Server Monitoring
      Mailer                 Logger     actuators

                                         control
...
Web Server Monitoring
      Mailer                 Logger      actuators

                                          contro...
Web Server Monitoring
      Mailer                     Logger            actuators
          email(...)         log(Access...
context
            Accessing
             Profile
                                    operators

AccessLog
               ...
what the architect expresses


                                     context
            Accessing
             Profile
    ...
what the architect would like to express


                                     context
            Accessing
            ...
what the architect would like to express


                                     context
            Accessing
            ...
what the architect would like to express


                                     context
            Accessing
            ...
what the architect would like to express

activation
 condition                               context
                Acce...
what the architect would like to express

                                  data    context
            Accessing         ...
what the architect would like to express
                         emission

                                     context
 ...
Behavioral Contracts



                                      context
             Accessing
              Profile
        ...
Behavioral Contracts


⟨                   ;              ;     ⟩

                                              context
 ...
Behavioral Contracts

activation
 condition

⟨⇑AccessLogParser ;              ;     ⟩

                                   ...
Behavioral Contracts

activation     data
 condition requirement

⟨⇑AccessLogParser ; ⇓IP2Profile ;       ⟩

              ...
Behavioral Contracts

activation     data
                       emission
 condition requirement

⟨⇑AccessLogParser ; ⇓IP2...
Behavioral Contracts



                          context
                         operators

           IP2Profile



    ...
Behavioral Contracts


⟨   ;              ;    ⟩

                               context
                              ope...
Behavioral Contracts

activation
 condition

⟨⇓self ;                ;    ⟩

                                    context
 ...
Behavioral Contracts

activation     data
 condition requirement

⟨⇓self ; (⇓NSLookup, ⇓LDAP) ;    ⟩

                    ...
Behavioral Contracts

activation     data
                       emission
 condition requirement

⟨⇓self ; (⇓NSLookup, ⇓LD...
Web Server Monitoring
      Mailer                 Logger      actuators

                                          contro...
Mailer                 Logger      actuators   3.Check conformance
                                          control
 Intr...
Programming Framework

     Mailer                 Logger


IntrusionInformer      ProfileLogger


   Intrusion
    Detecto...
Programming Framework

     Mailer                 Logger


IntrusionInformer      ProfileLogger


   Intrusion
           ...
Programming Framework

     Mailer                 Logger
                                             For each component:...
Programming Framework
                                             For each component:
                                   ...
Accessing
             Profile

AccessLog
                        IP2Profile
 Parser




                                   ...
(AccessInfo,Profile)
                                                         architecture
                   Accessing    ...
(AccessInfo,Profile)
                                                                       architecture
                  ...
(AccessInfo,Profile)
                                                                      architecture
                   ...
(AccessInfo,Profile)
                                                                      architecture
                   ...
(AccessInfo,Profile)
                                                          architecture
                Accessing      ...
(AccessInfo,Profile)
                                                                    architecture
                Acces...
(AccessInfo,Profile)
                                                                   architecture
                Access...
(AccessInfo,Profile)
                                                                   architecture
                Access...
(AccessInfo,Profile)
                                                                   architecture
                Access...
Profile
[IPAddress]                                         architecture
         IP2Profile
   String             Profile
  ...
Profile
[IPAddress]                                         architecture
         IP2Profile
   String             Profile
  ...
Profile
[IPAddress]                                          architecture
         IP2Profile
   String             Profile
 ...
Profile
[IPAddress]                                          architecture
         IP2Profile
   String             Profile
 ...
Profile
[IPAddress]                                              architecture
         IP2Profile
   String             Profi...
Profile
[IPAddress]                                              architecture
         IP2Profile
   String             Profi...
Profile
[IPAddress]                                              architecture
         IP2Profile
   String             Profi...
Profile
[IPAddress]                                              architecture
         IP2Profile
   String             Profi...
Profile
[IPAddress]                                              architecture
         IP2Profile
   String             Profi...
Unpresented
              Contributions
•   splash/oopsla 2010

    •   Formalization of the model

    •   Analysis on th...
A suite of tools




       25
DiaSpec
a DSL to describe SCC applications
device AccessLogReader extends StoppableDevice {
  source line as String;
}
con...
A suite of tools
device AccessLogReader extends StoppableDevice {
  source line as String;
}


                           ...
DiaSim
 a simulator with 2D rendering




[Mobiquitous’09] + [Demo at PERCOM’09]
                  28
A suite of tools
device AccessLogReader extends StoppableDevice {
  source line as String;
}


                           ...
Pantagruel
a graphical language to prototype
pervasive computing applications

  SENSORS            CONTROLLERS    ACTUATO...
A suite of tools
device AccessLogReader extends StoppableDevice {
  source line as String;
}


                           ...
A suite of tools
device AccessLogReader extends StoppableDevice {
  source line as String;
}


                           ...
Conclusion

•   Existing ADLs do not
    automate conformance
    checking

•   Our ADL is dedicated to
    SCC applicatio...
Conclusion & Future Work

•   Existing ADLs do not
                                   •   Architecture-driven
    automate...
Upcoming SlideShare
Loading in …5
×

Architecture-Driven Programming for Sense/Compute/Control Applications

3,515 views

Published on

Software architectures have long been used to design the structure of a software and to impose constraints on the software implementation. Existing approaches are capable of formally verifying properties on these constraints at the design stage. However, few approaches verify that a given implementation conforms to the software architecture constraints, and even fewer use these constraints to guide developers during implementation.

In this presentation, we propose a generative approach to enforce the software architecture constraints during implementation. Toward this goal, we focus on a specific application area, Sense/Compute/Control applications, which are applications that interact with a physical or virtual environment. Our work is based on a domain-specific architectural pattern dedicated to SCC applications. The data-flow of this pattern is restricted by interaction constraints. For specifying such constraints, we propose a dedicated language of behavioral contracts, adapted to our architectural pattern. These behavioral contracts are used for automatically generating a dedicated programming framework. This framework enforces the conformance of the resulting implementation with the software architecture constraints and provides guidance to developers.

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
3,515
On SlideShare
0
From Embeds
0
Number of Embeds
838
Actions
Shares
0
Downloads
58
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide
























  • standard ADL => poor expressiveness => few support
  • standard ADL => poor expressiveness => few support
















































  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • instanciate the pattern (environment = webserver)

    role of this application?
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support
  • Too few description => too many implementations => no support































































































































  • present the formalisation
    => use it to describe the rest

    Problem then solution










  • Architecture-Driven Programming for Sense/Compute/Control Applications

    1. 1. Architecture-Driven Programming for Sense/Compute/Control Applications Damien Cassou, Émilie Balland, Charles Consel, Julia Lawall 1
    2. 2. 1.Design • facilitates communication • documents decisions • guides development 2
    3. 3. 1.Design • facilitates communication • documents decisions Architecture Description Languages • guides development (ADLs) 2
    4. 4. 2.Implement based on the design as a contemplative document General Purpose Languages (GPLs) 3
    5. 5. 3.Check conformance 4
    6. 6. 3.Check conformance 4
    7. 7. 3.Check conformance 4
    8. 8. 3.Check conformance 4
    9. 9. 3.Check conformance 4
    10. 10. 3.Check conformance manual operation 4
    11. 11. 3.Check conformance • costly • slow • error-prone manual operation 4
    12. 12. Our Approach 5
    13. 13. 3.Check conformance • costly • slow • error-prone manual operation 6
    14. 14. 3.Check conformance • costly • slow • error-prone compiler produces a dedicated programming framework 6
    15. 15. 3.Check conformance • costly • free • slow • immediate • error-prone • error-free compiler produces a dedicated programming framework 6
    16. 16. compiler 7
    17. 17. compiler builds a programming framework which • guides the implementation • provides high-level support • ensures conformance 7
    18. 18. compiler dedicated to the application builds a programming framework which • guides the implementation • provides high-level support • ensures conformance 7
    19. 19. compiler dedicated to the application builds a programming framework which • guides the implementation • provides high-level support • ensures conformance heavily rely on the Java type checker 7
    20. 20. Our Approach an ADL + generation of a dedicated programming framework 8
    21. 21. Our Approach a domain-specific ADL + generation of a dedicated programming framework 8
    22. 22. The Domain Sense/Compute/Control applications (SCC) 9
    23. 23. The Domain Sense/Compute/Control applications (SCC) “applications that interact with an environment” 9
    24. 24. The Domain Sense/Compute/Control applications (SCC) “applications that interact with an environment” 10
    25. 25. The Domain Sense/Compute/Control applications (SCC) “applications that interact with an environment” Cover various areas • building automation • application monitoring environment • robotics • autonomic computing • ... 10
    26. 26. The Domain Sense/Compute/Control applications (SCC) environment 11
    27. 27. The Domain Sense/Compute/Control applications (SCC) environment sensors 11
    28. 28. The Domain Sense/Compute/Control applications (SCC) environment sensors Sense 11
    29. 29. The Domain Sense/Compute/Control applications (SCC) environment context operators raw data sensors Sense 11
    30. 30. The Domain Sense/Compute/Control applications (SCC) environment context operators Compute raw data sensors Sense 11
    31. 31. The Domain Sense/Compute/Control applications (SCC) control operators context environment data context operators Compute raw data sensors Sense 11
    32. 32. The Domain Sense/Compute/Control applications (SCC) orders actuators control operators context environment data context operators Compute raw data sensors Sense 11
    33. 33. The Domain Sense/Compute/Control applications (SCC) orders actuators control operators context environment data context operators Compute raw data sensors Sense 11
    34. 34. The Domain Sense/Compute/Control applications (SCC) Control orders actuators control operators context environment data context operators Compute raw data sensors Sense 11
    35. 35. The Domain orders actuators control operators context data context operators raw data sensors 12
    36. 36. The Domain actuators orders control operators context data context operators raw data sensors 12
    37. 37. The Domain actuators control operators context operators 12 sensors
    38. 38. Web Server Monitoring actuators control operators context operators 13 sensors
    39. 39. Web Server Monitoring actuators control operators environment = the web server context operators 13 sensors
    40. 40. Web Server Monitoring actuators control operators context operators 13 sensors
    41. 41. Web Server Monitoring actuators control IntrusionInformer operators context operators 13 sensors
    42. 42. Web Server Monitoring Mailer actuators control IntrusionInformer operators context operators 13 sensors
    43. 43. Web Server Monitoring Mailer actuators control IntrusionInformer ProfileLogger operators context operators 13 sensors
    44. 44. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators context operators 13 sensors
    45. 45. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators context Accessing Profile operators 13 sensors
    46. 46. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators context Accessing Profile operators 13 sensors
    47. 47. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators Intrusion Detector context Accessing Profile operators 13 sensors
    48. 48. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators Intrusion Detector context Accessing Profile operators AccessLog Parser 13 sensors
    49. 49. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators Intrusion Detector context Accessing Profile operators AccessLog Parser AccessLogReader 13 sensors
    50. 50. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators Intrusion Detector context Accessing Profile operators AccessLog IP2Profile Parser AccessLogReader 13 sensors
    51. 51. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators Intrusion Detector context Accessing Profile operators AccessLog IP2Profile Parser AccessLogReader NSLookup 13 sensors
    52. 52. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators Intrusion Detector context Accessing Profile operators AccessLog IP2Profile Parser AccessLogReader NSLookup 13 LDAP sensors
    53. 53. Web Server Monitoring Mailer Logger actuators email(...) log(AccessInfo,Profile) control IntrusionInformer ProfileLogger operators AccessInfo Intrusion Detector (AccessInfo,Profile) context Accessing Profile Profile operators AccessInfo [IPAddress] AccessLog IP2Profile Parser String Profile String [IPAddress] [String] AccessLogReader NSLookup 13 LDAP sensors
    54. 54. context Accessing Profile operators AccessLog IP2Profile Parser 14 sensors
    55. 55. what the architect expresses context Accessing Profile operators AccessLog IP2Profile Parser 14 sensors
    56. 56. what the architect would like to express context Accessing Profile operators AccessLog IP2Profile Parser 14 sensors
    57. 57. what the architect would like to express context Accessing Profile operators AccessLog IP2Profile Parser 14 sensors
    58. 58. what the architect would like to express context Accessing Profile operators AccessLog IP2Profile Parser 14 sensors
    59. 59. what the architect would like to express activation condition context Accessing Profile operators AccessLog IP2Profile Parser 14 sensors
    60. 60. what the architect would like to express data context Accessing requirement Profile operators AccessLog IP2Profile Parser 14 sensors
    61. 61. what the architect would like to express emission context Accessing Profile operators AccessLog IP2Profile Parser 14 sensors
    62. 62. Behavioral Contracts context Accessing Profile operators AccessLog IP2Profile Parser 15 sensors
    63. 63. Behavioral Contracts ⟨ ; ; ⟩ context Accessing Profile operators AccessLog IP2Profile Parser 15 sensors
    64. 64. Behavioral Contracts activation condition ⟨⇑AccessLogParser ; ; ⟩ context Accessing Profile operators AccessLog IP2Profile Parser 15 sensors
    65. 65. Behavioral Contracts activation data condition requirement ⟨⇑AccessLogParser ; ⇓IP2Profile ; ⟩ context Accessing Profile operators AccessLog IP2Profile Parser 15 sensors
    66. 66. Behavioral Contracts activation data emission condition requirement ⟨⇑AccessLogParser ; ⇓IP2Profile ; ⇑self⟩ context Accessing Profile operators AccessLog IP2Profile Parser 15 sensors
    67. 67. Behavioral Contracts context operators IP2Profile NSLookup 16 LDAP sensors
    68. 68. Behavioral Contracts ⟨ ; ; ⟩ context operators IP2Profile NSLookup 16 LDAP sensors
    69. 69. Behavioral Contracts activation condition ⟨⇓self ; ; ⟩ context operators IP2Profile NSLookup 16 LDAP sensors
    70. 70. Behavioral Contracts activation data condition requirement ⟨⇓self ; (⇓NSLookup, ⇓LDAP) ; ⟩ context operators IP2Profile NSLookup 16 LDAP sensors
    71. 71. Behavioral Contracts activation data emission condition requirement ⟨⇓self ; (⇓NSLookup, ⇓LDAP) ; ∅⟩ context operators IP2Profile NSLookup 16 LDAP sensors
    72. 72. Web Server Monitoring Mailer Logger actuators control IntrusionInformer ProfileLogger operators Intrusion Detector context Accessing Profile operators AccessLog IP2Profile Parser AccessLogReader NSLookup 17 LDAP sensors
    73. 73. Mailer Logger actuators 3.Check conformance control IntrusionInformer ProfileLogger operators Intrusion Detector context Accessing Profile operators AccessLog IP2Profile Parser AccessLogReader NSLookup LDAP sensors compiler produces a dedicated programming framework 18
    74. 74. Programming Framework Mailer Logger IntrusionInformer ProfileLogger Intrusion Detector Accessing Profile AccessLog IP2Profile Parser AccessLogReader NSLookup LDAP 19
    75. 75. Programming Framework Mailer Logger IntrusionInformer ProfileLogger Intrusion For each component: Detector • an abstract class Accessing Profile AccessLog IP2Profile Parser AccessLogReader NSLookup LDAP 19
    76. 76. Programming Framework Mailer Logger For each component: IntrusionInformer ProfileLogger • an abstract class Intrusion For each interaction: Detector • an abstract method Accessing Profile AccessLog IP2Profile Parser AccessLogReader NSLookup LDAP 19
    77. 77. Programming Framework For each component: • an abstract class Mailer Logger For each interaction: IntrusionInformer ProfileLogger • an abstract method Intrusion Dedicated support: Detector • interfaces Accessing • proxies Profile • composites AccessLog Parser IP2Profile • discovery • RPC AccessLogReader NSLookup LDAP • ... 19
    78. 78. Accessing Profile AccessLog IP2Profile Parser 20
    79. 79. (AccessInfo,Profile) architecture Accessing Profile AccessInfo Profile [IPAddress] AccessLog ⟨ ; ; ⟩ IP2Profile Parser abstract class AccessingProfile { abstract Pair<AccessInfo,Profile> onNewAccessLogParser(AccessInfo newAccess, IP2ProfileClosure ip2Pro); } framework 20
    80. 80. (AccessInfo,Profile) architecture Accessing Profile AccessInfo Profile [IPAddress] AccessLog ⟨⇑AccessLogParser ; ; ⟩ IP2Profile Parser abstract class AccessingProfile { abstract Pair<AccessInfo,Profile> onNewAccessLogParser(AccessInfo newAccess, IP2ProfileClosure ip2Pro); } framework 20
    81. 81. (AccessInfo,Profile) architecture Accessing Profile AccessInfo Profile [IPAddress] AccessLog ⟨⇑AccessLogParser ; ⇓IP2Profile ; ⟩ IP2Profile Parser abstract class AccessingProfile { abstract Pair<AccessInfo,Profile> onNewAccessLogParser(AccessInfo newAccess, IP2ProfileClosure ip2Pro); } framework 20
    82. 82. (AccessInfo,Profile) architecture Accessing Profile AccessInfo Profile [IPAddress] AccessLog ⟨⇑AccessLogParser ; ⇓IP2Profile ; ⇑self⟩ IP2Profile Parser abstract class AccessingProfile { abstract Pair<AccessInfo,Profile> onNewAccessLogParser(AccessInfo newAccess, IP2ProfileClosure ip2Pro); } framework 20
    83. 83. (AccessInfo,Profile) architecture Accessing Profile AccessInfo Profile [IPAddress] AccessLog ⟨ ; ; ⟩ IP2Profile Parser abstract class AccessingProfile { abstract onNewAccessLogParser(...);} framework class StdAccessingProfile extends AccessingProfile { @Override Pair<AccessInfo,Profile> onNewAccessLogParser(AccessInfo newAccess, IP2ProfileClosure ip2Pro){ Profile profile = ip2Pro.get(newAccess.getHost_ip()); return new Pair<AccessInfo,Profile>(newAccess, profile); } user code 21
    84. 84. (AccessInfo,Profile) architecture Accessing Profile AccessInfo Profile [IPAddress] AccessLog ⟨⇑AccessLogParser ; ⟨ ; ⟩ IP2Profile Parser abstract class AccessingProfile { abstract onNewAccessLogParser(...);} framework class StdAccessingProfile extends AccessingProfile { @Override Pair<AccessInfo,Profile> onNewAccessLogParser(AccessInfo newAccess, IP2ProfileClosure ip2Pro){ Profile profile = ip2Pro.get(newAccess.getHost_ip()); return new Pair<AccessInfo,Profile>(newAccess, profile); } user code 21
    85. 85. (AccessInfo,Profile) architecture Accessing Profile AccessInfo Profile [IPAddress] AccessLog ⟨⇑AccessLogParser ; ⇓IP2Profile ; ⟩ IP2Profile Parser abstract class AccessingProfile { abstract onNewAccessLogParser(...);} framework class StdAccessingProfile extends AccessingProfile { @Override Pair<AccessInfo,Profile> onNewAccessLogParser(AccessInfo newAccess, IP2ProfileClosure ip2Pro){ Profile profile = ip2Pro.get(newAccess.getHost_ip()); return new Pair<AccessInfo,Profile>(newAccess, profile); } user code 21
    86. 86. (AccessInfo,Profile) architecture Accessing Profile AccessInfo Profile [IPAddress] AccessLog ⟨⇑AccessLogParser ; ⇓IP2Profile ; ⇑self⟩ IP2Profile Parser abstract class AccessingProfile { abstract onNewAccessLogParser(...);} framework class StdAccessingProfile extends AccessingProfile { @Override Pair<AccessInfo,Profile> onNewAccessLogParser(AccessInfo newAccess, IP2ProfileClosure ip2Pro){ Profile profile = ip2Pro.get(newAccess.getHost_ip()); return new Pair<AccessInfo,Profile>(newAccess, profile); } user code 21
    87. 87. (AccessInfo,Profile) architecture Accessing Profile AccessInfo Profile [IPAddress] AccessLog ⟨⇑AccessLogParser ; ⇓IP2Profile ; ⇑self⟩ IP2Profile Parser only ways to interact! abstract class AccessingProfile { abstract onNewAccessLogParser(...);} framework class StdAccessingProfile extends AccessingProfile { @Override Pair<AccessInfo,Profile> onNewAccessLogParser(AccessInfo newAccess, IP2ProfileClosure ip2Pro){ Profile profile = ip2Pro.get(newAccess.getHost_ip()); return new Pair<AccessInfo,Profile>(newAccess, profile); } user code 21
    88. 88. Profile [IPAddress] architecture IP2Profile String Profile ⟨ ; ; ⟩ [IPAddress] [String] NSLookup LDAP abstract class IP2Profile { abstract Profile get(IPAddress paramIPAddress, NSLookupClosure nsLookup, LDAPClosure ldap); } framework 22
    89. 89. Profile [IPAddress] architecture IP2Profile String Profile ⟨⇓self ; ; ⟩ [IPAddress] [String] NSLookup LDAP abstract class IP2Profile { abstract Profile get(IPAddress paramIPAddress, NSLookupClosure nsLookup, LDAPClosure ldap); } framework 22
    90. 90. Profile [IPAddress] architecture IP2Profile String Profile ⟨⇓self ; (⇓NSLookup, ⇓LDAP) ; ⟩ [IPAddress] [String] NSLookup LDAP abstract class IP2Profile { abstract Profile get(IPAddress paramIPAddress, NSLookupClosure nsLookup, LDAPClosure ldap); } framework 22
    91. 91. Profile [IPAddress] architecture IP2Profile String Profile ⟨⇓self ; (⇓NSLookup, ⇓LDAP) ; ∅⟩ [IPAddress] [String] NSLookup LDAP abstract class IP2Profile { abstract Profile get(IPAddress paramIPAddress, NSLookupClosure nsLookup, LDAPClosure ldap); } framework 22
    92. 92. Profile [IPAddress] architecture IP2Profile String Profile ⟨ ; ; ⟩ [IPAddress] [String] NSLookup LDAP abstract class IP2Profile { abstract Profile get(...); } framework class StdIP2Profile extends IP2Profile { @Override Profile get(IPAddress paramIPAddress, NSLookupClosure nsLookup, LDAPClosure ldap){ String host = nsLookup.get(paramIPAddress); return ldap.pull(host); } user code } 23
    93. 93. Profile [IPAddress] architecture IP2Profile String Profile ⟨⇓self ; ; ⟩ [IPAddress] [String] NSLookup LDAP abstract class IP2Profile { abstract Profile get(...); } framework class StdIP2Profile extends IP2Profile { @Override Profile get(IPAddress paramIPAddress, NSLookupClosure nsLookup, LDAPClosure ldap){ String host = nsLookup.get(paramIPAddress); return ldap.pull(host); } user code } 23
    94. 94. Profile [IPAddress] architecture IP2Profile String Profile ⟨⇓self ; (⇓NSLookup, ⇓LDAP) ; ⟩ [IPAddress] [String] NSLookup LDAP abstract class IP2Profile { abstract Profile get(...); } framework class StdIP2Profile extends IP2Profile { @Override Profile get(IPAddress paramIPAddress, NSLookupClosure nsLookup, LDAPClosure ldap){ String host = nsLookup.get(paramIPAddress); return ldap.pull(host); } user code } 23
    95. 95. Profile [IPAddress] architecture IP2Profile String Profile ⟨⇓self ; (⇓NSLookup, ⇓LDAP) ; ⟩ [IPAddress] [String] NSLookup LDAP abstract class IP2Profile { abstract Profile get(...); } framework class StdIP2Profile extends IP2Profile { @Override Profile get(IPAddress paramIPAddress, NSLookupClosure nsLookup, LDAPClosure ldap){ String host = nsLookup.get(paramIPAddress); return ldap.pull(host); } user code } 23
    96. 96. Profile [IPAddress] architecture IP2Profile String Profile ⟨⇓self ; (⇓NSLookup, ⇓LDAP) ; ∅⟩ [IPAddress] [String] NSLookup LDAP abstract class IP2Profile { abstract Profile get(...); } framework class StdIP2Profile extends IP2Profile { @Override Profile get(IPAddress paramIPAddress, NSLookupClosure nsLookup, LDAPClosure ldap){ String host = nsLookup.get(paramIPAddress); return ldap.pull(host); } user code } 23
    97. 97. Unpresented Contributions • splash/oopsla 2010 • Formalization of the model • Analysis on the architecture • Architecture refinement • Coordination of data (synchronization / disjunction) 24
    98. 98. A suite of tools 25
    99. 99. DiaSpec a DSL to describe SCC applications device AccessLogReader extends StoppableDevice { source line as String; } context AccessLogParser as Access { source line from AccessLogReader; } context AccessingProfile as IdentifiedAccess { context AccessLogParser; context IP2Profile; } context IP2Profile as Profile indexed by ip as IPAddress { source ip2host from NSLookup; source host2profile from LDAPServer; } controller ProfileLogger { context AccessingProfile; action Log on Logger; } [GPCE’09] 26
    100. 100. A suite of tools device AccessLogReader extends StoppableDevice { source line as String; } a DSL to describe SCC applications context AccessLogParser as Access { source line from AccessLogReader; } context AccessingProfile as IdentifiedAccess { context AccessLogParser; context IP2Profile; } context IP2Profile as Profile indexed by ip as IPAddress { [GPCE’09] source ip2host from NSLookup; source host2profile from LDAPServer; } controller ProfileLogger { context AccessingProfile; action Log on Logger; } 27
    101. 101. DiaSim a simulator with 2D rendering [Mobiquitous’09] + [Demo at PERCOM’09] 28
    102. 102. A suite of tools device AccessLogReader extends StoppableDevice { source line as String; } a DSL to describe SCC applications context AccessLogParser as Access { source line from AccessLogReader; } context AccessingProfile as IdentifiedAccess { context AccessLogParser; context IP2Profile; } context IP2Profile as Profile indexed by ip as IPAddress { [GPCE’09] source ip2host from NSLookup; source host2profile from LDAPServer; } controller ProfileLogger { context AccessingProfile; action Log on Logger; } a simulator with 2D rendering [Mobiquitous’09] + [Demo at PERCOM’09] 29
    103. 103. Pantagruel a graphical language to prototype pervasive computing applications SENSORS CONTROLLERS ACTUATORS showerdoor R3 showerdoor AND state is CLOSED 1 state is OPEN 2 mixingvalve mixingvalve regulate(WARM) R4 run() OR stop() showermotion showermotion detected is true detected is false [DSL’09] + [Demo at PERCOM’10] 30
    104. 104. A suite of tools device AccessLogReader extends StoppableDevice { source line as String; } a DSL to describe SCC applications context AccessLogParser as Access { source line from AccessLogReader; } context AccessingProfile as IdentifiedAccess { context AccessLogParser; context IP2Profile; } context IP2Profile as Profile indexed by ip as IPAddress { [GPCE’09] source ip2host from NSLookup; source host2profile from LDAPServer; } controller ProfileLogger { context AccessingProfile; action Log on Logger; } a simulator with 2D rendering [Mobiquitous’09] + [Demo at PERCOM’09] SENSORS showerdoor CONTROLLERS R3 ACTUATORS showerdoor a graphical language to prototype pervasive computing applications AND state is CLOSED 1 state is OPEN 2 mixingvalve mixingvalve regulate(WARM) R4 run() [DSL’09] + [Demo at PERCOM’10] OR stop() showermotion showermotion detected is true detected is false 31
    105. 105. A suite of tools device AccessLogReader extends StoppableDevice { source line as String; } a DSL to describe SCC applications context AccessLogParser as Access { source line from AccessLogReader; } context AccessingProfile as IdentifiedAccess { context AccessLogParser; context IP2Profile; } context IP2Profile as Profile indexed by ip as IPAddress { [GPCE’09] source ip2host from NSLookup; source host2profile from LDAPServer; } controller ProfileLogger { context AccessingProfile; action Log on Logger; } a simulator with]2D rendering 0 PERC OM+1 ’ [ Dem o at[Mobiquitous’09] [Demo at PERCOM’09] SENSORS showerdoor CONTROLLERS R3 ACTUATORS showerdoor a graphical language to prototype pervasive computing applications AND state is CLOSED 1 state is OPEN 2 mixingvalve mixingvalve regulate(WARM) R4 run() [DSL’09] + [Demo at PERCOM’10] OR stop() showermotion showermotion detected is true detected is false 31
    106. 106. Conclusion • Existing ADLs do not automate conformance checking • Our ADL is dedicated to SCC applications • Implementation is • driven by the framework • correct by construction http://diasuite.inria.fr 32
    107. 107. Conclusion & Future Work • Existing ADLs do not • Architecture-driven automate conformance checking • testing • Our ADL is dedicated to • analysis SCC applications • Non-functional properties [splash’10] • Implementation is • driven by the framework • Validation with a customer • correct by construction • Generalization to other architectural styles http://diasuite.inria.fr 32

    ×