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

doc: some enhancements

parent 17fdfaa2
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
...@@ -783,43 +783,35 @@ Some modules, used by the sasa core engine, can be useful from =rdbg=. ...@@ -783,43 +783,35 @@ Some modules, used by the sasa core engine, can be useful from =rdbg=.
<<distributions>> <<distributions>>
<<install>> <<install>>
** TL;DR ** Install =sasa= via opam: TL;DR
On debian-based distributions, open a terminal and copy/paste:
#+BEGIN_SRC sh :eval no
sudo apt install -y zathura graphviz emacs opam
#+END_SRC
On *debian-based* distributions, open a terminal and copy/paste (on
other Linux (or mac) distributions, the packages names should be more
or less the same):
On other Linux (or mac) distributions, the packages names should be more or less the
same.
Then: #+BEGIN_SRC sh :eval no
sudo apt install -y opam
#+BEGIN_SRC sh :eval no
opam init -y opam init -y
eval $(opam env) eval $(opam env)
echo "test -r ~/.opam/opam-init/init.sh && . ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true" >> ~/.bashrc echo "test -r ~/.opam/opam-init/init.sh && . ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true" >> ~/.bashrc
opam switch create 4.11.1 opam switch create 4.14.1
eval $(opam env) eval $(opam env)
opam install -y merlin tuareg opam install -y merlin tuareg
opam user-setup install opam user-setup install
opam repo add -a verimag-sync-repo \ opam repo add -a verimag-sync-repo \
"http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository" "http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository"
opam update -y opam update -y
opam install -y sasa opam install -y sasa
#+END_SRC
And optionally (to define test oracles in Lustre or daemons in Lutin):
#+BEGIN_SRC sh :eval no # optionally (to perform automated tests):
opam depext -y rdbgui4sasa lutin -- useless with opam >= 2.1 opam depext -y rdbgui4sasa lutin || echo "useless with opam >= 2.1"
opam install -y rdbgui4sasa lutin lustre-v6 opam install -y rdbgui4sasa lutin lustre-v6
#+END_SRC
# optionally (Useful during interactive simulations)
opam install -y graphviz
and optionally too (for =luciole=, a gtk-based UI useful to play daemon manually): # optionally (for =luciole=, a gtk-based UI useful to play daemon manually):
#+BEGIN_SRC sh :eval no
mkdir ~/lv4 # for example mkdir ~/lv4 # for example
cd ~/lv4 cd ~/lv4
wget http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/linux64/lustre-v4-III-e-linux64.tgz wget http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/linux64/lustre-v4-III-e-linux64.tgz
...@@ -829,90 +821,112 @@ echo "export PATH=$LUSTRE_INSTALL/bin:$PATH" >> ~/.bashrc ...@@ -829,90 +821,112 @@ echo "export PATH=$LUSTRE_INSTALL/bin:$PATH" >> ~/.bashrc
sudo apt install -y wish sudo apt install -y wish
#+END_SRC #+END_SRC
and finally (for running examples in the =sasa/test/= directory): For running examples in the =sasa/test/= directory to check it has worked:
#+BEGIN_SRC sh :eval no #+BEGIN_SRC sh :eval no
git clone https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa.git git clone https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa.git
#+END_SRC #+END_SRC
** Not strictly mandatory, but useful, third-party software Hopefully, everything went file. Otherwise, you can try one of methods below :
In order to perform interactive simulations, you need to install the ** Install =sasa= via opam (long version)
[[https://en.wikipedia.org/wiki/DOT_(graph_description_language)][graphviz]] tools suite and a pdf viewer that is able to auto-refresh
(for instance =zathura=). E.g., on debian-based distribution:
#+BEGIN_SRC sh :eval no
sudo apt install zathura graphviz
#+END_SRC
Moreover, as you will write Ocaml programs, you definitely need to Follows more or less the same instructions as above, but described
install the ocaml package manager [[http://opam.ocaml.org/doc/Install.html][opam]]. =opam= works out of the box into more details in case you want to understand the rationale for
with most Linux distributions and OSX (mac). =opam= ought to work [[http://protz.github.io/ocaml-installer/][on each commands, and adapt it to your distribution.
windows too]].
#+BEGIN_SRC sh :eval no
sudo apt install opam As using =sasa= requires to write =Ocaml= programs, you definitely
opam init need to install the =Ocaml= package manager [[http://opam.ocaml.org/doc/Install.html][opam]]. [[http://opam.ocaml.org/doc/Install.html][opam]] works out
opam switch create 4.11.1 of the box with most Linux distributions and OSX (mac). =opam= ought
to work [[http://protz.github.io/ocaml-installer/][on windows too]].
#+BEGIN_SRC sh :eval no
sudo apt install -y opam
opam init -y
eval $(opam env) eval $(opam env)
echo "eval $(opam env)" >> ~/.bashrc
#+END_SRC #+END_SRC
You also need an editor. We advice =emacs= with =merlin= and =tuareg=. The =opam init= ougth to have populated your shell resource file with
#+BEGIN_SRC sh :eval no the necessary configurations commands, but it case it didn't you can
sudo apt install emacs run something like:
opam install -y merlin tuareg #+BEGIN_SRC sh :eval no
opam user-setup install -y echo "eval $(opam env)" >> ~/.bashrc
#+END_SRC #+END_SRC
In order to be able to use =luciole= (a small GUI useful to Once opam is installed and configured, you may want to install (or not) the last
interactively play the role of the daemon using gtk buttons) you can version of the compiler.
also install the Lustre V4 distribution. On linux:
#+BEGIN_SRC sh #+BEGIN_SRC sh :eval no
mkdir ~/lv4 # for example opam switch create 4.14.1
cd ~/lv4 eval $(opam env)
wget http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/linux64/lustre-v4-III-e-linux64.tgz echo "eval $(opam env)" >> ~/.bashrc
tar xvzf lustre-v4-III-e-linux64.tgz
echo "export LUSTRE_INSTALL=~/lv4/lustre-v4-III-e-linux64" >> ~/.bashrc # if you are using bash
echo "export PATH=$LUSTRE_INSTALL/bin:$PATH" >> ~/.bashrc
sudo apt install -y wish
#+END_SRC #+END_SRC
Otherwise:
http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/index.html
** Install =sasa= via opam (version >= 2.*)
Once opam (version >= 2.*!) is installed and configured (see above),
you can install =sasa= as follows:
Then, you need to add the =verimag-sync-repo= into your set of opam's
repository:
#+BEGIN_SRC sh :eval no :tangle sh/install-opam.sh :noweb yes :tangle-mode (identity #o444) #+BEGIN_SRC sh :eval no :tangle sh/install-opam.sh :noweb yes :tangle-mode (identity #o444)
opam repo add -a verimag-sync-repo \ opam repo add -a verimag-sync-repo \
"http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository" "http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository"
opam update -y opam update -y
#+END_SRC
Now you should be able to install =sasa=:
#+BEGIN_SRC sh :eval no :tangle sh/install-opam.sh :noweb yes :tangle-mode (identity #o444)
opam install -y sasa opam install -y sasa
#+END_SRC #+END_SRC
If you want to use the =rdbgui4sasa= Graphical User Interface: as well as the =rdbgui4sasa= Graphical User Interface:
#+BEGIN_SRC sh :eval no :tangle sh/install-opam.sh :noweb yes :tangle-mode (identity #o444) #+BEGIN_SRC sh :eval no :tangle sh/install-opam.sh :noweb yes :tangle-mode (identity #o444)
opam depext -y rdbgui4sasa && opam install -y rdbgui4sasa (opam depext -y rdbgui4sasa || echo "useless since opam 2.1") && opam install -y rdbgui4sasa
#+END_SRC #+END_SRC
If you want to be able to defined daemons in Lutin, or test oracles in If you want to be able to use the automated test framawork, you can also
Lustre, you can also install the corresponding packages packages. install the following packages:
#+BEGIN_SRC sh :eval no :tangle sh/install-opam.sh :noweb yes :tangle-mode (identity #o444) #+BEGIN_SRC sh :eval no :tangle sh/install-opam.sh :noweb yes :tangle-mode (identity #o444)
opam install -y lustre-v6 opam install -y lustre-v6
opam depext -y lutin && opam install -y lutin (opam depext -y lutin || echo "useless since opam 2.1") && opam install -y lutin
#+END_SRC #+END_SRC
Once this is done, upgrading to the last version of =sasa= is as Then, if one day you want to upgrade your =sasa= version:
simple as:
#+BEGIN_SRC sh :eval no #+BEGIN_SRC sh :eval no
opam update opam update
opam upgrade opam upgrade
#+END_SRC #+END_SRC
*** Not strictly mandatory, but useful, third-party software
In order to perform interactive simulations, you need to install a
pdf viewer that is able to auto-refresh (for instance =zathura=):
#+BEGIN_SRC sh :eval no
sudo apt install zathura
#+END_SRC
You also need an editor, for instance =emacs= with =merlin= and =tuareg=.
#+BEGIN_SRC sh :eval no
sudo apt install emacs
opam install -y merlin tuareg
opam user-setup install -y
#+END_SRC
In order to be able to use =luciole= (a small GUI useful to
interactively play the role of the daemon using gtk buttons) you can
also install the Lustre V4 distribution. On linux:
#+BEGIN_SRC sh
mkdir ~/lv4 # for example
cd ~/lv4
wget http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/linux64/lustre-v4-III-e-linux64.tgz
tar xvzf lustre-v4-III-e-linux64.tgz
echo "export LUSTRE_INSTALL=~/lv4/lustre-v4-III-e-linux64" >> ~/.bashrc # if you are using bash
echo "export PATH=$LUSTRE_INSTALL/bin:$PATH" >> ~/.bashrc
sudo apt install -y wish
#+END_SRC
For more information:
http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/index.html
** Install =sasa= via =git= ** Install =sasa= via =git=
......
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