package codex
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=bc7266a140c6886add673ede90e335d3
sha512=8da42c0ff2c1098c5f9cb2b5b43b306faf7ac93b8f5ae00c176918cee761f249ff45b29309f31a05bbcf6312304f86a0d5a000eb3f1094d3d3c2b9b4c7f5c386
doc/codex.types/Types/TypedC/index.html
Module Types.TypedCSource
TypedC: Grammar for describing the types for the type-based domain, and operations on concrete types.
type structure = {st_byte_size : Units.In_bytes.t;st_members : (Units.In_bytes.t * string * typ) list;
}and descr = | Void| Base of basic(*Base types. Note that even if they have a name, they are not a definition (e.g., you cannot have pointers to byte.
*)| Structure of structure| StructureFAM of {}(*Structure with flexible array member, decomposed as fix prefix * array.
*)| Ptr of pointer(*Todo: we should always have a size (possibly an existentially-qualified variable).
*)| Array of typ * array_length(*Arguments: element type, and the number of elements, if statically known.
*)| Function of funtyp| Application of name(*∃ bound_var : bound_typ, inner
*)| Existential of {}| Union of union| Weak of typ
and constr_name = | ConstrName of string| ConstrNameFunc of string| ConstrNameUnion of string| ConstrNameStruct of string| ConstrNameEnum of string| ConstrNameArray of constr_name
Called type name in OOPSLA, but is the name of a family of region names when there are arguments.
Each constr_name is associated to a unique id and arity to give a constr.
equiv a b returns true if it can show that a is a subtype of b and b is a subtype a.
contains t u determines whether t contains u. (Definition: t contains u iff t = u or a component of t (e.g. a structure member) contains u.
Returns the size of the type (in bytes), if possible
These functions allow to update or query the binding from type names to types.
Unroll the definitions of a type (i.e. replace a name with the corresponding type)
Substitutes the symbolic variables in the type typ by the corresponding expressions in bindings
Additionnal functions used for type domains
Maps a name to a type constructor.
find the constr_def associated to a constr, or None if none.
print the constructor map, for debug purposes.
print all the stored maps, for debug purposes
Retrieve the type associated to a function name, or None if there is none.
Retrieve the type associated to a function name, and whether it was declared inline; or None if not found.
print the function map, for debug purposes.
Retrieve the type associated to a function name, or None if not found.
print the function map, for debug purposes.