Ada Code Generation : Main Task—Partition and Flow Control for Ada : Activating the Generated Modules (the “State Machines”)

Activating the Generated Modules (the “State Machines”)

LO_MAIN is a GENERATED procedure, that “glues’ together all the specific modules as partitioned by the compilation-profile. Since LO_MAIN refers to specific procedures, it differs between different models:

procedure LO_MAIN is
begin
<module1>_EXEC_ALL;
<module2>_EXEC_ALL;
........
<moduleN>_EXEC_ALL;
end
 
Note: The LO_MAIN is actually the scheduler of the generated components. It applies a fair non-prioritized round-robin scheduling policy, similar to the interpretive simulator. However, it is possible to introduce priority scheduling by modifying this module.