diff --git a/src/lib/CoAlgMisc.ml b/src/lib/CoAlgMisc.ml index 071e169a6f60fe2cb0d21db6f51d401490608651..9718617ca4e05b62c6dbdc51e2446f55e3f89820 100644 --- a/src/lib/CoAlgMisc.ml +++ b/src/lib/CoAlgMisc.ml @@ -781,12 +781,20 @@ let stateToString (state:state): string = "}" let stateToDot (state:state): string = + let color = match state.statusS with + | Sat -> "green" + | Unsat -> "red" + | Open -> "yellow" + | Expandable -> "white" + in let ownidx = (string_of_int state.idx) in let parents = - List.map (fun (co:core) -> "Node"^string_of_int co.idx^" -> Node"^ownidx^";") + List.map (fun (co:core) -> + "Node"^string_of_int co.idx^" -> Node"^ownidx^";") state.parentsS in - "Node" ^ ownidx ^ " [shape=ellipse,label=\"State " ^ ownidx + "Node" ^ ownidx ^ " [shape=ellipse,style=filled,fillcolor=" ^ color + ^ ",label=\"State " ^ ownidx ^ "\\n" ^ (Str.global_replace (Str.regexp ", ") "\\n" (bsetToString state.sortS state.bsS)) ^ "\"];\n" @@ -794,12 +802,20 @@ let stateToDot (state:state): string = let coreToDot (core:core): string = + let color = match core.statusC with + | Sat -> "green" + | Unsat -> "red" + | Open -> "yellow" + | Expandable -> "white" + in let ownidx = (string_of_int core.idx) in let parents = - List.map (fun (st,_:state*int) -> "Node"^string_of_int st.idx^" -> Node"^ownidx^";") + List.map (fun (st,_:state*int) -> + "Node"^string_of_int st.idx^" -> Node"^ownidx^";") core.parentsC in - "Node" ^ ownidx ^ " [shape=ellipse,label=\"Core " ^ ownidx + "Node" ^ ownidx ^ " [shape=ellipse,style=filled,fillcolor=" ^ color + ^ ",label=\"Core " ^ ownidx ^ "\\n" ^ (Str.global_replace (Str.regexp ", ") "\\n" (bsetToString core.sortC core.bsC)) ^ "\"];\n"