diff --git a/guides/users/README.md b/guides/users/README.md
index ac94585129e6b4e8136672c6ed84dad9ec7b90dc..e247db1156ca4da910d32f0ce0b84ddce25790b9 100644
--- a/guides/users/README.md
+++ b/guides/users/README.md
@@ -1,31 +1,54 @@
-- [Dot files](#orgb9209ad)
-- [Algorithms](#org7742a9c)
-- [Demons](#org8ea31bc)
-  - [Built-in demons](#org9966a8e)
-  - [Custom demons](#orgf2216a6)
-- [CLI](#org95f9d26)
-- [Lutin, `lurette`, and `rdbg`](#orgbedc9f2)
-  - [Running interactive sessions with `rdbg`](#org77af7a9)
-  - [Running batch sessions with `lurette`](#org4e27195)
-- [Releases Notes](#org27e58ac)
-- [Installation](#org65dd59d)
-  - [From source](#orgc3c7db1)
-  - [Via opam (not yet working)](#orgb5b1bb5)
+# Table of Contents
 
-Basically, one needs to provide
+1.  [TL;DR](#orga45eea4)
+2.  [Topology](#orgb8c7290)
+3.  [Algorithms](#orgc894586)
+4.  [Batch Simulations](#org0743f40)
+    1.  [Running batch simulations with Built-in demons](#orgee42d2b)
+    2.  [Running batch simulations with manual demons](#orge9dcf0f)
+    3.  [Running batch simulations with `lurette`](#org11cd697)
+    4.  [The `sasa` CLI](#org13a550d)
+5.  [Interactive Simulation](#org7b95c08)
+    1.  [Running interactive sessions with `rdbg`](#org3e6af24)
+    2.  [Running batch sessions with `lurette`](#org3c9df51)
+6.  [Viewing Results](#org459aaeb)
+7.  [Install](#orgcf8ca49)
+    1.  [From source](#org7a5696b)
+    2.  [Via opam (not yet working)](#orgae3acee)
+8.  [More](#org349aeb6)
+9.  [FAQ](#orgff5e314)
+    1.  [Is there a FAQ?](#orgd350457)
 
-1.  a dot file
-2.  the algorithms mentionned in the dot file
 
+<a id="orga45eea4"></a>
 
-<a id="orgb9209ad"></a>
+# TL;DR
 
-# Dot files
+SASA is a **Self-stabilizing Algorithms SimulAtor**, based on the so-called **state model** introduced by <span class="underline">Dijkstra</span> in its seminal article on [Self-stabilizing distributed algorithms](http://www.cs.utexas.edu/~EWD/ewd04xx/EWD426.PDF)
 
-Dot files should
+Basically, one needs to provide:
 
-1.  follow the [graphviz/dot format](https://en.wikipedia.org/wiki/DOT_(graph_description_language)).
-2.  all nodes **must be labelled** by the `algo` field
+1.  a topology, made of nodes and channels (via a dot file)
+2.  the algorithms attached to nodes (via `ocaml` programs)
+
+Now, suppose you have a topology defined in `ring.dot`, that refers to an algorithm defined in the ocaml program `p.ml` (cf `test/skeleton/` directory), you can simulate it as follows:
+
+```sh
+ocamlfind ocamlopt -shared -package sasacore p.ml -o p.cmxs
+sasa g.dot
+```
+
+The source code is available at <https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa>
+
+
+<a id="orgb8c7290"></a>
+
+# Topology
+
+The topology is given via `.dot` files, that should
+
+1.  follow the [graphviz/dot format](https://en.wikipedia.org/wiki/DOT_(graph_description_language))
+2.  have nodes **labelled** by the `algo` field
 
 ```dot
 graph ring {
@@ -44,7 +67,7 @@ graph ring {
 Of course the `some_algo.ml` file must exist.
 
 
-<a id="org7742a9c"></a>
+<a id="orgc894586"></a>
 
 # Algorithms
 
@@ -63,68 +86,82 @@ More precisely, each algorithm should provide 3 functions that must be registred
 which profiles is defined in [algo.mli](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/blob/master/lib/algo/algo.mli)
 
 ```ocaml
-(* Time-stamp: <modified the 19/05/2019 (at 21:43) by Erwan Jahier> *)
+let x = ref 6 in 
+ !x
+type t
+
+```
+
+```lutin
+let x = ref 6 in 
+ !x
+type t
 
+```
+
+```code
+(* Time-stamp: <modified the 24/09/2019 (at 17:09) by Erwan Jahier> *)
 (** Process programmer API *)
-type varT = It | Ft | Bt | Et of int | St | Nt | At of varT * int
-type vars = (string * varT) list 
-
-type value = I of int | F of float | B of bool  | E of int | S of string
-           | N of int  (* neighbor canal number *)
-           | A of value array
-type local_env = string -> value 
-type action = string (* label *)
-
-type neighbor = {
-  lenv:  local_env;
-  n_vars: vars;
-  pid: unit -> string; (* Returns the pid of the neigbhor. This info
-                          is not available in all modes (e.g.,
-                          anonymous) *)
+
+type 's neighbor = {
+  state: 's; (* processes local state (user defined) *) 
+  pid  : unit -> string; (* nb: this pid is not available in all
+                            simulation modes (e.g., anonymous) *)
+  spid:  unit -> string; (* pid of the process this neighbor is the neighbor of *)
   reply: unit -> int; 
   (* Returns the channel number that let this neighbor access to the
-     content of the process, if the neighbor can access to the
-     process.  Returns -1 if the neigbor can not access to the
-     process, which can happen in directed graphs only.  This info is
-     not available in all modes *)
+     content of the process, if it neighbor can access it.  Returns -1
+     if the neigbor can not access to the process, which may happen in
+     directed graphs only.  This info is not available in all simulation
+     modes. *)
+  weight: unit -> int option; (* may be available in directed graphs only *)
 }
 
-type enable_fun = neighbor list -> local_env -> action list
-type step_fun   = neighbor list -> local_env -> action -> local_env
-
-(** Those 3 registering functions must be called! *)
 type algo_id = string
-val reg_vars : algo_id -> vars -> unit
-val reg_enable : algo_id  -> enable_fun -> unit
-val reg_step : algo_id  -> step_fun -> unit
-
-(** raised by sasa if one of the function above is not called *)
-exception Unregistred of string * string
+type action  = string 
+type 's enable_fun = 's neighbor list -> 's -> action list
+type 's step_fun   = 's neighbor list -> 's -> action -> 's
+
+type 's algo_to_register = {
+  algo_id   : string;
+  init_state: int (* holds the process neigbors number *) -> 's;
+  enab      : 's enable_fun;
+  step      : 's step_fun;
+  actions   : action list option (** Mandatory in custom demon mode *)
+}
+type 's to_register = {
+  algo : 's algo_to_register list;
+  state_to_string: 's -> string; (* [1] *)
+  state_of_string: (string -> 's) option; (* To be able to parse state init in the dot *)
+  copy_state: 's -> 's;
+}
+(* [1] for state_to_string, the idea here is to print the raw values
+   contained in 's.
 
-(** This one is not mandatory.  The initialisation done in the dot
-   file have priority over this one.  *)
-val reg_init_vars : algo_id -> (neighbor list -> local_env) -> unit
+   If a value is omitted, one won't see it in the simulation outputs.
 
-(** Mandatory in custom mode only. *)
-val reg_actions : algo_id -> action list -> unit
+   If one prepend a value with "some_id=", some_id will we used in
+   the simulation outputs. Otherwise, an id will be invented *)
 
-(** util(s) *)
-val value_to_string : value -> string
+type node_id = string (* cf topology.mli *)
 
+(** To be called once *)
+val register : 's to_register -> unit
 
-(**/**)
-(** functions below are not part of the API *)
-val vart_to_rif_decl: varT -> string -> (string * string) list
-val vart_to_rif_string: varT -> string -> string
-val verbose_level: int ref
 
+val get_graph_attribute : string -> string
 
-(** the following functions are used by sasa *)
-val get_vars   : algo_id -> vars
-val get_enable : algo_id -> enable_fun
-val get_step   : algo_id -> step_fun 
-val get_init_vars  : algo_id -> (string * varT) list -> (neighbor list -> local_env) 
-val get_actions   : algo_id -> action list
+(** Topological infos *)
+val card : unit -> int
+val min_degree : unit -> int
+val mean_degree : unit -> float
+val max_degree : unit -> int
+val is_cyclic : unit -> bool
+val is_connected : unit -> bool
+val is_tree : unit -> bool
+val height : unit -> (node_id -> int) option
+val links_number : unit -> int
+val diameter : unit -> int
 ```
 
 Optionnaly, one can register a function that provides initial values to local variables (`reg_init`). If not such registration is done, local variables will be set according to `init` annotations in the dot file. If no such annotations exists, initial values will be chosen at random.
@@ -154,16 +191,28 @@ Actions names (`string`) must be registered if one wants to use `sasa` with cust
 Some examples can be found in the [test](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/tree/master/test) directory.
 
 
-<a id="org8ea31bc"></a>
+<a id="org0743f40"></a>
 
-# Demons
+# Batch Simulations
 
 
-<a id="org9966a8e"></a>
+<a id="orgee42d2b"></a>
 
-## Built-in demons
+## Running batch simulations with Built-in demons
 
-Built-in demons are usable via one of the following options:
+To launch batch simulations, one can use the `sasa` Command Line Interface.
+
+For instance, in order to simulate an algorithm defined in the `ring.dot` (cf <../../test/coloring>), you can launch the following command:
+
+```sh
+sasa ring.dot 
+```
+
+By default, the distributed demon will be used to activate actions. Several other demon can be used, via one of the following options:
+
+```sh
+sasa -h | grep "\-demon"
+```
 
     --synchronous-demon, -sd
     --central-demon, -cd
@@ -172,31 +221,55 @@ Built-in demons are usable via one of the following options:
     --custom-demon, -custd
 
 
-<a id="orgf2216a6"></a>
+<a id="orge9dcf0f"></a>
+
+## Running batch simulations with manual demons
+
+By using the `--custom-demon` option (or `-custd` for short), you can play the role of the demon. More precisely, you will be prompted for stating which actions should be activated, among the set of enabled actions.
+
+```sh
+cd ../../test/unison
+sasa ring.dot --custom-demon
+```
 
-## Custom demons
+At each step, xxx
 
 In the custom demon mode, the demon is executed outside `sasa`, by a process that communicates via the standard input/output using [RIF](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-sec-5) conventions. More precisely, `sasa` writes on `stdout` a Boolean for each action and each process, that states if the corresponding action is enabled for the current step. Then it reads on `stdin` a Boolean for each action and each process that tells which actions (among the enabled ones) should be activated.
 
 The demon can thus be played by users that read and enter Boolean values.
 
-```shell
-cd ../../test/unison
-sasa ring.dot --custom-demon
+In order to enter such input more easily, one can use [`luciole-rif`](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-sec-8)
+
+```sh
+luciole-rif sasa ring.dot --custom-demon
 ```
 
-It can also by simulated by `lutin` programs via the use of `lurette` (for batch executions) or `rdbg` (for interactive sessions).
+It can also by simulated by [`lutin`](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-sec-4) programs via the use of [`lurette`](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-sec-9) (for batch executions) or [`rdbg`](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-sec-10) (for interactive sessions).
 
 Built-in demons can of course be programmed in Lutin. One can generate such demons using the `--gen-lutin-demon` option: `sasa --gen-lutin-demon a_graph.dot`. It can be handy at least to get the demons variables names in the good order if one to write its own demon.
 
 Moreover, for using the custom mode, it is mandatory to register actions (via `Algo.reg_actions`).
 
 
-<a id="org95f9d26"></a>
+<a id="org11cd697"></a>
 
-# CLI
+## Running batch simulations with `lurette`
 
-```shell
+If you want to perform simulations with custom demons, you need to use `lurette`. For instance, in order to simulate an algorithm defined in the `ring.dot` (cf <../../test/coloring>) using a Lutin demon defined in `ring.lut`, you can launch the following command:
+
+```sh
+lurette \
+     -env "sasa ring.dot -custd" \
+     -sut "lutin ring.lut -n distributed"
+
+```
+
+
+<a id="org13a550d"></a>
+
+## The `sasa` CLI
+
+```sh
 sasa --help
 ```
 
@@ -211,12 +284,17 @@ sasa --help
                 Use a Locally Central demon
                 (i.e., never activates two neighbors actions in the same step)
     --distributed-demon, -dd
-                Use a Distributed demon (which select at least one action)
+                Use a Distributed demon (which select at least one action). This is the default demon.
     --custom-demon, -custd
                 Use a Custom demon (forces --rif)
     --rif, -rif Follows RIF conventions
     --seed, -seed
                 Set the pseudo-random generator seed of build-in demons
+    --gen-register, -reg
+                Generates the registering file and exit.
+    
+    
+     
     --length, -l <int>
                 Maximum number of steps to be done (10000 by default).
     
@@ -228,16 +306,18 @@ sasa --help
                 Display main options
     --more, -m  Display more options
 
-For more options:
+More `sasa` options:
 
-```shell
+```sh
 sasa --more
 ```
 
     --gen-lutin-demon, -gld
                 Generate Lutin demons and exit
+    --gen-lustre-oracle-skeleton, -glos
+                Generate a Lustre oracle skeleton
     --list-algos, -algo
-                Output the algo names used in the dot file and exit. 
+                Output the algo files used in the dot file and exit. 
     --dummy-input
                 Add a dummy input to sasa so that built-in demon can be used from rdbg
     --ignore-first-inputs, -ifi
@@ -247,16 +327,20 @@ sasa --more
                 Display the version ocaml version sasa was compiled with and exit.
 
 
-<a id="orgbedc9f2"></a>
+<a id="org7b95c08"></a>
 
-# Lutin, `lurette`, and `rdbg`
+# Interactive Simulation
+
+If you want to perform interaction
+
+Lutin, `lurette`, and `rdbg`
 
 cf `Makefile` in the [test](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/tree/master/test) directory.
 
 In each sub-directory of [../../test/](../../test/), there is a `rdbg-session.ml` file that takes care of the red-tape for using `rdbg` with the corresponding examples.
 
 
-<a id="org77af7a9"></a>
+<a id="org3e6af24"></a>
 
 ## Running interactive sessions with `rdbg`
 
@@ -321,26 +405,26 @@ rdbg
 Typing '0' will therefore also load the `rdbg_session.ml` file we have just been using.
 
 
-<a id="org4e27195"></a>
+<a id="org3c9df51"></a>
 
 ## Running batch sessions with `lurette`
 
 XXX TODO
 
 
-<a id="org27e58ac"></a>
+<a id="org459aaeb"></a>
 
-# Releases Notes
+# Viewing Results
 
-<https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/releases>
+`sasa -rif` and `lurette` generates `.rif` files that can be viewed with `gnuplot-rif` or `sim2chro`; cf <http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/>
 
 
-<a id="org65dd59d"></a>
+<a id="orgcf8ca49"></a>
 
-# Installation
+# Install
 
 
-<a id="orgc3c7db1"></a>
+<a id="org7a5696b"></a>
 
 ## From source
 
@@ -355,15 +439,13 @@ You will need:
 One can mimick the content of the `test` job in the project [Gitlab CI script](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/blob/master/.gitlab-ci.yml).
 
 
-<a id="orgb5b1bb5"></a>
+<a id="orgae3acee"></a>
 
 ## Via opam (not yet working)
 
 ```sh
-# optional
 opam repo add verimag-sync-repo "http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository"
 opam update -y
-opam depext -y sasa
 opam install -y sasa
 ```
 
@@ -373,3 +455,30 @@ Once this is done, upgrading to the last version of the tools is as simple as:
 opam update
 opam upgrade
 ```
+
+In order to install the tools mentionned in this documentation that can be used with `sasa` (namely, `gnuplot-rif`, `sim2chro`, `luciole-rif`, `lutin`, `lurette`, `rdbg`):
+
+```sh
+opam depext -y rdbg lutin
+opam install -y rdbg lutin
+```
+
+
+<a id="org349aeb6"></a>
+
+# More
+
+-   Releases Notes: <https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/releases>
+-   Sources: <https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa>
+
+
+<a id="orgff5e314"></a>
+
+# FAQ
+
+
+<a id="orgd350457"></a>
+
+## Is there a FAQ?
+
+yes
diff --git a/guides/users/README.org b/guides/users/README.org
index d7d3113a6b575a22348caff2eee3de51064c641e..ccd5f6650f54c1fc6652de5cd3abc4ca4cf05243 100644
--- a/guides/users/README.org
+++ b/guides/users/README.org
@@ -2,7 +2,7 @@
 #+SETUPFILE: theme-bigblow-local.setup
 #+TOC: headlines 2
 #+LANGUAGE:  en
-#+OPTIONS:   H:3 num:nil  \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:nil skip:nil tags:not-in-toc
+#+OPTIONS:   H:3   \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:nil skip:nil tags:not-in-toc
 #+LINK_UP:http://www-verimag.imag.fr/
 #+LINK_HOME:http://www-verimag.imag.fr/
 #+OPTIONS: toc:nil
@@ -10,7 +10,7 @@
 #+TOC: tables             
 #+EMAIL: erwan.jahier@univ-grenoble-alpes.fr  
 #+AUTHOR: Erwan Jahier 
-#+TITLE: Self-stabilizing Algorithms SimulAtor: sasa
+#+TITLE: Self-stabilizing Algorithms SimulAtor: SASA 
 
  
 * TL;DR 
diff --git a/lib/algo/algo.ml b/lib/algo/algo.ml
index 5c5d10fe9ff75860166fcbb402fdae9d2227f0c6..8d304411a62af73eecdbdcdddce41a39f48a904c 100644
--- a/lib/algo/algo.ml
+++ b/lib/algo/algo.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 06/09/2019 (at 09:56) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 10:25) by Erwan Jahier> *)
 
 open Sasacore
 (* Process programmer API *)
@@ -10,9 +10,33 @@ type 's neighbor = {
   pid: unit -> string; 
   spid:  unit -> string;
   reply: unit -> int; 
-  weight: unit -> int option; 
+  weight: unit -> int; 
 }
 
+exception Not_available
+
+(** processes local state (user defined) *) 
+let (state : 's neighbor -> 's) = fun s -> s.state
+
+(** This pid is not available in all simulation modes (e.g.,
+   anonymous) *)
+let (pid : 's neighbor -> string) = fun s -> s.pid ()
+        
+
+(* spid (self-pid) of the process this neighbor is the neighbor of *)
+let (spid : 's neighbor -> string) = fun s -> s.spid ()
+            
+(** Returns the channel number that let this neighbor access to the
+   content of the process, if it neighbor can access it.  Returns -1
+   if the neigbor can not access to the process, which may happen in
+   directed graphs only.  This info is not available in all
+   simulation modes. *)
+let (reply : 's neighbor -> int) = fun s -> s.reply ()
+                
+(** Makes sense in directed graphs only *)
+let (weight : 's neighbor -> int) = fun s -> s.weight ()
+                    
+
 type 's enable_fun = 's neighbor list -> 's -> action list
 type 's step_fun   = 's neighbor list -> 's -> action -> 's
 
@@ -39,7 +63,9 @@ let (to_reg_neigbor : 's Register.neighbor -> 's neighbor) =
       pid = n.Register.pid;
       spid = n.Register.pid;
       reply = n.Register.reply; 
-      weight = n.Register.weight; 
+      weight = fun () -> match n.Register.weight () with
+          None -> raise Not_available
+        | Some w -> w; 
     } 
 
 let (to_reg_enable_fun : 's enable_fun ->
diff --git a/lib/algo/algo.mli b/lib/algo/algo.mli
index 251a56261ea56cb6139b1b17f6befee284169c57..f0c2154926c6b973b5fccabed404da84495e6608 100644
--- a/lib/algo/algo.mli
+++ b/lib/algo/algo.mli
@@ -1,19 +1,31 @@
-(* Time-stamp: <modified the 04/07/2019 (at 10:36) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 10:26) by Erwan Jahier> *)
 (** Process programmer API *)
 
-type 's neighbor = {
-  state: 's; (* processes local state (user defined) *) 
-  pid  : unit -> string; (* nb: this pid is not available in all
-                            simulation modes (e.g., anonymous) *)
-  spid:  unit -> string; (* pid of the process this neighbor is the neighbor of *)
-  reply: unit -> int; 
-  (* Returns the channel number that let this neighbor access to the
-     content of the process, if it neighbor can access it.  Returns -1
-     if the neigbor can not access to the process, which may happen in
-     directed graphs only.  This info is not available in all simulation
-     modes. *)
-  weight: unit -> int option; (* may be available in directed graphs only *)
-}
+type 's neighbor
+
+(** processes local state (user defined) *) 
+val state : 's neighbor -> 's
+
+(** exception raised when some data can not be accessed (e.g., the
+   pid anonymous networks) *)
+exception Not_available
+
+(** Returns the process id of the neighbor. *)
+val pid : 's neighbor -> string
+
+(* Returns the (self-)pid of the process this neighbor is the neighbor of *)
+val spid : 's neighbor -> string
+
+(** Returns the channel number that let this neighbor access to the
+   content of the process, if it neighbor can access it.  Returns -1
+   if the neigbor can not access to the process, which may happen in
+   directed graphs only.  This info is not available in all
+   simulation modes. *)
+val reply : 's neighbor -> int
+
+(** Makes sense in directed graphs only *)
+val weight : 's neighbor -> int 
+
 
 type algo_id = string
 type action  = string 
diff --git a/lib/sasacore/register.ml b/lib/sasacore/register.ml
index 8385cc4fbd673c977115d6584a60e538d2b4af55..1b0f03a70a05b8aeeba6fb645be2ae9b438e7cec 100644
--- a/lib/sasacore/register.ml
+++ b/lib/sasacore/register.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 05/07/2019 (at 17:27) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 10:22) by Erwan Jahier> *)
 
 type 's neighbor = {
   state:  's ;
diff --git a/lib/sasacore/register.mli b/lib/sasacore/register.mli
index 9947c84af64972d90a730e3940646d8b0353bdd6..df0150f96b272addd7b52a9bfe0d3e1b39d3255b 100644
--- a/lib/sasacore/register.mli
+++ b/lib/sasacore/register.mli
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 05/07/2019 (at 17:27) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 10:22) by Erwan Jahier> *)
 
 type 's neighbor = {
   state:  's ;
diff --git a/test/alea-coloring/p.ml b/test/alea-coloring/p.ml
index 923347151f4b3b413d68d76194a35a9876a4ff66..522b223a52b7abbafa5941dd9e78234a5976aef6 100644
--- a/test/alea-coloring/p.ml
+++ b/test/alea-coloring/p.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 12/09/2019 (at 10:39) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 09:52) by Erwan Jahier> *)
 
 open Algo
 
@@ -7,7 +7,7 @@ let k=3
 let (init_state: int -> 'v) = fun _i -> Random.int k 
 
 let (clash : 'v neighbor list -> 'v list) = fun nl -> 
-  let res = List.map (fun n -> n.state) nl in
+  let res = List.map (fun n -> state n) nl in
   res
 
 let (free : 'v neighbor list -> 'v list) = fun nl ->
diff --git a/test/bfs-spanning-tree/p.ml b/test/bfs-spanning-tree/p.ml
index 11951dadcc2afa101bf46d7420575369cda2dd9b..77a5856132be47c402bab2aa2c3030f4ddbdf646 100644
--- a/test/bfs-spanning-tree/p.ml
+++ b/test/bfs-spanning-tree/p.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 13/09/2019 (at 10:36) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 09:58) by Erwan Jahier> *)
 
 (* This is algo 5.4 in the book *)
 
@@ -16,12 +16,12 @@ let (init_state: int -> 'v) =
 
     
 let (dist: 'v neighbor list -> int) = fun nl -> 
-  let dl = List.map (fun n -> n.state.d) nl in
+  let dl = List.map (fun n -> (state n).d) nl in
   1+(List.fold_left min (d-1) dl)
 
 let (dist_ok: 'v neighbor list -> 'v -> bool) =
   fun nl e -> 
-    let dl = List.map (fun n -> n.state.d) nl in
+    let dl = List.map (fun n -> (state n).d) nl in
     let md = List.fold_left min (List.hd dl) (List.tl dl) in
     e.d - 1 = md
 
@@ -36,7 +36,7 @@ let (get_parent: 'v neighbor list -> 'v -> 'v neighbor) =
 let (enable_f:'v neighbor list -> 'v -> action list) =
   fun nl e ->
     let par = get_parent nl e in
-    let par_st = par.state in
+    let par_st = state par in
     (if  (e.d) <> dist nl then ["CD"] else []) @
     (if (dist_ok nl e) && ( par_st.d <> e.d - 1) then ["CP"] else [])
 
@@ -55,7 +55,7 @@ let (step_f : 'v neighbor list -> 'v -> action -> 'v) =
     function
     | "CD" -> { e with d = dist nl } 
     | "CP" ->
-      let ok_l = List.map (fun n ->  n.state.d = e.d-1) nl in
+      let ok_l = List.map (fun n ->  (state n).d = e.d-1) nl in
       let q = index_of_first_true ok_l in
       { e with  par = q }
         
diff --git a/test/coloring/p.ml b/test/coloring/p.ml
index 6ebe9ce9be95602a25e4212cf59bbf5342039d00..cd63f20136f2359733c5192cbcac7c8a6cfe122e 100644
--- a/test/coloring/p.ml
+++ b/test/coloring/p.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 12/09/2019 (at 10:46) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 09:53) by Erwan Jahier> *)
 
 (* This is algo 3.1 in the book *)
 
@@ -14,11 +14,11 @@ let (copy_state : ('v -> 'v)) = fun x -> x
 
 let (neigbhors_values : 'v neighbor list -> 'v list) =
   fun nl ->
-    List.map (fun n -> n.state) nl 
+    List.map (fun n -> state n) nl 
 
 let (clash : 'v  -> 'v neighbor list -> bool) = fun v nl -> 
   let vnl = neigbhors_values nl in
-  let inl = List.map (fun n -> n.pid()) nl in
+  let inl = List.map (fun n -> pid n) nl in
   let res = List.mem v vnl in
   if verbose then (
     Printf.printf "%s %s in [%s] (%s)\n" (state_to_string v)
diff --git a/test/dfs-list/p.ml b/test/dfs-list/p.ml
index ed585a5e11f52581afe287a58943fa7baf2ddb23..28d9d7ef110b252c2bec7a0b2ac31c7ddffaeb33 100644
--- a/test/dfs-list/p.ml
+++ b/test/dfs-list/p.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 13/09/2019 (at 10:59) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 10:01) by Erwan Jahier> *)
 
 (* cf Collin-Dolex-94 *)
 
@@ -23,7 +23,7 @@ let min_path al =
 
 let (get_paths: 'v neighbor list -> int list list) =
   fun nl ->
-    List.mapi (fun alpha_i n -> n.state.path) nl 
+    List.mapi (fun alpha_i n -> (state n).path) nl 
     
 (* concat or truncate *)
 let (concat_path : int list -> int -> int list) =
@@ -37,7 +37,7 @@ let (compute_parent : State.t neighbor list -> int list -> int) =
   fun nl p ->
     (* The parent of a process p is the neighbor which path is a
        subpath of p *)
-    let paths = List.mapi (fun i n -> n.state.path, i) nl in
+    let paths = List.mapi (fun i n -> (state n).path, i) nl in
     let _,parent =
       match 
         List.find_opt
@@ -53,7 +53,7 @@ let (compute_parent : State.t neighbor list -> int list -> int) =
 
 let compute_path nl e =
   let paths = get_paths nl in
-  let paths = List.map2 (fun p n -> concat_path p (n.reply ())) paths nl in
+  let paths = List.map2 (fun p n -> concat_path p (reply n)) paths nl in
   let path = min_path paths in
   path
     
@@ -64,8 +64,8 @@ let (enable_f:'v neighbor list -> 'v -> action list) =
     let p_str = array_to_string v.path in 
     Printf.eprintf " p=[%s] parent=%d \n" p_str v.par ;
     List.iter (fun n ->  
-        let n_str = array_to_string n.state.path in 
-        Printf.eprintf "    n=[%s] parent=%d\n" n_str n.state.par 
+        let n_str = array_to_string (state n).path in 
+        Printf.eprintf "    n=[%s] parent=%d\n" n_str (state n).par 
       ) nl ; flush stderr; 
    *)
     let path = compute_path nl v in
diff --git a/test/dfs/p.ml b/test/dfs/p.ml
index 18495b6b968adbd0f5cbe616ee24b92bb2841e4c..3ca09fe5b81801756a21e2601d85b7202109bc98 100644
--- a/test/dfs/p.ml
+++ b/test/dfs/p.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 13/09/2019 (at 10:54) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 10:00) by Erwan Jahier> *)
 
 (* cf Collin-Dolex-94 *)
 
@@ -27,7 +27,7 @@ let min_path al =
 
 let (get_paths: 'v neighbor list -> int array list) =
   fun nl ->
-    List.mapi (fun alpha_i n -> n.state.path) nl 
+    List.mapi (fun alpha_i n -> (state n).path) nl 
 
 (* The index of the first negative elt in a starting from 1. Returns
    the size of the a if none is found *)
@@ -69,7 +69,7 @@ let (compute_parent : t neighbor list -> int array -> int) =
     (* The parent of a process p is the neighbor which path is a
        subpath of p *)
     let last_p = end_of_a p in
-    let paths = List.mapi (fun i n -> n.state.path, i) nl in
+    let paths = List.mapi (fun i n -> (state n).path, i) nl in
     let _,parent =
       match 
         List.find_opt
@@ -86,7 +86,7 @@ let (compute_parent : t neighbor list -> int array -> int) =
 
 let compute_path nl e =
   let paths = get_paths nl in
-  let paths = List.map2 (fun p n -> concat_path p (n.reply ())) paths nl in
+  let paths = List.map2 (fun p n -> concat_path p (reply n)) paths nl in
   let path = min_path paths in
   path
     
diff --git a/test/dijkstra-ring/p.ml b/test/dijkstra-ring/p.ml
index f72bae298c14be7d6314a5d2995173ac0248ac45..3ab913e20537028bcd5f19ef29ff2682a5669126 100644
--- a/test/dijkstra-ring/p.ml
+++ b/test/dijkstra-ring/p.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 13/09/2019 (at 09:50) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 09:59) by Erwan Jahier> *)
 
 open Algo
 
@@ -14,13 +14,13 @@ let (init_state: int -> 's) =
 let (enable_f: 's neighbor list -> 's -> action list) =
   fun nl e ->
     let pred = List.hd nl in
-    if e <>  pred.state then ["a"] else []
+    if e <> state pred then ["a"] else []
   
 let (step_f : 's neighbor list -> 's -> action -> 's) =
   fun nl e a ->
     let pred = List.hd nl in
     match a with 
-    | _ -> pred.state
+    | _ -> state pred
 
 let actions = Some ["a"]
 
diff --git a/test/dijkstra-ring/root.ml b/test/dijkstra-ring/root.ml
index c5b56d464dd537bbddab8f41ac8759088bd8bd55..20d36fa78020f3cfb6a13a837a22f2250e8e137e 100644
--- a/test/dijkstra-ring/root.ml
+++ b/test/dijkstra-ring/root.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 13/09/2019 (at 09:50) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 09:59) by Erwan Jahier> *)
 
 open Algo
 
@@ -13,7 +13,7 @@ let (init_state: int -> 's) =
 let (enable_f: 's neighbor list -> 's -> action list) =
   fun nl e ->
     let pred = List.hd nl in
-    if e = pred.state then ["a"] else []
+    if e = state pred then ["a"] else []
 
 let (step_f : 's neighbor list -> 's -> action -> 's) =
   fun nl e a ->
diff --git a/test/skeleton/p.ml b/test/skeleton/p.ml
index ad2b85a4da1e9b15ec84be9e355d0f5775fcb5ca..f20b3e7301f03b5de53c5e5a12559c46cb88d7ca 100644
--- a/test/skeleton/p.ml
+++ b/test/skeleton/p.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 13/09/2019 (at 09:06) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 09:57) by Erwan Jahier> *)
 
 (* a dumb algo *)
 
@@ -10,7 +10,7 @@ let (init_state: int -> 'st) =
 
 let (enable_f: 'st neighbor list -> 'st -> action list) =
   fun nl e ->
-    match (List.hd nl).state with
+    match state (List.hd nl) with
     | 0 ->  ["action2"]
     | 1 ->  []
     | _ ->  ["action1"]
diff --git a/test/unison/unison.ml b/test/unison/unison.ml
index 4e2961af1827bcd3dd3f7ca5ded20f8e5ef8ea92..68490671dd4c127f5bbdb9e064d9b94b01ac356c 100644
--- a/test/unison/unison.ml
+++ b/test/unison/unison.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 13/09/2019 (at 09:56) by Erwan Jahier> *)
+(* Time-stamp: <modified the 25/09/2019 (at 09:59) by Erwan Jahier> *)
 
 open Algo
 
@@ -18,7 +18,7 @@ let list_min l =
   | x::l -> List.fold_left min x l
 
 let new_clock_value nl clock =
-  let cl = List.map (fun n ->  n.state) nl in
+  let cl = List.map (fun n -> state n) nl in
   let min_clock = List.fold_left min clock cl in
   (min_clock + 1) mod m