From 275b124e484510dc49141f86b5174f8bd0be7d97 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 6 Mar 2009 16:23:45 +0000 Subject: [PATCH] Minor improvements in pretty-printing. --- .../contribs/formal_topology/bin/comb.ml | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/helm/software/matita/contribs/formal_topology/bin/comb.ml b/helm/software/matita/contribs/formal_topology/bin/comb.ml index 7b48cb3c2..e89deaeeb 100755 --- a/helm/software/matita/contribs/formal_topology/bin/comb.ml +++ b/helm/software/matita/contribs/formal_topology/bin/comb.ml @@ -5,7 +5,8 @@ 4: > 657 >9 5: > 526 >8 6: > 529 >8 - 7: + 7: > 529 >8 + 8: > 529 >8 *) type t = M | I | C @@ -78,24 +79,24 @@ let rec new_dir dir = ;; let string_of_w w = - String.concat "" - (List.map (function I -> "i" | C -> "c" | M -> "-") w) + let s = + String.concat "" + (List.map (function I -> "i" | C -> "c" | M -> "-") w) + in + if s = "" then "." else s ;; let string_of_w' w = - String.concat "" - (List.map (function I -> "i" | C -> "c" | M -> "m") w) + let s = + String.concat "" + (List.map (function I -> "i" | C -> "c" | M -> "m") w) + in + if s = "" then "E" else s ;; -let string_of_eqclass l = - let s = String.concat "=" (List.map string_of_w l) in - if s = "" then "." else s -;; +let string_of_eqclass l = String.concat "=" (List.map string_of_w l);; -let name_of_eqclass l = - let s = String.concat "_" (List.map string_of_w' l) in - if s = "" then "E" else s -;; +let name_of_eqclass l = String.concat "_" (List.map string_of_w' l);; exception NoMatch;; @@ -149,7 +150,7 @@ let step (l : w list) = (List.map (function w -> List.map (fun x -> x@w) - (if List.length (List.filter (fun w -> w = M) w) >= 7 then + (if List.length (List.filter (fun w -> w = M) w) >= 1 then [[I];[C]] else [[I];[C];[M]]) @@ -295,5 +296,5 @@ let rec iter n nodes old_arcs = else analyze pkg in - iter 8 [[]] [] + iter 7 [[]] [] ;; -- 2.39.2