Frama-C API - Machine
This module handle the machine configuration. Previous Frama-C versions handled this in Cil
.
State
val self : State.t
Internal state of the machine.
val is_computed : ?project:Project.t -> unit -> bool
Whether current project has set its machine description.
Sizeof getters
Names getters
Alignof getters
Typ/kind getters
val ptrdiff_kind : unit -> Cil_types.ikind
val ptrdiff_type : unit -> Cil_types.typ
val sizeof_kind : unit -> Cil_types.ikind
val sizeof_type : unit -> Cil_types.typ
val wchar_kind : unit -> Cil_types.ikind
val wchar_type : unit -> Cil_types.typ
val uintptr_kind : unit -> Cil_types.ikind
val uintptr_type : unit -> Cil_types.typ
val string_literal_type : unit -> Cil_types.typ
Expansions getters
Other getters
val get_machdep : unit -> Machdep.mach
Compiler
whether we accept empty struct. Implied by msvcMode
and gccMode
, and can be forced by set_acceptEmptyCompinfo
otherwise.
After a call to this function, empty compinfos are allowed by the kernel, this must be used as a configuration step equivalent to a machdep, except that it is not a user configuration.
Note that if the selected machdep is GCC or MSVC, this call has no effect as these modes already allow empty compinfos.
Initializer
val init : initLogicBuiltins:(unit -> unit) -> Machdep.mach -> unit
Call this function to perform some initialization, and only after you have set msvcMode
. initLogicBuiltins
is the function to call to init logic builtins. The Machdep
argument is a description of the hardware platform and of the compiler used.
Forward references
Unless your name is Cil_builtins
, you should not call this.
Deprecated access
type machine = private {
mutable useLogicalOperators : bool;
(*Whether to use the logical operands LAnd and LOr. By default, do not use them because they are unlike other expressions and do not evaluate both of their operands.
*)mutable machdep : Machdep.mach;
(*Machine.init will set this to the current machine description.
*)mutable lowerConstants : bool;
(*Do lower constants (default true)
*)mutable insertImplicitCasts : bool;
(*Do insert implicit casts (default true)
*)mutable stringLiteralType : Cil_types.typ;
mutable upointType : Cil_types.typ;
(*An unsigned integer type that fits pointers.
*)mutable upointKind : Cil_types.ikind;
mutable wcharType : Cil_types.typ;
(*An integer type that fits wchar_t.
*)mutable wcharKind : Cil_types.ikind;
mutable ptrdiffType : Cil_types.typ;
(*An integer type that fits ptrdiff_t.
*)mutable ptrdiffKind : Cil_types.ikind;
mutable typeOfSizeOf : Cil_types.typ;
(*An integer type that is the type of sizeof.
*)mutable kindOfSizeOf : Cil_types.ikind;
}
val theMachine : machine