Skip to content
Snippets Groups Projects
README.org 2.66 KiB

Basically, one needs to provide

  1. a dot file
  2. the algorithms mentionned in the dot file

Dot files

Dot files should

  1. follow the graphviz/dot format.
  2. contain nodes labelled by the algo field
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 
}

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 that must be registred using the string used in dot file algo fields with:

  • reg_vars
  • reg_enable
  • reg_step

which profiles is defined in algo.mli

One can also register a function that provides initial values to local variables (reg_init). If not such registration is done, local variables will be set according to init annotations in the dot file. If no such annotations exists, initial values will be chosen at random.

graph ring {
 p1 [algo="some_algo.cmxs" init="v=1" init="x=3"]
 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 
}

Algorithms must then be compiled with ocamlopt -shared to produce the cmxs files mentionned in the dot file algo fields.

ocamlopt -shared -I +sasa some_algo.ml -o some_algo.cmxs

Some examples can be found in the test directory.

Simulation

sasa some_topo.dot
sasa --help

Custom mode

For using the custom mode, it is mandatory to register actions

rdbg

Releases Notes

https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/releases

Installation (not yet working)

# 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:

opam update
opam upgrade