Scalar types represented by complex structure #1254
Labels
generator
Related to generator package (SPARK code generation)
model
Related to model package (e.g., model verification)
specification
Related to specification package (e.g., specification parsing)
Context and Problem Statement
There are cases where a scalar value (usually an integer) is represented by a complex structure. One example would be variable-length integers (#8). While some of these constructs are representable with the current means, their handling is cumbersome. That is caused by the fact that a single logical entity (like the Tag type or the Length in the ASN.1 BER encoding) cannot be represented as a single message field. In each place where such a logical entity is used, a differentiation between the possible variants is required to determine which message field for the desired value must be actually accessed.
Another example would be the ASN.1 BER encoding, where each message and each message field is represented by a TLV structure. Using the generated code to serialize such a message would require to determine and set the values of the Tag and the Length for each field manually, which gets very cumbersome for nested messages.
Use Cases
Design
Examples
(see also example specifications on
issue_8
branch)The text was updated successfully, but these errors were encountered: