diff options
Diffstat (limited to 'tests/source/rfollow.scade')
-rw-r--r-- | tests/source/rfollow.scade | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/source/rfollow.scade b/tests/source/rfollow.scade new file mode 100644 index 0000000..6ee1558 --- /dev/null +++ b/tests/source/rfollow.scade @@ -0,0 +1,27 @@ +node follow(a: real) returns (probe f: real) +var + probe pf: real; +let + assume h1: a >= 0. and a <= 1.; + guarantee g1: f >= 0. and f <= 1.; + guarantee g2: pf >= 0. and pf <= 1.; + + pf = 0. -> pre f; + f = (pf + a) / 2.0; + +tel + + +node test(i: int) returns (a, b, c: int; exit: bool) +var + probe u, v: real; +let + u = real(i mod 10) / 10.; + v = follow(u); + a = int(u * 1000.); + b = int(v * 1000.); + c = 0; + exit = (i > 100); +tel + + |