Module Cabs2cil


module Cabs2cil: sig .. end
NDC added command line parameter. Turn on tranformation that forces correct parameter evaluation order

val convFile : Cabs.file -> Cil_types.file
val forceRLArgEval : bool Pervasives.ref
NDC added command line parameter. Turn on tranformation that forces correct parameter evaluation order
val nocil : int Pervasives.ref
Set this integer to the index of the global to be left in CABS form. Use -1 to disable
val allowDuplication : bool Pervasives.ref
Indicates whether we're allowed to duplicate small chunks of code.
val typeForInsertedVar : (Cil_types.typ -> Cil_types.typ) Pervasives.ref
A hook into the code that creates temporary local vars. By default this is the identity function, but you can overwrite it if you need to change the types of cabs2cil-introduced temp variables.
val typeForInsertedCast : (Cil_types.exp -> Cil_types.typ -> Cil_types.typ -> Cil_types.typ)
Pervasives.ref
Like typeForInsertedVar, but for casts. typeForInsertedCast expr original_type destination_type returns the type into which expr, which has type original_type and whose type must be converted into destination_type, must be casted.

By default, returns destination_type.

This applies only to implicit casts. Casts already present in the source code are exempt from this hook.

val fresh_global : string -> string
fresh_global prefix creates a variable name not clashing with any other globals and starting with prefix

CEA-LRI: exports for logic typing
val prefix : string -> string -> bool
Check that s starts with the prefix p.
val annonCompFieldName : string
val conditionalConversion : Cil_types.typ -> Cil_types.typ -> Cil_types.typ
val arithmeticConversion : Cil_types.typ -> Cil_types.typ -> Cil_types.typ
val integralPromotion : Cil_types.typ -> Cil_types.typ
val blockInitializer : Cilutil.LvalSet.t ->
Cil_types.varinfo ->
Cabs.init_expression -> Cil_types.block * Cil_types.init * Cil_types.typ
val blockInit : Cil_types.lval -> Cil_types.init -> Cil_types.typ -> Cil_types.block
Returns a block of statements equivalent to the initialization init applied to lvalue lval of type typ.
val mkAddrOfAndMark : Cil_types.lval -> Cil_types.exp
Applies mkAddrOf after marking variable whose address is taken.
val setDoTransformWhile : unit -> unit
If called, sets a flag so that continue in while loops get transformed into forward gotos, like it is already done in do-while and for loops.
val setDoAlternateConditional : unit -> unit
If called, sets a flag so that translation of conditionals does not result in forward ingoing gotos (from the if-branch to the else-branch).
val setDoAlternateAssign : unit -> unit
If called, sets a flag so that translation of assignments as sub-expressions returns the right-hand-side rather than the left-hand-side.