From 8f2ae64b1a137c3479df05c81171199d92e3773c Mon Sep 17 00:00:00 2001 From: Guillaume Bury Date: Thu, 20 Nov 2014 00:39:37 +0100 Subject: [PATCH] Small modifications to colors in dot proof output --- sat/res.ml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sat/res.ml b/sat/res.ml index 50ac5b7a..2d516913 100644 --- a/sat/res.ml +++ b/sat/res.ml @@ -329,6 +329,11 @@ module Make(St : Solver_types.S) = struct (print_dot_edge id) (c_id p1) (print_dot_edge id) (c_id p2) + let color s = match s.[0] with + | 'E' -> "" + | 'L' -> "" + | _ -> "BGCOLOR=\"GREY\"" + let rec print_dot_proof fmt p = if not (is_drawn p.conclusion) then begin has_drawn p.conclusion; @@ -341,10 +346,10 @@ module Make(St : Solver_types.S) = struct print_dot_rule "BGCOLOR=\"LIGHTBLUE\"" aux () fmt p.conclusion | Lemma _ -> let aux fmt () = - Format.fprintf fmt "%aLemma%s" + Format.fprintf fmt "%aLemma%s" print_clause p.conclusion St.(p.conclusion.name) in - print_dot_rule "BGCOLOR=\"RED\"" aux () fmt p.conclusion + print_dot_rule "BGCOLOR=\"LIGHTBLUE\"" aux () fmt p.conclusion | Resolution (proof1, proof2, a) -> let aux fmt () = Format.fprintf fmt "%a%s%s" @@ -354,7 +359,7 @@ module Make(St : Solver_types.S) = struct let p1 = proof1 () in let p2 = proof2 () in Format.fprintf fmt "%a%a%a%a" - (print_dot_rule "" aux ()) p.conclusion + (print_dot_rule (color p.conclusion.St.name) aux ()) p.conclusion (print_res_node p.conclusion p1.conclusion p2.conclusion) a print_dot_proof p1 print_dot_proof p2