Top Banner
Leveraging Software Architectures to Guide and Verify the Development of Sense/Compute/Control Applications Damien Cassou 1,2 , Emilie Balland 1 , Charles Consel 1 , Julia Lawall 3 1 Phoenix, INRIA, France 2 Software Architecture Group, HPI, Germany 3 APL, DIKU, Denmark
65

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

Jan 28, 2015

Download

Technology

Damien Cassou

Slides of the presentation I gave at ICSE'11 in Hawaii. The paper is available on my website: http://damiencassou.seasidehosting.st/
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Leveraging Software Architectures to Guide and Verify the Development of Sense/Compute/Control Applications

Leveraging Software Architecturesto Guide and Verify the Development of

Sense/Compute/Control Applications

Damien Cassou1,2, Emilie Balland1, Charles Consel1, Julia Lawall3

1Phoenix, INRIA, France2Software Architecture Group, HPI, Germany

3APL, DIKU, Denmark

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

2

Contributions

• A design language to specify a software system

• A compiler to process such specification for– the verification of safety properties– the guidance of the implementation– the conformance

Context: Sense/Compute/Co

ntrol software systems

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

3

Sense

Compute

Sense/Compute/Control (SCC)Software System

Environment

Control

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

4

GPS, flight plan

direction

aileron, engine

Sense

Compute

Control

Sense/Compute/Control (SCC)Software System

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

5

Environment

motion detection

intrusion?

alarm triggering

Sense

Compute

Control

Sense/Compute/Control (SCC)Software System

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

6

Found in various domains• avionics• home automation• tier-system monitoring• robotics• …

Environment

Sense/Compute/Control (SCC)Software Systems

[Taylor et al., Software Architecture: Foundations, Theory, and Practice, 2009]

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

contextoperators

sensorssources

actuatorsactions

Environment

The SCC Architectural Style

controloperators

raw data

refined information

orders

7[Edwards et al., Architecture-driven self-adaptation and self-management in robotics, SEAMS’09][Chen et al., Context aggregation and dissemination in ubiquitous computing, WMCSA’02]

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

8

The SCC Architectural Style

actuatorsactions

sensorssources

contextoperators

controloperators

Compute

Environment

raw data

refined information

orders

Sense

Control

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

9

actuatorsactions

sensorssources

contextoperators

controloperators

Environment

Application Logic

EnvironmentInterface

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

10

contextoperators

controloperators Information use

Information refinement

The SCC Architectural Style

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

11

Going Beyond the SCC Style

Objectives– to verify safety properties– to guide implementation– to ensure conformance

Our approach

– a design language– a compiler

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

DesignLanguage

abstract

concrete

Design

Design

Compiling a Design

12

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

Design

Design

Compiling a Design

Compiler Software systemgenerated

defeats guidance and verification

13

DesignLanguage

abstract

concrete

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

Design

Design

Compiling a Design

Compiler Software system

Compiler Software System

generated

mixes design and

implementation

generated

14

DesignLanguage

abstract

concrete

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

Compiling a Design

Design Compiler Software System

generated

Design Compiler Software systemgenerated

Design Compiler Software System

generated

15

DesignLanguage

abstract

concrete

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

Our Approach

Design Compiler

16

programmingframework

developer’s code GPL

Design language

GPL

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

Our Approach

Design Compiler

17

verification

Programmingframework

Developer’s code

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

Our Approach

Design Compiler Programmingframework

18

verification

Developer’s code

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

Our Approach

Design Compiler

19

verification

by

construction

Programmingframework

Developer’s code

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

20

Environment

motiondetection

intrusion?

alarmtriggering

Diving Into the Design Language

actuatorsactions

contextoperators

controloperators

sensorssources

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

21

controloperators

actuatorsactions

contextoperators

sensorssources

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

22

actuatorsactions

contextoperators

controloperators

sensorssources

actuators

sensors

controloperators

contextoperators

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

23

actuators

sensors

controloperators

contextoperators

Intrusion

Boolean

PresenceBuildingLocked

BooleanBoolean

context Intrusion as Boolean { context BuildingLocked; context Presence;}

design language dedicated to SCC

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

24

actuators

sensors

controloperators

contextoperators

Intrusion

Boolean

PresenceBuildingLocked

BooleanBoolean

Keypadkeycode

MotionSensormotion

Integer Boolean

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

25

actuators

sensors

controloperators

Intrusion

PresenceBuildingLocked

BooleanBoolean

Keypadkeycode

MotionSensormotion

Integer Boolean

IntrusionManager

AlarmOnOff

controller IntrusionManager { context Intrusion; action OnOff on Alarm;}

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

26

actuators

sensors

controloperators

contextoperators

SecurityManager

PresenceBuildingLocked

SceneImage

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

KeypadUpdateSt

Keypadkeycode

MotionSensormotion

Cameraimage

Boolean

BooleanBoolean

Integer Boolean File

File

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

27

actuators

controloperators

contextoperators

sensors

PresenceBuildingLocked

Intrusion

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

28Presence

BuildingLocked

Intrusion

PresenceBuildingLocked

Intrusion

multipleinterpretations

PresenceBuildingLocked

Intrusion

Interaction Description

request

event

eventrequest

event

request

request

request

event

1

1

2

2

2

2

1

3

3

PresenceBuildingLocked

Intrusion

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

29

too abstract!

Interaction Description

multipleinterpretations

PresenceBuildingLocked

Intrusion

PresenceBuildingLocked

Intrusion

PresenceBuildingLocked

Intrusionrequest

event

eventrequest

event

request

request

request

event

1

1

2

2

2

2

1

3

3

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

Main

Interaction Contracts

1 Activation condition

30

1request

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

Main

Interaction Contracts

3 Emission

2 Data requirement

1 Activation condition

ContextOperator3

2 request

Sensor

source

2request

3 event

1

event

ContextOperator2

31

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

Interaction Contracts

1 Activation condition

2 Data requirement

PresenceBuildingLocked

Intrusion

12

32

3 Emission3

context Intrusion as Boolean { context Presence; context BuildingLocked; interaction { when provided Presence get BuildingLocked maybe publish }}

123

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

33

Compiling a Design

Design Compiler Programmingframework

Developer’s code

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

Programming Framework

The compiler maps• each component description to an abstract class

implementing the run-time support

• each interaction contract to an abstract method constrained with type declarations

34

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

Programming Framework

35

1 Activation condition

2 Data requirement

3 Emission

Interaction contract Abstract method• name• parameters• return type

1

1 2 3

3

Design Compiler Programmingframework

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

36

Code Generation

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

37

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

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

38

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

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

39

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

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

40

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

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

41

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

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

42

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

43

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

44

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

45

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

46

abstract class AbstractIntrusionManager {

abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);

protected final class Actions { … } protected final class Select { … } protected final class SceneImage { … } }

Code Generation

generated framework

code

controller IntrusionManager { context Intrusion; context SceneImage; interaction { when provided Intrusion get SceneImage do OnOff on Alarm, Send on Mailer }}

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

47

Implementationabstract class AbstractIntrusionManager { abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);}

generated framework code

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

48

Implementationabstract class AbstractIntrusionManager { abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);}

generated framework code

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

49

Implementationabstract class AbstractIntrusionManager { abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);}

generated framework code

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

50

Implementationabstract class AbstractIntrusionManager { abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);}

generated framework code

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

51

Implementationabstract class AbstractIntrusionManager { abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);}

generated framework code

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

52

Implementationabstract class AbstractIntrusionManager { abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);}

generated framework code

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

53

Implementationabstract class AbstractIntrusionManager { abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);}

generated framework code

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

54

Implementationabstract class AbstractIntrusionManager { abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);}

generated framework code

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

55

Implementationabstract class AbstractIntrusionManager { abstract Actions onIntrusion( boolean intrusion, SceneImage sceneImage, Select select);}

generated framework code

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

Intrusion

IntrusionManager

AlarmOnOff

MailerSend

SceneImage

Boolean File

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

56

Implementation

class IntrusionManager extends AbstractIntrusionManager { Actions onIntrusion(boolean intrusion, SceneImage sceneImage, Select select) {

if (intrusion) { Actions actions; actions = select.alarms().all().on(); Mailer mailer = select.mailers().anyOne(); File image = sceneImage.get(); actions.add(mailer.send(“Intrusion !”, “admin”, image)); return actions; }}

developer code

• do not require any documentation• leverage code completion

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

57

Summary

• A design language dedicated to specifying SCC software systems

• A compiler to process such specification for– the guidance of the implementation– the conformance

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

Status Report• Implementation using standard language tools

– Java, ANTLR, StringTemplate

• Safety property verification– generation of Promela specifications– e.g., interaction invariants

• Several application domains– avionics: simulated auto-pilot and AR drone– building automation: light, fire, security, newscast, etc.– misc.: web-server monitoring, home messenger, etc.

• Ongoing empirical evaluation with both students and professional software engineers

http://diasuite.inria.frDamien Cassou, Emilie Balland, Charles Consel, Julia Lawall

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

59

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

60

Facilitating Evolution

• eases developer’s work by– showing mismatches– leveraging development tools

• ensures conformance

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

61

Productivity

82%

10%

8%

FrameworkImplementationSpecification

➡ 76% actually executed

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

62

Code Generation< MotionSensor.motion; MotionSensor.motion; self > ⇑ ⇓ ⇑

abstract class AbstractPresence {

abstract boolean onMotionFromMotionSensor( boolean motion, Select select);

}

1 2 3Presence

MotionSensor

motion

1 2

3

boolean

boolean

generated framework

code

1

1

23

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

63

MotionSensor

motion

ImplementationPresence

1 2

3

boolean

boolean

class Presence extends AbstractPresence { boolean onMotionFromMotionSensor(boolean motion, Select select) { if (motion) return true; MotionSensors sensors = select.motionSensors().all(); for (MotionSensor sensor : sensors) if (sensor.getMotion()) return true; return false; }}

developer code

abstract class AbstractPresence { abstract boolean onNewMotionFromMotionSensor( boolean motion, Select select);} generated

framework code

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

64

A Research Vehicle

This work is part of a larger research project with– 7 PhDs leveraging the frameworks

• QoS (FASE’11)• security (ICPS’09, DAIS’11)• error-handling (OOPSLA’10)• virtual testing (Mobiquitous’10 and ‘09)• SIP (ICC’10, ICIN’09, IPTComm’08)• end-user programming (DSLWC’09)

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

65

Limitations

• Applies only to new projects

• Applies only to Sense/Compute/Control

• Requires architects to learn a new language

• Imposes small run-time overhead