If two components from different leaves of the composition tree communicate with each other through port bindings and channels the XSTS ort transformer creates multiple local variables.
The reason: in the above case the 2 statecharts are transformed, then their containing component. Said component will also merge the ort actions, creating local variables. This step concludes by writing back the value of the local variable to the global one.
local var _p1_ : ...
local var _p2_ : ...
...
p1 := _p1_
p2 := _p2_
When the root sync component is transformed, it finds the local->global write, and assumes we need a new local variable, since it is accessed. Thus, it creates a new local version of the global variable.
If two components from different leaves of the composition tree communicate with each other through port bindings and channels the XSTS ort transformer creates multiple local variables.
The reason: in the above case the 2 statecharts are transformed, then their containing component. Said component will also merge the
ort
actions, creating local variables. This step concludes by writing back the value of the local variable to the global one.When the root sync component is transformed, it finds the local->global write, and assumes we need a new local variable, since it is accessed. Thus, it creates a new local version of the global variable.