diff --git a/doc/README.md b/doc/README.md index 907547cc57df26e40ec6bec45194bff611aef9f2..6c3d7585ccd300d38c7bd0eb48c144d4b7c87818 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 182278563489b5ef96c77dcc2d14a33e2b5e315d..e1390acf8c93ca1c9eac38cf237bbf43bce6b09d 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)