Module InferModules.JContext
type jump_kind=|Next|Jump of int|Exitdata structure for representing whether an instruction is a goto, a return or a standard instruction.
module NodeTbl : InferStdlib.IStd.Caml.Hashtbl.S with type NodeTbl.key = InferIR.Procdesc.Node.tHastable for storing nodes that correspond to if-instructions. These are used when adding the edges in the contrl flow graph.
type icfg={tenv : InferIR.Tenv.t;cfg : InferIR.Cfg.t;}data structure for saving the three structures tht contain the intermediate representation of a file: the type environment, the control graph and the control flow graph
type t= private{icfg : icfg;procdesc : InferIR.Procdesc.t;impl : Sawja_pack.JBir.t;mutable var_map : (InferIR.Pvar.t * InferIR.Typ.t * InferIR.Typ.t) Sawja_pack.JBir.VarMap.t;if_jumps : int NodeTbl.t;goto_jumps : (int, jump_kind) InferStdlib.IStd.Caml.Hashtbl.t;cn : Javalib_pack.JBasics.class_name;source_file : InferBase.SourceFile.t;program : JClasspath.program;}data structure for storing the context elements.
val create_context : icfg -> InferIR.Procdesc.t -> Sawja_pack.JBir.t -> Javalib_pack.JBasics.class_name -> InferBase.SourceFile.t -> JClasspath.program -> tcretes a context for a given method.
val get_tenv : t -> InferIR.Tenv.treturns the type environment that corresponds to the current file.
val add_if_jump : t -> InferIR.Procdesc.Node.t -> int -> unitadds to the context the line that an if-node will jump to
val get_if_jump : t -> InferIR.Procdesc.Node.t -> int optionreturns whether the given node corresponds to an if-instruction
val add_goto_jump : t -> int -> jump_kind -> unitadds to the context the line that the node in the given line will jump to.
val get_goto_jump : t -> int -> jump_kindif the given line corresponds to a goto instruction, then returns the line where it jumps to, otherwise returns the next line.
val is_goto_jump : t -> int -> boolreturns whether the given line corresponds to a goto instruction.
val set_pvar : t -> Sawja_pack.JBir.var -> InferIR.Typ.t -> InferIR.Pvar.tset_pvar context var typeadds a variable with a type to the context
val get_var_type : t -> Sawja_pack.JBir.var -> InferIR.Typ.t optionget_var_type context varreturns the type of the variable, if the variable is in the context
val reset_pvar_type : t -> unitresets the dynamic type of the variables in the context.
val reset_exn_node_table : unit -> unitresets the hashtable mapping methods to their exception nodes
val add_exn_node : InferIR.Typ.Procname.t -> InferIR.Procdesc.Node.t -> unitadds the exception node for a given method