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 0f1490b8 authored by erwan's avatar erwan
Browse files

lus2lic is now named lv6

parent 524a27b5
Pipeline #5937 passed with stages
in 10 minutes and 29 seconds
OASISFormat: 0.4 OASISFormat: 0.4
Name: Lutin Name: Lutin
Version: 2.45 Version: 2.46
Authors: Erwan Jahier Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr Maintainers: erwan.jahier@imag.fr
License: PROP License: PROP
......
...@@ -819,11 +819,18 @@ the [[file:up-and-down.lut][up-and-down.lut]] program: ...@@ -819,11 +819,18 @@ the [[file:up-and-down.lut][up-and-down.lut]] program:
#+INCLUDE: "./up-and-down.lut" src lutin #+INCLUDE: "./up-and-down.lut" src lutin
#+begin_src sh :tangle sh/up-and-down-demo.sh :exports none :noweb yes #+begin_src sh :tangle sh/up-and-down-demo.sh :exports none :noweb yes
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin up-and-down.lut" luciole-rif lutin up-and-down.lut
# xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin up-and-down.lut"
#+end_src
#+begin_src sh :tangle sh/gnuplot-rif-luciole.sh :exports none :noweb yes
# xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "
gnuplot-rif luciole.rif
#+end_src #+end_src
{{{run(./sh/up-and-down-demo.sh, luciole-rif lutin up-and-down.lut)}}} {{{run(./sh/up-and-down-demo.sh, luciole-rif lutin up-and-down.lut)}}}
{{{run(./sh/gnuplot-rif-luciole.sh, gnuplot-rif luciole.rif)}}}
The combinator =up= (reps =down=) constraints the variable =x= The combinator =up= (reps =down=) constraints the variable =x=
to be between its previous value and its previous value plus (resp to be between its previous value and its previous value plus (resp
minus) a positive =delta=. The node =up-and-down=, after an minus) a positive =delta=. The node =up-and-down=, after an
...@@ -850,7 +857,7 @@ output variables. Such variables can be declared using the ...@@ -850,7 +857,7 @@ output variables. Such variables can be declared using the
#+INCLUDE: "./true-since-n-instants.lut" src lutin #+INCLUDE: "./true-since-n-instants.lut" src lutin
#+begin_src sh :tangle sh/true-since-demo.sh :exports none :noweb yes #+begin_src sh :tangle sh/true-since-demo.sh :exports none :noweb yes
xterm -e "luciole-rif lutin true-since-n-instants.lut"; luciole-rif lutin true-since-n-instants.lut
#+end_src #+end_src
{{{run(./sh/true-since-demo.sh, luciole-rif lutin true-since-n-instants.lut)}}} {{{run(./sh/true-since-demo.sh, luciole-rif lutin true-since-n-instants.lut)}}}
...@@ -875,8 +882,6 @@ program with an explicit ~loop~), the local variable was a simple ...@@ -875,8 +882,6 @@ program with an explicit ~loop~), the local variable was a simple
Local variables can also plain random variables, as Local variables can also plain random variables, as
illustrated the [[file:local.lut][local.lut]] program: illustrated the [[file:local.lut][local.lut]] program:
#+INCLUDE: "./local.lut" src lutin #+INCLUDE: "./local.lut" src lutin
At first step, the local variable ~target~ is chosen randomly At first step, the local variable ~target~ is chosen randomly
...@@ -890,6 +895,9 @@ illustrated the [[file:local.lut][local.lut]] program: ...@@ -890,6 +895,9 @@ illustrated the [[file:local.lut][local.lut]] program:
#+begin_src sh :tangle sh/local-demo.sh :exports none :noweb yes #+begin_src sh :tangle sh/local-demo.sh :exports none :noweb yes
rm -f local.rif; lutin local.lut -l 100 -o local.rif && gnuplot-rif local.rif rm -f local.rif; lutin local.lut -l 100 -o local.rif && gnuplot-rif local.rif
#+end_src #+end_src
#+begin_src sh :tangle sh/local-damped.sh :exports none :noweb yes
rm -f local-bis.rif; lutin local-bis.lut -l 100 -o local-bis.rif && gnuplot-rif local-bis.rif
#+end_src
{{{run(./sh/local-demo.sh,lutin local.lut -l 100 -o local.rif ; gnuplot-rif local.rif)}}} {{{run(./sh/local-demo.sh,lutin local.lut -l 100 -o local.rif ; gnuplot-rif local.rif)}}}
...@@ -897,9 +905,10 @@ illustrated the [[file:local.lut][local.lut]] program: ...@@ -897,9 +905,10 @@ illustrated the [[file:local.lut][local.lut]] program:
file:png/Screenshot-Gnuplot-local.png file:png/Screenshot-Gnuplot-local.png
#+BEGIN_QUOTE
*Question:* modify the previous program so that x reaches the target *Question:* modify the previous program so that x reaches the target
after a [[file:png/Screenshot-Gnuplot-localbis.png][damped oscillation]] after a
{{{nprun(./sh/local-damped.sh,damped oscillation)}}}
...@@ -908,9 +917,8 @@ like in the following screen-shot: ...@@ -908,9 +917,8 @@ like in the following screen-shot:
file:png/Screenshot-Gnuplot-localbis.png file:png/Screenshot-Gnuplot-localbis.png
#+END_QUOTE ** Damped oscillation
#+INCLUDE: "./local-bis.lut" src lutin
[[file:local-bis.lut][Answer]]
** Distribute a constraint into a scope: =assert= ** Distribute a constraint into a scope: =assert=
...@@ -987,7 +995,6 @@ node bizzare() returns (x,res: real) = ...@@ -987,7 +995,6 @@ node bizzare() returns (x,res: real) =
file:png/Screenshot-Gnuplot-ext.png file:png/Screenshot-Gnuplot-ext.png
** Exceptions ** Exceptions
*** Global exceptions can be declared outside the main node: *** Global exceptions can be declared outside the main node:
......
...@@ -444,11 +444,18 @@ gnuplot-rif walk.rif ...@@ -444,11 +444,18 @@ gnuplot-rif walk.rif
#+INCLUDE: "./up-and-down.lut" src lutin #+INCLUDE: "./up-and-down.lut" src lutin
#+begin_src sh :tangle sh/up-and-down-demo.sh :exports none :noweb yes #+begin_src sh :tangle sh/up-and-down-demo.sh :exports none :noweb yes
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin up-and-down.lut" luciole-rif lutin up-and-down.lut
# xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin up-and-down.lut"
#+end_src
#+begin_src sh :tangle sh/gnuplot-rif-luciole.sh :exports none :noweb yes
# xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "
gnuplot-rif luciole.rif
#+end_src #+end_src
{{{run(./sh/up-and-down-demo.sh, luciole-rif lutin up-and-down.lut)}}} {{{run(./sh/up-and-down-demo.sh, luciole-rif lutin up-and-down.lut)}}}
{{{run(./sh/gnuplot-rif-luciole.sh, gnuplot-rif luciole.rif)}}}
\pause \pause
...@@ -466,7 +473,7 @@ output variables. Such variables can be declared using the ...@@ -466,7 +473,7 @@ output variables. Such variables can be declared using the
#+INCLUDE: "./true-since-n-instants.lut" src lutin #+INCLUDE: "./true-since-n-instants.lut" src lutin
#+begin_src sh :tangle sh/true-since-demo.sh :exports none :noweb yes #+begin_src sh :tangle sh/true-since-demo.sh :exports none :noweb yes
xterm -e "luciole-rif lutin true-since-n-instants.lut"; luciole-rif lutin true-since-n-instants.lut
#+end_src #+end_src
{{{run(./sh/true-since-demo.sh, luciole-rif lutin true-since-n-instants.lut)}}} {{{run(./sh/true-since-demo.sh, luciole-rif lutin true-since-n-instants.lut)}}}
...@@ -476,26 +483,27 @@ output variables. Such variables can be declared using the ...@@ -476,26 +483,27 @@ output variables. Such variables can be declared using the
Local variables can also plain random variables, as Local variables can also plain random variables, as
illustrated the [[file:local.lut][local.lut]] program: illustrated the [[file:local.lut][local.lut]] program:
#+INCLUDE: "./local.lut" src lutin #+INCLUDE: "./local.lut" src lutin
#+begin_src sh :tangle sh/local-demo.sh :exports none :noweb yes #+begin_src sh :tangle sh/local-demo.sh :exports none :noweb yes
rm -f local.rif; lutin local.lut -l 100 -o local.rif && gnuplot-rif local.rif rm -f local.rif; lutin local.lut -l 100 -o local.rif && gnuplot-rif local.rif
#+end_src #+end_src
#+begin_src sh :tangle sh/local-damped.sh :exports none :noweb yes
rm -f local-bis.rif; lutin local-bis.lut -l 100 -o local-bis.rif && gnuplot-rif local-bis.rif
#+end_src
{{{run(./sh/local-demo.sh,lutin local.lut -l 100 -o local.rif ; gnuplot-rif local.rif)}}} {{{run(./sh/local-demo.sh,lutin local.lut -l 100 -o local.rif ; gnuplot-rif local.rif)}}}
#+BEGIN_QUOTE
*Question:* modify the previous program so that x reaches the target *Question:* modify the previous program so that x reaches the target
after a [[file:png/Screenshot-Gnuplot-localbis.png][damped oscillation]] after a
{{{nprun(./sh/local-damped.sh,damped oscillation)}}}
#+END_QUOTE
[[file:local-bis.lut][Answer]] ** Damped oscillation
#+INCLUDE: "./local-bis.lut" src lutin
** Distribute a constraint into a scope: =assert= ** Distribute a constraint into a scope: =assert=
...@@ -545,7 +553,6 @@ node bizzare() returns (x,res: real) = ...@@ -545,7 +553,6 @@ node bizzare() returns (x,res: real) =
{{{run(./sh/ext-call-demo.sh, lutin -L libm.so -l 200 ext-call.lut -o ext-call.rif;gnuplot-rif ext-call.rif)}}} {{{run(./sh/ext-call-demo.sh, lutin -L libm.so -l 200 ext-call.lut -o ext-call.rif;gnuplot-rif ext-call.rif)}}}
** Exceptions ** Exceptions
*** Global exceptions can be declared outside the main node: *** Global exceptions can be declared outside the main node:
......
...@@ -775,11 +775,18 @@ html. ...@@ -775,11 +775,18 @@ html.
#+INCLUDE: "./up-and-down.lut" src lutin #+INCLUDE: "./up-and-down.lut" src lutin
#+begin_src sh :tangle sh/up-and-down-demo.sh :exports none :noweb yes #+begin_src sh :tangle sh/up-and-down-demo.sh :exports none :noweb yes
xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin up-and-down.lut" luciole-rif lutin up-and-down.lut
# xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "luciole-rif lutin up-and-down.lut"
#+end_src
#+begin_src sh :tangle sh/gnuplot-rif-luciole.sh :exports none :noweb yes
# xterm -hold -fa "Liberation Mono:size=15:antialias=false" -e "
gnuplot-rif luciole.rif
#+end_src #+end_src
{{{run(./sh/up-and-down-demo.sh, luciole-rif lutin up-and-down.lut)}}} {{{run(./sh/up-and-down-demo.sh, luciole-rif lutin up-and-down.lut)}}}
{{{run(./sh/gnuplot-rif-luciole.sh, gnuplot-rif luciole.rif)}}}
html: The combinator =up= (reps =down=) constraints the variable =x= html: The combinator =up= (reps =down=) constraints the variable =x=
to be between its previous value and its previous value plus (resp to be between its previous value and its previous value plus (resp
minus) a positive =delta=. The node =up-and-down=, after an minus) a positive =delta=. The node =up-and-down=, after an
...@@ -806,7 +813,7 @@ output variables. Such variables can be declared using the ...@@ -806,7 +813,7 @@ output variables. Such variables can be declared using the
#+INCLUDE: "./true-since-n-instants.lut" src lutin #+INCLUDE: "./true-since-n-instants.lut" src lutin
#+begin_src sh :tangle sh/true-since-demo.sh :exports none :noweb yes #+begin_src sh :tangle sh/true-since-demo.sh :exports none :noweb yes
xterm -e "luciole-rif lutin true-since-n-instants.lut"; luciole-rif lutin true-since-n-instants.lut
#+end_src #+end_src
{{{run(./sh/true-since-demo.sh, luciole-rif lutin true-since-n-instants.lut)}}} {{{run(./sh/true-since-demo.sh, luciole-rif lutin true-since-n-instants.lut)}}}
...@@ -831,8 +838,6 @@ html. ...@@ -831,8 +838,6 @@ html.
Local variables can also plain random variables, as Local variables can also plain random variables, as
illustrated the [[file:local.lut][local.lut]] program: illustrated the [[file:local.lut][local.lut]] program:
#+INCLUDE: "./local.lut" src lutin #+INCLUDE: "./local.lut" src lutin
html: At first step, the local variable ~target~ is chosen randomly html: At first step, the local variable ~target~ is chosen randomly
...@@ -846,6 +851,9 @@ html. ...@@ -846,6 +851,9 @@ html.
#+begin_src sh :tangle sh/local-demo.sh :exports none :noweb yes #+begin_src sh :tangle sh/local-demo.sh :exports none :noweb yes
rm -f local.rif; lutin local.lut -l 100 -o local.rif && gnuplot-rif local.rif rm -f local.rif; lutin local.lut -l 100 -o local.rif && gnuplot-rif local.rif
#+end_src #+end_src
#+begin_src sh :tangle sh/local-damped.sh :exports none :noweb yes
rm -f local-bis.rif; lutin local-bis.lut -l 100 -o local-bis.rif && gnuplot-rif local-bis.rif
#+end_src
{{{run(./sh/local-demo.sh,lutin local.lut -l 100 -o local.rif ; gnuplot-rif local.rif)}}} {{{run(./sh/local-demo.sh,lutin local.lut -l 100 -o local.rif ; gnuplot-rif local.rif)}}}
...@@ -853,9 +861,10 @@ html: ...@@ -853,9 +861,10 @@ html:
file:png/Screenshot-Gnuplot-local.png file:png/Screenshot-Gnuplot-local.png
html. html.
#+BEGIN_QUOTE
*Question:* modify the previous program so that x reaches the target *Question:* modify the previous program so that x reaches the target
after a [[file:png/Screenshot-Gnuplot-localbis.png][damped oscillation]] after a
{{{nprun(./sh/local-damped.sh,damped oscillation)}}}
html: html:
...@@ -864,9 +873,8 @@ like in the following screen-shot: ...@@ -864,9 +873,8 @@ like in the following screen-shot:
file:png/Screenshot-Gnuplot-localbis.png file:png/Screenshot-Gnuplot-localbis.png
html. html.
#+END_QUOTE ** Damped oscillation
#+INCLUDE: "./local-bis.lut" src lutin
[[file:local-bis.lut][Answer]]
** Distribute a constraint into a scope: =assert= ** Distribute a constraint into a scope: =assert=
...@@ -943,7 +951,6 @@ html: ...@@ -943,7 +951,6 @@ html:
file:png/Screenshot-Gnuplot-ext.png file:png/Screenshot-Gnuplot-ext.png
html. html.
** Exceptions ** Exceptions
*** Global exceptions can be declared outside the main node: *** Global exceptions can be declared outside the main node:
......
let within(x, min, max: real): bool = let within(x, min, max: real) :bool = (min <= x) and (x <= max)
(min <= x) and (x <= max) let up (delta:real;x:real ref):bool = within(x,pre x,pre x+delta)
let up (delta:real; x : real ref) : bool = let down(delta:real;x:real ref):bool = within(x,pre x-delta,pre x)
within(x, pre x, pre x + delta)
let down(delta:real; x : real ref) : bool =
within(x, pre x - delta, pre x)
node up_and_down(min,max,d:real) returns (x:real) = node up_and_down(min,max,d:real) returns (x:real) =
within(x, min, max) fby within(x, min, max) fby
loop { loop {
......
...@@ -213,7 +213,7 @@ let compile_lustre_program_if_needed ...@@ -213,7 +213,7 @@ let compile_lustre_program_if_needed
"No " ^ lustre_node ^ ".c or no " ^ lustre_node ^ "No " ^ lustre_node ^ ".c or no " ^ lustre_node ^
".h exist(s), so I try to compile " ^ lustre_prog ^ ".h exist(s), so I try to compile " ^ lustre_prog ^
" with node " ^ lustre_node ^ " with node " ^ lustre_node ^
" with lus2lic -ec and ec2c...\n"); " with lv6 -ec and ec2c...\n");
if Util2.lv62ec lustre_prog lustre_node user_dir then if Util2.lv62ec lustre_prog lustre_node user_dir then
Util2.ec2c lustre_node tmp_dir Util2.ec2c lustre_node tmp_dir
else else
......
...@@ -413,7 +413,7 @@ let (parse_rp_string : string -> unit) = ...@@ -413,7 +413,7 @@ let (parse_rp_string : string -> unit) =
*) *)
| "v6"::prog::node::opts -> | "v6"::prog::node::opts ->
let args = ("lus2lic"::prog::"-node"::node::"--expand-io-type"::opts) in let args = ("lv6"::prog::"-node"::node::"--expand-io-type"::opts) in
LustreV6(Array.of_list args) LustreV6(Array.of_list args)
| ["ec_exe"; prog] -> LustreEcExe(prog) | ["ec_exe"; prog] -> LustreEcExe(prog)
| ["ec"; prog] -> LustreEc(prog) | ["ec"; prog] -> LustreEc(prog)
......
...@@ -83,7 +83,7 @@ let (make_rp_list : reactive_program list -> ...@@ -83,7 +83,7 @@ let (make_rp_list : reactive_program list ->
let plugin = let plugin =
match rp with match rp with
(* | LustreV6(prog,node) -> add_init [] (LustreRun.make_v6 prog node) *) (* | LustreV6(prog,node) -> add_init [] (LustreRun.make_v6 prog node) *)
| LustreV6(args) -> Lus2licRun.make args | LustreV6(args) -> Lv6Run.make args
| LustreV4(prog,node) -> LustreRun.make_v4 prog node | LustreV4(prog,node) -> LustreRun.make_v4 prog node
| LustreEc(prog) -> LustreRun.make_ec prog | LustreEc(prog) -> LustreRun.make_ec prog
| LustreEcExe(prog) -> LustreRun.make_ec_exe prog | LustreEcExe(prog) -> LustreRun.make_ec_exe prog
......
...@@ -291,8 +291,8 @@ let (ec2c: string -> string -> bool) = ...@@ -291,8 +291,8 @@ let (ec2c: string -> string -> bool) =
let (lv62ec: string -> string -> string -> bool) = let (lv62ec: string -> string -> string -> bool) =
fun lustre_prog lustre_node dir -> fun lustre_prog lustre_node dir ->
try try
let lus2lic = mygetenv "LUS2LIC" in let lv6 = mygetenv "LUS2LIC" in
match Util.my_create_process ~std_out:Unix.stderr ~wait:true lus2lic match Util.my_create_process ~std_out:Unix.stderr ~wait:true lv6
[ [
lustre_prog; "--node" ; lustre_node; "-ec"; lustre_prog; "--node" ; lustre_node; "-ec";
"-o"; (Filename.concat dir (lustre_node ^ ".ec")) "-o"; (Filename.concat dir (lustre_node ^ ".ec"))
......
...@@ -105,9 +105,11 @@ let (get_val_env_in : env_in -> name -> Value.t) = ...@@ -105,9 +105,11 @@ let (get_val_env_in : env_in -> name -> Value.t) =
fun env n -> fun env n ->
(* try Hashtbl.find env n *) (* try Hashtbl.find env n *)
try Value.OfIdent.get env n try Value.OfIdent.get env n
with Not_found -> with Not_found -> (* I should rather raise a specific exception *)
print_string ("A SUT input is missing: " ^ n ^ "\n"); print_string (
print_string ("Lurette finished.\n"); "Error: a (Lutin program) input is missing: " ^ n ^ "\n" ^
"E: Maybe this program is not bootable (able to start without input)\n"^
"E: and used as an environment of Lurette or rdbg?\n");
flush stdout; flush stdout;
exit 2 exit 2
......
let str="2.45" let str="2.46"
let sha="c903e6e" let sha="524a27b"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment