Contains(a.FunctionSymbol))
{
try
{ o = InvokeStepper(a); }
catch (Exception e)
{ return new TestResult(k,Verdict.Failure,e.Message,trace); }
}}}}
if (strategy.IsInAcceptingState)
return new TestResult(k,Verdict.Success,"",trace);
else
return new TestResult(k,Verdict.Failure,
"Did not finish in accepting state", trace);
}
Figure 16.6. Extension of the algorithm in Figure 12.7 with observable actions.
270 Reactive Systems
tester actions enabled and when the observation queue is empty. The default name
of a wait action is "Wait", which can be customized using the waitAction option
of ct. A wait action takes one integer argument that specifies the amount of time
in milliseconds, called an observation time-out. The conformance tester uses the
observation time-out to wait for an observable action to arrive.
The simplest way to define a state independent wait action is to use a finite state
machine (FSM) model program and to compose it with the main model program.
The following FSM, say Wait20, specifies a 20-ms observation time-out:
FSM(0,AcceptingStates(0),Transitions(t(0,Wait(20),0)))
The time-out action is an observable action without arguments. It happens if
the observation queue is empty after executing a wait action. This results in a
conformance failure, unless the time-out action is enabled in the model program.
The default name of the time-out action is "Timeout", which can be customized using
the timeoutAction option of ct.
Pages:
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355