Module IR.Procdesc
Per-procedure CFG
module NodeKey : sig ... endmodule Node : sig ... endnode of the control flow graph
module IdMap : IStdlib.PrettyPrintable.PPMap with type PPMap.key = Node.idMap with node id keys.
module NodeHash : IStdlib.IStd.Caml.Hashtbl.S with type NodeHash.key = Node.tHash table with nodes as keys.
module NodeMap : IStdlib.IStd.Caml.Map.S with type NodeMap.key = Node.tMap over nodes.
module NodeSet : IStdlib.IStd.Caml.Set.S with type NodeSet.elt = Node.tSet of nodes.
val append_locals : t -> ProcAttributes.var_data list -> unitappend a list of new local variables to the existing list of local variables
val compute_distance_to_exit_node : t -> unitCompute the distance of each node to the exit node, if not computed already
val create_node : t -> IBase.Location.t -> Node.nodekind -> Sil.instr list -> Node.tCreate a new cfg node with the given location, kind, list of instructions, and add it to the procdesc.
val create_node_from_not_reversed : t -> IBase.Location.t -> Node.nodekind -> Instrs.not_reversed_t -> Node.tval fold_instrs : t -> init:'accum -> f:('accum -> Node.t -> Sil.instr -> 'accum) -> 'accumfold over all nodes and their instructions
val find_map_instrs : t -> f:(Sil.instr -> 'a option) -> 'a optionval from_proc_attributes : ProcAttributes.t -> tUse
Cfg.create_proc_descif you are adding a proc desc to a cfg
val get_access : t -> ProcAttributes.accessReturn the visibility attribute
val get_attributes : t -> ProcAttributes.tGet the attributes of the procedure.
val set_attributes : t -> ProcAttributes.t -> unitval get_captured : t -> CapturedVar.t listReturn name and type of block's captured variables
val get_exit_node : t -> Node.tval get_formals : t -> (Mangled.t * Typ.t) listReturn name and type of formal parameters
val get_loc : t -> IBase.Location.tReturn loc information for the procedure
val get_locals : t -> ProcAttributes.var_data listReturn name and type and attributes of local variables
val get_nodes : t -> Node.t listval get_proc_name : t -> Procname.tval get_ret_type : t -> Typ.tReturn the return type of the procedure and type string
val has_added_return_param : t -> boolval is_ret_type_pod : t -> boolval get_ret_var : t -> Pvar.tval get_ret_param_var : t -> Pvar.tval get_start_node : t -> Node.tval get_static_callees : t -> Procname.t listget a list of unique static callees excluding self
val is_defined : t -> boolReturn
trueiff the procedure is defined, and not just declared
val is_java_synchronized : t -> boolReturn
trueif the procedure signature has the Java synchronized keyword
val is_csharp_synchronized : t -> boolReturn
trueif the procedure is synchronized via a C# lock
val is_objc_arc_on : t -> boolReturn
trueiff the ObjC procedure is compiled with ARC
val iter_instrs : (Node.t -> Sil.instr -> unit) -> t -> unititerate over all nodes and their instructions
val replace_instrs : t -> f:(Node.t -> Sil.instr -> Sil.instr) -> boolMap and replace the instructions to be executed. Returns true if at least one substitution occured.
val replace_instrs_using_context : t -> f:(Node.t -> 'a -> Sil.instr -> Sil.instr) -> update_context:('a -> Sil.instr -> 'a) -> context_at_node:(Node.t -> 'a) -> boolMap and replace the instructions to be executed using a context that we built with previous instructions in the node. Returns true if at least one substitution occured.
val replace_instrs_by_using_context : t -> f:(Node.t -> 'a -> Sil.instr -> Sil.instr array) -> update_context:('a -> Sil.instr -> 'a) -> context_at_node:(Node.t -> 'a) -> boolLike
replace_instrs_using_context, but slower, and each instruction may be replaced by 0, 1, or more instructions.
val fold_nodes : t -> init:'accum -> f:('accum -> Node.t -> 'accum) -> 'accumfold over all the nodes of a procedure
val fold_slope_range : Node.t -> Node.t -> init:'accum -> f:('accum -> Node.t -> 'accum) -> 'accumfold between two nodes or until we reach a branching structure
val set_succs : Node.t -> normal:Node.t list option -> exn:Node.t list option -> unitSet the successor nodes and exception nodes, if given, and update predecessor links
val node_set_succs : t -> Node.t -> normal:Node.t list -> exn:Node.t list -> unitSet the successor nodes and exception nodes, and update predecessor links
val set_start_node : t -> Node.t -> unitval get_wto : t -> Node.t WeakTopologicalOrder.Partition.tval is_loop_head : t -> Node.t -> boolval pp_signature : Stdlib.Format.formatter -> t -> unitval pp_local : Stdlib.Format.formatter -> ProcAttributes.var_data -> unitval is_specialized : t -> boolval is_captured_pvar : t -> Pvar.t -> booltrue if pvar is a captured variable of a cpp lambda or obcj block
val is_captured_var : t -> Var.t -> booltrue if var is a captured variable of a cpp lambda or obcj block
val has_modify_in_block_attr : t -> Pvar.t -> boolval shallow_copy_code_from_pdesc : orig_pdesc:t -> dest_pdesc:t -> unit
module SQLite : IBase.SqliteUtils.Data with type t = t optionper-procedure CFGs are stored in the SQLite "procedures" table as NULL if the procedure has no CFG
val load : Procname.t -> t option