diff --git a/Makefile b/Makefile
index 21abdd6e600702976719de76dce7980469e3880c..b31d55e9cb731265c83a9a25439504c87b7f96c2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,14 @@
 CC=ocamlopt
 FLAGS=
 
-all: main.out
+all: main.out tests.out
 
-main.out: src/main.ml
-	$(CC) $(FLAGS) -o bin/$@ $< 
+tests: tests.out
+
+main: main.out
+
+main.out: src/main.ml src/user.ml
+	cd src && $(CC) $(FLAGS) -o ../bin/$@ main.ml user.ml 
+
+tests.out: src/main.ml src/tests.ml
+	cd src && $(CC) $(FLAGS) -o ../bin/$@ main.ml tests.ml
diff --git a/README.md b/README.md
index b62cb3b18bd54fc7f89383dade3d21bc0b6f0c44..d69a6a47f501b9e7306740a31e87eb3dc4cfba1e 100644
--- a/README.md
+++ b/README.md
@@ -7,11 +7,14 @@ Le but de ce projet est d'implanter un protocole de communication avec les habit
 ## Compilation : 
 
 - Pour compiler le projet :
-> make build
+> make
 
 - Pour compiler les tests :
 > make tests
 
+- Pour tout compiler :
+> make all
+
 ## Utilisation :
 
 Après compilation vous pouvez lancer le programme avec :
diff --git a/bin/main.out b/bin/main.out
index 064efa5c21a4fc71a8e54b4c8687de7b4b66aece..d3b447c6b1ffa2f84087cea4ba4064b50a1c1398 100755
Binary files a/bin/main.out and b/bin/main.out differ
diff --git a/doc/_minted-rapport/2948F96AAE53931596E74284E4F762CBF5367203DB9C5C29E728CCB221C2B2CA.pygtex b/doc/_minted-rapport/2948F96AAE53931596E74284E4F762CBF5367203DB9C5C29E728CCB221C2B2CA.pygtex
new file mode 100644
index 0000000000000000000000000000000000000000..344a06560f1d953f881d38a932f70cf3fdcc1ccd
--- /dev/null
+++ b/doc/_minted-rapport/2948F96AAE53931596E74284E4F762CBF5367203DB9C5C29E728CCB221C2B2CA.pygtex
@@ -0,0 +1,4 @@
+\begin{Verbatim}[commandchars=\\\{\}]
+	\PYG{k}{let} \PYG{n}{roue} \PYG{o}{=} \PYG{o}{[}\PYG{l+s+sc}{\PYGZsq{} \PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}A\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}B\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}C\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}D\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}E\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}F\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}G\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}H\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}I\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}J\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}K\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}L\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}M\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}N\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}O\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}P\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}Q\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}R\PYGZsq{}}\PYG{o}{;}
+		\PYG{l+s+sc}{\PYGZsq{}S\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}T\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}U\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}V\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}W\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}X\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}Y\PYGZsq{}}\PYG{o}{;}\PYG{l+s+sc}{\PYGZsq{}Z\PYGZsq{}}\PYG{o}{]}
+\end{Verbatim}
diff --git a/doc/_minted-rapport/default-pyg-prefix.pygstyle b/doc/_minted-rapport/default-pyg-prefix.pygstyle
new file mode 100644
index 0000000000000000000000000000000000000000..cd0f51ac14bc0245adbc1b7a69a2d395b97b924d
--- /dev/null
+++ b/doc/_minted-rapport/default-pyg-prefix.pygstyle
@@ -0,0 +1,101 @@
+
+\makeatletter
+\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
+    \let\PYG@ul=\relax \let\PYG@tc=\relax%
+    \let\PYG@bc=\relax \let\PYG@ff=\relax}
+\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
+\def\PYG@toks#1+{\ifx\relax#1\empty\else%
+    \PYG@tok{#1}\expandafter\PYG@toks\fi}
+\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
+    \PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
+\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
+
+\expandafter\def\csname PYG@tok@w\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
+\expandafter\def\csname PYG@tok@c\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYG@tok@cp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.74,0.48,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@k\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@kp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@kt\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
+\expandafter\def\csname PYG@tok@o\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYG@tok@ow\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
+\expandafter\def\csname PYG@tok@nb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@nf\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
+\expandafter\def\csname PYG@tok@nc\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
+\expandafter\def\csname PYG@tok@nn\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
+\expandafter\def\csname PYG@tok@ne\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.82,0.25,0.23}{##1}}}
+\expandafter\def\csname PYG@tok@nv\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYG@tok@no\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@nl\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.63,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@ni\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}
+\expandafter\def\csname PYG@tok@na\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.49,0.56,0.16}{##1}}}
+\expandafter\def\csname PYG@tok@nt\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@nd\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
+\expandafter\def\csname PYG@tok@s\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@sd\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@si\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
+\expandafter\def\csname PYG@tok@se\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.73,0.40,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@sr\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
+\expandafter\def\csname PYG@tok@ss\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYG@tok@sx\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@m\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYG@tok@gh\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
+\expandafter\def\csname PYG@tok@gu\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
+\expandafter\def\csname PYG@tok@gd\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@gi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@gr\endcsname{\def\PYG@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@ge\endcsname{\let\PYG@it=\textit}
+\expandafter\def\csname PYG@tok@gs\endcsname{\let\PYG@bf=\textbf}
+\expandafter\def\csname PYG@tok@gp\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
+\expandafter\def\csname PYG@tok@go\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.53,0.53,0.53}{##1}}}
+\expandafter\def\csname PYG@tok@gt\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
+\expandafter\def\csname PYG@tok@err\endcsname{\def\PYG@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}
+\expandafter\def\csname PYG@tok@kc\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@kd\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@kn\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@kr\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@bp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYG@tok@fm\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
+\expandafter\def\csname PYG@tok@vc\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYG@tok@vg\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYG@tok@vi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYG@tok@vm\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYG@tok@sa\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@sb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@sc\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@dl\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@s2\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@sh\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@s1\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYG@tok@mb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYG@tok@mf\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYG@tok@mh\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYG@tok@mi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYG@tok@il\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYG@tok@mo\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYG@tok@ch\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYG@tok@cm\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYG@tok@cpf\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYG@tok@c1\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYG@tok@cs\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+
+\def\PYGZbs{\char`\\}
+\def\PYGZus{\char`\_}
+\def\PYGZob{\char`\{}
+\def\PYGZcb{\char`\}}
+\def\PYGZca{\char`\^}
+\def\PYGZam{\char`\&}
+\def\PYGZlt{\char`\<}
+\def\PYGZgt{\char`\>}
+\def\PYGZsh{\char`\#}
+\def\PYGZpc{\char`\%}
+\def\PYGZdl{\char`\$}
+\def\PYGZhy{\char`\-}
+\def\PYGZsq{\char`\'}
+\def\PYGZdq{\char`\"}
+\def\PYGZti{\char`\~}
+% for compatibility with earlier versions
+\def\PYGZat{@}
+\def\PYGZlb{[}
+\def\PYGZrb{]}
+\makeatother
+
diff --git a/doc/_minted-rapport/default.pygstyle b/doc/_minted-rapport/default.pygstyle
new file mode 100644
index 0000000000000000000000000000000000000000..08728b3724e3f22a955d401967aed18343c28aae
--- /dev/null
+++ b/doc/_minted-rapport/default.pygstyle
@@ -0,0 +1,101 @@
+
+\makeatletter
+\def\PYGdefault@reset{\let\PYGdefault@it=\relax \let\PYGdefault@bf=\relax%
+    \let\PYGdefault@ul=\relax \let\PYGdefault@tc=\relax%
+    \let\PYGdefault@bc=\relax \let\PYGdefault@ff=\relax}
+\def\PYGdefault@tok#1{\csname PYGdefault@tok@#1\endcsname}
+\def\PYGdefault@toks#1+{\ifx\relax#1\empty\else%
+    \PYGdefault@tok{#1}\expandafter\PYGdefault@toks\fi}
+\def\PYGdefault@do#1{\PYGdefault@bc{\PYGdefault@tc{\PYGdefault@ul{%
+    \PYGdefault@it{\PYGdefault@bf{\PYGdefault@ff{#1}}}}}}}
+\def\PYGdefault#1#2{\PYGdefault@reset\PYGdefault@toks#1+\relax+\PYGdefault@do{#2}}
+
+\expandafter\def\csname PYGdefault@tok@w\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
+\expandafter\def\csname PYGdefault@tok@c\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYGdefault@tok@cp\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.74,0.48,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@k\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@kp\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@kt\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
+\expandafter\def\csname PYGdefault@tok@o\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYGdefault@tok@ow\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@nb\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@nf\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@nc\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@nn\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@ne\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.82,0.25,0.23}{##1}}}
+\expandafter\def\csname PYGdefault@tok@nv\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYGdefault@tok@no\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@nl\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.63,0.63,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@ni\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}
+\expandafter\def\csname PYGdefault@tok@na\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.49,0.56,0.16}{##1}}}
+\expandafter\def\csname PYGdefault@tok@nt\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@nd\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@s\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@sd\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@si\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
+\expandafter\def\csname PYGdefault@tok@se\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.40,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@sr\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
+\expandafter\def\csname PYGdefault@tok@ss\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYGdefault@tok@sx\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@m\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYGdefault@tok@gh\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
+\expandafter\def\csname PYGdefault@tok@gu\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
+\expandafter\def\csname PYGdefault@tok@gd\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@gi\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@gr\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@ge\endcsname{\let\PYGdefault@it=\textit}
+\expandafter\def\csname PYGdefault@tok@gs\endcsname{\let\PYGdefault@bf=\textbf}
+\expandafter\def\csname PYGdefault@tok@gp\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
+\expandafter\def\csname PYGdefault@tok@go\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.53,0.53,0.53}{##1}}}
+\expandafter\def\csname PYGdefault@tok@gt\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
+\expandafter\def\csname PYGdefault@tok@err\endcsname{\def\PYGdefault@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}
+\expandafter\def\csname PYGdefault@tok@kc\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@kd\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@kn\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@kr\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@bp\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@fm\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
+\expandafter\def\csname PYGdefault@tok@vc\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYGdefault@tok@vg\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYGdefault@tok@vi\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYGdefault@tok@vm\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
+\expandafter\def\csname PYGdefault@tok@sa\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@sb\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@sc\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@dl\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@s2\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@sh\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@s1\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
+\expandafter\def\csname PYGdefault@tok@mb\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYGdefault@tok@mf\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYGdefault@tok@mh\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYGdefault@tok@mi\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYGdefault@tok@il\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYGdefault@tok@mo\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
+\expandafter\def\csname PYGdefault@tok@ch\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYGdefault@tok@cm\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYGdefault@tok@cpf\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYGdefault@tok@c1\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+\expandafter\def\csname PYGdefault@tok@cs\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
+
+\def\PYGdefaultZbs{\char`\\}
+\def\PYGdefaultZus{\char`\_}
+\def\PYGdefaultZob{\char`\{}
+\def\PYGdefaultZcb{\char`\}}
+\def\PYGdefaultZca{\char`\^}
+\def\PYGdefaultZam{\char`\&}
+\def\PYGdefaultZlt{\char`\<}
+\def\PYGdefaultZgt{\char`\>}
+\def\PYGdefaultZsh{\char`\#}
+\def\PYGdefaultZpc{\char`\%}
+\def\PYGdefaultZdl{\char`\$}
+\def\PYGdefaultZhy{\char`\-}
+\def\PYGdefaultZsq{\char`\'}
+\def\PYGdefaultZdq{\char`\"}
+\def\PYGdefaultZti{\char`\~}
+% for compatibility with earlier versions
+\def\PYGdefaultZat{@}
+\def\PYGdefaultZlb{[}
+\def\PYGdefaultZrb{]}
+\makeatother
+
diff --git a/doc/rapport.pdf b/doc/rapport.pdf
index 8b1a1d313df9165a47333f01542472ffba40db31..87876f5607dbd3d0678eed14eef6c58d8bd20c60 100644
Binary files a/doc/rapport.pdf and b/doc/rapport.pdf differ
diff --git a/doc/rapport.tex b/doc/rapport.tex
index ed88589c9e7b135a780ed7da1e0237ad54971320..7e33c317ed1cbab6182bd5be32638e711d176995 100644
--- a/doc/rapport.tex
+++ b/doc/rapport.tex
@@ -27,9 +27,61 @@
 \tableofcontents
 \clearpage
 \section*{Introduction}
-\section{Démarche générale}
-\subsection{Les principales structures de données  utilisées ainsi que les différentes opérations implémentées sur ces structures}
+\begin{center}
+	\textbf{DERNIÈRES NOUVELLES : LES EXTRA-TERRESTRES EXISTENT}
+\end{center}
+
+Le but de ce projet est d'implanter un protocole de communication avec les habitants des mondes lointains.\\
+
+Plus précisément, il s'agira de prendre un message entrée et de donner la suite d'instructions permettant de piloter une (ou plusieurs) antenne(s) afin d'envoyer ledit message.\\
+
+Dans l'urgence de cette nouvelle, nous avons développé un système d'antennes rudimentaire composées chacune d'une roue comportant les 26 lettres de l'alphabet et du caractère espace. Nous pouvons donc voir l'ensemble des symboles utilisables comme un cycle. Le caractère suivant A est B, ..., le caractère suivant Y est Z, le caractère suivant Z est espace suivi de A.\\
+
+Toutes les antennes sont initialement positionnées sur le caractère espace.\\
+
+Les commandes disponibles pour manipuler une antenne sont au nombre de 3 :\\
+
+\begin{itemize}
+	\item "N" : passe au caractère suivant.;
+	\item "P" : revient au caractère précédent;
+	\item "E" : envoie la commande d'émission du caractère courrant.\\ 
+	
+\end{itemize}
+
+Nous devons commencer rapidement à envoyer des messages afin d'ouvrir au plus vite la voie à nos ingénieurs financiers et autres analystes de données. Le projet sera donc découper en trois phases (une antenne, plusieurs antennes et compression du signal).\\
+
+Durant toutes ces phases vos programme devront lire deux lignes sur leur entrée standard.\\
+
+la première ligne comportera un entier n donnant le nombre d'antennes disponibles. Pour la première phase, cet entier sera toujours égal à 1.
+la deuxième ligne comportera le message lui-même.\\
+
+Le programme affichera donc une suite de commandes permettant d'émettre le message.
+\section{Phase 1}
+\subsection{Démarche générale}
+Le principe est le suivant : je défini la roue comme une liste des caractères (en majuscule) : 
+
+\begin{minted}{ocaml}
+	let roue = [' ';'A';'B';'C';'D';'E';'F';'G';'H';'I';'J';'K';'L';'M';'N';'O';'P';'Q';'R';
+		'S';'T';'U';'V';'W';'X';'Y';'Z']
+\end{minted}
+
+Puis, je demande à l'utilisateur le message à traduire grâce aux fonctions [parse\_input ()] et [split\_string s] fournies par le professeur.\\
+
+Le couple (n:int,l:char list) ainsi obtenu est passé dans la fonction [commande (n,l) roue].\\
+
+On introduit alors la fonction [translate c roue] qui se charge de renvoyer la commande correspondant à l'envoi de la lettre c:char, sous forme de string. (Il suffit pour cela de récupérer l'indice (noté i) du caractère c dans roue et de renvoyer i fois 'N' si i<14 sinon 27-i fois 'P').\\
+
+On introduit aussi la fonction [tourner c n roue] 
+
+Cette nouvelle fonction agit par récurrence sur la liste de caractères l de cette manière :\\
+\begin{itemize}
+	\item à la première itération, on traduit le premier caractère de la liste en sa commande (une string) grâce à la fonction translate qui renvoie un couple ()
+	\item à la $n^ieme$ iteration, le $n^ieme$ caractère est traduit en sa commande (en une string) en utilisant la roue 
+\end{itemize}
+ 
+
 \section{Fonctionnement général du script}
+\section{Tests}
 \section{Idées d'optimisation du code}
 
 Au lieu de choisir la roue à utiliser lettre après lettre, on peut tracer un arbre n-aire (où n est le nombre de roues) et trouver le chemin le plus court pour la phrase a traduire. On optimiserai le temps d'execution du programme non pas lettre par lettre mais pour toute la phrase. \\
diff --git a/src/main.cmi b/src/main.cmi
index 178c9b9fe588ef148fc085b95dd6a294c3ae0dc4..c8d94691df1e977bf6db811f68b7705455d67f26 100644
Binary files a/src/main.cmi and b/src/main.cmi differ
diff --git a/src/main.cmo b/src/main.cmo
index 75dc3bc49d33ac8e12eae058a00efa8f032b23e7..df6721d0e31366cc43906f94b83c077c9a26eb5a 100644
Binary files a/src/main.cmo and b/src/main.cmo differ
diff --git a/src/main.cmx b/src/main.cmx
index d8a3319501cbb3d8879c1c95df47d54cc41b0000..b7761fc298c37ba715858de4b32ae8a598ac9b79 100644
Binary files a/src/main.cmx and b/src/main.cmx differ
diff --git a/src/main.ml b/src/main.ml
index 50d4efb9c00b995aa48a50eea60ea663a761f0e6..163b7f9fc180009507b99f1db1bd742a963d7eca 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -6,7 +6,7 @@
  * *)
 
 (* 
- * @ensure : retourne la liste de caracteres correspondant à la chaine [s] 
+ * @ensure : retourne la liste de caracteres correspondant a la chaine [s] 
  *)
 let split_string s =
   let rec aux i n =
@@ -33,7 +33,7 @@ let parse_input () =
 print_elt 1 (parse_input());;*)
 
 (*définition de la roue*)
-let roue = ' '::'A'::'B'::'C'::'D'::'E'::'F'::'G'::'H'::'I'::'J'::'K'::'L'::'M'::'N'::'O'::'P'::'Q'::'R'::'S'::'T'::'U'::'V'::'W'::'X'::'Y'::'Z'::[];;
+let roue = [' ';'A';'B';'C';'D';'E';'F';'G';'H';'I';'J';'K';'L';'M';'N';'O';'P';'Q';'R';'S';'T';'U';'V';'W';'X';'Y';'Z'];;
 
 (* 
  * @ensure : tourne la roue n fois vers la gauche si c='N' et vers la droite si c='P'
@@ -77,10 +77,6 @@ let rec commande (i,l) roue = match l with
     | e::r -> let (s,n) = translate e roue in
     String.concat "" (s::(commande (i,r) (tourner s.[0] n roue))::[]);;
 
-(*Résultat de la phase 1*)
-let input=parse_input();;
-let com = commande input roue;;
-print_string (com);;
 
 (************************************************************Début de la phase 2************************************************************)
 
@@ -104,8 +100,6 @@ let temps_commande s =
     in
     tps liste_char;;
 
-(*test temps d'execution*)
-Printf.printf "\n %d s\n" (temps_commande com);;
 
 let liste_roues=roue::[]
 
@@ -156,7 +150,7 @@ let rec initialize_list n a = if n = 1 then [a] else if n = 0 then [] else a::(i
 (* 
  * @ensure : traduit le message l en commande en selectionnant pour chaque lettre la bonne antenne
  *)
-let commande (n,m) = 
+let commande2 (n,m) = 
 let rec commande_phase2 l liste_roues index_init = match l with
     | [] -> ""
     | e::t -> let index = quelle_roue liste_roues e index_init in
@@ -171,9 +165,5 @@ in
     in
     commande_phase2 m liste 0;;
 
-(*@ensure : test commande_phase 2*)
-let com2 = commande input;;
-print_string com2;;
-Printf.printf "\n %d s \n" (temps_commande com2);;
     
     
diff --git a/src/main.o b/src/main.o
index 948d6c8d158c4b464ee8fd43b6dcbcd2cf77899a..9e4354d48b598e3877a309e5cf296d8ac9dd121b 100644
Binary files a/src/main.o and b/src/main.o differ
diff --git a/src/tests.ml b/src/tests.ml
new file mode 100644
index 0000000000000000000000000000000000000000..1e18efefb2cefca495b5f5a4864a4d5020bf7073
--- /dev/null
+++ b/src/tests.ml
@@ -0,0 +1,35 @@
+(*
+ * author : Loïc Dubard
+ * file: tests.ml
+ * Fichier des tests
+ * date : 30-04-2019
+ * *)
+
+open Main;;
+open Printf;;
+
+printf "------DEBUT DES TESTS------\n";;
+
+(* Test de tourner c n roue *)
+
+(*Test de translate c roue*)
+
+(*Test de char_to_index i c roue *)
+
+(*test de commande (i,l) roue *)
+
+(*Test de temps_lettre l*)
+
+(*test temps_commande s*)
+
+(*Test make_liste_index l c*)
+
+(*Test quelle_roue l c index_init*)
+
+(*test tourner_list c n i l *)
+
+(*test initialize_list n a*)
+
+(*test commande2 (n,m) *)
+
+printf "------FIN DES TESTS------\n";;
diff --git a/src/user.ml b/src/user.ml
new file mode 100644
index 0000000000000000000000000000000000000000..c59d7cf97b588f44d022c83a1ab8868cdfb55d81
--- /dev/null
+++ b/src/user.ml
@@ -0,0 +1,22 @@
+(*
+ * author : Loïc Dubard
+ * file: user.ml
+ * Fichier qui fait le lien entre l'homme et la machine
+ * date : 03-03-2019
+ * *)
+open Main;;
+
+
+(*Résultat de la phase 1*)
+let input=parse_input();;
+let com = commande input roue;;
+print_string (com);;
+
+(*test temps d'execution*)
+Printf.printf "\n %d s\n" (temps_commande com);;
+
+
+(*@ensure : test commande_phase 2*)
+let com2 = commande2 input;;
+print_string com2;;
+Printf.printf "\n %d s \n" (temps_commande com2);;