Biomedical Engineering Reference
In-Depth Information
Fig. 7.2
Event scheduling
2. Sequential : A sequential organisation of the event functions is used to call event
functions into a new function, in the same order, defined by their position in
the Event-B model. It is not providing any kind of optimisation in the calling
function.
Event scheduling phase is used to synthesise all target language functions. All
these target language functions are equivalent to Event-B events. We propose two
techniques to trigger all the translated events. First is calling a function “ Iterate
that implements a continuous iteration of translated target programming language
functions of the Event-B model, in the same order, defined by their position in the
Event-B model. Second technique is to optimise the calling order of the events. Op-
timisation approach schedules calling target language functions using a refinement
approach. An incremental refinement-based structure of events within the Event-B
models exploits to recursively generate nesting calling functions corresponding to
the abstract events. Abstract level guards are forming a group of concrete events.
Each group of events are triggered by a main “ Iterate ” function. This technique is
used to improve run-time performance wherever at the concrete level has several
events. In the sequential order of calling event functions in the “ Iterate ” function
invokes every calling function in a sequential order. Whenever guards are satisfied
by invoked event function, then the function executes and when guards are not true ,
then the next calling function invokes in a sequential way. Main disadvantage of
this technique is that, when a translated code has a lot of calling functions ( > 50),
then the every function consumes some memory as well as time for invoking a
function. While in an optimised way, to make a group of calling functions, which
automatically reduces time and memory consumption during invocation of the “ It-
erate ” function. A scheduling structure (see Fig. 7.3 ) shows a calling order of event
functions in the “ Iterate ” function.
Finally, top-level main function of a target programming language is generated
to call the generated functions “INITIALISATION” and “Iterate”. The only proce-
dural requirement is the calling of “INITIALISATION” prior to “Iterate”. All other
Search WWH ::




Custom Search