Information Technology Reference
In-Depth Information
4.4
Input / Output
There is no canonical form to express borders of a system and I/O across these
borders in UML. For our purposes, we use a self-defined, minimal UML profile,
providing the class stereotypes <<system under test>> and <<environment>>
as we have already shown in Fig. 1. Classes without one of these stereotypes are
considered to be part of the SUT.
There are several ways of communication between the SUT and its environ-
ment classes:
Incoming signals. In UML, incoming signals are modeled by signal receptions
either in the SUT class or in an interface implemented by the SUT class. The
latter is used for signals not directly handled by the SUT class but delegated
to another class. In the OOAS code, this is modeled by a controllable action
that puts the signal event into the event queues of all objects registered as
listeners on this signal.
Outgoing signals. Outgoing signals are modeled as signal receptions in the
environment classes in the UML model. In the OOAS code, this is mapped
to an observable action that is called when the signal sending occurs.
Outgoing calls. In UML, outgoing calls are modeled as methods of environ-
ment classes (like the setOn / setOff methods in the Car Alarm System). In
the OOAS this is mapped to a call of an observable action. If the callee has
a return value, the observable action is directly followed by a controllable
action.
Incoming calls. Incoming calls are modeled as method invocations of the SUT
class in UML. In the OOAS this is reflected by a call of a controllable action.
If the callee has a return value, the controllable action is directly followed
by an observable action.
The classes in the OOAS directly derived from classes in the UML model are
accompanied by two additional classes: model and environment .The model
class is put before the SUT class in a prioritized composition and provides house-
keeping functionality like distributing broadcast signals and time triggers (see
next subsection). The environment class is put after the SUT class in a priori-
tized composition in the SAB and contains all the controllable actions like signal
receptions. The system assembling block for the CAS is shown below.
1 /
all definitions before
/
system
2
model // AlarmSystem //
environment
3
External inputs are put last in the OOAS execution because internal opera-
tions are assumed to happen in zero time steps and therefore would always be
completed before the next input can happen - resulting in a run-to-completion
behavior.
One important semantical difference between the behavior of the OOAS- and
the UML model concerns the handling of input events that do not enable any
transition in the current state of the state-machine. In the UML standard for
state-machines (this is a semantic variation point for protocol state-machines)
 
Search WWH ::




Custom Search