-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsatisfiable precondition for setter of opaque field #665
Comments
O1 Ignore comparisons of aggregates in field conditions− The validity of the opaque fields of the serialized message cannot be ensured. O2 Handle opaque fields with comparison to aggregate similar to scalar fieldsTo be able to check the field condition when setting type Field_Dependent_Value (Fld : Virtual_Field := F_Initial) is
record
case Fld is
when F_Initial | F_Final =>
null;
when F_A =>
A_Value : RFLX_Types.Bytes (RFLX_Types.Index'First .. RFLX_Types.Index'First + 1);
end case;
end record; And the value can then be checked in function Field_Condition (Ctx : Context; Val : Field_Dependent_Value) return Boolean is
((case Val.Fld is
when F_Initial =>
True,
when F_A =>
Val.A_Value = (1, 2),
when F_Final =>
False)); − While this works fine for I have already implemented O2, but the resulting implementation does not compile with |
The generated setters for opaque fields cannot be used correctly, if the value of the opaque field is compared to an aggregate in a condition. A field condition has to be fulfilled when setting a field. In case of opaque fields the to be set value is not provided to
Field_Condition
, so that the condition cannot be fulfilled.The text was updated successfully, but these errors were encountered: