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.
17. compiler
builds a programming framework which
• guides the implementation
• provides high-level support
• ensures conformance
7
18. compiler
dedicated to
the application
builds a programming framework which
• guides the implementation
• provides high-level support
• ensures conformance
7
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. Our Approach
an ADL
+
generation of a dedicated
programming framework
8
21. Our Approach
a domain-specific ADL
+
generation of a dedicated
programming framework
8
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
29. The Domain
Sense/Compute/Control applications (SCC)
environment
context
operators
raw data sensors Sense
11
30. The Domain
Sense/Compute/Control applications (SCC)
environment
context
operators
Compute
raw data sensors Sense
11
31. The Domain
Sense/Compute/Control applications (SCC)
control
operators
context environment
data
context
operators
Compute
raw data sensors Sense
11
32. The Domain
Sense/Compute/Control applications (SCC)
orders actuators
control
operators
context environment
data
context
operators
Compute
raw data sensors Sense
11
33. The Domain
Sense/Compute/Control applications (SCC)
orders actuators
control
operators
context environment
data
context
operators
Compute
raw data sensors Sense
11
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. The Domain
orders actuators
control
operators
context
data
context
operators
raw data sensors
12
36. The Domain
actuators
orders
control
operators
context
data
context
operators
raw data
sensors
12
37. The Domain
actuators
control
operators
context
operators
12 sensors
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. 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. 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
97. Unpresented
Contributions
• splash/oopsla 2010
• Formalization of the model
• Analysis on the architecture
• Architecture refinement
• Coordination of data (synchronization / disjunction)
24
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. 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. DiaSim
a simulator with 2D rendering
[Mobiquitous’09] + [Demo at PERCOM’09]
28
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. 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. 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. 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. 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. 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
Editor's Notes
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