The structure TypedValue presents a lack of information for Union and Record types.
Considering the following example where MyRecord1 and MyRecord2 are two records characterized by different structure:
types
MyUnion = MyRecord1 | MyRecord2
at C code level is not possible to distinguish between the two types by checking the type field (both are characterized by type=VDM_RECORD).
Possible solution: Add a new field to TypedValue containing the name of the type (alias = 'MyRecord1' and alias='MyRecord2').
The structure
TypedValuepresents a lack of information for Union and Record types.Considering the following example where
MyRecord1andMyRecord2are two records characterized by different structure:at C code level is not possible to distinguish between the two types by checking the
typefield (both are characterized bytype=VDM_RECORD).Possible solution: Add a new field to
TypedValuecontaining the name of the type (alias = 'MyRecord1'andalias='MyRecord2').