diff --git a/_oasis b/_oasis
index 5caff6e6175c65c6d3d0aa5a099e731ab4dc924d..324bc47aa3e01ce5532e7c4fde439b034d4f2192 100644
--- a/_oasis
+++ b/_oasis
@@ -1,6 +1,6 @@
 OASISFormat: 0.4
 Name:        lustre-v6
-Version:     1.707
+Version:     1.708
 Synopsis:    The Lustre V6 Verimag compiler
 Description: This package contains:
    (1) lus2lic: the (current) name of the compiler (and interpreter via -exec).
diff --git a/src/lv6version.ml b/src/lv6version.ml
index 3530ba32bfce760e52fec21427390c27ed88d313..1fac739ef078d9c7ad6e6ceb92dfb9e9d50865ba 100644
--- a/src/lv6version.ml
+++ b/src/lv6version.ml
@@ -1,7 +1,7 @@
 (** Automatically generated from Makefile *) 
 let tool = "lus2lic"
 let branch = "master"
-let commit = "707"
-let sha_1 = "a0197e0ca6c1adedc26192caacb2dbd8c8c6ef5e"
+let commit = "708"
+let sha_1 = "23dd9907980de51df48fb244655208a2c583034e"
 let str = (branch ^ "." ^ commit ^ " (" ^ sha_1 ^ ")")
 let maintainer = "jahier@imag.fr"
diff --git a/src/sortActions.ml b/src/sortActions.ml
index fdfaa39ef41539d9ad85527839b4584889ed3ed2..ec2094a294f42cac54b15b925bf532a62262d2c3 100644
--- a/src/sortActions.ml
+++ b/src/sortActions.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 12/07/2017 (at 10:41) by Erwan Jahier> *)
+(** Time-stamp: <modified the 17/07/2017 (at 17:02) by Erwan Jahier> *)
 
 (** topological sort of actions (that may optimize test openning) *)
 
@@ -80,8 +80,6 @@ let (optimize_test_openning: Soc.gao list -> ActionsDeps.t -> Soc.gao list) =
 open Lv6MainArgs
 
 
-
-
 let (f : Action.t list -> ActionsDeps.t -> Lxm.t -> Soc.gao list) = 
   fun actions deps lxm -> 
   (* =>  la liste d'actions en entrée contient des doublons !  *)
@@ -107,10 +105,16 @@ let (f : Action.t list -> ActionsDeps.t -> Lxm.t -> Soc.gao list) =
         SortActionsExpe.optimize_test_openning gaol 
       )
   with TopoSortActions.DependencyCycle(x,l) ->
-    let l = List.map Action.to_string l in
+    let name i = "a"^(string_of_int i) in
+    let l = List.mapi (fun i x -> x, name i) l in
+    let lstr = List.map (fun (a,n) -> n^": "^(Action.to_string a)) l in
+    let legend = String.concat "\n\t" lstr in
+    let _,names = List.split l in
+    let dep = String.concat ">" names  in
     let msg = "A combinational cycle been detected "^
-                (Lxm.details lxm)^" on \n  "^(Action.to_string x)^
-                  "\n  "^(String.concat "\n  " l) ^
-                    "\n\nHint: \n\t- try to use --expand-nodes or --expand-node-call; sometimes it works. \n\t- -knc migth ease to see where the cycle is.\n\t - -dbg deps will dump more (too much?) information\n" ^ (ActionsDeps.to_string deps) ^ "\n"
+                (Lxm.details lxm)^" on \n  "^(Action.to_string x)^ "\n  "^ dep ^
+                  ">a0\n where \n\t'>' means 'should be done after'\n\t" ^ legend ^
+                    "\n\nHint: \n\t- try to use --expand-nodes or --expand-node-call; sometimes it works. \n\t- -knc migth ease to see where the cycle is.\n\t- -dbg deps will dump more (too much?) information\n"
+                      (*                     ^ (ActionsDeps.to_string deps) ^ "\n" *)
     in
     raise (Lv6errors.Global_error msg)
diff --git a/src/topoSort.ml b/src/topoSort.ml
index b8d8775716c7ee5dcdf6bbe11142a2ff865531be..91ef8b364c4663b4ec872c8b5bc702a9efb5f2a0 100644
--- a/src/topoSort.ml
+++ b/src/topoSort.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 03/02/2016 (at 14:40) by Erwan Jahier> *)
+(** Time-stamp: <modified the 17/07/2017 (at 16:55) by Erwan Jahier> *)
 
 
 module type PartialOrder =
@@ -40,7 +40,34 @@ module Make(PO: PartialOrder) = struct
     Mapt.fold
       (fun x color acc -> if color=Grey then x::acc else acc) ct []
 
-let rec (visit : store -> color_table -> elt -> color_table) =
+  let (smallest_cycle : store -> elt -> elt list -> elt list) =
+    fun store x al ->
+    (* al contains a cycle at x, and no other one *)
+    let rec (f: elt -> elt list -> elt list) =
+      fun c path ->
+      let deps = PO.find_dep store c in
+      let succ = List.filter (fun x -> List.mem x al) deps in
+      let cycles = List.fold_left
+                     (fun acc y ->
+                      try if x = y then (c::path)::acc else (f y (c::path))::acc
+                      with Not_found -> acc)
+                     [] succ
+      in
+      let res,_ = (* compute the smallest amond cycles *)
+        match cycles with
+        | [] -> raise Not_found
+        | y::l -> List.fold_left
+                    (fun (l1, s1) l2 ->
+                     let s2 = List.length l2 in
+                     if s1<s2 then l1, s1 else l2, s2
+                    )
+                    (y, List.length y) l
+      in
+      List.rev res
+    in
+    f x []
+             
+  let rec (visit : store -> color_table -> elt -> color_table) =
   fun store color_t n ->
     if not (PO.have_dep store n) then Mapt.add n Black color_t else
       let color_t =
@@ -48,7 +75,9 @@ let rec (visit : store -> color_table -> elt -> color_table) =
 	       (fun color_t nt -> 
 	         try
 	           match Mapt.find nt color_t with
-		          | Grey -> raise (DependencyCycle (n, grey_actions color_t))
+		        | Grey ->
+                 let c = smallest_cycle store n (grey_actions color_t) in
+                 raise (DependencyCycle (n, c))
 		          | Black -> color_t
 	         with 
 		          (* The node [nt] is white *)
diff --git a/test/lus2lic.sum b/test/lus2lic.sum
index 374e21d66f989e5e6bbe01d6935a549390e22d2f..1852dbc6059ec359c33261d04a2bfbd0192c4f83 100644
--- a/test/lus2lic.sum
+++ b/test/lus2lic.sum
@@ -1,5 +1,5 @@
 ==> lus2lic0.sum <==
-Test Run By jahier on Wed Jul 12 11:27:39 
+Test Run By jahier on Mon Jul 17 17:05:43 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic0 tests ===
@@ -66,7 +66,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte
 XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
 
 ==> lus2lic1.sum <==
-Test Run By jahier on Wed Jul 12 11:27:40 
+Test Run By jahier on Mon Jul 17 17:05:44 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic1 tests ===
@@ -408,7 +408,7 @@ PASS: sh multipar.sh
 PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus  {}
 
 ==> lus2lic2.sum <==
-Test Run By jahier on Wed Jul 12 11:28:36 
+Test Run By jahier on Mon Jul 17 17:06:38 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic2 tests ===
@@ -747,7 +747,7 @@ PASS: ./lus2lic  {-2c zzz2.lus -n zzz2}
 PASS: sh zzz2.sh 
 
 ==> lus2lic3.sum <==
-Test Run By jahier on Wed Jul 12 11:29:50 
+Test Run By jahier on Mon Jul 17 17:07:52 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic3 tests ===
@@ -975,7 +975,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node contractForElement
 PASS: ./lus2lic {-o convert.lic convert.lus}
 PASS: ./lus2lic {-ec -o convert.ec convert.lus}
 PASS: ./myec2c {-o convert.c convert.ec}
-FAIL: Try to compare lus2lic -exec and ecexe: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node convert.lus {}
+PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node convert.lus {}
 PASS: ./lus2lic {-o count.lic count.lus}
 PASS: ./lus2lic {-ec -o count.ec count.lus}
 PASS: ./myec2c {-o count.c count.ec}
@@ -1261,7 +1261,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
 
 
 ==> lus2lic4.sum <==
-Test Run By jahier on Wed Jul 12 11:32:38 
+Test Run By jahier on Mon Jul 17 17:10:40 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic4 tests ===
@@ -1757,7 +1757,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
 # of unexpected failures	3
 
 ==> lus2lic2.sum <==
-PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus 37907 {}
+PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus 35197 {}
 
 		=== lus2lic2 Summary ===
 
@@ -1766,8 +1766,8 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus 37907 {}
 ==> lus2lic3.sum <==
 		=== lus2lic3 Summary ===
 
-# of expected passes		487
-# of unexpected failures	10
+# of expected passes		488
+# of unexpected failures	9
 # of unresolved testcases	4
 
 ==> lus2lic4.sum <==
@@ -1777,15 +1777,15 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus 37907 {}
 # of expected passes		465
 # of unexpected failures	6
 ===============================
-# Total number of failures: 19
-lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 0 seconds
-lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 56 seconds
+# Total number of failures: 18
+lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds
+lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 54 seconds
 lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 74 seconds
 lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 168 seconds
-lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 68 seconds
+lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 67 seconds
 * Ref time: 
-0.05user 0.02system 6:06.52elapsed 0%CPU (0avgtext+0avgdata 5648maxresident)k
-160inputs+0outputs (0major+6211minor)pagefaults 0swaps
+0.05user 0.02system 6:03.98elapsed 0%CPU (0avgtext+0avgdata 5676maxresident)k
+160inputs+0outputs (0major+6200minor)pagefaults 0swaps
 * Quick time (-j 4):
-0.06user 0.01system 2:51.96elapsed 0%CPU (0avgtext+0avgdata 5652maxresident)k
-96inputs+0outputs (0major+6190minor)pagefaults 0swaps
+0.06user 0.01system 2:50.47elapsed 0%CPU (0avgtext+0avgdata 5700maxresident)k
+96inputs+0outputs (0major+6210minor)pagefaults 0swaps
diff --git a/test/should_fail/semantics/depend.lus b/test/should_fail/semantics/depend.lus
index f051eaf70924fda478ed063e115b825d0f780ddc..385029e79ce686f92a1598857a2731579c16ec49 100644
--- a/test/should_fail/semantics/depend.lus
+++ b/test/should_fail/semantics/depend.lus
@@ -20,10 +20,8 @@ let
   biz1 = bizzare { a = a ; b = b};
   biz2 = bizzare { a = biz1.b ; b = biz1.a};
   res[0] = biz1;
-
   res[1].b = b;
   res[1].a[0] = a[1];
-
  res[1].a[1] = biz2.b[0];
 
   a[0] = opp(b[1]);