Leveraging Software Architecturesto Guide and Verify the Development of Sense/Compute/Control Applications<br />Damien Cas...
Contributions<br />A design language to specify a software system<br />A compiler to process such specification for<br /> ...
Sense/Compute/Control (SCC)Software System<br />Environment<br />Compute<br />Sense<br />3<br />Control<br />
4<br />Sense/Compute/Control (SCC)Software System<br />aileron, engine<br />Control<br />Compute<br />direction<br />Sense...
5<br />Sense/Compute/Control (SCC)Software System<br />alarm triggering<br />Control<br />Environment<br />Compute<br />in...
Found in various domains<br /><ul><li>avionics
home automation
tier-system monitoring
robotics
…</li></ul>6<br />Sense/Compute/Control (SCC)Software Systems<br />Environment<br />[Taylor et al., Software Architecture:...
The SCC Architectural Style<br />sources<br />sensors<br />actuators<br />actions<br />orders<br />control<br />operators<...
The SCC Architectural Style<br />8<br />sources<br />actuators<br />sensors<br />actions<br />Control<br />orders<br />con...
9<br />Environment<br />Interface<br />Application <br />Logic<br />sources<br />actuators<br />sensors<br />actions<br />...
10<br />The SCC Architectural Style<br />control<br />operators<br />Information use<br />Information refinement<br />cont...
Going Beyond the SCC Style<br />11<br />  Our approach<br /><ul><li>a design language
a compiler</li></ul>  Objectives<br />to verify safety properties<br />to guide implementation<br />to ensure conformance<...
Compiling a Design<br />Design<br />Language<br />abstract<br />Design<br />concrete<br />Design<br />12<br />
Compiling a Design<br />Design<br />Language<br />abstract<br />generated<br />Design<br />Compiler<br />Software system<b...
Compiling a Design<br />Design<br />Language<br />abstract<br />generated<br />Design<br />Compiler<br />Software system<b...
Compiling a Design<br />Design<br />Language<br />abstract<br />generated<br />Software system<br />Design<br />Compiler<b...
Our Approach<br />Design language<br />GPL<br />Compiler<br />Design<br />GPL<br />programming<br />framework<br />develop...
Our Approach<br />verification<br />Developer’s code<br />Compiler<br />Programming<br />framework<br />Design<br />17<br />
Our Approach<br />verification<br />Developer’s code<br />Compiler<br />Programming<br />framework<br />Design<br />18<br />
Our Approach<br />verification<br />by construction<br />Developer’s code<br />Compiler<br />Programming<br />framework<br...
20<br />Diving Into the Design Language<br />sources<br />actuators<br />sensors<br />actions<br />alarm<br />triggering<b...
21<br />sources<br />actuators<br />sensors<br />actions<br />control<br />operators<br />context<br />operators<br />
22<br />sources<br />actuators<br />sensors<br />actuators<br />actions<br />control<br />operators<br />control<br />oper...
design language dedicated to SCC<br />actuators<br />context Intrusion as Boolean {<br />  context BuildingLocked;<br />  ...
24<br />keycode<br />motion<br />Keypad<br />MotionSensor<br />actuators<br />control<br />operators<br />Boolean<br />Int...
25<br />keycode<br />motion<br />Keypad<br />MotionSensor<br />Alarm<br />actuators<br />OnOff<br />control<br />operators...
keycode<br />motion<br />image<br />Alarm<br />Mailer<br />Keypad<br />Keypad<br />MotionSensor<br />Camera<br />actuators...
actuators<br />control<br />operators<br />context<br />operators<br />27<br />Intrusion<br />Presence<br />Building<br />...
28<br />Interaction Description<br />event<br />3<br />Intrusion<br />Intrusion<br />request<br />event<br />2<br />Presen...
29<br />Interaction Description<br />event<br />3<br />Intrusion<br />request<br />too abstract!<br />event<br />2<br />1<...
Interaction Contracts<br />1<br />request<br />Main<br />1<br />Activation condition<br />30<br />
Interaction Contracts<br />source<br />Sensor<br />3<br />event<br />Main<br />1<br />Activation condition<br />event<br /...
Interaction Contracts<br />3<br />Intrusion<br />1<br />Activation condition<br />context Intrusion asBoolean {<br />  con...
Compiling a Design<br />33<br />Developer’s code<br />Programming<br />framework<br />Compiler<br />Design<br />
Programming Framework<br />The compilermaps<br /><ul><li>each component description to an abstract class implementing the ...
each interaction contract to an abstract method constrained with type declarations</li></ul>34<br />
Programming Framework<br />35<br />Compiler<br />Programming<br />framework<br />Design<br />Activation condition<br />Int...
 parameters
 return type</li></ul>1<br />1<br />Data requirement<br />2<br />1<br />2<br />3<br />Emission<br />3<br />3<br />
Code Generation<br />36<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />37<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />38<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />39<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />40<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />41<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />42<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />43<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />44<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />45<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Code Generation<br />46<br />Alarm<br />Mailer<br />controller IntrusionManager{<br />  context Intrusion;<br />  contextS...
Implementation<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br />   boolean intrusion, S...
Implementation<br />48<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusio...
Implementation<br />49<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusio...
Implementation<br />50<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusio...
Implementation<br />51<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusio...
Implementation<br />52<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusio...
Implementation<br />53<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusio...
Implementation<br />54<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusio...
Implementation<br />55<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusio...
Implementation<br />56<br /><ul><li>  do not require any documentation
  leverage code completion</li></ul>classIntrusionManagerextendsAbstractIntrusionManager {<br />  ActionsonIntrusion(boole...
Upcoming SlideShare
Loading in …5
×

Leveraging Software Architectures to Guide and Verify the Development of Sense/Compute/Control Applications

803 views
723 views

Published on

Slides of the presentation I gave at ICSE'11 in Hawaii. The paper is available on my website: http://damiencassou.seasidehosting.st/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
803
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Software architectures have long been used as a way to make software design explicit. However, these architectures are barely leveraged to guide subsequent phases of a software development cycle. In this work, we propose to leverage software architectures for the implementation and verification phases
  • SCC applications are applications that interact with an external environment
  • In this pattern, sensors…Interactions between these components are restricted.Explain that it separates the logic and the environment handling
  • In this style, sensors…Interactions between these components are restricted
  • In this style, sensors…Interactions between these components are restricted
  • In this style, sensors…Interactions between these components are restricted
  • The pattern guides the architect in describing his application. We want to go further and use this description to guide…
  • REQUEST + EVENT
  • CONFORMANCE
  • Leveraging Software Architectures to Guide and Verify the Development of Sense/Compute/Control Applications

    1. 1. Leveraging Software Architecturesto Guide and Verify the Development of Sense/Compute/Control Applications<br />Damien Cassou1,2, Emilie Balland1, Charles Consel1, Julia Lawall3<br />1Phoenix, INRIA, France<br />2Software Architecture Group, HPI, Germany<br />3APL, DIKU, Denmark<br />
    2. 2. Contributions<br />A design language to specify a software system<br />A compiler to process such specification for<br /> the verification of safety properties<br /> the guidance of the implementation<br /> the conformance<br />2<br />Context: Sense/Compute/Control software systems<br />
    3. 3. Sense/Compute/Control (SCC)Software System<br />Environment<br />Compute<br />Sense<br />3<br />Control<br />
    4. 4. 4<br />Sense/Compute/Control (SCC)Software System<br />aileron, engine<br />Control<br />Compute<br />direction<br />Sense<br />GPS, flight plan<br />
    5. 5. 5<br />Sense/Compute/Control (SCC)Software System<br />alarm triggering<br />Control<br />Environment<br />Compute<br />intrusion?<br />Sense<br />motion detection<br />
    6. 6. Found in various domains<br /><ul><li>avionics
    7. 7. home automation
    8. 8. tier-system monitoring
    9. 9. robotics
    10. 10. …</li></ul>6<br />Sense/Compute/Control (SCC)Software Systems<br />Environment<br />[Taylor et al., Software Architecture: Foundations, Theory, and Practice, 2009]<br />
    11. 11. The SCC Architectural Style<br />sources<br />sensors<br />actuators<br />actions<br />orders<br />control<br />operators<br />Environment<br />refined information<br />context<br />operators<br />raw data<br />7<br />[Chen et al., Context aggregation and dissemination in ubiquitous computing, WMCSA’02]<br />[Edwards et al., Architecture-driven self-adaptation and self-management in robotics, SEAMS’09]<br />
    12. 12. The SCC Architectural Style<br />8<br />sources<br />actuators<br />sensors<br />actions<br />Control<br />orders<br />control<br />operators<br />Sense<br />Environment<br />Compute<br />refined information<br />context<br />operators<br />raw data<br />
    13. 13. 9<br />Environment<br />Interface<br />Application <br />Logic<br />sources<br />actuators<br />sensors<br />actions<br />control<br />operators<br />Environment<br />context<br />operators<br />
    14. 14. 10<br />The SCC Architectural Style<br />control<br />operators<br />Information use<br />Information refinement<br />context<br />operators<br />
    15. 15. Going Beyond the SCC Style<br />11<br /> Our approach<br /><ul><li>a design language
    16. 16. a compiler</li></ul> Objectives<br />to verify safety properties<br />to guide implementation<br />to ensure conformance<br />
    17. 17. Compiling a Design<br />Design<br />Language<br />abstract<br />Design<br />concrete<br />Design<br />12<br />
    18. 18. Compiling a Design<br />Design<br />Language<br />abstract<br />generated<br />Design<br />Compiler<br />Software system<br />defeats guidance and verification<br />concrete<br />Design<br />13<br />
    19. 19. Compiling a Design<br />Design<br />Language<br />abstract<br />generated<br />Design<br />Compiler<br />Software system<br />mixes design and implementation<br />generated<br />concrete<br />Software System<br />Design<br />Compiler<br />14<br />
    20. 20. Compiling a Design<br />Design<br />Language<br />abstract<br />generated<br />Software system<br />Design<br />Compiler<br />generated<br />Compiler<br />Software System<br />Design<br />generated<br />concrete<br />Software System<br />Design<br />Compiler<br />15<br />
    21. 21. Our Approach<br />Design language<br />GPL<br />Compiler<br />Design<br />GPL<br />programming<br />framework<br />developer’s code<br />16<br />
    22. 22. Our Approach<br />verification<br />Developer’s code<br />Compiler<br />Programming<br />framework<br />Design<br />17<br />
    23. 23. Our Approach<br />verification<br />Developer’s code<br />Compiler<br />Programming<br />framework<br />Design<br />18<br />
    24. 24. Our Approach<br />verification<br />by construction<br />Developer’s code<br />Compiler<br />Programming<br />framework<br />Design<br />19<br />
    25. 25. 20<br />Diving Into the Design Language<br />sources<br />actuators<br />sensors<br />actions<br />alarm<br />triggering<br />control<br />operators<br />Environment<br />intrusion?<br />context<br />operators<br />motion<br />detection<br />
    26. 26. 21<br />sources<br />actuators<br />sensors<br />actions<br />control<br />operators<br />context<br />operators<br />
    27. 27. 22<br />sources<br />actuators<br />sensors<br />actuators<br />actions<br />control<br />operators<br />control<br />operators<br />context<br />operators<br />context<br />operators<br />sensors<br />
    28. 28. design language dedicated to SCC<br />actuators<br />context Intrusion as Boolean {<br /> context BuildingLocked;<br /> context Presence;<br />}<br />control<br />operators<br />23<br />Boolean<br />Intrusion<br />context<br />operators<br />Boolean<br />Boolean<br />Presence<br />Building<br />Locked<br />sensors<br />
    29. 29. 24<br />keycode<br />motion<br />Keypad<br />MotionSensor<br />actuators<br />control<br />operators<br />Boolean<br />Intrusion<br />context<br />operators<br />Boolean<br />Boolean<br />Presence<br />Building<br />Locked<br />Boolean<br />Integer<br />sensors<br />
    30. 30. 25<br />keycode<br />motion<br />Keypad<br />MotionSensor<br />Alarm<br />actuators<br />OnOff<br />control<br />operators<br />IntrusionManager<br />controller IntrusionManager{<br /> context Intrusion;<br /> action OnOff on Alarm;<br />}<br />Intrusion<br />Boolean<br />Boolean<br />Presence<br />Building<br />Locked<br />Boolean<br />Integer<br />sensors<br />
    31. 31. keycode<br />motion<br />image<br />Alarm<br />Mailer<br />Keypad<br />Keypad<br />MotionSensor<br />Camera<br />actuators<br />OnOff<br />Send<br />UpdateSt<br />control<br />operators<br />IntrusionManager<br />SecurityManager<br />Boolean<br />Intrusion<br />File<br />context<br />operators<br />Boolean<br />Boolean<br />Scene<br />Image<br />Presence<br />Building<br />Locked<br />26<br />File<br />Boolean<br />Integer<br />sensors<br />
    32. 32. actuators<br />control<br />operators<br />context<br />operators<br />27<br />Intrusion<br />Presence<br />Building<br />Locked<br />sensors<br />
    33. 33. 28<br />Interaction Description<br />event<br />3<br />Intrusion<br />Intrusion<br />request<br />event<br />2<br />Presence<br />Building<br />Locked<br />1<br />Building<br />Locked<br />Presence<br />multiple<br />interpretations<br />event<br />1<br />request<br />3<br />Intrusion<br />Intrusion<br />request<br />event<br />2<br />request<br />request<br />1<br />2<br />Building<br />Locked<br />Building<br />Locked<br />2<br />Presence<br />Presence<br />
    34. 34. 29<br />Interaction Description<br />event<br />3<br />Intrusion<br />request<br />too abstract!<br />event<br />2<br />1<br />Building<br />Locked<br />Presence<br />multiple<br />interpretations<br />event<br />1<br />request<br />3<br />Intrusion<br />Intrusion<br />request<br />event<br />2<br />request<br />request<br />1<br />2<br />Building<br />Locked<br />Building<br />Locked<br />2<br />Presence<br />Presence<br />
    35. 35. Interaction Contracts<br />1<br />request<br />Main<br />1<br />Activation condition<br />30<br />
    36. 36. Interaction Contracts<br />source<br />Sensor<br />3<br />event<br />Main<br />1<br />Activation condition<br />event<br />2<br />Data requirement<br />1<br />request<br />2<br />3<br />Emission<br />2<br />request<br />Context<br />Operator3<br />Context<br />Operator2<br />31<br />
    37. 37. Interaction Contracts<br />3<br />Intrusion<br />1<br />Activation condition<br />context Intrusion asBoolean {<br /> context Presence;<br /> context BuildingLocked;<br /> interaction {<br /> whenprovided Presence<br /> get BuildingLocked<br /> maybepublish<br /> }<br />}<br />2<br />Data requirement<br />2<br />1<br />32<br />3<br />Emission<br />Building<br />Locked<br />Presence<br />1<br />2<br />3<br />
    38. 38. Compiling a Design<br />33<br />Developer’s code<br />Programming<br />framework<br />Compiler<br />Design<br />
    39. 39. Programming Framework<br />The compilermaps<br /><ul><li>each component description to an abstract class implementing the run-time support
    40. 40. each interaction contract to an abstract method constrained with type declarations</li></ul>34<br />
    41. 41. Programming Framework<br />35<br />Compiler<br />Programming<br />framework<br />Design<br />Activation condition<br />Interaction contract <br /> Abstract method<br /><ul><li> name
    42. 42. parameters
    43. 43. return type</li></ul>1<br />1<br />Data requirement<br />2<br />1<br />2<br />3<br />Emission<br />3<br />3<br />
    44. 44. Code Generation<br />36<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    45. 45. Code Generation<br />37<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    46. 46. Code Generation<br />38<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    47. 47. Code Generation<br />39<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    48. 48. Code Generation<br />40<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    49. 49. Code Generation<br />41<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    50. 50. Code Generation<br />42<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    51. 51. Code Generation<br />43<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    52. 52. Code Generation<br />44<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    53. 53. Code Generation<br />45<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    54. 54. Code Generation<br />46<br />Alarm<br />Mailer<br />controller IntrusionManager{<br /> context Intrusion;<br /> contextSceneImage;<br /> interaction {<br /> whenprovided Intrusion<br /> getSceneImage<br /> do OnOff on Alarm,Send on Mailer<br /> }<br />}<br />OnOff<br />Send<br />IntrusionManager<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />abstractclassAbstractIntrusionManager {<br />abstract Actions onIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />protectedfinalclass Actions { … }<br /> protectedfinalclass Select { … }<br /> protectedfinalclassSceneImage { … }<br /> }<br />generated framework code<br />
    55. 55. Implementation<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />}<br />47<br />Alarm<br />Mailer<br />OnOff<br />Send<br />IntrusionManager<br />generated framework code<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    56. 56. Implementation<br />48<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />}<br />OnOff<br />Send<br />IntrusionManager<br />generated framework code<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    57. 57. Implementation<br />49<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />}<br />OnOff<br />Send<br />IntrusionManager<br />generated framework code<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    58. 58. Implementation<br />50<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />}<br />OnOff<br />Send<br />IntrusionManager<br />generated framework code<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    59. 59. Implementation<br />51<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />}<br />OnOff<br />Send<br />IntrusionManager<br />generated framework code<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    60. 60. Implementation<br />52<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />}<br />OnOff<br />Send<br />IntrusionManager<br />generated framework code<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    61. 61. Implementation<br />53<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />}<br />OnOff<br />Send<br />IntrusionManager<br />generated framework code<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    62. 62. Implementation<br />54<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />}<br />OnOff<br />Send<br />IntrusionManager<br />generated framework code<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    63. 63. Implementation<br />55<br />Alarm<br />Mailer<br />abstractclassAbstractIntrusionManager {<br />abstract ActionsonIntrusion(<br /> boolean intrusion, SceneImagesceneImage, Select select);<br />}<br />OnOff<br />Send<br />IntrusionManager<br />generated framework code<br />Boolean<br />File<br />Intrusion<br />Scene<br />Image<br />classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    64. 64. Implementation<br />56<br /><ul><li> do not require any documentation
    65. 65. leverage code completion</li></ul>classIntrusionManagerextendsAbstractIntrusionManager {<br /> ActionsonIntrusion(boolean intrusion, SceneImagesceneImage, Select select){<br />if (intrusion) {<br /> Actions actions;<br /> actions = select.alarms().all().on();<br /> Mailer mailer = select.mailers().anyOne();<br /> File image = sceneImage.get();<br />actions.add(mailer.send(“Intrusion !”, “admin”, image));<br />return actions;<br /> }<br />}<br />developer code<br />
    66. 66. Summary<br />A design language dedicated to specifying SCC software systems<br />A compiler to process such specification for<br /> the guidance of the implementation<br /> the conformance<br />57<br />
    67. 67. Status Report<br />Implementation using standard language tools<br />Java, ANTLR, StringTemplate<br />Safety property verification<br />generation of Promela specifications<br />e.g., interaction invariants<br />Several application domains<br />avionics: simulated auto-pilot and AR drone<br />building automation: light, fire, security, newscast, etc.<br />misc.: web-server monitoring, home messenger, etc.<br />Ongoing empirical evaluation with both students and professional software engineers<br />http://diasuite.inria.fr<br />Damien Cassou, Emilie Balland, Charles Consel, Julia Lawall<br />
    68. 68. 59<br />
    69. 69. Facilitating Evolution<br />eases developer’s work by<br />showing mismatches<br />leveraging development tools<br />ensures conformance<br />60<br />
    70. 70. Productivity<br />61<br />➡ 76% actually executed<br />
    71. 71. Code Generation<br />3<br />boolean<br />motion<br />MotionSensor<br />Presence<br />1<br />2<br />3<br /><⇑MotionSensor.motion; ⇓MotionSensor.motion; ⇑ self > <br />boolean<br />1<br />2<br />abstractclassAbstractPresence {<br />abstractbooleanonMotionFromMotionSensor(<br /> boolean motion, Select select);<br />}<br />62<br />1<br />2<br />3<br />1<br />generated framework code<br />
    72. 72. Implementation<br />3<br />boolean<br />motion<br />MotionSensor<br />Presence<br />2<br />boolean<br />1<br />abstractclassAbstractPresence {<br />abstractbooleanonNewMotionFromMotionSensor(<br /> boolean motion, Select select);<br />}<br />generated framework code<br />class Presence extendsAbstractPresence {<br /> booleanonMotionFromMotionSensor(boolean motion, Select select) {<br />if (motion)<br />return true;<br />MotionSensors sensors = select.motionSensors().all();<br />for (MotionSensor sensor : sensors)<br />if (sensor.getMotion())<br />return true;<br />return false;<br /> }<br />}<br />developer code<br />63<br />
    73. 73. A Research Vehicle<br />This work is part of a larger research project with<br />7 PhDs leveraging the frameworks<br />QoS (FASE’11)<br />security (ICPS’09, DAIS’11)<br />error-handling (OOPSLA’10)<br />virtual testing (Mobiquitous’10 and ‘09)<br />SIP (ICC’10, ICIN’09, IPTComm’08)<br />end-user programming (DSLWC’09)<br />64<br />
    74. 74. Limitations<br />Applies only to new projects<br />Applies only to Sense/Compute/Control<br />Requires architects to learn a new language<br />Imposes small run-time overhead<br />65<br />

    ×