The EXEC procedure is actually the heart of the behavioral logic as described in the statecharts. Every non-basic state has an EXEC procedure that activates all the state-logic within a single execution cycle. The EXEC procedure takes care of in state transition, static reactions, and activation of substate EXEC procedures. The traversal is done hierarchically, starting at the very top state in the module and going down towards the basic states. In case of an AND-state, the orthogonal components are traversed sequentially one after the other.
procedure EXEC_BARRIER is
begin
case BARRIER_isin is
when NORMAL =>
if FAIL_PERMANENT then
exit_NORMAL;
BARRIER_isin := DAMAGED;
else
EXEC_NORMAL;
end if;
when DAMAGED =>
. . .
end case ;
end EXEC_BARRIER ;