-[Running batch simulations with Built-in demons](#org4866456)
-[Running batch simulations with Built-in demons](#orgc56b42d)
-[Running batch simulations with manual demons](#orgf3df31d)
-[Running batch simulations with manual demons](#org92cd9f2)
-[Running batch simulations with `lurette`](#org9d9ef24)
-[Running batch simulations with `lurette`](#org0705ed8)
-[Viewing Results](#org477c3d3)
-[Viewing Results](#orgd2e4baa)
-[The `sasa` CLI](#org262a057)
-[The `sasa` CLI](#org8d9f6c5)
-[Interactive mode](#orgc6d5408)
-[Interactive mode](#org6af6ee2)
-[Example: use `rdbg` from the `test/alea-coloring/` directory](#org9b78bb5)
-[Example: use `rdbg` from the `test/alea-coloring/` directory](#orgf6b37f1)
-[The exemples of test directory](#org2006456)
-[The exemples of test directory](#org2913976)
-[Running interactive sessions with `rdbg`](#org964d57c)
-[Running interactive sessions with `rdbg`](#org8931da2)
-[Getting `rdbg` on-line help](#orgf6c6506)
-[Getting `rdbg` on-line help](#orgc066a85)
-[Useful Modules](#org911eaed)
-[Useful Modules](#org07221ab)
-[Install](#orgf00383a)
-[Install](#org02db332)
-[Via opam 2 (prefered method)](#orgd5a02ba)
-[Via opam 2 (prefered method)](#org0c28ed7)
-[Via docker](#org4a9d80f)
-[Via docker](#orgd84fbc0)
-[From source](#org0ce02ed)
-[From source](#org193dfd6)
-[More](#orgc3319a2)
-[More](#orgdadfb09)
-[FAQ](#org76c8af0)
-[FAQ](#org96481a2)
-[Is there a FAQ?](#org3a27f5b)
-[Is there a FAQ?](#orgefc66e1)
# Table of Contents
# Table of Contents
1.[TL;DR](#org1b29c61)
1.[TL;DR](#org7460992)
2.[Topology](#org7ac1440)
2.[Topology](#org6b74c58)
3.[Algorithms](#org15e10c7)
3.[Algorithms](#orge7cc59f)
4.[Examples](#org6a40149)
4.[Examples](#org9fd0d11)
5.[Batch mode](#orga9bce8f)
5.[Batch mode](#org72ad817)
1.[Running batch simulations with Built-in demons](#org4866456)
1.[Running batch simulations with Built-in demons](#orgc56b42d)
2.[Running batch simulations with manual demons](#orgf3df31d)
2.[Running batch simulations with manual demons](#org92cd9f2)
3.[Running batch simulations with `lurette`](#org9d9ef24)
3.[Running batch simulations with `lurette`](#org0705ed8)
4.[Viewing Results](#org477c3d3)
4.[Viewing Results](#orgd2e4baa)
5.[The `sasa` CLI](#org262a057)
5.[The `sasa` CLI](#org8d9f6c5)
6.[Interactive mode](#orgc6d5408)
6.[Interactive mode](#org6af6ee2)
1.[Example: use `rdbg` from the `test/alea-coloring/` directory](#org9b78bb5)
1.[Example: use `rdbg` from the `test/alea-coloring/` directory](#orgf6b37f1)
2.[The exemples of test directory](#org2006456)
2.[The exemples of test directory](#org2913976)
3.[Running interactive sessions with `rdbg`](#org964d57c)
3.[Running interactive sessions with `rdbg`](#org8931da2)
4.[Getting `rdbg` on-line help](#orgf6c6506)
4.[Getting `rdbg` on-line help](#orgc066a85)
5.[Useful Modules](#org911eaed)
5.[Useful Modules](#org07221ab)
7.[Install](#orgf00383a)
7.[Install](#org02db332)
1.[Via opam 2 (prefered method)](#orgd5a02ba)
1.[Via opam 2 (prefered method)](#org0c28ed7)
2.[Via docker](#org4a9d80f)
2.[Via docker](#orgd84fbc0)
3.[From source](#org0ce02ed)
3.[From source](#org193dfd6)
8.[More](#orgc3319a2)
8.[More](#orgdadfb09)
9.[FAQ](#org76c8af0)
9.[FAQ](#org96481a2)
1.[Is there a FAQ?](#org3a27f5b)
1.[Is there a FAQ?](#orgefc66e1)
<aid="org1b29c61"></a>
<aid="org7460992"></a>
# TL;DR
# TL;DR
SASA is a **Self-stabilizing Algorithms SimulAtor**, based on the so-called **atomic state model** introduced by <spanclass="underline">Dijkstra</span> in its seminal article on [Self-stabilizing distributed algorithms](http://www.cs.utexas.edu/~EWD/ewd04xx/EWD426.PDF)
SASA is a **Self-stabilizing Algorithms SimulAtor**, based on the so-called **Atomic State model**(ASM) introduced by <spanclass="underline">Dijkstra</span> in its seminal article on [Self-stabilizing distributed algorithms](http://www.cs.utexas.edu/~EWD/ewd04xx/EWD426.PDF).
Basically, one needs to provide:
Basically, one needs to provide:
1. a topology, made of nodes and transitions (via a dot file)
1. a topology, made of nodes and transitions (via a [dot](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) file)
2. the algorithms attached to nodes (via `ocaml` programs)
2. the algorithms attached to nodes (via [`ocaml`](https://ocaml.org/) programs)
The fastest way to get started is to copy the files provides in the `test/skeleton` directory, and to modify them:
The fastest way to get started is to copy the files provided in the `test/skeleton` directory, and to modify them:
```sh
```sh
cd test
cd test
...
@@ -71,12 +71,12 @@ make ring.cmxs
...
@@ -71,12 +71,12 @@ make ring.cmxs
sasa ring.dot
sasa ring.dot
```
```

The source code is available at <https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa>
The source code is available at <https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa>
@@ -139,7 +139,7 @@ Such parameters can be retreived in Algorithms using the `Algo.get_graph_attribu
...
@@ -139,7 +139,7 @@ Such parameters can be retreived in Algorithms using the `Algo.get_graph_attribu
nb: a `Algo.diameter: unit -> int` function is provided, but it can be expensive to use.
nb: a `Algo.diameter: unit -> int` function is provided, but it can be expensive to use.
<aid="org15e10c7"></a>
<aid="orge7cc59f"></a>
# Algorithms
# Algorithms
...
@@ -151,7 +151,7 @@ The following has been generated from [algo.mli](https://gricad-gitlab.univ-gren
...
@@ -151,7 +151,7 @@ The following has been generated from [algo.mli](https://gricad-gitlab.univ-gren
</div>
</div>
<a id="org6a40149"></a>
<a id="org9fd0d11"></a>
# Examples
# Examples
...
@@ -179,12 +179,14 @@ The `test` directory also contains sub-directories which gathers programs shared
...
@@ -179,12 +179,14 @@ The `test` directory also contains sub-directories which gathers programs shared
-`test/*/my-rdbg-tuning.ml`: includes `test/my-rdbg-tuning.ml` and defines commands specific to the example of the directory. Indeed, `rdbg`, once launched, first tries to read the content of the file name `my-rdbg-tuning.ml` (it it exists).
-`test/*/my-rdbg-tuning.ml`: includes `test/my-rdbg-tuning.ml` and defines commands specific to the example of the directory. Indeed, `rdbg`, once launched, first tries to read the content of the file name `my-rdbg-tuning.ml` (it it exists).
<aid="orga9bce8f"></a>
<aid="org72ad817"></a>
# Batch mode
# Batch mode

<aid="org4866456"></a>
<aid="orgc56b42d"></a>
## Running batch simulations with Built-in demons
## Running batch simulations with Built-in demons
...
@@ -209,7 +211,7 @@ sasa -h | grep "\-demon"
...
@@ -209,7 +211,7 @@ sasa -h | grep "\-demon"
--custom-demon, -custd
--custom-demon, -custd
<aid="orgf3df31d"></a>
<aid="org92cd9f2"></a>
## Running batch simulations with manual demons
## Running batch simulations with manual demons
...
@@ -236,7 +238,7 @@ It can also by simulated by [`lutin`](http://www-verimag.imag.fr/DIST-TOOLS/SYNC
...
@@ -236,7 +238,7 @@ It can also by simulated by [`lutin`](http://www-verimag.imag.fr/DIST-TOOLS/SYNC
Built-in demons can of course be programmed in Lutin. One can generate such demons using the `--gen-lutin-demon` option: `sasa --gen-lutin-demon a_graph.dot`. It can be handy at least to get the demons variables names in the good order if one to write its own demon.
Built-in demons can of course be programmed in Lutin. One can generate such demons using the `--gen-lutin-demon` option: `sasa --gen-lutin-demon a_graph.dot`. It can be handy at least to get the demons variables names in the good order if one to write its own demon.
<aid="org9d9ef24"></a>
<aid="org0705ed8"></a>
## Running batch simulations with `lurette`
## Running batch simulations with `lurette`
...
@@ -259,14 +261,14 @@ lurette \
...
@@ -259,14 +261,14 @@ lurette \
```
```
<aid="org477c3d3"></a>
<aid="orgd2e4baa"></a>
## Viewing Results
## Viewing Results
`sasa -rif` and `lurette` generates `.rif` files that can be viewed with `gnuplot-rif` or `sim2chro`; cf <http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/>
`sasa -rif` and `lurette` generates `.rif` files that can be viewed with `gnuplot-rif` or `sim2chro`; cf <http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/>
<aid="org262a057"></a>
<aid="org8d9f6c5"></a>
## The `sasa` CLI
## The `sasa` CLI
...
@@ -329,14 +331,14 @@ sasa --more
...
@@ -329,14 +331,14 @@ sasa --more
Display the version ocaml version sasa was compiled with and exit.
Display the version ocaml version sasa was compiled with and exit.
<aid="orgc6d5408"></a>
<aid="org6af6ee2"></a>
# Interactive mode
# Interactive mode
If you want to perform interactive session, you can launch `sasa` under the control of [rdbg](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/rdbg/). Before reading this section, please read at least the [Basic usage Section if the rdbg documentation](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/rdbg/README.html#Level0).
<aid="orge1b419c"></a>If you want to perform interactive session, you can launch `sasa` under the control of [rdbg](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/rdbg/). Before reading this section, please read at least the [Basic usage Section if the rdbg documentation](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/rdbg/README.html#Level0).
<aid="org9b78bb5"></a>
<aid="orgf6b37f1"></a>
## Example: use `rdbg` from the `test/alea-coloring/` directory
## Example: use `rdbg` from the `test/alea-coloring/` directory
...
@@ -389,7 +391,7 @@ $ rdbg
...
@@ -389,7 +391,7 @@ $ rdbg
Typing `[Enter]` will therefore also load the `rdbg_session.ml` file we have just been using.
Typing `[Enter]` will therefore also load the `rdbg_session.ml` file we have just been using.
<aid="org2006456"></a>
<aid="org2913976"></a>
## The exemples of test directory
## The exemples of test directory
...
@@ -400,7 +402,7 @@ The [test](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/t
...
@@ -400,7 +402,7 @@ The [test](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/t
-`test/*/my-rdbg-tuning.ml`: includes `test/my-rdbg-tuning.ml` and defines commands specific to the example of the directory. Indeed, `rdbg`, once launched, first tries to read the content of the file name `my-rdbg-tuning.ml` (it it exists).
-`test/*/my-rdbg-tuning.ml`: includes `test/my-rdbg-tuning.ml` and defines commands specific to the example of the directory. Indeed, `rdbg`, once launched, first tries to read the content of the file name `my-rdbg-tuning.ml` (it it exists).
<aid="org964d57c"></a>
<aid="org8931da2"></a>
## Running interactive sessions with `rdbg`
## Running interactive sessions with `rdbg`
...
@@ -417,7 +419,7 @@ The [test](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/t
...
@@ -417,7 +419,7 @@ The [test](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/t
All those commands are defined in (the common) [test/my-rdbg-tuning.ml](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/tree/master/test/my-rdbg-tuning.ml) that is included in (locals) `test/*/my-rdbg-tuning.ml` that are included in (generated) `test/*/rdbg-session.ml` files. `my-rdbg-tuning.ml` contains straigthforward `ocaml` code that defines various `rdbg` shortcuts to ease the simulation of `sasa` systems. Feel free to tailor those command to yours needs by modyfying the local `my-rdbg-tuning.ml`!
All those commands are defined in (the common) [test/my-rdbg-tuning.ml](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/tree/master/test/my-rdbg-tuning.ml) that is included in (locals) `test/*/my-rdbg-tuning.ml` that are included in (generated) `test/*/rdbg-session.ml` files. `my-rdbg-tuning.ml` contains straigthforward `ocaml` code that defines various `rdbg` shortcuts to ease the simulation of `sasa` systems. Feel free to tailor those command to yours needs by modyfying the local `my-rdbg-tuning.ml`!
<aid="orgf6c6506"></a>
<aid="orgc066a85"></a>
## Getting `rdbg` on-line help
## Getting `rdbg` on-line help
...
@@ -430,10 +432,10 @@ Here are 2 useful entry-points to rdbg on-line help:
...
@@ -430,10 +432,10 @@ Here are 2 useful entry-points to rdbg on-line help:
(rdbg) l
(rdbg) l
```
```
ef6c2b943fb4eda627a5c5ff18890bdd
899ba97918e5b30522844acaf1223a45
<aid="org911eaed"></a>
<aid="org07221ab"></a>
## Useful Modules
## Useful Modules
...
@@ -460,12 +462,12 @@ Some modules, used by the sasa core engine, can be useful from `rdbg`.
...
@@ -460,12 +462,12 @@ Some modules, used by the sasa core engine, can be useful from `rdbg`.
</div>
</div>
<a id="orgf00383a"></a>
<a id="org02db332"></a>
# Install
# Install
<aid="orgd5a02ba"></a>
<aid="org0c28ed7"></a>
## Via opam 2 (prefered method)
## Via opam 2 (prefered method)
...
@@ -490,14 +492,14 @@ opam install -y rdbg lutin
...
@@ -490,14 +492,14 @@ opam install -y rdbg lutin
```
```
<aid="org4a9d80f"></a>
<aid="orgd84fbc0"></a>
## Via docker
## Via docker
cf the Install section of [Synchrone Reactive Tool Box](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6).
cf the Docker Install section of the [Synchrone Reactive Tool Box](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#docker).
One can mimick the content of the `test` job in the project [.gitlab-ci.yml Gitlab CI script](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/tree/master/.gitlab-ci.yml).
One can mimick the content of the `test` job in the project [.gitlab-ci.yml Gitlab CI script](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/tree/master/.gitlab-ci.yml).
<aid="orgc3319a2"></a>
<aid="orgdadfb09"></a>
# More
# More
...
@@ -525,12 +527,12 @@ One can mimick the content of the `test` job in the project [.gitlab-ci.yml Gitl
...
@@ -525,12 +527,12 @@ One can mimick the content of the `test` job in the project [.gitlab-ci.yml Gitl