diff options
author | Alex Auvolat <alex.auvolat@ansys.com> | 2014-06-18 12:13:17 +0200 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ansys.com> | 2014-06-18 12:13:17 +0200 |
commit | 0caa1ebe947646459295c6a66da6bf19f399c21e (patch) | |
tree | 715b4e786a7df2a3f847230baaa8d26f9ed9e680 /tests/source | |
parent | 5ac14cee1bdb9f2ccc40ad6eb1841b5c2ed584d1 (diff) | |
download | scade-analyzer-0caa1ebe947646459295c6a66da6bf19f399c21e.tar.gz scade-analyzer-0caa1ebe947646459295c6a66da6bf19f399c21e.zip |
Abstract interpretation gives good results on the limiter example.
Diffstat (limited to 'tests/source')
-rw-r--r-- | tests/source/limiter.scade | 2 | ||||
-rw-r--r-- | tests/source/test4.scade | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/source/limiter.scade b/tests/source/limiter.scade index a611d98..ff60567 100644 --- a/tests/source/limiter.scade +++ b/tests/source/limiter.scade @@ -15,7 +15,7 @@ node limiter(x: int; d: int) returns (probe y: int) node test(i: int) returns(a, b, c: int; exit: bool) let exit = i >= 30; - a = (i * 21 + 122) mod (2 * bound) - bound; -- not really random + a = (i * 21 + 122) mod (2 * bound + 1) - bound; -- not really random b = 16; c = limiter(a, b); tel diff --git a/tests/source/test4.scade b/tests/source/test4.scade index b32a37d..843302f 100644 --- a/tests/source/test4.scade +++ b/tests/source/test4.scade @@ -1,7 +1,7 @@ node test(i: int) returns(probe a, b, c: int; exit: bool) let exit = i >= 5; - a = 0 -> (if pre a >= 10 then 0 else pre a + 1); + a = 0 -> (if pre a >= 5 then 0 else pre a + 1); b = 0 -> pre i; c = 0; tel |