Biomedical Engineering Reference
In-Depth Information
BOOL Iterate(void)
{
if (Condition 1 ...)
{
if (Event 1 ()
==
TRUE) return TRUE
;
BOOL Iterate(void)
{
if (Event 2 ()
==
TRUE) return TRUE
;
...
}
if (Event 1 ()
TRUE)
return TRUE
==
;
if (Event 2 ()
TRUE)
return TRUE ;
==
if (Condition 2 ...) {
if (Event 4 () == TRUE) return TRUE ;
if (Event 5 () == TRUE) return TRUE ;
...
.
if (Condition m ...) {
if (Event n 1 () ==
.
.
if (Event n () ==
TRUE)
return TRUE
;
/
Signal deadlock
/
TRUE) return TRUE
;
return FALSE
;
if (Event n ()
==
TRUE) return TRUE
;
}
...
/
Signal deadlock
/
return FALSE
;
}
Fig. 7.3
Scheduling architecture
behaviour regarding iteration control may be selected. The INITIALISATION func-
tion is exposed to allow later calls to it by the execution environment, providing a
mechanism for run-time reset of the Event-B machine if required. In the particular
example, the machine is invoked only once and, after initialisation, is iterated contin-
uously without any scheduling constraints until either implicit or explicit deadlock
(i.e. an event having no actions) is detected. Implicit deadlock is flagged as an error
condition, explicit deadlock is treated as normal execution.
In the C and C++ languages ...
void
main ( void )
{
i f (
INITIALISATION ()==TRUE
){
do{
Iterate ();
}while (! kbhit ());
}
}
In the C# language ...
public
static
void
Main()
{
M1_VOOR
objM1_VOOR
=
new M1_VOOR ( ) ;
i f (
objM1_VOOR . INITIALISATION ()== t r u e
){
for ( i n t
n=0;n<=1000;n++){
Search WWH ::




Custom Search