@ -192,25 +192,29 @@ module Node = struct
(* * Print extended instructions for the node,
(* * Print extended instructions for the node,
highlighting the given subinstruction if present * )
highlighting the given subinstruction if present * )
let pp_instrs pe0 ~ sub_instrs instro fmt node =
let pp_instrs pe0 ~ sub_instrs instro fmt node =
if sub_instrs then
let pe =
let pe =
match instro with None -> pe0 | Some instr -> Pp . extend_colormap pe0 ( Obj . repr instr ) Red
match instro with None -> pe0 | Some instr -> Pp . extend_colormap pe0 ( Obj . repr instr ) Red
in
in
let instrs = get_instrs node in
let instrs = get_instrs node in
let pp_loc fmt () = F . fprintf fmt " %a " Location . pp ( get_loc node ) in
Sil . pp_instr_list pe fmt instrs
let print_sub_instrs () = F . fprintf fmt " %a " ( Sil . pp_instr_list pe ) instrs in
else
let () =
match get_kind node with
match get_kind node with
| Stmt_node s
| Stmt_node s
-> if sub_instrs then print_sub_instrs () else F . fprintf fmt " statements (%s) %a " s pp_loc ()
-> F . fprintf fmt " statements (%s) " s
| Prune_node ( _ , _ , descr )
| Prune_node ( _ , _ , descr )
-> if sub_instrs then print_sub_instrs () else F . fprintf fmt " assume %s %a " descr pp_loc ()
-> F . fprintf fmt " assume %s " descr
| Exit_node _
| Exit_node _
-> if sub_instrs then print_sub_instrs () else F . fprintf fmt " exit %a " pp_loc ()
-> F . fprintf fmt " exit "
| Skip_node s
| Skip_node s
-> if sub_instrs then print_sub_instrs () else F . fprintf fmt " skip (%s) %a " s pp_loc ()
-> F . fprintf fmt " skip (%s) " s
| Start_node _
| Start_node _
-> if sub_instrs then print_sub_instrs () else F . fprintf fmt " start %a " pp_loc ()
-> F . fprintf fmt " start "
| Join_node
| Join_node
-> if sub_instrs then print_sub_instrs () else F . fprintf fmt " join %a " pp_loc ()
-> F . fprintf fmt " join "
in
F . fprintf fmt " %a " Location . pp ( get_loc node )
(* * Dump extended instructions for the node *)
(* * Dump extended instructions for the node *)
let d_instrs ~ ( sub_instrs : bool ) ( curr_instr : Sil . instr option ) ( node : t ) =
let d_instrs ~ ( sub_instrs : bool ) ( curr_instr : Sil . instr option ) ( node : t ) =