Module IR.Sil
Programs and Types
type if_kind=Kind of prune instruction
type instr_metadata=|Abstract of IBase.Location.ta good place to apply abstraction, mostly used in the biabduction analysis
|CatchEntry of{try_id : int;loc : IBase.Location.t;}entry of C++ catch blocks
|ExitScope of Var.t list * IBase.Location.tremove temporaries and dead program variables
|Nullify of Pvar.t * IBase.Location.tnullify stack variable
|Skipno-op
|TryEntry of{try_id : int;loc : IBase.Location.t;}entry of C++ try block
|TryExit of{try_id : int;loc : IBase.Location.t;}exit of C++ try block
|VariableLifetimeBegins of Pvar.t * Typ.t * IBase.Location.tstack variable declared
val compare_instr_metadata : instr_metadata -> instr_metadata -> int
type instr=|Load of{id : Ident.t;e : Exp.t;root_typ : Typ.t;typ : Typ.t;loc : IBase.Location.t;}Load a value from the heap into an identifier.
id = *exp:typ(root_typ)whereexpis an expression denoting a heap addresstypis typ ofexpandidroot_typis the root type ofexp
The
root_typis deprecated: it is broken in C/C++. We are removingroot_typin the future, so please usetypinstead.|Store of{e1 : Exp.t;root_typ : Typ.t;typ : Typ.t;e2 : Exp.t;loc : IBase.Location.t;}Store the value of an expression into the heap.
*exp1:typ(root_typ) = exp2whereexp1is an expression denoting a heap addresstypis typ of*exp1andexp2root_typis the root type ofexp1exp2is the expression whose value is stored.
The
root_typis deprecated: it is broken in C/C++. We are removingroot_typin the future, so please usetypinstead.|Prune of Exp.t * IBase.Location.t * bool * if_kindprune the state based on
exp=1, the boolean indicates whether true branch|Call of Ident.t * Typ.t * Exp.t * (Exp.t * Typ.t) list * IBase.Location.t * CallFlags.tCall ((ret_id, ret_typ), e_fun, arg_ts, loc, call_flags)represents an instructionret_id = e_fun(arg_ts);|Metadata of instr_metadatahints about the program that are not strictly needed to understand its semantics, for instance information about its original syntactic structure
An instruction.
val equal_instr : instr -> instr -> boolval skip_instr : instrval instr_is_auxiliary : instr -> boolCheck if an instruction is auxiliary, or if it comes from source instructions.
val location_of_instr : instr -> IBase.Location.tGet the location of the instruction
val if_kind_to_string : if_kind -> stringPretty print an if_kind
val pp_instr_metadata : IStdlib.Pp.env -> F.formatter -> instr_metadata -> unitval pp_instr : print_types:bool -> IStdlib.Pp.env -> F.formatter -> instr -> unitPretty print an instruction.
val d_instr : instr -> unitDump an instruction.