Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sasa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
sasa
Commits
ac38cbc6
Commit
ac38cbc6
authored
3 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
docs: some fixes
parent
dbf6ad81
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
guides/contributors/README.org
+16
-10
16 additions, 10 deletions
guides/contributors/README.org
lib/algo/algo.mli
+22
-15
22 additions, 15 deletions
lib/algo/algo.mli
with
38 additions
and
25 deletions
guides/contributors/README.org
+
16
−
10
View file @
ac38cbc6
...
@@ -5,21 +5,27 @@ Self-stabilizing Algorithms SimulAtor
...
@@ -5,21 +5,27 @@ Self-stabilizing Algorithms SimulAtor
Contributors Guide
Contributors Guide
file:dune-deps.pdf
file:dune-deps.pdf
file:module-dep.pdf
file:module-deps.pdf
(cf file:Makefile to update them)
* Releases Notes
* Releases Notes
https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/releases
https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/
-/
releases
* Compiling sasa sources
* Compiling sasa sources
You will need:
You will need:
- =make=
- =make=
- a set of tools installable via [[https://opam.ocaml.org/][opam]]
- =opam=
- =dune=
- the =sasa= =opam= dependencies, that you can install by:
- =ocamlgraph=
- =lutin= (not for compiling actually, but for using sasa with custom daemons)
#+BEGIN_SRC sh
opam add repo verimag http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository
opam update
opam install --deps-only sasa
#+END_SRC
cf the test job in the Gitlab CI script: [[file:../../.gitlab-ci.yml][../../.gitlab-ci.yml]]
cf the test job in the Gitlab CI script: [[file:../../.gitlab-ci.yml][../../.gitlab-ci.yml]]
for a working installation process.
for a working installation process.
...
@@ -69,7 +75,7 @@ values. It can also by simulated by =lutin= programs via the use of
...
@@ -69,7 +75,7 @@ values. It can also by simulated by =lutin= programs via the use of
- [[file:../../lib/sasacore/demon.mli][../../lib/sasacore/daemon.mli]]
- [[file:../../lib/sasacore/demon.mli][../../lib/sasacore/daemon.mli]]
- [[file:../../lib/sasacore/demon.ml][../../lib/sasacore/daemon.ml]]
- [[file:../../lib/sasacore/demon.ml][../../lib/sasacore/daemon.ml]]
custom Lutin programs that mimic
k
the built-in modes can be generated
custom Lutin programs that mimic the built-in modes can be generated
by:
by:
#+INCLUDE: "../../lib/sasacore/genLutin.mli" src ocaml
#+INCLUDE: "../../lib/sasacore/genLutin.mli" src ocaml
...
@@ -130,14 +136,14 @@ Examples of use can be found in:
...
@@ -130,14 +136,14 @@ Examples of use can be found in:
The [[file:../../lib/sasacore/sasaVersion.ml][../../lib/sasacore/sasaVersion.ml]] is automatically generated
The [[file:../../lib/sasacore/sasaVersion.ml][../../lib/sasacore/sasaVersion.ml]] is automatically generated
- by [[file:../../Makefile.version][../../Makefile.version]]
- by [[file:../../Makefile.version][../../Makefile.version]]
- using git tags that are automatically generated using the =release=
- using git tags that are automatically generated using the =release=
job of the CI script, which is based on [[https://
www.npmjs.com/package
/semantic-release
-
gitlab][semantic-release
-
gitlab]]
job of the CI script, which is based on [[https://
github.com
/semantic-release
/
gitlab][
@
semantic-release
/
gitlab]]
In order to generate sensible version numbers, please follow in your
In order to generate sensible version numbers, please follow in your
commit messages the conventions described here:
commit messages the conventions described here:
https://
www.npmjs.com/package/conventional-changelog-eslin
t
https://
github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-forma
t
This also permits to generate some Releases Notes:
This also permits to generate some Releases Notes:
https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/releases
https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/
-/
releases
* Pluging =sasa= on Synchronous tools
* Pluging =sasa= on Synchronous tools
...
...
This diff is collapsed.
Click to expand it.
lib/algo/algo.mli
+
22
−
15
View file @
ac38cbc6
(* Time-stamp: <modified the
09
/0
4
/2021 (at 1
0
:3
9
) by Erwan Jahier> *)
(* Time-stamp: <modified the
27
/0
8
/2021 (at 1
4
:3
7
) by Erwan Jahier> *)
(** {1 The Algorithm programming Interface}
(** {1 The Algorithm programming Interface}
A SASA process is an instance of an algorithm defined via this
A SASA process is an instance of an algorithm defined via this
...
@@ -27,17 +27,18 @@ type 's step_fun = 's -> 's neighbor list -> action -> 's
...
@@ -27,17 +27,18 @@ type 's step_fun = 's -> 's neighbor list -> action -> 's
need into this state (an integer, a structure, etc.). The only
need into this state (an integer, a structure, etc.). The only
constraint is that all algorithms should use the same type.
constraint is that all algorithms should use the same type.
- The second argument holds the process neighbors (its successors
- The second argument holds the process neighbors it can read the
in the graph). Note that SASA processes, that live in graph nodes,
state of (i.e., its predecessors in the graph). Note that SASA
can only access to their immediate neighbors. From each neighbor,
processes, that live in graph nodes, can only access to their
a process can access to various information (cf [state], [reply],
immediate neighbors. From each neighbor, a process can access to
and [weight] functions below).
various information (cf [state], [reply], and [weight] functions
below).
[enable_fun] returns the list of enable actions.
[enable_fun] returns the list of enable actions.
[step_fun], which also takes an action in input, returns the new
value
[step_fun], which also
takes an action in input,
returns the new
of the local state resulting from the execution of the
action.
value
of the
local
state
resulting from
the
execution of
the
*)
action.
*)
type
'
s
state_init_fun
=
int
->
string
->
'
s
type
'
s
state_init_fun
=
int
->
string
->
'
s
(** The initial value of the local state can be set using an
(** The initial value of the local state can be set using an
...
@@ -116,18 +117,23 @@ val links_number : unit -> int
...
@@ -116,18 +117,23 @@ val links_number : unit -> int
val
diameter
:
unit
->
int
val
diameter
:
unit
->
int
(** {3 Trees} *)
(** {3 Trees} *)
(** a tree is an a-cyclic and connected graph (directed or not) *)
val
is_tree
:
unit
->
bool
val
is_tree
:
unit
->
bool
(** an in-tree is a _directed_ tree where all nodes have at most one _predecessor_ *)
val
is_in_tree
:
unit
->
bool
val
is_in_tree
:
unit
->
bool
(** an out-tree is a _directed_ tree where all nodes have at most one _successor_ *)
val
is_out_tree
:
unit
->
bool
val
is_out_tree
:
unit
->
bool
(** returns true if the graph is an undirected rooted tree
(** {3 Rooted Trees}
(i.e. every node has exactly one parent except the root, which has none),
false otherwise *)
val
is_rooted_tree
:
unit
->
bool
A rooted tree in a tree where one vertex is distinguished.
(* The following 4 functions only work on rooted trees
By convention, sasa considers a tree to be rooted if exactly one
(in-trees and out-trees generated by gg are ok) *)
node id contains the string "root".
The following 4 functions only work on rooted trees
*)
(** maps each node to the size of the corresponding sub-tree *)
(** maps each node to the size of the corresponding sub-tree *)
val
sub_tree_size
:
string
(* the node id *)
->
int
val
sub_tree_size
:
string
(* the node id *)
->
int
...
@@ -142,6 +148,7 @@ val level : string (* the node id *) -> int
...
@@ -142,6 +148,7 @@ val level : string (* the node id *) -> int
for the tree root. *)
for the tree root. *)
val
parent
:
string
(* the node id *)
->
int
option
val
parent
:
string
(* the node id *)
->
int
option
val
is_rooted_tree
:
unit
->
bool
(** It is possible to set some global parameters in the dot file
(** It is possible to set some global parameters in the dot file
using graph attributes. This function allows one the get their
using graph attributes. This function allows one the get their
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment