Commit 0f1490b8 authored by erwan's avatar erwan

lus2lic is now named lv6

parent 524a27b5
Pipeline #5937 passed with stages
in 10 minutes and 29 seconds
OASISFormat: 0.4
Name: Lutin
Version: 2.45
Version: 2.46
Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr
License: PROP
......
......@@ -819,11 +819,18 @@ 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 -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
{{{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=
to be between its previous value and its previous value plus (resp
minus) a positive =delta=. The node =up-and-down=, after an
......@@ -850,7 +857,7 @@ 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 "luciole-rif lutin true-since-n-instants.lut";
luciole-rif lutin true-since-n-instants.lut
#+end_src
{{{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
Local variables can also plain random variables, as
illustrated the [[file:local.lut][local.lut]] program:
#+INCLUDE: "./local.lut" src lutin
At first step, the local variable ~target~ is chosen randomly
......@@ -890,6 +895,9 @@ illustrated the [[file:local.lut][local.lut]] program:
#+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
#+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)}}}
......@@ -897,9 +905,10 @@ illustrated the [[file:local.lut][local.lut]] program:
file:png/Screenshot-Gnuplot-local.png
#+BEGIN_QUOTE
*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:
file:png/Screenshot-Gnuplot-localbis.png
#+END_QUOTE
[[file:local-bis.lut][Answer]]
** Damped oscillation
#+INCLUDE: "./local-bis.lut" src lutin
** Distribute a constraint into a scope: =assert=
......@@ -987,7 +995,6 @@ node bizzare() returns (x,res: real) =
file:png/Screenshot-Gnuplot-ext.png
** Exceptions
*** Global exceptions can be declared outside the main node:
......
......@@ -444,11 +444,18 @@ gnuplot-rif walk.rif
#+INCLUDE: "./up-and-down.lut" src lutin
#+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
{{{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
......@@ -466,7 +473,7 @@ 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 "luciole-rif lutin true-since-n-instants.lut";
luciole-rif lutin true-since-n-instants.lut
#+end_src
{{{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
Local variables can also plain random variables, as
illustrated the [[file:local.lut][local.lut]] program:
#+INCLUDE: "./local.lut" src lutin
#+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
#+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)}}}
#+BEGIN_QUOTE
*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=
......@@ -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)}}}
** Exceptions
*** Global exceptions can be declared outside the main node:
......
......@@ -775,11 +775,18 @@ html.
#+INCLUDE: "./up-and-down.lut" src lutin
#+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
{{{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=
to be between its previous value and its previous value plus (resp
minus) a positive =delta=. The node =up-and-down=, after an
......@@ -806,7 +813,7 @@ 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 "luciole-rif lutin true-since-n-instants.lut";
luciole-rif lutin true-since-n-instants.lut
#+end_src
{{{run(./sh/true-since-demo.sh, luciole-rif lutin true-since-n-instants.lut)}}}
......@@ -831,8 +838,6 @@ html.
Local variables can also plain random variables, as
illustrated the [[file:local.lut][local.lut]] program:
#+INCLUDE: "./local.lut" src lutin
html: At first step, the local variable ~target~ is chosen randomly
......@@ -846,6 +851,9 @@ html.
#+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
#+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)}}}
......@@ -853,9 +861,10 @@ html:
file:png/Screenshot-Gnuplot-local.png
html.
#+BEGIN_QUOTE
*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:
......@@ -864,9 +873,8 @@ like in the following screen-shot:
file:png/Screenshot-Gnuplot-localbis.png
html.
#+END_QUOTE
[[file:local-bis.lut][Answer]]
** Damped oscillation
#+INCLUDE: "./local-bis.lut" src lutin
** Distribute a constraint into a scope: =assert=
......@@ -943,7 +951,6 @@ html:
file:png/Screenshot-Gnuplot-ext.png
html.
** Exceptions
*** Global exceptions can be declared outside the main node:
......
let within(x, min, max: real): bool =
(min <= x) and (x <= max)
let up (delta:real; x : real ref) : bool =
within(x, pre x, pre x + delta)
let down(delta:real; x : real ref) : bool =
within(x, pre x - delta, pre x)
let within(x, min, max: real) :bool = (min <= x) and (x <= max)
let up (delta:real;x:real ref):bool = 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) =
within(x, min, max) fby
loop {
......
......@@ -213,7 +213,7 @@ let compile_lustre_program_if_needed
"No " ^ lustre_node ^ ".c or no " ^ lustre_node ^
".h exist(s), so I try to compile " ^ lustre_prog ^
" 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
Util2.ec2c lustre_node tmp_dir
else
......
......@@ -413,7 +413,7 @@ let (parse_rp_string : string -> unit) =
*)
| "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)
| ["ec_exe"; prog] -> LustreEcExe(prog)
| ["ec"; prog] -> LustreEc(prog)
......
......@@ -83,7 +83,7 @@ let (make_rp_list : reactive_program list ->
let plugin =
match rp with
(* | 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
| LustreEc(prog) -> LustreRun.make_ec prog
| LustreEcExe(prog) -> LustreRun.make_ec_exe prog
......
......@@ -291,8 +291,8 @@ let (ec2c: string -> string -> bool) =
let (lv62ec: string -> string -> string -> bool) =
fun lustre_prog lustre_node dir ->
try
let lus2lic = mygetenv "LUS2LIC" in
match Util.my_create_process ~std_out:Unix.stderr ~wait:true lus2lic
let lv6 = mygetenv "LUS2LIC" in
match Util.my_create_process ~std_out:Unix.stderr ~wait:true lv6
[
lustre_prog; "--node" ; lustre_node; "-ec";
"-o"; (Filename.concat dir (lustre_node ^ ".ec"))
......
......@@ -105,9 +105,11 @@ let (get_val_env_in : env_in -> name -> Value.t) =
fun env n ->
(* try Hashtbl.find env n *)
try Value.OfIdent.get env n
with Not_found ->
print_string ("A SUT input is missing: " ^ n ^ "\n");
print_string ("Lurette finished.\n");
with Not_found -> (* I should rather raise a specific exception *)
print_string (
"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;
exit 2
......
let str="2.45"
let sha="c903e6e"
let str="2.46"
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