From 27f447d9da11ecaf283bfdcccc0c4c7e2c58dfb1 Mon Sep 17 00:00:00 2001 From: Erwan Jahier <erwan.jahier@univ-grenoble-alpes.fr> Date: Thu, 7 Mar 2019 15:23:19 +0100 Subject: [PATCH] Enhance doc --- doc/README.md | 35 ++++++++++++++++++++++------------- doc/README.org | 23 ++++++++++++++--------- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/doc/README.md b/doc/README.md index 907547cc..6c3d7585 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,6 +1,7 @@ -- [Dot files](#orgb64a426) -- [Algorithms](#orgcbdd346) -- [Installation (not yet working)](#org5811f90) +- [Dot files](#org6667d72) +- [Algorithms](#org32323ab) +- [Simulation](#org0285ecd) +- [Installation (not yet working)](#orge431269) Basically, one needs to provide @@ -8,14 +9,14 @@ Basically, one needs to provide 2. the algorithms mentionned in the dot file -<a id="orgb64a426"></a> +<a id="org6667d72"></a> # Dot files Dot files should -- follow the graphviz/dot format (cf <https://en.wikipedia.org/wiki/DOT_(graph_description_language)>). -- contain nodes labelled by the `algo` field +1. follow the [graphviz/dot format](https://en.wikipedia.org/wiki/DOT_(graph_description_language)). +2. contain nodes labelled by the `algo` field ```dot graph ring { @@ -32,7 +33,7 @@ graph ring { ``` -<a id="orgcbdd346"></a> +<a id="org32323ab"></a> # Algorithms @@ -42,26 +43,34 @@ Those algorithms must provide: 2. an `enable` fonction that says which actions are enabled (i.e., that can be activated) 3. a `step` function that executes enabled actions -More precisely, each algorithm should provide 3 functions +More precisely, each algorithm should provide 3 functions that must be registred with: - `reg_vars` - `reg_enable` - `reg_step` -which profile is defined in <../lib/algo/algo.mli> - -Each algorithm must then register them (using `reg_vars`, `reg_enable`, and `reg_step` respectively). +which profiles is defined in <../lib/algo/algo.mli> Algorithms must then be compiled with `ocamlopt -shared` to produce the cmxs files mentionned in the dot. ```sh -ocamlopt -shared -I +sasa algo.ml -o algo.cmxs +ocamlopt -shared -I +sasa some_algo.ml -o some_algo.cmxs ``` Some examples can be found in the <./test/> directory. -<a id="org5811f90"></a> +<a id="org0285ecd"></a> + +# Simulation + +```sh +sasa some_topo.dot +sasa --help +``` + + +<a id="orge431269"></a> # Installation (not yet working) diff --git a/doc/README.org b/doc/README.org index 18227856..e1390acf 100644 --- a/doc/README.org +++ b/doc/README.org @@ -8,9 +8,8 @@ Basically, one needs to provide * Dot files Dot files should -- follow the graphviz/dot format (cf - https://en.wikipedia.org/wiki/DOT_(graph_description_language)). -- contain nodes labelled by the =algo= field +1. follow the [[https://en.wikipedia.org/wiki/DOT_(graph_description_language)][graphviz/dot format]]. +2. contain nodes labelled by the =algo= field #+BEGIN_SRC dot graph ring { @@ -34,23 +33,29 @@ Those algorithms must provide: 2. an =enable= fonction that says which actions are enabled (i.e., that can be activated) 3. a =step= function that executes enabled actions -More precisely, each algorithm should provide 3 functions +More precisely, each algorithm should provide 3 functions that must +be registred with: - =reg_vars= - =reg_enable= - =reg_step= -which profile is defined in file:../lib/algo/algo.mli -Each algorithm must then register them (using =reg_vars=, =reg_enable=, -and =reg_step= respectively). +which profiles is defined in [[file:../lib/algo/algo.mli]] Algorithms must then be compiled with =ocamlopt -shared= to produce the cmxs files mentionned in the dot. #+BEGIN_SRC sh -ocamlopt -shared -I +sasa algo.ml -o algo.cmxs +ocamlopt -shared -I +sasa some_algo.ml -o some_algo.cmxs #+END_SRC -Some examples can be found in the file:./test/ directory. +Some examples can be found in the [[file:./test/]] directory. + +* Simulation + +#+BEGIN_SRC sh + sasa some_topo.dot + sasa --help +#+END_SRC * Installation (not yet working) -- GitLab