Theory CTypesDefs
theory CTypesDefs
imports
CTypesBase
begin
section "C types setup"
type_synonym field_name = string
type_synonym qualified_field_name = "field_name list"
type_synonym typ_name = string
text ‹A ‹typ_desc› wraps a ‹typ_struct› with a typ name.
A ‹typ_struct› is either a Scalar, with size, alignment and either a
field description (for ‹typ_info›) or a 'normalisor'
(for ‹typ_uinfo›), or an Aggregate, with a list of ‹typ_desc›,
field name, and field descripton (for the complete sub-structure) or unit
(for ‹typ_uinfo›). The field description for aggregates is an extension of
the original work of H. Tuch. It is used to make the construction of a new structure from
nested structures / arrays more efficient. Properties like commutation of fields can
be expressed and proven for the toplevel fields only, without having to re-examine the
nested leafs of the tree.
›