package goblint-cil

  1. Overview
  2. Docs
val convFile : Cabs.file -> Cil.file

The main entry point

val forceRLArgEval : bool Stdlib.ref

Turn on tranformation that forces correct parameter evaluation order

val silenceLongDoubleWarning : bool Stdlib.ref

By default, we warn as large constants cannot be appropriately represented as OCaml floats. This can be set to true by tools that are aware of this problem and only use the string component of CReal to avoid emitting warnings that are spurious in that context.

val nocil : int Stdlib.ref

Set this integer to the index of the global to be left in CABS form. Use -1 to disable

val addNestedScopeAttr : bool Stdlib.ref

Add an attribute to all variables which are not declared at the top scope, so tools building on CIL can know which variables were pulled up. Should be disabled when printing CIL code, as compilers will warn about this attribute.

val allowDuplication : bool Stdlib.ref

Indicates whether we're allowed to duplicate small chunks of code.

val doCollapseCallCast : bool Stdlib.ref

If false, the destination of a Call instruction should always have the same type as the function's return type. Where needed, CIL will insert a temporary to make this happen.

If true, the destination type may differ from the return type, so there is an implicit cast. This is useful for analyses involving malloc, because the instruction "T* x = malloc(...);" won't be broken into two instructions, so it's easy to find the allocation type.

This is false by default. Set to true to replicate the behavior of CIL 1.3.5 and earlier.

val cacheGlobals : bool Stdlib.ref

Disables caching of globals during parsing. This is handy when we want to parse additional source files without hearing about confclits.

val typeForTypeof : (Cil.typ -> Cil.typ) Stdlib.ref

A hook into the code for processing typeof.

val typeForInsertedVar : (Cil.typ -> Cil.typ) Stdlib.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.typ -> Cil.typ) Stdlib.ref

Like typeForInsertedVar, but for casts. Casts in the source code are exempt from this hook.

val typeForCombinedArg : ((string, string) Stdlib.Hashtbl.t -> Cil.typ -> Cil.typ) Stdlib.ref

A hook into the code that merges arguments in function types.

val attrsForCombinedArg : ((string, string) Stdlib.Hashtbl.t -> Cil.attributes -> Cil.attributes) Stdlib.ref

A hook into the code that merges arguments in function attributes.

val allTempVars : unit Inthash.t
type envdata =
  1. | EnvVar of Cil.varinfo
  2. | EnvEnum of Cil.exp * Cil.typ
  3. | EnvTyp of Cil.typ
  4. | EnvLabel of string
    (*

    A hashtable containing a mapping of variables, enums, types and labels to varinfo, typ, etc.

    *)
val environment : (string, envdata * Cil.location) Stdlib.Hashtbl.t
val genvironment : (string, envdata * Cil.location) Stdlib.Hashtbl.t
val convStandaloneExp : genv:(string, envdata * Cil.location) Stdlib.Hashtbl.t -> env:(string, envdata * Cil.location) Stdlib.Hashtbl.t -> Cabs.expression -> Cil.exp option
val currentFunctionFDEC : Cil.fundec Stdlib.ref
val integralPromotion : Cil.typ -> Cil.typ

c.f. ISO 6.3.1.1

val arithmeticConversion : Cil.typ -> Cil.typ -> Cil.typ

c.f. ISO 6.3.1.8

val doBinOp : Cil.binop -> Cil.exp -> Cil.typ -> Cil.exp -> Cil.typ -> Cil.typ * Cil.exp

Construct Cil.exp.BinOp with correct implicit casts inserted.

OCaml

Innovation. Community. Security.