diff --git a/infer/src/IR/cfg.ml b/infer/src/IR/cfg.ml index b3792c894..503fb76e5 100644 --- a/infer/src/IR/cfg.ml +++ b/infer/src/IR/cfg.ml @@ -27,7 +27,8 @@ module Node = struct | Prune_node of bool * Sil.if_kind * string (** (true/false branch, if_kind, comment) *) | Skip_node of string - and t = { (** a node *) + (** a node *) + and t = { (** unique id of the node *) nd_id : id; @@ -61,7 +62,9 @@ module Node = struct (** successor nodes in the cfg *) mutable nd_succs : t list; } - and proc_desc = { (** procedure description *) + + (** procedure description *) + and proc_desc = { pd_attributes : ProcAttributes.t; (** attributes of the procedure *) pd_id : int; (** unique proc_desc identifier *) mutable pd_nodes : t list; (** list of nodes of this procedure *) @@ -73,7 +76,8 @@ module Node = struct let exn_sink_kind = Stmt_node "exceptions sink" let throw_kind = Stmt_node "throw" - type cfg = (** data type for the control flow graph *) + (** data type for the control flow graph *) + type cfg = { node_id : int ref; node_list : t list ref; name_pdesc_tbl : proc_desc Procname.Hash.t; (** Map proc name to procdesc *) diff --git a/infer/src/IR/cg.ml b/infer/src/IR/cg.ml index 3f1e959ff..b68d0ec20 100644 --- a/infer/src/IR/cg.ml +++ b/infer/src/IR/cg.ml @@ -260,9 +260,10 @@ let get_nodes_and_defined_children (g: t) = let nodes_list = Procname.Set.elements !nodes in IList.map (fun n -> (n, get_defined_children g n)) nodes_list +(** nodes with defined flag, and edges *) type nodes_and_edges = - (node * bool) list * (* nodes with defined flag *) - (node * node) list (* edges *) + (node * bool) list * + (node * node) list (** Return the list of nodes, with defined+disabled flags, and the list of edges *) let get_nodes_and_edges (g: t) : nodes_and_edges =