Skip to content
Snippets Groups Projects
Commit 99bab12b authored by erwan's avatar erwan
Browse files

Add a small documentation

parent 70f8ea57
No related branches found
No related tags found
No related merge requests found
- [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
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment