From ae4b6bd29c434d2ae78f89e80502bb3ada13039e Mon Sep 17 00:00:00 2001 From: Erwan Jahier <erwan.jahier@univ-grenoble-alpes.fr> Date: Wed, 16 Feb 2022 18:28:01 +0100 Subject: [PATCH] docs: fix the html generatd doc (org-mode html block syntax changed) --- guides/users/README.md | 254 +++++++++++++++++++--------------------- guides/users/README.org | 50 ++++---- test/skeleton/ring.dot | 14 +-- 3 files changed, 153 insertions(+), 165 deletions(-) diff --git a/guides/users/README.md b/guides/users/README.md index 312cef9a..77fc9f72 100644 --- a/guides/users/README.md +++ b/guides/users/README.md @@ -1,42 +1,42 @@ -- [TL;DR](#org7d8f7c0) -- [Topology](#orgb740b40) -- [Algorithms](#org8dcf853) -- [Examples](#org4a3e28a) -- [Batch mode](#org45900d7) - - [Running batch simulations](#org5e6aabd) - - [Running batch simulations with Built-in daemons](#org688c49a) - - [Running batch simulations with manual (a.k.a. custom) daemons](#orge126295) - - [Running batch simulations with `lurette`](#org5e351b7) - - [Viewing Results](#org5a16c11) - - [The `sasa` CLI](#org787969e) -- [Interactive mode](#org578208a) - - [Example: use `rdbg` from the `test/alea-coloring/` directory](#org7d9fb4e) - - [The examples of test directory](#org646483c) - - [Running interactive sessions with `rdbg`](#org4538175) - - [Getting `rdbg` on-line help](#org8bb16ba) - - [A `rdbg` `sasa` GUI](#org69bf58c) - - [Useful Modules](#org5781218) -- [Install](#orgccc7e98) - - [TL;DR](#orgf88e099) - - [Not strictly mandatory, but useful, third-party software](#orge18cbad) - - [Install `sasa` via opam (version >= 2.\*)](#orgb522bdb) - - [Install `sasa` via `git`](#orgb3bb93b) - - [Use `sasa` via docker](#orgbdfd166) - - [Use `sasa` via a Virtual Machine](#org8a3c22b) -- [Screencasts](#orgcb02048) -- [More](#org020d69e) -- [FAQ](#org4be25b7) - - [Is there a FAQ?](#orgb84f441) - - [I have a compilation error that I don't understand](#orgc8ed449) - - [I have the error `Invalid_argument("compare: functional value")`](#org0f6d260) - - - -<a id="org7d8f7c0"></a> +- [TL;DR](#org8fa27cc) +- [Topology](#org5e9e5fc) +- [Algorithms](#orgf2ed7c2) +- [Examples](#org36e35df) +- [Batch mode](#orgfbdc4f5) + - [Running batch simulations](#orgb148cef) + - [Running batch simulations with Built-in daemons](#org9015d05) + - [Running batch simulations with manual (a.k.a. custom) daemons](#org7eec4f0) + - [Running batch simulations with `lurette`](#orgc770ce0) + - [Viewing Results](#org77bb70c) + - [The `sasa` CLI](#org13e9147) +- [Interactive mode](#org64cd5de) + - [Example: use `rdbg` from the `test/alea-coloring/` directory](#org77bfd02) + - [The examples of test directory](#orgccecf21) + - [Running interactive sessions with `rdbg`](#org1d73d68) + - [Getting `rdbg` on-line help](#org6e2b752) + - [A `rdbg` `sasa` GUI](#orgaeb9370) + - [Useful Modules](#org1b0d22c) +- [Install](#orga6e17e7) + - [TL;DR](#org773be47) + - [Not strictly mandatory, but useful, third-party software](#orge1cefb0) + - [Install `sasa` via opam (version >= 2.\*)](#org799f08b) + - [Install `sasa` via `git`](#orgc6832ab) + - [Use `sasa` via docker](#org8fc4b64) + - [Use `sasa` via a Virtual Machine](#org0c0d7c2) +- [Screencasts](#org682fc05) +- [More](#org11d9306) +- [FAQ](#orgfc8c2b2) + - [Is there a FAQ?](#org72c0095) + - [I have a compilation error that I don't understand](#orge57b20e) + - [I have the error `Invalid_argument("compare: functional value")`](#orgcbfe32e) + + + +<a id="org8fa27cc"></a> # TL;DR -<a id="org7c817e9"></a> SASA is a **Self-stabilizing Algorithms SimulAtor**, based on the so-called **Atomic State model** (ASM) introduced by <span class="underline">Dijkstra</span> in its seminal article on [Self-stabilizing distributed algorithms](http://www.cs.utexas.edu/~EWD/ewd04xx/EWD426.PDF). This model is also sometimes named "locally shared memory model with composite atomicity" +<a id="org46147ce"></a> SASA is a **Self-stabilizing Algorithms SimulAtor**, based on the so-called **Atomic State model** (ASM) introduced by <span class="underline">Dijkstra</span> in its seminal article on [Self-stabilizing distributed algorithms](http://www.cs.utexas.edu/~EWD/ewd04xx/EWD426.PDF). This model is also sometimes named "locally shared memory model with composite atomicity" Basically, one needs to provide: @@ -49,8 +49,8 @@ The fastest way to get started is to copy the files provided in the `test/skelet cd test cp -rf skeleton my_algo # copy a simple example cd my_algo # one may want to edit "p.ml" and "ring.dot" -make ring7.cmxs # compile anything that needs to be compiled -sasa ring7.dot -l 4 # run a batch simulation for 4 steps +make ring.cmxs # compile anything that needs to be compiled +sasa ring.dot -l 4 # run a batch simulation for 4 steps ``` - [SASA source code](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa) @@ -61,11 +61,11 @@ sasa ring7.dot -l 4 # run a batch simulation for 4 steps [](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/sasa/poster.pdf) -<a id="orgb740b40"></a> +<a id="org5e9e5fc"></a> # Topology -<a id="orgf00d97c"></a> <a id="org5857dc1"></a> The topology is given via `.dot` files, that should +<a id="org12b1a12"></a> <a id="orgbb48953"></a> The topology is given via `.dot` files, that should 1. follow the [graphviz/dot format](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) 2. have nodes **labeled** by the `algo` field @@ -121,24 +121,26 @@ graph ring { Such parameters can be retrieved in algorithms using the `Algo.get_graph_attribute : string -> string` function. For example, if you know the graph diameter, you can define it as a graph attribute (a `Algo.diameter: unit -> int` function is provided, but it can be expensive to use for large graphs). -Some tools are provided in the `sasa` [distributions](#org366a559) to generate such kinds of `dot` graphs: <https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/articles/sasa-gg/> +Some tools are provided in the `sasa` [distributions](#org8f315c0) to generate such kinds of `dot` graphs: <https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/articles/sasa-gg/> -<a id="org8dcf853"></a> +<a id="orgf2ed7c2"></a> # Algorithms -<a id="orga43fd68"></a> +<a id="org6eaf8cc"></a> The following has been generated from [algo.mli](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/blob/master/lib/algo/algo.mli) -<div class="html"> -<iframe title="The Algo API" name="algo-api" width="700" height="700" src="<https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/algo/Algo/index.html>" alt="<sub>html</sub>/algo/Algo/index.html";> </iframe> +<iframe title="The Algo API" name="algo-api" + width="700" + height="700" + src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/algo/Algo/index.html" + alt="_html/algo/Algo/index.html";> +</iframe> -</div> - -<a id="org4a3e28a"></a> +<a id="org36e35df"></a> # Examples @@ -178,14 +180,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` (if it exists). -<a id="org45900d7"></a> +<a id="orgfbdc4f5"></a> # Batch mode  -<a id="org5e6aabd"></a> +<a id="orgb148cef"></a> ## Running batch simulations @@ -221,38 +223,15 @@ sasa ring.dot All the CLI commands above can be run automatically using a `make` rule contained in [test/Makefile.inc](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/tree/master/test/Makefile.inc). Hence, by including this file the `Makefile` of the current directory (cf [test/coloring/Makefile](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/tree/master/test/coloring/Makefile)), one can generate the `ring.cmxs` file straightforwardly: ```sh -cd test/coloring # from the sasa git repository -make ring.cmxs # compile what's need to be compiled -sasa ring.dot # launch the simulation + cd test/coloring # from the sasa git repository + make ring.cmxs # compile what's need to be compiled + sasa ring.dot # launch the simulation ``` - make: 'ring.cmxs' is up to date. - # Automatically generated by /home/jahier/.opam/4.10.0/bin/sasa version "4.3.5" ("a6897fa") - # on crevetete the 2/11/2020 at 15:28:50 - #sasa ring.dot - - #seed 852602967 - #inputs - #outputs "p1_c":int "p2_c":int "p3_c":int "p4_c":int "p5_c":int "p6_c":int "p7_c":int "Enab_p1_conflict":bool "Enab_p2_conflict":bool "Enab_p3_conflict":bool "Enab_p4_conflict":bool "Enab_p5_conflict":bool "Enab_p6_conflict":bool "Enab_p7_conflict":bool "p1_conflict":bool "p2_conflict":bool "p3_conflict":bool "p4_conflict":bool "p5_conflict":bool "p6_conflict":bool "p7_conflict":bool potential:real - - - #step 0 - #outs 0 1 0 1 1 0 0 t f f t t t t f f f f t t t 14. - - #step 1 - #outs 0 1 0 1 2 2 1 f f f f t t f f f f f t f f 2. - - #step 2 - #outs 0 1 0 1 0 2 1 f f f f f f f f f f f t f f 0. - - This algo is silent after 4 moves, 2 steps, 2 rounds. - - #quit - nb: the simulation output (in the green frame) follows the [RIF](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-orga43b00b) conventions. -<a id="org688c49a"></a> +<a id="org9015d05"></a> ## Running batch simulations with Built-in daemons @@ -271,7 +250,7 @@ sasa -h | grep "\-daemon" --greedy-daemon, -gd -<a id="orge126295"></a> +<a id="org7eec4f0"></a> ## Running batch simulations with manual (a.k.a. custom) daemons @@ -303,22 +282,22 @@ The daemon can thus be played by users that read and enter Boolean values. In th In order to enter such input more easily, one can use (requires [the lustre V4 tool box](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/index.html)): [`luciole-rif`](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-orgc145c58) ```sh -luciole-rif sasa ring.dot --custom-daemon + luciole-rif sasa ring.dot --custom-daemon ``` Daemons can also by simulated by [`lutin`](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-sec-4) programs via the use of [`lurette`](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-sec-9) (for batch executions) or [`rdbg`](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#outline-container-sec-10) (for interactive sessions). -<a id="org5e351b7"></a> +<a id="orgc770ce0"></a> ## Running batch simulations with `lurette` If one wants to use a test oracle to check at runtime some algorithms properties, one can use `lurette` as follows: ```sh -cd test/coloring -make ring.cmxs -lurette -sut "sasa ring.dot" -oracle "lv6 ring_oracle.lus -n oracle -exec" + cd test/coloring + make ring.cmxs + lurette -sut "sasa ring.dot" -oracle "lv6 ring_oracle.lus -n oracle -exec" ``` Here the oracle is specified in Lustre V6. For more information on this topic: <https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/articles/sasa-oracles/> @@ -326,7 +305,7 @@ Here the oracle is specified in Lustre V6. For more information on this topic: < `lurette` can also be used to perform simulations with programmed daemons. For instance, in order to simulate an algorithm defined in `ring.dot` (cf [test/coloring](https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/tree/master/test/coloring)) using a Lutin daemon defined in `ring.lut`, you can launch the following: ```sh -lurette -env "sasa ring.dot -custd" -sut "lutin ring.lut -n distributed" + lurette -env "sasa ring.dot -custd" -sut "lutin ring.lut -n distributed" ``` Note that for `lurette`, the role of the SUT (System Under Test) and the one of the environment is dual: the outputs of the SUT are the inputs of the environment, and vice-versa. The only difference is that the environment plays first. But `sasa` needs to play first, to be able to state which actions are enabled at the very first step. Hence `sasa` is used as a `lurette` environment, and the daemon program is used a `lurette` SUT. @@ -334,19 +313,19 @@ Note that for `lurette`, the role of the SUT (System Under Test) and the one of For more information on this topic: <https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/articles/sasa-daemons/> -<a id="org5a16c11"></a> +<a id="org77bb70c"></a> ## 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/reactive-toolbox/> -<a id="org787969e"></a> +<a id="org13e9147"></a> ## The `sasa` CLI ```sh -sasa --help + sasa --help ``` usage: sasa [<option>]* <topology>.dot @@ -390,7 +369,7 @@ sasa --help More `sasa` options: ```sh -sasa --more + sasa --more ``` --rif, -rif Display only outputs on stdout (i.e., behave as a rif input file) @@ -405,17 +384,16 @@ sasa --more --dummy-input Add a dummy input to sasa so that built-in daemon can be used from rdbg --ignore-first-inputs, -ifi - Ignore first inputs (necessary to use luciole via - lurette/rdbg/luciole-rif) + [Deprecated] make sasa ignore its first input vector --ocaml-version Display the version ocaml version sasa was compiled with and exit. -<a id="org578208a"></a> +<a id="org64cd5de"></a> # Interactive mode -<a id="org1e0f245"></a> If you want to perform step-by-step simulations, you can use the `-custd` option. But if you want to perform step-by-step simulations without the burden of playing the role of the daemon, you can launch `sasa` under the control of [rdbg](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/rdbg/). +<a id="org01b2fe8"></a> If you want to perform step-by-step simulations, you can use the `-custd` option. But if you want to perform step-by-step simulations without the burden of playing the role of the daemon, you can launch `sasa` under the control of [rdbg](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/rdbg/). Another advantage of [rdbg](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/rdbg/) is its ability to display a graphical view of the current configuration during the simulation, to move step by step, or round by round, forward or backwards. @@ -424,7 +402,7 @@ cf <https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/articles/rdbg-sasa/> 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#outline-container-sec-3). -<a id="org7d9fb4e"></a> +<a id="org77bfd02"></a> ## Example: use `rdbg` from the `test/alea-coloring/` directory @@ -467,7 +445,7 @@ rdbg [q] quit -<a id="org646483c"></a> +<a id="orgccecf21"></a> ## The examples of test directory @@ -478,7 +456,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). -<a id="org4538175"></a> +<a id="org1d73d68"></a> ## Running interactive sessions with `rdbg` @@ -495,7 +473,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`! -<a id="org8bb16ba"></a> +<a id="org6e2b752"></a> ## Getting `rdbg` on-line help @@ -591,7 +569,7 @@ Here are 2 useful entry-points to rdbg on-line help: (rdbg) -<a id="org69bf58c"></a> +<a id="orgaeb9370"></a> ## A `rdbg` `sasa` GUI @@ -605,41 +583,49 @@ opam install -y rdbgui4ocaml To use it: <https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/articles/rdbgui4sasa/> -<a id="org5781218"></a> +<a id="org1b0d22c"></a> ## Useful Modules Some modules, used by the sasa core engine, can be useful from `rdbg`. -<div class="html"> -<iframe title="The Topology API" name="topology-api" width="700" height="500" src="<https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/Topology/index.html>" alt="<./_html/sasacore/Sasacore/Topology/index.html>";> </iframe> - -</div> - -<div class="html"> -<iframe title="The Diameter API" name="diameter-api" width="700" height="300" src="<https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/Diameter/index.html>" alt="<./_html/sasacore/Sasacore/Diameter/index.html>";> </iframe> - -</div> - -<div class="html"> -<iframe title="The Process API" width="700" height="300" src="<https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/Process/index.html>" alt="<./_html/sasacore/Sasacore/Process/index.html>";> </iframe> - -</div> - -<div class="html"> -<iframe title="The StringOf API" width="700" height="300" src="<https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/StringOf/index.html>" alt="<./_html/sasacore/Sasacore/StringOf/index.html>";> </iframe> - -</div> - - -<a id="orgccc7e98"></a> +<iframe title="The Topology API" name="topology-api" + width="700" + height="500" + src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/Topology/index.html" + alt="file:./_html/sasacore/Sasacore/Topology/index.html";> +</iframe> + +<iframe title="The Diameter API" name="diameter-api" + width="700" + height="300" + src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/Diameter/index.html" + alt="file:./_html/sasacore/Sasacore/Diameter/index.html";> +</iframe> + +<iframe title="The Process API" + width="700" + height="300" + src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/Process/index.html" + alt="file:./_html/sasacore/Sasacore/Process/index.html";> +</iframe> + +<iframe title="The StringOf API" + width="700" + height="300" + src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/StringOf/index.html" + alt="file:./_html/sasacore/Sasacore/StringOf/index.html";> +</iframe> + + +<a id="orga6e17e7"></a> # Install -<a id="org366a559"></a> <a id="org4c1c8c8"></a> +<a id="org8f315c0"></a> <a id="org43a1957"></a> -<a id="orgf88e099"></a> +<a id="org773be47"></a> ## TL;DR @@ -693,7 +679,7 @@ git clone https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa.gi ``` -<a id="orge18cbad"></a> +<a id="orge1cefb0"></a> ## Not strictly mandatory, but useful, third-party software @@ -736,7 +722,7 @@ sudo apt install -y wish Otherwise: <http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/index.html> -<a id="orgb522bdb"></a> +<a id="org799f08b"></a> ## Install `sasa` via opam (version >= 2.\*) @@ -770,7 +756,7 @@ opam upgrade ``` -<a id="orgb3bb93b"></a> +<a id="orgc6832ab"></a> ## Install `sasa` via `git` @@ -814,14 +800,14 @@ make test One can also mimic 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). -<a id="orgbdfd166"></a> +<a id="org8fc4b64"></a> ## Use `sasa` via docker cf the Docker Install section of the [Synchrone Reactive Tool Box](http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v6/#docker). This docker image contains all the tools mentioned in this section (`sasa`, `lustre`, `opam`, `ocaml`, emacs, graphviz, etc.). -<a id="org8a3c22b"></a> +<a id="org0c0d7c2"></a> ## Use `sasa` via a Virtual Machine @@ -831,7 +817,7 @@ cf the Docker Install section of the [Synchrone Reactive Tool Box](http://www-ve - passwd:sasa -<a id="orgcb02048"></a> +<a id="org682fc05"></a> # Screencasts @@ -847,7 +833,7 @@ cf the Docker Install section of the [Synchrone Reactive Tool Box](http://www-ve cf <http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/sasa/screencasts/> -<a id="org020d69e"></a> +<a id="org11d9306"></a> # More @@ -856,12 +842,12 @@ cf <http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/sasa/screencasts/> - Tutorials: <https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt//tags/sasa/> -<a id="org4be25b7"></a> +<a id="orgfc8c2b2"></a> # FAQ -<a id="orgb84f441"></a> +<a id="org72c0095"></a> ## Is there a FAQ? @@ -870,7 +856,7 @@ Yes. Beside, some tutorials are also available here: <https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/tags/sasa/> -<a id="orgc8ed449"></a> +<a id="orge57b20e"></a> ## I have a compilation error that I don't understand @@ -880,8 +866,8 @@ Beside, some tutorials are also available here: <https://verimag.gricad-pages.un - If the message is totally useless, please feel free to add an issue here <https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/issues> -<a id="org0f6d260"></a> +<a id="orgcbfe32e"></a> ## I have the error `Invalid_argument("compare: functional value")` -Most probably you a try to compare 2 `'s Algo.neighbor`. It's an abstract type, hence you cannot compare them, i.e., you cannot use `Stdlib.compare`, nor its twins (`<>`, `>`, `<`, etc.), nor functions that use them (`min`, `max`, `List.sort`, etc.). You should compare their `pid` instead (if the network is not anonymous). \ No newline at end of file +Most probably you a try to compare 2 `'s Algo.neighbor`. It's an abstract type, hence you cannot compare them, i.e., you cannot use `Stdlib.compare`, nor its twins (`<>`, `>`, `<`, etc.), nor functions that use them (`min`, `max`, `List.sort`, etc.). You should compare their `pid` instead (if the network is not anonymous). diff --git a/guides/users/README.org b/guides/users/README.org index 8af41139..17fc6a38 100644 --- a/guides/users/README.org +++ b/guides/users/README.org @@ -51,40 +51,41 @@ make clean cd test cp -rf skeleton my_algo # copy a simple example cd my_algo # one may want to edit "p.ml" and "ring.dot" -make ring7.cmxs # compile anything that needs to be compiled -sasa ring7.dot -l 4 # run a batch simulation for 4 steps +make ring.cmxs # compile anything that needs to be compiled +sasa ring.dot -l 4 # run a batch simulation for 4 steps #+END_SRC #+RESULTS[13cc60a20b534115483ffd7ae0f22f6bcc52a8dd]: #+begin_example -sasa -reg ring7.dot -ocamlfind ocamlopt -package algo -shared state.ml p.ml config.ml ring7.ml -o ring7.cmxs -# Automatically generated by /home/jahier/.opam/4.10.0/bin/sasa version "4.3.5" ("a6897fa") -# on crevetete the 4/11/2020 at 8:28:38 -#sasa ring7.dot -l 4 +sasa -reg ring.dot +ocamlfind ocamlopt -bin-annot -package algo -shared state.ml p.ml config.ml ring.ml -o ring.cmxs +# Automatically generated by /home/jahier/.opam/4.13.1/bin/sasa version "v4.5.7" ("733695a") +# on crevetete the 16/2/2022 at 18:26:44 +#sasa ring.dot -l 4 -#seed 194528744 +#seed 178073955 #inputs -#outputs "p1_i":int "p2_i":int "p3_i":int "p4_i":int "p5_i":int "p6_i":int "p7_i":int "Enab_p1_action2":bool "Enab_p1_action1":bool "Enab_p2_action2":bool "Enab_p2_action1":bool "Enab_p3_action2":bool "Enab_p3_action1":bool "Enab_p4_action2":bool "Enab_p4_action1":bool "Enab_p5_action2":bool "Enab_p5_action1":bool "Enab_p6_action2":bool "Enab_p6_action1":bool "Enab_p7_action2":bool "Enab_p7_action1":bool "p1_action2":bool "p1_action1":bool "p2_action2":bool "p2_action1":bool "p3_action2":bool "p3_action1":bool "p4_action2":bool "p4_action1":bool "p5_action2":bool "p5_action1":bool "p6_action2":bool "p6_action1":bool "p7_action2":bool "p7_action1":bool +#outputs "p1_v0":int "p2_v0":int "p3_v0":int "p4_v0":int "p5_v0":int "p6_v0":int "p7_v0":int "Enab_p1_action1":bool "Enab_p1_action2":bool "Enab_p2_action1":bool "Enab_p2_action2":bool "Enab_p3_action1":bool "Enab_p3_action2":bool "Enab_p4_action1":bool "Enab_p4_action2":bool "Enab_p5_action1":bool "Enab_p5_action2":bool "Enab_p6_action1":bool "Enab_p6_action2":bool "Enab_p7_action1":bool "Enab_p7_action2":bool "p1_action1":bool "p1_action2":bool "p2_action1":bool "p2_action2":bool "p3_action1":bool "p3_action2":bool "p4_action1":bool "p4_action2":bool "p5_action1":bool "p5_action2":bool "p6_action1":bool "p6_action2":bool "p7_action1":bool "p7_action2":bool "legitimate":bool #step 0 -#outs 4 5 2 1 9 0 4 t f t f f f t f f t t f t f f f f f f f t f f t t f f f +#outs 9 2 8 5 5 4 8 t f t f t f t f t f t f t f t f t f t f t f f f t f f f f #step 1 -#outs 4 5 2 0 1 0 4 t f t f f t f f f t t f t f f f t f f t f f f f t f t f +#outs 0 0 0 0 5 0 8 t f f t f t t f f t t f f t f f f f f t t f f f f f f t f #step 2 -#outs 4 0 1 0 1 0 0 f t f f f t f f f t f t t f f f f f f t f f f f f f t f +#outs 0 0 1 0 5 0 1 f f f f f t t f f t f f f t f f f f f f t f f t f f f f f #step 3 -#outs 4 0 1 0 1 0 0 f t f f f t f f f t f t t f f t f f f f f f f f f f f f +#outs 0 0 1 0 1 0 1 f f f f f t f f f t f f f t f f f f f t f f f f f f f f f #step 4 -#outs 1 0 1 0 1 0 0 f t f f f t f f f t f t f f f f f f f t f f f t f t f f +#outs 0 0 1 0 1 0 1 f f f f f t f f f t f f f t f f f f f f f f f f f f f t f #q #+end_example + + [[https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa][SASA source code]] + [[https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/tags/sasa/][Some Online Tutorials]] + [[https://hal.archives-ouvertes.fr/hal-02521149][TAP 2020 article pre-print]] @@ -175,14 +176,15 @@ https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/articles/sasa-gg/ The following has been generated from [[https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/blob/master/lib/algo/algo.mli][algo.mli]] -#+begin_html + +#+begin_export html <iframe title="The Algo API" name="algo-api" width="700" height="700" src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/algo/Algo/index.html" alt="_html/algo/Algo/index.html";> </iframe> -#+end_html +#+end_export * Examples @@ -738,38 +740,38 @@ To use it: https://verimag.gricad-pages.univ-grenoble-alpes.fr/vtt/articles/rdb Some modules, used by the sasa core engine, can be useful from =rdbg=. -#+begin_html +#+begin_export html <iframe title="The Topology API" name="topology-api" width="700" height="500" src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/Topology/index.html" alt="file:./_html/sasacore/Sasacore/Topology/index.html";> </iframe> -#+end_html -#+begin_html +#+end_export +#+begin_export html <iframe title="The Diameter API" name="diameter-api" width="700" height="300" src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/Diameter/index.html" alt="file:./_html/sasacore/Sasacore/Diameter/index.html";> </iframe> -#+end_html -#+begin_html +#+end_export +#+begin_export html <iframe title="The Process API" width="700" height="300" src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/Process/index.html" alt="file:./_html/sasacore/Sasacore/Process/index.html";> </iframe> -#+end_html -#+begin_html +#+end_export +#+begin_export html <iframe title="The StringOf API" width="700" height="300" src="https://verimag.gricad-pages.univ-grenoble-alpes.fr/synchrone/sasa/_html/sasacore/Sasacore/StringOf/index.html" alt="file:./_html/sasacore/Sasacore/StringOf/index.html";> </iframe> -#+end_html +#+end_export * Install <<distributions>> diff --git a/test/skeleton/ring.dot b/test/skeleton/ring.dot index 80cff9f1..bacf56c5 100644 --- a/test/skeleton/ring.dot +++ b/test/skeleton/ring.dot @@ -1,11 +1,11 @@ graph ring { - p1 [algo="some_algo.ml"] - p2 [algo="some_algo.ml"] - p3 [algo="some_algo.ml"] - p4 [algo="some_algo.ml"] - p5 [algo="some_algo.ml"] - p6 [algo="some_algo.ml"] - p7 [algo="some_algo.ml"] + p1 [algo="p.ml"] + p2 [algo="p.ml"] + p3 [algo="p.ml"] + p4 [algo="p.ml"] + p5 [algo="p.ml"] + p6 [algo="p.ml"] + p7 [algo="p.ml"] p1 -- p2 -- p3 -- p4 -- p5 -- p6 -- p7 -- p1 } -- GitLab