Frama-C:
Plug-ins:
Libraries:

Frama-C API - Types

Types, or type-related information.

The two functions below are suitable for use in functor Logic_typing.Make

val mem_enum_tag : string -> bool
  • returns

    true iff there is an enum constant with the given name in the AST.

  • since 22.0-Titanium
val find_enum_tag : string -> Cil_types.exp * Cil_types.typ

Find an enum constant from its name in the AST.

  • raises Not_found

    when no such constant exists.

val mem_type : Logic_typing.type_namespace -> string -> bool
  • returns

    true iff there is a type with the given name in the given namespace in the AST.

  • since 22.0-Titanium
val find_type : Logic_typing.type_namespace -> string -> Cil_types.typ

Find a type from its name in the AST.

  • raises Not_found

    when no such type exists.

val iter_types : (string -> Cil_types.typ -> Logic_typing.type_namespace -> unit) -> unit

Iteration on named types (typedefs, structs, unions, enums). The first argument is the name of type.

Find the global that defines the corresponding type.

  • raises Not_found

    if no such type has been defined.

  • since Magnesium-20151001