Information Technology Reference
In-Depth Information
it is requested that these inputs are ignored (cf. [1], State Machine, p. 566 ).
We deviate from the behavior specified in the UML standard and only allow
inputs that enable transitions. The reasons for this design choice are among the
following.
- Firstly, we use the input-output conformance relation (IOCO [11]) for test-
ing. This conformance relation enables us to work with partial models, which
is an advantage we want to preserve. Allowing all input events at all times
would make the testing model input complete and disallow the use of several
partial models working on the same inputs for test-case generation. Notice
that IOCO assumes the implementation to be input-enabled.
- Secondly, disallowing inputs that are ignored also has the benefit of shrinking
the state-space, which is an advantage during test-case generation: models of
other demonstrators within the MOGENTES project are significantly more
complex than the car alarm system.
Hence, we limit the OOAS to a non-input-enabled system. Within the OOAS-
code, enabling and disabling of controllables is controlled via flags that are
managed by the
model class.
4.5 Time Triggers
A time triggered transition fires a given amount of time after entering the source
state if the state has not been left before. Object-oriented action systems, as
described, have no notion of time, hence we need to emulate it. We also need to
say that our support of time is restricted to cases of observable, variable delay:
we do not control the SUT via timeouts.
We use an additional action after(t) , which is non-deterministically composed
with the actions representing input from the environment, to mark the observa-
tion of passing time. Notice that we do not allow the waiting time to be split:
two consecutive after(t) may not occur without either the first causing a time
trigger to fire or a controllable action is used between them. This avoids series
of after(t) actions which can be represented by one having a larger t parameter.
The time trigger functionality is realized by managing an ordered list of active
timers. When a state with a leaving time triggered transition is entered, the timer
is registered with the value of the time trigger.
The occurrence of after(t) reduces all timers in the list by the value of t .When
a timer value is reduced to zero this way, the corresponding time trigger event
is added to the event queue of the registered object. To simplify the implemen-
tation, we limit the allowed value of t to the minimum value of all registered
timers. The following pseudo-code sketches the after action.
obs after (c waittime : t time) =
1
requires c waittime > 0 and wait allowed and
2
( len m. get timers () > 0) and (t = min timeout(m. get timers ())):
3
/
update timers and event queue
￿
/
4
end
5
6
7
do
Search WWH ::




Custom Search