Fix ElimCompDefInst for nested parameters
The CIF eliminate component def/inst transformation crashes for the following CIF specification:
plant def sensor():
uncontrollable u_on;
location off:
initial; marked;
edge u_on;
end
group def G():
S : sensor();
end
System : G();
plant def O(sensor s):
location absent:
initial; marked;
edge s.u_on;
end
S_hybrid : O(System.S);
When S_hybrid
is instantiated, it needs System.S
as a parameter, if System
is not yet instantiated, then for s.u_on
a CompInstWrapExpression (System, S.u_on)
should be created, to replace the original CompParamWrapExpression (s, u_on)
. However, the transformation assumes such cases do not exist. A similar problem exists for CompParamWrapTypes
.