From 49267897e85f75cbcaae1fa355655a447e38e15c Mon Sep 17 00:00:00 2001 From: Guillaume Bury Date: Wed, 29 Jun 2016 21:25:53 +0200 Subject: [PATCH] Fixed bad tabls in dot backend --- backend/dot.ml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/backend/dot.ml b/backend/dot.ml index 7878925f..c3248806 100644 --- a/backend/dot.ml +++ b/backend/dot.ml @@ -20,12 +20,15 @@ module Make(S : Res.S)(A : Arg with type atom := S.atom and type lemma := S.lemm let print_clause fmt c = let v = c.S.St.atoms in - let n = Vec.size v in - for i = 0 to n - 1 do - Format.fprintf fmt "%a" A.print_atom (Vec.get v i); - if i < n - 1 then - Format.fprintf fmt ", " - done + if Vec.is_empty v then + Format.fprintf fmt "⊥" + else + let n = Vec.size v in + for i = 0 to n - 1 do + Format.fprintf fmt "%a" A.print_atom (Vec.get v i); + if i < n - 1 then + Format.fprintf fmt ", " + done let print_edge fmt i j = Format.fprintf fmt "%s -> %s;@\n" i j @@ -48,7 +51,7 @@ module Make(S : Res.S)(A : Arg with type atom := S.atom and type lemma := S.lemm | f :: r -> Format.fprintf fmt "%s%a" color (List.length l) rule f (); - List.iter (fun f -> Format.fprintf fmt "%a" f ()) r + List.iter (fun f -> Format.fprintf fmt "%a" f ()) r let print_dot_node fmt id color c rule rule_color l = Format.fprintf fmt "%s [shape=plaintext, label=<%a
>];@\n"