diff --git a/src/dot2lus.ml b/src/dot2lus.ml
index 94b12bebf58da9220432c938d5555add9a582023..e406a6f5c8709b0e629738b77b3829a693cf3ca1 100644
--- a/src/dot2lus.ml
+++ b/src/dot2lus.ml
@@ -142,7 +142,7 @@ let output_topology output (graph : Topology.t) name =
  graph.nodes
  |> List.iteri (fun i n ->
   let algo = algo_name n in
-  let neighbors = graph.succ n.id |> List.map (fun (_, id) -> index_of_id id) in
+  let neighbors = graph.succ n.id |> List.map (fun id -> index_of_id id) in
   let deg = List.length neighbors in
   let nl = sprint_neighbor_list neighbors "p_c" in
   let pnl = sprint_neighbor_list neighbors "prev_p_c" in
diff --git a/src/dune b/src/dune
deleted file mode 100644
index f4c25e2510d78905b129b9b29d7f65c98ef05d5a..0000000000000000000000000000000000000000
--- a/src/dune
+++ /dev/null
@@ -1,16 +0,0 @@
-;; Time-stamp: <modified the 21/11/2021 (at 17:50) by Erwan Jahier>
-
-(executable
- (name dot2lus)
- (flags -noassert)
-  (link_flags (-linkall))
- (libraries ocamlgraph lutils sasacore algo)
-)
-
-(install
- (section bin)
- (package sasa)
- (files (dot2lus.exe as salut))
-; (files sasaRun.cmxa)
-)
-
diff --git a/test/Makefile.inc b/test/Makefile.inc
index 821770eb2291ab1ca91b6df98afda8c23499efd6..99a6691a08c7916afb8e8e79d3839154a024e02d 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -21,7 +21,7 @@ clean:
 	rm -f $(TOPOLOGY).ml config.ml
 	rm -f *.rif *.seed
 	rm -f $(TOPOLOGY).lus
-	rm -f $(TOPOLOGY)_verify.lv4
+	rm -f *_verify.lv4
 
 test: $(TOPOLOGY).cmxs $(TOPOLOGY).lus
 	lurette -sut "sasa $(TOPOLOGY).dot $(SASAFLAGS)" -oracle "lv6 $(TOPOLOGY)_oracle.lus -n oracle"
@@ -33,16 +33,23 @@ verify: $(TOPOLOGY)_verify.lv4
 	kind2  $<
 
 
-$(TOPOLOGY).lus: $(TOPOLOGY).dot
+# %(TOPOLOGY).lus: $(TOPOLOGY).dot
+%.lus: %.dot
 	$(D2L) $(DOT2LUSFLAGS) $<
 
-$(TOPOLOGY).cmxs: state.ml $(SASA_ALGOS) config.ml $(TOPOLOGY).ml
-	ocamlfind ocamlopt -package algo -shared $^ -o $@
+LIB=-package algo
+OCAMLOPT=ocamlfind ocamlopt -bin-annot
 
-$(TOPOLOGY).ml config.ml: $(TOPOLOGY).dot
+%.cmxs: %.ml
+	$(OCAMLOPT) $(LIB) -shared state.ml $(shell sasa -algo $*.dot) config.ml $< -o $@
+
+
+
+%.ml: %.dot
 	sasa -reg $<
 
 # XXX: this method of adding kind2 annotations is brittle
-$(TOPOLOGY)_verify.lv4: $(TOPOLOGY)_oracle.lus $(TOPOLOGY).lus verify.lus
+%_verify.lv4: %_oracle.lus %.lus verify.lus
 	lv6 $< -n verify --lustre-v4 -o $@
 	sed -i -e "s/tel/--%MAIN ;\n--%PROPERTY ok;\ntel/" $@
+
diff --git a/test/token/Makefile b/test/token/Makefile
index 1450b7509912410941e00b4c040c4487e3aaf311..b7104cac5d223e95bd2361a73dcc42058e2cbb6e 100644
--- a/test/token/Makefile
+++ b/test/token/Makefile
@@ -1,5 +1,8 @@
 TOPOLOGY ?= ring3
 DOT2LUSFLAGS ?=
 SASA_ALGOS := p.ml root.ml
+DECO_PATTERN="0:root.ml 1-:p.ml"
+
 
 include ../Makefile.inc
+# -include ../../../test/Makefile.dot
diff --git a/test/token/p.lus b/test/token/p.lus
index cd8fe95875a3c0fd8d215f506dd9851e24361e1b..196daf81e5b252d354d38f13fba91075c5c6ccb4 100644
--- a/test/token/p.lus
+++ b/test/token/p.lus
@@ -1,11 +1,13 @@
 function p_enable<<const degree:int>>(this : state; neighbors : state^degree)
 returns (enabled : bool^actions_number);
 let
-	enabled = [ this <> neighbors[0] ];
+  enabled = [ this <> neighbors[0] ];
 tel;
 
-function p_step<<const degree:int>>(this : state; neighbors : state^degree; action : action)
+function p_step<<const degree:int>>(
+  this : state;
+  neighbors : state^degree; action : action)
 returns (new : state);
 let
-	new = neighbors[0];
+  new = neighbors[0];
 tel;
diff --git a/test/token/root.lus b/test/token/root.lus
index 1e00e0cd90968de35f51c1ee3a001b5cb2454da7..44121e80eacf3f945f2d6b6386b43f3a3170fec1 100644
--- a/test/token/root.lus
+++ b/test/token/root.lus
@@ -5,17 +5,20 @@ const actions_number = 1;
 
 function action_of_int(i : int) returns (a : action);
 let
-	a = T;
+  a = T;
 tel;
 
 function root_enable<<const degree:int>>(this : state; neighbors : state^degree)
 returns (enabled : bool^actions_number);
 let
-	enabled = [ this = neighbors[0] ];
+  enabled = [ this = neighbors[0] ];
 tel;
 
-function root_step<<const degree:int>>(this : state; neighbors : state^degree; action : action)
+function root_step<<const degree:int>>(
+  this : state;
+  neighbors : state^degree;
+  action : action)
 returns (new : state);
 let
-	new = (this + 1) mod card;
+  new = (this + 1) mod card;
 tel;
diff --git a/test/token/verify.lus b/test/token/verify.lus
index e0c1969c386c8056ba49f4adf258a65be41aa086..9a9ab63dadbb7a2d512312fd0d679bfc66c17ce9 100644
--- a/test/token/verify.lus
+++ b/test/token/verify.lus
@@ -20,7 +20,7 @@ let
 	legitimate = tokens = 1;
 	closure = true -> (pre(legitimate) => legitimate);
 
-	steps = (-1 -> pre(steps)) + 1;
+	steps = 0 -> pre(steps) ;
 	ok = tokens >= 1 -- there should always be at least one token holder
 	     and closure
 	     and (steps >= 3*card*(card-1)/2 - card - 1 => legitimate); -- worst-case stabilization