module Usedef: sig
.. end
compute use/def information
compute use/def information
module VS: Cil_datatype.Varinfo.Set
val getUseDefFunctionRef : (Cil_types.exp ->
Cil_types.exp list -> VS.t * VS.t * Cil_types.exp list)
Pervasives.ref
Set this global to how you want to handle function calls.
This also returns a modified argument list which will be used for the
purpose of Use analysis, in case you have a function that needs special
treatment of its args.
val considerVariableUse : (Cil_types.varinfo -> bool) Pervasives.ref
Say if you want to consider a variable use. This applies to
variable reads only; see also considerVariableAddrOfAsUse
val considerVariableDef : (Cil_types.varinfo -> bool) Pervasives.ref
Say if you want to consider a variable def
val considerVariableAddrOfAsUse : (Cil_types.varinfo -> bool) Pervasives.ref
Say if you want to consider a variable addrof as a use
: (Cil_types.exp -> VS.t) Pervasives.ref
Return any vars that should be considered "used" by an expression,
other than the ones it refers to directly. Deputy uses this for
variables in Cast annotations.
val onlyNoOffsetsAreDefs : bool Pervasives.ref
val ignoreSizeof : bool Pervasives.ref
Should we ignore the contents of sizeof and alignof?
val varUsed : VS.t Pervasives.ref
val varDefs : VS.t Pervasives.ref
class useDefVisitorClass :
(
object
Inherits
method vvrbl : Cil_types.varinfo -> Cil_types.varinfo Cil.visitAction
this will be invoked on variable definitions only because we intercept
all uses of variables in expressions !
method vlval : Cil_types.lval -> Cil_types.lval Cil.visitAction
If onlyNoOffsetsAreDefs is true, then we need to see the
varinfo in an lval along with the offset. Otherwise just
DoChildren
method vexpr : Cil_types.exp -> Cil_types.exp Cil.visitAction
method vinst : Cil_types.instr -> Cil_types.instr list Cil.visitAction
end
:
object ... end
)
val useDefVisitor : useDefVisitorClass
val computeUseExp : ?acc:VS.t -> Cil_types.exp -> VS.t
Compute the use information for an expression (accumulate to an existing
set)
val computeUseDefInstr : ?acc_used:VS.t ->
?acc_defs:VS.t -> Cil_types.instr -> VS.t * VS.t
Compute the use/def information for an instruction
val computeUseDefStmtKind : ?acc_used:VS.t ->
?acc_defs:VS.t -> Cil_types.stmtkind -> VS.t * VS.t
Compute the use/def information for a statement kind. Do not descend into
the nested blocks.
val computeDeepUseDefStmtKind : ?acc_used:VS.t ->
?acc_defs:VS.t -> Cil_types.stmtkind -> VS.t * VS.t
val computeUseLocalTypes : ?acc_used:VS.t -> Cil_types.fundec -> VS.t