Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 1d261ef2 authored by erwan's avatar erwan
Browse files

Add a lurette script that calls rdbg -lurette

parent 4086b5cb
......@@ -104,7 +104,7 @@ opam-test : $(WWWTEST)/pool/$(PACKNAME).tgz
cp $(OPAM_FILE_TEST)-fixed $(OPAM_FILE_TEST) && \
cd .. ; opam-admin check && opam-admin make -g
.PHONY:install $(WWW)/pool/$(PACKNAME).tgz
.PHONY:install $(WWW)/pool/$(PACKNAME).tgz $(WWWTEST)/pool/$(PACKNAME).tgz
oi:install
or:reinstall
ob:build
......
OASISFormat: 0.4
Name: Lutin
Version: 2.17
Version: 2.19
Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr
License: PROP
......@@ -14,7 +14,7 @@ Description:
automated testing of reactive systems with Lurette.
BuildTools: ocamlbuild
PreBuildCommand: make lutin/src/version.ml
PostInstallCommand: cp utils/simec_trap $exec_prefix/bin; cp utils/read-rif.sh $exec_prefix/bin
PostInstallCommand: cp utils/simec_trap $exec_prefix/bin; cp utils/read-rif.sh $exec_prefix/bin; cp utils/lurette $exec_prefix/bin
#PreBuildCommand: make gen_version
......
......@@ -161,8 +161,10 @@ $(OBJDIR)/%.png:ditaa/%.ditaa
# mais ca oblige à editer lutin-tuto-html.org à chaque fois
# bon, ok, j'ai trouvé un moyen (bourrin): --eval "(kill-emacs)" -Q
EMACSBH=emacs --load=./emacs-org.el --batch
EMACSB=emacs --load=../emacs-org.el --batch
EMACS=emacs --load=../zenburn-theme.el --load=../emacs-org.el
EMACSB=emacs --load=../emacs-org.el --batch
# XXX with --batch, I loose the htmlize coloring. why ?
EMACS=emacs --load=../zenburn-theme.el --load=../emacs-org.el # --batch
# $(EMACS) --batch \
......
doc/lutin-tuto/demarche-it-en.png

36.2 KB | W: | H:

doc/lutin-tuto/demarche-it-en.png

31.1 KB | W: | H:

doc/lutin-tuto/demarche-it-en.png
doc/lutin-tuto/demarche-it-en.png
doc/lutin-tuto/demarche-it-en.png
doc/lutin-tuto/demarche-it-en.png
  • 2-up
  • Swipe
  • Onion skin
;(package-initialize)
(setq load-path (cons (expand-file-name "~jahier/dd/org-mode/share/emacs/site-lisp/") load-path))
(setq load-path (cons (expand-file-name "~jahier/dd/org-mode/lisp/") load-path))
(setq load-path (cons (expand-file-name "~/el_files/") load-path))
(setq load-path (cons (expand-file-name "/local/jahier/.emacs.d/elpa/htmlize-1.39/") load-path))
(setq load-path (cons (expand-file-name "/local/jahier/.emacs.d/elpa/zenburn-theme-2.1/") load-path))
(setq load-path (cons (expand-file-name "~/.emacs.d/elpa/htmlize-1.39/") load-path))
;(setq load-path (cons (expand-file-name "/local/jahier/.emacs.d/elpa/htmlize-20161211.1019") load-path))
;(setq load-path (cons (expand-file-name "/local/jahier/.emacs.d/elpa/zenburn-theme-2.1/") load-path))
(require 'org)
;(require 'org-list)
(require 'org-latex)
;(require 'org-latex)
(require 'htmlize)
(require 'ob)
(require 'ob-lutin)
......
......@@ -12,6 +12,8 @@
\includepdf[pages={2-},nup=2x2,landscape,frame,delta=1 1,linktodoc]{lutin-tuto-handout.pdf}
%\includepdf[pages={2-},nup=3x3,landscape,frame,delta=1 1,linktodoc]{lutin-tuto-handout.pdf}
%\includepdf[pages={2-},nup=9x10,landscape,frame,delta=1 1,linktodoc]{lutin-tuto.pdf}
%%% si j'inclus le bip_anim, utiliser plutot ca :
......
......@@ -18,7 +18,7 @@
#+MACRO: runpdf
#+MACRO: run #+begin_src sh \\n<prompt> $2 \n#+end_src
#+MACRO: nprun $2
#+MACRO: pause
......
let min(x, y : real) : real = if x < y then x else y
let max(x, y : real) : real = if x > y then x else y
let abs(x:real) : real = if x < 0.0 then -x else x
-- Always loop, even if t deadlocks
let myloop(t:trace) : trace = loop try loop t
......@@ -58,17 +59,17 @@ node is_3_stable(epsilon, v:real) returns (vref:real;res:bool) =
node is_m_stable(d, m:int ; epsilon, v:real) returns (res:bool) =
exist v_average : real in
exist vref : real in
exist is_3_stable : bool in
exist is_stable : bool in
run v_average, is_3_stable := is_3_stable(epsilon,v) in
run v_average, is_stable := is_3_stable(epsilon,v) in
myloop (
loop not is_3_stable and not res and vref = v_average
loop not is_stable and not res and vref = v_average
fby
-- on se souvient de la valeur de ref à l'entree de ce loop pour
-- détecter une lente dérive de v.
assert
is_3_stable and -- as soon it is false, we start from the beginning
is_stable and -- as soon it is false, we start from the beginning
vref = pre vref and
abs(v-vref) < epsilon -- will detect drift
in
......
......@@ -6,6 +6,9 @@
%---------------------------------------------------------------
\definecolor{macouleur1}{RGB}{242,235,220}
\definecolor{macouleur2}{RGB}{191,182,170}
\definecolor{macouleur3}{RGB}{64,56,47}
\setbeamercolor{frametitle}{fg=DarkBlue} % ok
\setbeamercolor{title}{fg=DarkBlue} % ok
......
This diff is collapsed.
......@@ -19,7 +19,7 @@
#+MACRO: runpdf
#+MACRO: run #+begin_src sh \\n<prompt> $2 \n#+end_src
#+MACRO: nprun $2
#+MACRO: pause
......@@ -67,30 +67,39 @@ non-deterministic reactive machines.
** In order to run this tutorial
- You will need to install
#+BEGIN_SRC sh
sudo apt-get install opam gnuplot tcl
opam repo add verimag-sync-repo "http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository"
opam update
opam install lutin
#+END_SRC
and also the Lustre V4 distribution (for luciole and sim2chro)
http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/index.html
- [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/download.html][Lutin]]
- Tcl/tk
- Gnuplot
- you'll find on the Verimag website
- The [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/download.html][tools]]
{{{pdfhtml(
- An [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/lutin-tuto-html.html][htlm wordier version of those slides]]
- [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/lutin-tuto-html.html][Link to an htlm version of those slides with exercises]]
** In order to run the demo from the pdf slides
nb : in order to run the demo from the pdf slides
you can edit your =.xpdfrc= resource
You can edit (on linux boxes) your =~/.xpdfrc= resource
file modify the =urlCommand= rule:
#+begin_src sh
urlCommand "browserhook.sh '%s'"
#+end_src
and make the bash script [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/sh/browserhook.sh][browserhook.sh]] executable and available from your path,
- A [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/lutin-tuto-handout.pdf][pdf version of this tutorial]]
- Download the bash script [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/sh/browserhook.sh][browserhook.sh (link to the script)]]
- Make it executable and available from your path
- Then the green link should launch the corresponding shell command,
- A [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/lutin-tuto-handout.pdf][pdf version of this tutorial]]
)}}}
{{{runpdf(./sh/echo-go.sh, echo "go!")}}}
* Execute Lutin programs
# \includegraphics[width=10cm]{file:lutin-luciole.png}
......@@ -115,14 +124,13 @@ Let's consider the following Lutin program named [[./incr.lut][incr.lut]].
#+INCLUDE: "./incr.lut" src lutin
#+begin_src sh :tangle sh/incr-demo.sh :exports none :noweb yes
xterm -e "lutin incr.lut"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin incr.lut"
#+end_src
{{{run(./sh/incr-demo.sh, lutin incr.lut)}}}
#+BEGIN_EXAMPLE
Opening file /home/jahier/lurette/doc/lutin-tuto/incr.lut
# This is lutin Version 1.54 (9e783b6)
# The random engine was initialized with the seed 817281206
#inputs "x":int
......@@ -160,14 +168,13 @@ Consider the [[./one.lut][one.lut]] program:
#+INCLUDE: "./one.lut" src lutin
#+begin_src sh :tangle sh/one-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -l 5 one.lut"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin -l 5 one.lut"
#+end_src
{{{run(./sh/one-demo.sh, lutin -l 5 one.lut)}}}
#+BEGIN_SRC rif
Opening file /home/jahier/lurette/doc/lutin-tuto/one.lut
# This is lutin Version 1.54 (9e783b6)
# The random engine was initialized with the seed 931220738
#inputs
......@@ -195,7 +202,7 @@ launch ~lutin one.lut -l 5~ on [[./one.lut][one.lut]]:
*** Be quiet
#+begin_src sh :tangle sh/one-q-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -l 5 -quiet one.lut"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin -l 5 -quiet one.lut"
#+end_src
{{{run(./sh/one-q-demo.sh, lutin -l 5 -quiet one.lut)}}}
......@@ -219,10 +226,10 @@ obtain quieter sequence, one can use the ~-quiet~ option (~-q~ for short):
#+INCLUDE: "./N.lut" src lutin
#+begin_src sh :tangle sh/incr-luciole-demo.sh :exports none :noweb yes
xterm -e "lutin -luciole incr.lut"
xterm -e "luciole-rif lutin -rif incr.lut"
#+end_src
{{{run(./sh/incr-luciole-demo.sh, lutin -luciole incr.lut)}}}
{{{run(./sh/incr-luciole-demo.sh, luciole-rif lutin incr.lut)}}}
It is also possible to feed Lutin programs with ~luciole~, a tcl/tk
......@@ -248,7 +255,7 @@ It is possible to store the lutin RIF output into a file using the
#+begin_src sh :tangle sh/rif-demo.sh :exports none :noweb yes
xterm -e "lutin -l 10 -o ten.rif N.lut"
xterm -hold -e "ls -lh ten.rif"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "ls -lh ten.rif"
#+end_src
{{{run(./sh/rif-demo.sh, lutin -l 10 -o ten.rif N.lut ; ls -lh ten.rif)}}}
......@@ -260,7 +267,7 @@ It is possible to store the lutin RIF output into a file using the
*** Visualize a RIF file
#+begin_src sh :tangle sh/cat-demo.sh :exports none :noweb yes
xterm -hold -e "cat ten.rif"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "cat ten.rif"
#+end_src
{{{run(./sh/cat-demo.sh, cat ten.rif)}}}
......@@ -303,11 +310,13 @@ can use two tools that are part of the ~lutin~ distribution:
#+INCLUDE: "./decr.lut" src lutin
#+begin_src sh :tangle sh/lurette-demo.sh :exports none :noweb yes
xterm -e "lurettetop -go -rp \"sut:lutin:decr.lut:incr\" -rp \"env:lutin:decr.lut:decr\" -l 20"
lurette -sut "lutin decr.lut -n incr" -env "lutin decr.lut -n decr" &&\
cat rdbg.rif | sim2chrogtk -ecran > /dev/null
#+end_src
{{{run(./sh/lurette-demo.sh,
lurettetop -go -l 20 -rp "sut:lutin:incr.lut:incr" -rp "env:lutin:decr.lut:decr"
lurette -sut "lutin decr.lut -n incr" -env "lutin decr.lut -n decr" ; \\
cat rdbg.rif | sim2chrogtk -ecran > /dev/null
)}}}
......@@ -323,7 +332,7 @@ file:jpg/geluck-echec.jpg)}}}
- I've bought 2 electronic chess games
- connected one to another
- And now I have peace
- And now I'm at peace
* The Language
......@@ -338,14 +347,13 @@ syntax and semantics, please refer to the [[http://www-verimag.imag.fr/DIST-TOOL
** Back to programs of Section 1
*** Let's come back to the Lutin programs mentioned so far.
- Let's come back to the Lutin programs mentioned so far.
#+INCLUDE: "./incr.lut" src lutin
*** We said said That the first one, [[file:incr.lut][incr.lut]] increments
its input by one. Let's explain why.
*** We said said That the first one, [[file:incr.lut][incr.lut]] increments its input by one. Let's explain why.
*** Those programs illustrate the 2 kinds of expressions we have in Lutin.
- Those programs illustrate the 2 kinds of expressions we have in Lutin.
- *constraint expressions* (~y = x+1~) that asserts facts outputs
variables.
- *trace expression* (~loop~ <te>) that allows one to combine
......@@ -410,7 +418,7 @@ exactly as [[file:N.lut][N.lut]]:
#+INCLUDE: "./trivial.lut" src lutin
#+begin_src sh :tangle sh/trivial-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -l 10 -q trivial.lut"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin -l 10 -q trivial.lut"
#+end_src
{{{run(./sh/trivial-demo.sh, lutin -l 10 -q trivial.lut)}}}
......@@ -447,7 +455,7 @@ as done in [[file:trivial2.lut][trivial2.lut]]:
#+begin_src sh :tangle sh/trivial2-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -l 10 -q trivial2.lut"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin -l 10 -q trivial2.lut"
#+end_src
{{{run(./sh/trivial2-demo.sh,lutin -l 10 -q trivial2.lut)}}}
......@@ -481,7 +489,7 @@ the program stops.
#+INCLUDE: "./range.lut" src lutin
#+begin_src sh :tangle sh/range-demo.sh :exports none :noweb yes
xterm -hold -e "lutin range.lut -l 10 -q"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin range.lut -l 10 -q"
#+end_src
{{{run(./sh/range-demo.sh, lutin range.lut -l 10 -q)}}}
......@@ -523,7 +531,7 @@ Lutin constraints can only be linear, which means that the set of
#+begin_src sh :tangle sh/range-sv-demo.sh :exports none :noweb yes
xterm -hold -e "lutin range.lut -q -l 10 -sv "
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin range.lut -q -l 10 -sv "
#+end_src
{{{run(./sh/range-sv-demo.sh, lutin range.lut -l 10 -q --step-vertices)}}}
......@@ -559,11 +567,11 @@ the same.
#+begin_src sh :tangle sh/poly-demo.sh :exports none :noweb yes
# xterm -e "lutin polyhedron.lut -l 1000 -quiet > poly.data";
echo 'set pointsize 0.2 ; set terminal wxt persist; splot "poly.data" using 1:2:3'| gnuplot
echo 'set pointsize 0.2 ; splot "poly.data" using 1:2:3;pause mouse close'| gnuplot
#+end_src
{{{run(./sh/poly-demo.sh, lutin polyhedron.lut -l 1000 -q > poly.data;\\
echo 'set point 0.2;set term wxt persist;splot "poly.data" using 1:2:3'| gnuplot)}}}
echo 'set point 0.2; splot "poly.data" using 1:2:3;pause mouse close'| gnuplot)}}}
However, constraint expressions should be linear. For example, =x *
......@@ -579,12 +587,12 @@ plotting facilities of gnuplot like that:
#+begin_src sh :tangle sh/poly-se-demo.sh :exports none :noweb yes
# xterm -e "lutin polyhedron.lut -se -l 1000 -quiet > poly-se.data" &&
echo 'set point 0.2 ; set term wxt persist; splot "poly-se.data" using 1:2:3'| gnuplot
echo 'set point 0.2 ; splot "poly-se.data" using 1:2:3; pause mouse close'| gnuplot
#+end_src
#+begin_src sh :tangle sh/poly-sv-demo.sh :exports none :noweb yes
# xterm -e "lutin polyhedron.lut -sv -l 1000 -quiet > poly-sv.data" &&
echo 'set point 0.8;set term wxt persist; splot "poly-sv.data" using 1:2:3'| gnuplot
echo 'set point 0.8; splot "poly-sv.data" using 1:2:3; pause mouse close'| gnuplot
#+end_src
......@@ -599,8 +607,8 @@ options on the repartition of generated points
#+begin_example
<prompt> lutin polyhedron.lut -l 1000 -quiet -se > poly-se.data
<prompt> lutin polyhedron.lut -l 1000 -quiet -sv > poly-sv.data
<prompt> echo 'set pointsize 0.2 ; set terminal wxt persist; splot "poly-se.data" using 1:2:3'| gnuplot
<prompt> echo 'set pointsize 0.8 ; set terminal wxt persist; splot "poly-sv.data" using 1:2:3'| gnuplot
<prompt> echo 'set pointsize 0.2; splot "poly-se.data" using 1:2:3;pause mouse close'| gnuplot
<prompt> echo 'set pointsize 0.8; splot "poly-sv.data" using 1:2:3;pause mouse close'| gnuplot
#+end_example
hint: use the mouse inside the gnuplot window to change the perspective.
......@@ -616,10 +624,10 @@ Constraint may also depend on inputs. Try to play the
#+INCLUDE: "./range-bis.lut" src lutin
#+begin_src sh :tangle sh/range-bis-demo.sh :exports none :noweb yes
xterm -e "lutin range-bis.lut -luciole"
xterm -e "luciole-rif lutin range-bis.lut"
#+end_src
{{{run(./sh/range-bis-demo.sh, lutin range-bis.lut -luciole)}}}
{{{run(./sh/range-bis-demo.sh, luciole-rif lutin range-bis.lut)}}}
......@@ -644,7 +652,7 @@ returns -1.
#+INCLUDE: "./choice.lut" src lutin
#+begin_src sh :tangle sh/choice-demo.sh :exports none :noweb yes
xterm -e "lutin -l 10 -q choice.lut";
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin -l 10 -q choice.lut";
#+end_src
{{{run(./sh/choice-demo.sh, lutin -l 10 -q choice.lut)}}}
......@@ -681,7 +689,7 @@ In [[file:choice2.lut][choice2.lut]], ~x=42~ is chosen with a probability of 3/4
#+begin_src sh :tangle sh/choice2-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -l 1000 -q choice2.lut | grep 42 | wc -l";
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin -l 1000 -q choice2.lut | grep 42 | wc -l";
#+end_src
{{{run(./sh/choice2-demo.sh, lutin -l 10000 -q choice2.lut | grep 42 | wc -l)}}}
......@@ -704,10 +712,10 @@ be satisfiable.
#+INCLUDE: "./choice3.lut" src lutin
#+begin_src sh :tangle sh/choice3-demo.sh :exports none :noweb yes
xterm -e "lutin -luciole choice3.lut";
xterm -e "luciole-rif lutin choice3.lut";
#+end_src
{{{run(./sh/choice3-demo.sh, lutin -luciole choice3.lut)}}}
{{{run(./sh/choice3-demo.sh, luciole-rif lutin choice3.lut)}}}
......@@ -723,7 +731,7 @@ be satisfiable.
#+INCLUDE: "./letdef.lut" src lutin
#+begin_src sh :tangle sh/letdef-demo.sh :exports none :noweb yes
xterm -e "lutin -quiet letdef.lut"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin -quiet letdef.lut"
#+end_src
{{{run(./sh/letdef-demo.sh, lutin -quiet letdef.lut)}}}
......@@ -761,10 +769,10 @@ the [[file:up-and-down.lut][up-and-down.lut]] program:
#+INCLUDE: "./up-and-down.lut" src lutin
#+begin_src sh :tangle sh/up-and-down-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -luciole up-and-down.lut"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin up-and-down.lut"
#+end_src
{{{run(./sh/up-and-down-demo.sh, lutin -luciole up-and-down.lut)}}}
{{{run(./sh/up-and-down-demo.sh, luciole-rif lutin up-and-down.lut)}}}
The combinator =up= (reps =down=) constraints the variable =x=
to be between its previous value and its previous value plus (resp
......@@ -792,10 +800,10 @@ output variables. Such variables can be declared using the
#+INCLUDE: "./true_since_n_instants.lut" src lutin
#+begin_src sh :tangle sh/true-since-demo.sh :exports none :noweb yes
xterm -e "lutin true_since_n_instants.lut -luciole";
xterm -e "luciole-rif lutin true_since_n_instants.lut";
#+end_src
{{{run(./sh/true-since-demo.sh, lutin true\_since\_n\_instants.lut -luciole)}}}
{{{run(./sh/true-since-demo.sh, luciole-rif lutin true\_since\_n\_instants.lut)}}}
It is possible to set its previous value at declaration time as for
......@@ -973,11 +981,11 @@ st2. If the "do" part is omitted, the statement terminates normally.
#+INCLUDE "except.lut" src lutin
#+begin_src sh :tangle sh/except-demo.sh :exports none :noweb yes
xterm -hold -e "lutin except.lut -luciole"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin except.lut"
#+end_src
{{{run(./sh/except-demo.sh, lutin except.lut -luciole)}}}
{{{run(./sh/except-demo.sh, luciole-rif lutin except.lut)}}}
[[file:except.lut][except.lut]]
......@@ -998,10 +1006,10 @@ Note that the 43 value is never generated (if i<>43 of course).
#+INCLUDE: "./paralel.lut" src lutin 6-
#+begin_src sh :tangle sh/para-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -luciole paralel.lut"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin paralel.lut"
#+end_src
{{{run(./sh/para-demo.sh, lutin -luciole paralel.lut)}}}
{{{run(./sh/para-demo.sh, luciole-rif lutin paralel.lut)}}}
=<te1> &> <te2>= executes the trace expression =<te1>= and =<te2>= in
......@@ -1038,10 +1046,10 @@ blocked somewhere inside =t=. ([[file:myloop.lut][myloop.lut]])
#+INCLUDE: "./myloop.lut" src lutin
#+begin_src sh :tangle sh/myloop-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -luciole myloop.lut"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin myloop.lut"
#+end_src
{{{run(./sh/myloop-demo.sh, lutin -luciole myloop.lut)}}}
{{{run(./sh/myloop-demo.sh, luciole-rif lutin myloop.lut)}}}
Each step you set reset to =true=, the output equals to =0=.
......@@ -1054,7 +1062,7 @@ Each step you set reset to =true=, the output equals to =0=.
# In Lutin, there are two operators for computing things in parallel: *)
# =&>= and =run=. *)
* A new operator =run/in=
* The =run= operator
** Cheap parallelism: Calling Lutin nodes =run/in=
The idea is the following: when one writes:
......@@ -1087,7 +1095,7 @@ Moreover in Lutin, the order of equations matters.
#+INCLUDE: "./run.lut" src lutin
#+begin_src sh :tangle sh/run-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -l 5 -q run.lut -m use_run"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "lutin -l 5 -q run.lut -m use_run"
#+end_src
{{{run(./sh/run-demo.sh,lutin -l 5 -q run.lut -m use\_run)}}}
......@@ -1142,14 +1150,14 @@ run statements.
#+begin_src sh :tangle sh/sensors-demo.sh :exports none :noweb yes
xterm -hold -e "lutin sensors.lut -m main -luciole"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin sensors.lut -m main"
#+end_src
{{{run(./sh/sensors-demo.sh,lutin sensors.lut -m main -luciole)}}}
{{{run(./sh/sensors-demo.sh,luciole-rif lutin sensors.lut -m main)}}}
#+begin_example
<prompt> lutin sensors.lut -m main -luciole
<prompt> luciole-rif lutin sensors.lut -m main
#+end_example
......@@ -1234,10 +1242,10 @@ and a few macros:
[[file:is_stable.lut][The Lutin version]]
#+begin_src sh :tangle sh/is_stable-demo.sh :exports none :noweb yes
xterm -hold -e "lutin -luciole is_stable.lut -m is_stable"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin is_stable.lut -m is_stable"
#+end_src
{{{run(./sh/is_stable-demo.sh,lutin -luciole is\_stable.lut -m is\_stable)}}}
{{{run(./sh/is_stable-demo.sh,luciole-rif lutin is\_stable.lut -m is\_stable)}}}
*** The Lustre version
......@@ -1250,15 +1258,22 @@ test oracles, that we traditionally write in Lustre).
[[file:is_stable.lus][The Lustre version]]
** The Crazzy rabbit
** The Crazzy rabbit :noexport:
XXX pour l'instant je ne sais pas a appeler du ocaml via rdbg en
ligne de commande. Et ai-je vraiment envie de le faire ? Ca va
compliquer rdbg.ml grave. Bref, pour refaire marcher ce truc, il faudra
que j'ecrire une session.ml a la main
- The rabbit serves as an environment for a caml program
that displays its position in a graphical windows
- The rabbit remains in its field, and avoids a moving obstable
- The rabbit changes it speed an trajectory from times to times
#+begin_src sh :tangle sh/rabbit-demo.sh :exports none :noweb yes
xterm -hold -e "cd crazy-rabbit; lurettetop -rp "sut:ocaml:rabbit.cmxs:" -rp 'env:lutin:rabbit.lut:-main:rabbit:-L:libm.so:-loc'"
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "cd crazy-rabbit; lurettetop -rp "sut:ocaml:rabbit.cmxs:" -rp 'env:lutin:rabbit.lut:-main:rabbit:-L:libm.so:-loc'"
lurette -sut "" -env "lutin crazy-rabbit/rabbit.lut -n rabbit -L libm.so"
#+end_src
{{{run(sh/rabbit-demo.sh,lurettetop -rp "sut:ocaml:rabbit.cmxs:" -rp 'env:lutin:rabbit.lut:-main:rabbit:-L:libm.so:-loc')}}}
......
# XXX Edite plutot le main.org patate !
# Time-stamp: <modified the 02/09/2015 (at 16:28) by Erwan Jahier>
# Time-stamp: <modified the 16/03/2017 (at 11:11) by Erwan Jahier>
#+OPTIONS: LaTeX:t
#+OPTIONS:toc:2
#+TODO: todo cont | done
#+OPTIONS: H:2 num:t toc:t \n:nil ::t |:t ^:t -:t f:t *:t skip:t tags:not-in-toc
#+OPTIONS: H:3 num:t toc:t \n:nil ::t |:t ^:t -:t f:t *:t skip:t tags:not-in-toc
#+LINK_UP: http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html
#+LINK_HOME:http://www-verimag.imag.fr/Lutin.html
......@@ -23,18 +24,14 @@
#+LATEX_HEADER: \usepackage{color}
#+LATEX_HEADER: \usepackage{xcolor}
#+LATEX_HEADER: \usepackage{listings}
#+LATEX_HEADER: \input{lmybeamer}
#+LATEX_HEADER: \AtBeginSection[]{}
#+LATEX_HEADER: \hypersetup{pdfcreator=Erwan Jahier,pdfnewwindow=true}
#+OPTIONS: LaTeX:dvipng
#+LATEX_HEADER: \input{mybeamer}
#+AUTHOR: \href{grille.pdf}{Erwan Jahier}
#+TITLE: \href{lutin-tuto-pdf.pdf}{A Lutin Tutorial}
#+MACRO: runpdf #+begin_latex\n\href{file:$1}{\texttt{\color{DarkGreen}{<prompt> $2}}} \n#+end_latex
#+MACRO: run #+begin_latex\n\href{file:$1}{\texttt{\color{DarkGreen}{<prompt> $2}}} \n#+end_latex
#+MACRO: nprun #+begin_latex\n\href{file:$1}{\texttt{\color{DarkGreen}{$2}}} \n#+end_latex
#+MACRO: pause \pause
......@@ -53,14 +50,14 @@
#+LATEX_HEADER: \usepackage{version}
#+LATEX_HEADER: \AtBeginSection[]{}
#+LATEX_HEADER: \hypersetup{pdfcreator=Erwan Jahier,pdfnewwindow=true}
#+OPTIONS: LaTeX:dvipng
#+DATE: \today
#+LATEX_HEADER: \AtBeginSection[]{\begin{frame}\frametitle{Plan}\setcounter{tocdepth}{3}\tableofcontents[currentsection]\end{frame}}
#+LATEX_HEADER: \definecolor{electricblue}{HTML}{05ADF3}
#+LATEX_HEADER: \hypersetup{colorlinks,pdfcreator=Erwan Jahier,pdfnewwindow=true}
#+OPTIONS: LaTeX:dvipng
#+OPTIONS: LaTeX:dvipng
#+DATE: Verimag
* Forewords
** Motivations: testing reactive programs
......@@ -86,30 +83,39 @@ file:./demarche-it-en.png
** In order to run this tutorial
- You will need to install
#+BEGIN_SRC sh
sudo apt-get install opam gnuplot tcl
opam repo add verimag-sync-repo "http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository"
opam update
opam install lutin
#+END_SRC
and also the Lustre V4 distribution (for luciole and sim2chro)
http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lustre-v4/distrib/index.html
- [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/download.html][Lutin]]
- Tcl/tk
- Gnuplot
- you'll find on the Verimag website
- The [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/download.html][tools]]
{{{pdfhtml(
- An [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/lutin-tuto-html.html][htlm wordier version of those slides]]
- [[http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/lurette/lutin-tuto-html.html][Link to an htlm version of those slides with exercises]]
** In order to run the demo from the pdf slides
nb : in order to run the demo from the pdf slides
you can edit your =.xpdfrc= resource
You can edit (on linux boxes) your =~/.xpdfrc= resource
file modify the =urlCommand= rule:
#+begin_src sh
urlCommand "browserhook.sh '%s'"