Commit 6f1cc5bc authored by Erwan Jahier's avatar Erwan Jahier
Browse files

up_and_down.lut enhancements

parent bcc6bd44
let delta= 5.
let between(x, min, max : real) : bool = ((min < x) and (x < max))
let up (x : real ref) : bool = between(x, pre x, pre x + delta)
let down(x : real ref) : bool = between(x, pre x - delta, pre x)
let up (delta:real; x : real ref) : bool = between(x, pre x, pre x + delta)
let down(delta:real; x : real ref) : bool = between(x, pre x - delta, pre x)
node main () returns (x : real) =
let min = 0. in
let max= 100. in
let up_and_down(min, max, delta : real ; x : real ref) : trace =
between(x, min, max)
fby
fby
loop {
| loop { up(delta, x) and pre x < max }
| loop { down(delta, x) and pre x > min }
}
node main () returns (x : real) =
loop {
| loop { up(x) and pre x < max }
| loop { down(x) and pre x > min }
}
\ No newline at end of file
up_and_down(0.0, 100.0, 5.0, x)
......@@ -31,7 +31,7 @@ clean:
test_dontgo:
rm -f test.rif0 .lurette_rc
$(LURETTETOP) --output test.rif0 degradable-sensors.luc && \
$(LURETTETOP) --output test.rif0 env.lut && \
grep -v "lurette chronogram" test.rif0 | \
grep -v "The execution lasted"| sed -e "s/^M//" > test.rif &&\
rm -f test.res && diff -B -u -i test.rif.exp test.rif > test.res
......
......@@ -11,7 +11,7 @@ lablgtk: /tmp/lablgtk-1.2.7.tar.gz
make configure USE_DOTOPT=1 && \
make && \
make opt && \
make install
sudo make install
/tmp/lablgtk-1.2.7.tar.gz:
cd /tmp ; wget http://www.math.nagoya-u.ac.jp/~garrigue/soft/olabl/dist/lablgtk-1.2.7.tar.gz
......
Supports Markdown
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