maestro
maestro copied to clipboard
Array type copy does not copy type
When cloning the type here: https://github.com/INTO-CPS-Association/maestro/blob/2.0.0-alpha/plugins/fixedstep/src/main/java/org/intocps/maestro/plugin/FixedStep.java#L82
(compDecl.get().getType().clone()
)
the type does not contain the size of the array. This leads to the following MaBL:
FMI2Component[] fix_components[AIntLiteralExp] = { wtInstance , crtlInstance };
The reason is, that the parsing of an array does not set the size on the type (AARRAYTYPE
) of the vardecl.
Witness test:
I have fixed it manually by varDecl.setSize((List<? extends PExp>) compDecl.get().getSize().clone());
in order to progress, but it does not fixing the parsing issue.
I actually think it is wrong to have size as a property on arraytype.