ROOM
- OO ADL - UML is a relative
- Distributed real-time systems with reactive behavior -
systems where objects need to respond to events in a timely manner.
- Executable - useful for modeling
- Two levels of specification - Schematic (architectural) and
Detail (implementation)
ROOM basic elements
- event - message received at an object (associated name and
optional data object).
- protocol - ordered sequence of invocation/replies between two
objects - protocol classes can be defined - protocol classes can be defined
- actor - concurrent object responsible for performing some task.
ROOM protocols

ROOM Modelling Structure
- Concurrent Actors - act in parallel with other actors.
- Actor types - defined by the set of interfaces.
- Actors communicate via ports which represent an instance of a protocol
class. Ports are intermediaries between the implementation and environment.
- Actors can simultaneously handle multiple different protocols.
- Structural Replication of ports/actors
ROOM Actors

ROOM Composition: Binding
- Models a communication channel that connects two ports.
- ``Compatible'' protocols assumed - one must be the inverse of the other.

ROOM Composition: Layer connections
- Directed relationships to model situations where
there is an asymmetric dependency between two actors.
(ex: client/server - the client cannot function without
the server)
- Often represent many different service access point
(SAPSs) to service provision points (SPPs)

ROOM containment: Aggregation
- grouping actors - hiding the structure.
- Relay ports move messages from external to internal

- Multiple containment

ROOM OO features
- Actors can be subclasses
- Ports can be subclasses

ROOM Dynamic Features
- Optional actors - not created until needed. May
have slots for imported actors

- Substitutable actors - actual actor not instantited
until later - must meet the constraints imposed by the
interface.

ROOM behavior
- Structure and behavior meets at the actor interfaces.
- Behavior associated with actors - ROOMcharts based
on Harel StateCharts (1984)
RoomCharts

StateCharts
- Used for reactive systems - telecommunications, embedded
systems, control plants
- Multiple views: module, activity, behavior
- Behavior based on extension of FSMs and events
- hierarchical structure (AND-/OR-decomposition)
- Variables (incorporated into the events)
- Executable - code generation techniques
- Dynamic analysis - evaluate scenarios, deadlock, reachability, usage of transitions
StateChart FSMs
Transitions: alpha [C]/ beta
where alpha is the triggering event
C is a conditions that guards the event
beta is the action carried out when the transition is taken
Example:
entered(S)[in(T) and not active (C)]/
suspend(C); X := Y + 7
|
Referring To | Events | Conditions | Actions |
|
state | entered(S) | in(S) | |
|
S | exited(S) | | |
|
| started(A) | active(A) | start(A) |
|
activity | stopped(A) | hanging(A) | stop(A) |
|
A | | | suspend(A) |
|
| | | resume(A) |
|
data item | read(D) | D=F | D:=exp |
|
D,F | written(D) | D < F | |
|
condition | true(C) | D > F | make_true(C) |
|
C | false(C) | . . . | make_false(C) |
|
event E, action | timeout(E,) | schedule(A,n) | |
|
A, n time units | | | |
|
|
ROOM/StateChart References
- Selic, B., Gullekson, G., and Ward, P., Real-Time Object-Oriented Modeling, John Wiley & Sons, New York, NY, 1994.
- Selic, B., Modeling Real-Time Distributed Software Systems,
Proceedings of the 4th Workshop on Parallel and Distributed Real-time
Systems, 1996, pp. 11-18.
- Harel, D., Lachover, H., Naamad, A., Pnueli, A., Politi, M.,
Sherman, R., Shtull-Trauring, A., and Takhtenbrot, M.,
STATEMATE: A Working Environment for the Development of Complex
Reactive Systems.
IEEE Transactions on Software Engineering, 16,4, April 1990, pp. 403-414.
CHAM -- CHemical Abstract Machine
- Developed in theoretical CS for defining a generalized
computational model
- Chemical metaphor - inherently parallel
- A CHAM is specified by defining molecules m , m'
. . . (basic elements), solutions S , S' . . . (multisets - states
of the CHAM) of molecules and transformations S --> S'
dictating the way that solutions can evolve.
CHAM Software Architectures
- description of the syntax by which components of the architecture
(i.e. molecules) can be represented;
- a solution representing the intial state of the architecture;
- set of reaction rules describing how the components interact to
achieve the dynamic behavior of the system.
The Compressing Proxy
- merges gzip utility with HTTP server to improve performance
over slow networks
- Pseudo-filter is an adaptor for mismatch between Unix i/o and CERN HTTP filters

Problem
- Behavior
- Adaptor passes data to gzip as it receives it.
- When all data read, Adaptor reads results from gzip
- More subtle mismatch:
- gzip tries to write intermediate results, blocking until it
can be received.
- Adaptor tries to write new information to gzip blocking
until it can be received.
- Deadlock
CHAM Molecules
M ::= P | C | E | M ^ M
P ::= CFu | CFd | AD | GZ Components
C ::= i(N) | o(N) Communication channels
N ::= 1 | 2 | 3 | 4
E ::= eof-i | eof-o Control signals
CHAM Solutions
Initial Solution:
S0 = CFu ^ o(3) ,
CFd ^ i(4) ,
i(1) ^ eof-i ^ o(2) ^ eof-o ^ GZ,
i(3) ^ o(1) ^ eof-o ^ AD
Example:
- AD is initially in the state of consuming data on channel 3. Then
it can produce data on channel 1, generate the appropriate eof and be done.
- GZ will initiall get input from channel one until it receive eof. Then it will output on channel 2 and generate eof.
CHAM Laws
- General laws
- Reaction Law. An instance of the right-hand side of a rule can
replace the corresponding instance on its left-hand side. Given
M1,M2,. . .,Mk--> M'1,M'2,. . .,M'l , if
m1,m2,. . .,mk and m'1,m'2,. . .,m'l are instances of M{1..k} and M'{1..l} then we can apply the rule to
the current solution.
- Chemical Law. Reactions can be performed freely within any
solution:
S --> S' ==> S U S'' --> S' U S''
- Architecture Specific Laws
- [ T1 ] == i(x) ^ m1, o(x) ^ m2
--> m1 ^ i(x), m2 ^ o(x)
- [ T2 ] == e ^ m ^ c -->
c ^ e ^ m
- [ T3 ] == eof-o ^ m1 ^ o(x), eof-i ^ m2 ^ i(x) --> m1 ^ o(x) ^ eof-o , m2 ^ i(x) ^ eof-i
- [ T4 ] == eof-i ^ m --> m ^ eof-i
- [ T5 ] == GZ ^ m --> m ^ GZ
- [ T6 ] == f ^ c --> c ^ f
- [ T7 ] == AD ^ i(3) ^ m
--> i(2) ^ eof-i ^ o(4) ^
AD
- [ T8 ] == AD ^ i(2) ^ m
--> i(3) ^ o(1) ^ eof-o ^ AD
where m,m1,m2 in M, x in N, c in C, e in E,f in F
Applying rules
S0 = CFu ^ o(3) ,
CFd ^ i(4) ,
i(1) ^ eof-i ^ o(2) ^ eof-o ^ GZ,
i(3) ^ o(1) ^ eof-o ^ AD
S0 -->{T6} S1 , where
S1 = o(3) ^ CFu ,
CFd ^ i(4),
i(3) ^ o(1) ^ eof-o ^ AD,
i(1) ^ eof-i ^ o(2) ^ eof-o ^ GZ
S1 -->{T1} S2 , where
S2 = CFu ^ o(3) ,
CFd ^ i(4),
o(1) ^ eof-o ^ AD ^ i(3)
i(1) ^ eof-i ^ o(2) ^ eof-o ^ GZ
S2 -->{T1} S3 , where
S3 = CFu ^ o(3) ,
CFd ^ i(4),
eof-o ^ AD ^ i(3) ^ o(1)
eof-i ^ o(2) ^ eof-o ^ GZ ^ i(1)
At this point, T2 , T3 or T4 can occur nondeterministically.