diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000000000000000000000000000000000000..907547cc57df26e40ec6bec45194bff611aef9f2 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,81 @@ +- [Dot files](#orgb64a426) +- [Algorithms](#orgcbdd346) +- [Installation (not yet working)](#org5811f90) + +Basically, one needs to provide + +1. a dot file +2. the algorithms mentionned in the dot file + + +<a id="orgb64a426"></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 + +```dot +graph ring { + p1 [algo="some_algo.cmxs"] + p2 [algo="some_algo.cmxs"] + p3 [algo="some_algo.cmxs"] + p4 [algo="some_algo.cmxs"] + p5 [algo="some_algo.cmxs"] + p6 [algo="some_algo.cmxs"] + p7 [algo="some_algo.cmxs"] + + p1 -- p2 -- p3 -- p4 -- p5 -- p6 -- p7 -- p1 +} +``` + + +<a id="orgcbdd346"></a> + +# Algorithms + +Those algorithms must provide: + +1. a set of variables (registers) +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 + +- `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). + +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 +``` + +Some examples can be found in the <./test/> directory. + + +<a id="org5811f90"></a> + +# Installation (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 +``` + +Once is is done, upgrading to the last version of the tools is as simple as: + +```yaml +opam update +opam upgrade +``` \ No newline at end of file diff --git a/doc/README.org b/doc/README.org new file mode 100644 index 0000000000000000000000000000000000000000..182278563489b5ef96c77dcc2d14a33e2b5e315d --- /dev/null +++ b/doc/README.org @@ -0,0 +1,72 @@ + + + +Basically, one needs to provide +1. a dot file +2. the algorithms mentionned in the dot file + +* 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 + +#+BEGIN_SRC dot +graph ring { + p1 [algo="some_algo.cmxs"] + p2 [algo="some_algo.cmxs"] + p3 [algo="some_algo.cmxs"] + p4 [algo="some_algo.cmxs"] + p5 [algo="some_algo.cmxs"] + p6 [algo="some_algo.cmxs"] + p7 [algo="some_algo.cmxs"] + + p1 -- p2 -- p3 -- p4 -- p5 -- p6 -- p7 -- p1 +} +#+END_SRC + + +* Algorithms + +Those algorithms must provide: +1. a set of variables (registers) +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 +- =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). + +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 +#+END_SRC + +Some examples can be found in the file:./test/ directory. + +* Installation (not yet working) + +#+BEGIN_SRC sh :tangle sh/install-opam.sh :noweb yes :tangle-mode (identity #o444) +# 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 +#+END_SRC + +Once is is done, upgrading to the last version of the tools is as +simple as: + +#+BEGIN_SRC yaml +opam update +opam upgrade +#+END_SRC +