--- a/trunk/Toss/Arena/DiscreteRuleTest.ml
+++ b/trunk/Toss/Arena/DiscreteRuleTest.ml
@@ -21,6 +21,10 @@
   let elements = String.concat ", " str_list in
   assert_bool (msg^"expected one of "^elements^", but got "^str)
     (List.mem str str_list)
+
+let eq_str msg s1 s2 = 
+  let s1, s2 = Aux.normalize_spaces s1, Aux.normalize_spaces s2 in
+  assert_equal ~printer:(fun x -> x) ~msg s1 s2
 
 let tests = "DiscreteRule" >::: [
   "parsing: simple tests" >::
@@ -136,8 +140,9 @@
       let emb = choose_match model rule_obj embs in
       let nmodel =
 	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"clone, add to twin"
-        "[a_b, a_c | P (a_b); Q {a_b; a_c}; R:2 {}; _new_P (a_b); _right_b (a_b); _right_c (a_c) | ]"
+      eq_str "clone, add to twin"
+        ("[a_b, a_c | P (a_b); Q {a_b; a_c}; R:2 {}; _new_P (a_b); " ^
+            "_right_b (a_b); _right_c (a_c) | ]")
 	(Structure.str nmodel);
 
       let model =
@@ -155,13 +160,13 @@
       let emb = choose_match model rule_obj embs in
       let nmodel =
 	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"clone, remove from twin"
-        "[d, a_b, a_c | P {d; a_b}; Q (a_c); _del_Q (a_b); _new_P (a_b); _right_b (a_b); _right_c (a_c) | ]"
+      eq_str "clone, remove from twin"
+        ("[d, a_b, a_c | P {d; a_b}; Q (a_c); _del_Q (a_b); " ^
+            "_new_P (a_b); _right_b (a_b); _right_c (a_c) | ]")
 	(Structure.str nmodel);
 
       let model =
 	struc_of_str "[ | R{a}; Q{a}; P:1{ } | ]" in
-      
       let lhs_struc = struc_of_str "[ | Q{e} | ]" in
       let rhs_struc = struc_of_str "[ b, c | Q:1{}; P{b} | ]" in
       let signat = Structure.rel_signature model in
@@ -175,9 +180,10 @@
       let emb = choose_match model rule_obj embs in
       let nmodel =
 	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"clone, remove, add to twin"
-        "[a_b, a_c | P (a_b); Q:1 {}; R {a_b; a_c}; _del_Q {a_b; a_c}; _new_P (a_b); _right_b (a_b); _right_c (a_c) | ]"
-	(Structure.str nmodel);
+      eq_str "clone, remove, add to twin"
+        ("[a_b, a_c | P (a_b); Q:1 {}; R {a_b; a_c}; _del_Q {a_b; a_c}; " ^
+            "_new_P (a_b); _right_b (a_b); _right_c (a_c) | ]")
+        (Structure.str nmodel);
       
       let model =
 	struc_of_str "[ | P:1{ }; R{(a,b)}; C{(b,c)}; D{(a,c)} | ]" in      
@@ -194,10 +200,11 @@
       let emb = choose_match model rule_obj embs in
       let nmodel =
 	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x)
-        ~msg:"clone, copy rels, remove, add to twin"
-        "[b, a_b, c, a_c | C (b, c); D {(a_b, c); (a_c, c)}; P (a_b); R:2 {}; _del_R {(a_b, b); (a_c, b)}; _new_P (a_b); _right_a (b); _right_b (a_b); _right_c (a_c) | ]"
-	(Structure.str nmodel);
+      eq_str "clone, copy rels, remove, add to twin"
+        ("[b, a_b, c, a_c | C (b, c); D {(a_b, c); (a_c, c)}; P (a_b); " ^
+            "R:2 {}; _del_R {(a_b, b); (a_c, b)}; _new_P (a_b); " ^
+            "_right_a (b); _right_b (a_b); _right_c (a_c) | ]")
+        (Structure.str nmodel);
 
     );
 
@@ -217,10 +224,10 @@
          rule_s = [1,1; 2,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"clone, add to twin"
-        "[a1_a1, a1_a2 | P (a1_a1); Q {a1_a1; a1_a2}; R:2 {}; _new_P (a1_a1); _right_a1 (a1_a1); _right_a2 (a1_a2) | ]"
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "clone, add to twin"
+        ("[a1_a1, a1_a2 | P (a1_a1); Q {a1_a1; a1_a2}; R:2 {}; " ^
+            "_new_P (a1_a1); _right_a1 (a1_a1); _right_a2 (a1_a2) | ]")
 	(Structure.str nmodel);
 
       let model =
@@ -236,9 +243,8 @@
          rule_s = [1,1; 2,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"clone, remove from twin"
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "clone, remove from twin"
         ("[a2, a1_a1, a1_a2 | P {a2; a1_a1}; Q (a1_a2); _del_Q (a1_a1);" ^ 
 	    " _new_P (a1_a1); _right_a1 (a1_a1); _right_a2 (a1_a2) | ]")
 	(Structure.str nmodel);
@@ -256,9 +262,8 @@
          rule_s = [1,1; 2,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"clone, remove, add to twin"
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "clone, remove, add to twin"
         ("[a1_a1, a1_a2 | P (a1_a1); Q:1 {}; R {a1_a1; a1_a2}; _del_Q {a1_a1;" ^
 	    " a1_a2}; _new_P (a1_a1); _right_a1 (a1_a1); _right_a2 (a1_a2) | ]")
 	(Structure.str nmodel);
@@ -278,15 +283,12 @@
          rule_s = [1,1; 2,2; 3,2]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x)
-        ~msg:"clone, copy rels, remove, add to twin"
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "clone, copy rels, remove, add to twin"
         ("[a2, a1_a2, a3, a1_a3 | C (a2, a3); D {(a1_a2, a3); (a1_a3, a3)}; " ^
 	    "P (a1_a2); R:2 {}; _del_R {(a1_a2, a2); (a1_a3, a2)}; _new_P " ^
 	    "(a1_a2); _right_a1 (a2); _right_a2 (a1_a2); _right_a3 (a1_a3) | ]")
 	(Structure.str nmodel);
-
     );
 
   "rewrite: compile_rule no change" >::
@@ -305,17 +307,16 @@
          rule_s = [1,1; 2,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"clone, no cond, no emb rels"
-        "[a_b, a_c | P {a_b; a_c}; Q {a_b; a_c}; _right_b (a_b); _right_c (a_c) | ]"
-	(Structure.str nmodel);
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "clone, no cond, no emb rels"
+        ("[a_b, a_c | P {a_b; a_c}; Q {a_b; a_c}; _right_b (a_b); " ^
+            "_right_c (a_c) | ]") (Structure.str nmodel);
 
       let model =
 	struc_of_str "[ | P{d}; Q:1{ } | ]" in
-      
       let lhs_struc = struc_of_str "[ | P{e} | ]" in
-      let rhs_struc = struc_of_str "[ b,c | P{ (b) }; _opt_P{ (c) }; Q:1{}; _opt_Q{ (b) } | ]" in
+      let rhs_struc = struc_of_str 
+        "[ b,c | P{ (b) }; _opt_P{ (c) }; Q:1{}; _opt_Q{ (b) } | ]" in
       let signat = Structure.rel_signature model in
       let rule_obj = compile_rule signat []
         {lhs_struc = lhs_struc;
@@ -325,12 +326,10 @@
          rule_s = [1,1; 2,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"clone, cond, opt add"
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "clone, cond, opt add"
         "[d_b, d_c | P {d_b; d_c}; Q:1 {}; _right_b (d_b); _right_c (d_c) | ]"
 	(Structure.str nmodel);
-
     );
 
   "rewrite: compile_rule ident" >::
@@ -349,9 +348,8 @@
          rule_s = [1,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"no emb, add"
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "no emb, add"
         "[a | D:2 {}; P (a); Q (a); R:2 {}; _new_P (a); _right_b (a) | ]"
 	(Structure.str nmodel);
 
@@ -368,19 +366,17 @@
          rule_s = [1,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"cond, remove and add"
-        "[d, a | D:2 {}; P {d; a}; Q:1 {}; R:2 {}; _del_Q (a); _new_P (a); _right_e (a) | ]"
-	(Structure.str nmodel);
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "cond, remove and add"
+        ("[d, a | D:2 {}; P {d; a}; Q:1 {}; R:2 {}; _del_Q (a); " ^
+            "_new_P (a); _right_e (a) | ]") (Structure.str nmodel);
     );
 
   "rewrite: compile_rule no change ident" >::
     (fun () ->
 
       let model =
-	struc_of_str "[ | Q{a}; P:1{ } | ]" in
-      
+	struc_of_str "[ | Q{a}; P:1{ } | ]" in      
       let lhs_struc = struc_of_str "[ b |  | ]" in
       let rhs_struc = struc_of_str "[ b | P{ (b) }; Q{ (b) } | ]" in
       let signat = Structure.rel_signature model in
@@ -392,15 +388,13 @@
          rule_s = [1,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"no embedded rels"
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "no embedded rels"
 	"[a | P (a); Q (a); _new_P (a); _right_b (a) | ]"
 	(Structure.str nmodel);
 
       let model =
 	struc_of_str "[ | P{d}; Q:1{} | ]" in
-      
       let lhs_struc = struc_of_str "[ | P{ (b) } | ]" in
       let rhs_struc = struc_of_str "[ | P{ (b) } | ]" in
       let signat = Structure.rel_signature model in
@@ -412,12 +406,10 @@
          rule_s = [1,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"cond, identity"
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "cond, identity"
         "[d | P (d); Q:1 {}; _right_b (d) | ]"
 	(Structure.str nmodel);
-
     );
 
   "rewrite: compile_rule useless optional RHS" >::
@@ -425,7 +417,6 @@
 
       let model =
 	struc_of_str "[ | P{c}; Q:1{} | ]" in
-      
       let lhs_struc = struc_of_str "[ b | P{b} | ]" in
       let rhs_struc = struc_of_str "[ b,c | _opt_P{c} | ]" in
       let signat = Structure.rel_signature model in
@@ -437,8 +428,7 @@
          rule_s = [1,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
+      let nmodel = rewrite_single model emb rule_obj in
       assert_equal ~printer:(fun x->x)
         "[c, c0 | P (c); Q:1 {}; _right_b (c); _right_c (c0) | ]"
 	(Structure.str nmodel);
@@ -449,7 +439,6 @@
     (fun () ->
 
       let model = struc_of_str "[ | P {c}; Q:1{} | ]" in
-      
       let lhs_struc = struc_of_str "[ a | P {a} | ]" in
       let rhs_struc = struc_of_str "[ b | P:1{}; Q {b} | ]" in
       let signat = Structure.rel_signature model in
@@ -461,15 +450,13 @@
          rule_s = [1,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
+      let nmodel = rewrite_single model emb rule_obj in
       (* due to optimization, it is _right_a rather than _right_b *)
-      assert_equal ~printer:(fun x->x) ~msg:"remove and add pred"
+      eq_str "remove and add pred"
         "[c | P:1 {}; Q (c); _del_P (c); _new_Q (c); _right_a (c) | ]"
 	(Structure.str nmodel);
 
       let model = struc_of_str "[ | P:1{}; Q:1{}; C {(e,f)}; D:2{} | ]" in
-      
       let lhs_struc = struc_of_str "[ a,b | C {(a,b)} | ]" in
       let rhs_struc = struc_of_str "[ c,d | C:2{}; D {(c,d)} | ]" in
       let signat = Structure.rel_signature model in
@@ -481,13 +468,12 @@
          rule_s = [1,1; 2,2]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
+      let nmodel = rewrite_single model emb rule_obj in
       (* due to optimization, it is _right_a/b rather than _right_c/d *)
-      assert_equal ~printer:(fun x->x) ~msg:"remove and add binary"
-        "[e, f | C:2 {}; D (e, f); P:1 {}; Q:1 {}; _del_C (e, f); _new_D (e, f); _right_a (e); _right_b (f) | ]"
-	(Structure.str nmodel);
-
+      eq_str "remove and add binary"
+        ("[e, f | C:2 {}; D (e, f); P:1 {}; Q:1 {}; _del_C (e, f); " ^
+            "_new_D (e, f); _right_a (e); _right_b (f) | ]")
+	(Structure.str nmodel);
     );
 
   "rewrite: compile_rule adding and deleting els" >::
@@ -495,7 +481,6 @@
 
       (* adding *)
       let model = struc_of_str "[ | P {c};Q:1{};C:2{};R:2{} | ]" in
-      
       let lhs_struc = struc_of_str "[ a | P {a} | ]" in
       let rhs_struc = struc_of_str "[ b,c | P:1{}; Q {b}; R{(b,c)} | ]" in
       let signat = Structure.rel_signature model in
@@ -507,15 +492,15 @@
          rule_s = [1,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"adding"
-        "[c, c0 | C:2 {}; P:1 {}; Q (c); R (c, c0); _del_P (c); _new_Q (c); _new_R (c, c0); _right_b (c); _right_c (c0) | ]"
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "adding"
+        ("[c, c0 | C:2 {}; P:1 {}; Q (c); R (c, c0); _del_P (c); " ^
+            "_new_Q (c); _new_R (c, c0); _right_b (c); _right_c (c0) | ]")
 	(Structure.str nmodel);
 
       (* deleting *)
-      let model = struc_of_str "[ | C {(e,f)}; A {e}; B {f};P:1{};Q:1{};D:2{} | ]" in
-      
+      let model = 
+        struc_of_str "[ | C {(e,f)}; A {e}; B {f};P:1{};Q:1{};D:2{} | ]" in
       let lhs_struc = struc_of_str "[ a,b | C {(a,b)} | ]" in
       let rhs_struc = struc_of_str "[ c | P {c} | ]" in
       let signat = Structure.rel_signature model in
@@ -527,15 +512,13 @@
          rule_s = [1,2]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"deleting"
-        "[f | A:1 {}; B (f); C:2 {}; D:2 {}; P (f); Q:1 {}; _new_P (f); _right_c (f) | ]"
-        (Structure.str nmodel);
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "deleting" 
+        ("[f | A:1 {}; B (f); C:2 {}; D:2 {}; P (f); Q:1 {}; _new_P (f); " ^
+            "_right_c (f) | ]") (Structure.str nmodel);
 
       (* both adding and deleting *)
       let model = struc_of_str "[ | C {(e,f)}; D:2{} | ]" in
-      
       let lhs_struc = struc_of_str "[ a,b | C {(a,b)} | ]" in
       let rhs_struc = struc_of_str "[ c,d | C:2{}; D {(c,d)} | ]" in
       let signat = Structure.rel_signature model in
@@ -547,12 +530,10 @@
          rule_s = [1,1]} in
       let embs = find_matchings model rule_obj in
       let emb = choose_match model rule_obj embs in
-      let nmodel =
-	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"adding and deleting"
-        "[e, d | C:2 {}; D (e, d); _new_D (e, d); _right_c (e); _right_d (d) | ]"
-        (Structure.str nmodel);
-
+      let nmodel = rewrite_single model emb rule_obj in
+      eq_str "adding and deleting"
+        ("[e, d | C:2 {}; D (e, d); _new_D (e, d); _right_c (e); " ^
+            "_right_d (d) | ]") (Structure.str nmodel);
     );
 
   "rewrite: compile_rule injectivity" >::
@@ -574,15 +555,12 @@
         ~msg:"inserting a two element into a single element structure"
         Not_found
         (fun () -> ignore (choose_match model rule_obj embs));
-
-    );
-
+    );
 
   "rewrite: compile_rule precondition" >::
     (fun () ->
       
       (* with renaming *)
-
       let model =
 	struc_of_str "[ | P{e}; Q:1{}; C{e} | ]" in
       let lhs_struc = struc_of_str "[ | P{a} | ]" in
@@ -602,7 +580,6 @@
 
       let model =
 	struc_of_str "[ | P{e;f}; Q:1{}; C{e} | ]" in
-      
       let lhs_struc = struc_of_str "[ | P{a} | ]" in
       let rhs_struc = struc_of_str "[ | P:1{}; Q{b} | ]" in
       let signat = Structure.rel_signature model in
@@ -617,15 +594,13 @@
       let nmodel =
 	rewrite_single model emb rule_obj in
       (* due to optimization, it is _right_a rather than _right_b *)
-      assert_equal ~printer:(fun x->x) ~msg:"with renaming"
+      eq_str "with renaming"
         "[e, f | C (e); P (e); Q (f); _del_P (f); _new_Q (f); _right_a (f) | ]"
         (Structure.str nmodel);
 
       (* without renaming *)
-
       let model =
 	struc_of_str "[ | P{e;f}; Q:1{}; C{e} | ]" in
-      
       let lhs_struc = struc_of_str "[a,b | P{a;b} | ]" in
       let rhs_struc = struc_of_str "[ | P:1{}; Q{c} | ]" in
       let signat = Structure.rel_signature model in
@@ -639,10 +614,9 @@
       let emb = choose_match model rule_obj embs in
       let nmodel =
 	rewrite_single model emb rule_obj in
-      assert_equal ~printer:(fun x->x) ~msg:"without renaming"
+      eq_str "without renaming"
         "[f | C:1 {}; P:1 {}; Q (f); _del_P (f); _new_Q (f); _right_c (f) | ]"
         (Structure.str nmodel);
-
     );
 
   "compile_rule: defined relations" >::
@@ -659,8 +633,7 @@
          emb_rels = ["O"; "D"];
          pre = (Formula.And [], []);
          rule_s = [1,1]} in
-      assert_equal ~printer:(fun x->x) ~msg:"one not opt"
-        "not O(e)-> true"
+      eq_str "one not opt" "not O(e)-> true"
 	(rule_obj_str rule_obj);
 
       let lhs_struc = struc_of_str "[ e | _opt_D (e); O(e) | ]" in
@@ -673,8 +646,7 @@
          emb_rels = ["O"; "D"];
          pre = (Formula.And [], []);
          rule_s = [1,1]} in
-      assert_equal ~printer:(fun x->x) ~msg:"del one not opt"
-        "O(e)-> not O(e)"
+      eq_str "del one not opt" "O(e)-> not O(e)"
 	(rule_obj_str rule_obj);
 
       let lhs_struc = struc_of_str "[ e | D (e); _opt_O(e) | ]" in
@@ -705,7 +677,6 @@
         ["P(e) or Q(e)-> (O(e) and not P(e) and not Q(e))";
 	 "Q(e) or P(e)-> (O(e) and not P(e) and not Q(e))"]
 	(rule_obj_str rule_obj);
-
     ); 
 
   "compile_rule: special relations" >::
@@ -720,7 +691,7 @@
          emb_rels = ["O"; "D"];
          pre = (Formula.And [], []);
          rule_s = [1,1]} in
-      assert_equal ~printer:(fun x->x) ~msg:"defrel: diffthan P Q"
+      eq_str "defrel: diffthan P Q"
         "(not P(e) and not Q(e))-> true"
 	(rule_obj_str rule_obj);
 
@@ -751,22 +722,21 @@
          emb_rels = ["O"; "D"];
          pre = (Formula.And [], []);
          rule_s = [1,1]} in
-      assert_equal ~printer:(fun x->x) ~msg:"diffthan override"
+      eq_str "diffthan override"
         "(not O(e) and not P(e))-> (O(e) and not Q(e))"
 	(rule_obj_str rule_obj);
-
     ); 
 
   "compare_diff" >::
     (fun () ->
       let r1 = rule_of_str ["Q",1;"P",1]
-        "[a | P:1 {}; Q (a) | ] -> [b | P (b); Q:1 {} | ] emb Q with [b <- a]" in
+        "[a | P:1 {}; Q (a) |] -> [b | P (b); Q:1 {} | ] emb Q with [b <- a]" in
       let r2 = rule_of_str ["Q",1;"P",1]
         "[a | Q (a) | ] -> [b | P (b) | ] emb Q with [b <- a]" in
       let r1 = Aux.unsome r1.DiscreteRule.struc_rule
       and r2 = Aux.unsome r2.DiscreteRule.struc_rule in
       assert_equal ~printer:(fun (_,x)->x)
-        (true,"equal")
+        (true, "equal")
         (DiscreteRule.compare_diff r1 r2);
 
       let r1 = rule_of_str ["Q",1;"P",1]
@@ -775,8 +745,9 @@
         "[a | Q (a) | ] -> [b | P (b) | ] emb Q with [b <- a]" in
       let r1 = Aux.unsome r1.DiscreteRule.struc_rule
       and r2 = Aux.unsome r2.DiscreteRule.struc_rule in
-      assert_equal ~printer:(fun (_,x)->x)
-        (false,"Rule LHS structures differ: Relation tuple P(a) not found in the second structure")
+      assert_equal ~printer:(fun (_,x) -> x)
+        (false, "Rule LHS structures differ: " ^ 
+          "Relation tuple P(a) not found in the second structure")
         (DiscreteRule.compare_diff r1 r2);
 
       let r1 = rule_of_str ["Q",1;"P",1]
@@ -785,8 +756,8 @@
         "[a | Q (a) | ] -> [b | P (b) | ] emb P with [b <- a]" in
       let r1 = Aux.unsome r1.DiscreteRule.struc_rule
       and r2 = Aux.unsome r2.DiscreteRule.struc_rule in
-      assert_equal ~printer:(fun (_,x)->x)
-        (false,"Relation Q is embedded only in the first rule")
+      assert_equal ~printer:(fun (_,x) -> x)
+        (false, "Relation Q is embedded only in the first rule")
         (DiscreteRule.compare_diff r1 r2);
 
       let r1 = rule_of_str ["Q",1;"P",1]
@@ -795,11 +766,9 @@
         "[a,b | Q (a); P(b) | ] -> [b | P (b) | ] emb Q with [b <- b]" in
       let r1 = Aux.unsome r1.DiscreteRule.struc_rule
       and r2 = Aux.unsome r2.DiscreteRule.struc_rule in
-      assert_equal ~printer:(fun (_,x)->x)
+      assert_equal ~printer:(fun (_,x) -> x)
         (false,
          "RHS element b is mapped to LHS b instead of a in the second rule")
         (DiscreteRule.compare_diff r1 r2);
-      
-    );
-
+    );
 ]