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 | |
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')
-rw-r--r-- | tests/result/limiter.out | 48 | ||||
-rw-r--r-- | tests/source/limiter.scade | 2 | ||||
-rw-r--r-- | tests/source/test4.scade | 2 |
3 files changed, 26 insertions, 26 deletions
diff --git a/tests/result/limiter.out b/tests/result/limiter.out index 1851c7d..f047b8f 100644 --- a/tests/result/limiter.out +++ b/tests/result/limiter.out @@ -5,27 +5,27 @@ 4. 78 16 58 5. 99 16 74 6. 120 16 90 -7. -115 16 74 -8. -94 16 58 -9. -73 16 42 -10. -52 16 26 -11. -31 16 10 -12. -10 16 -6 -13. 11 16 10 -14. 32 16 26 -15. 53 16 42 -16. 74 16 58 -17. 95 16 74 -18. 116 16 90 -19. -119 16 74 -20. -98 16 58 -21. -77 16 42 -22. -56 16 26 -23. -35 16 10 -24. -14 16 -6 -25. 7 16 7 -26. 28 16 23 -27. 49 16 39 -28. 70 16 55 -29. 91 16 71 -30. 112 16 87 +7. -116 16 74 +8. -95 16 58 +9. -74 16 42 +10. -53 16 26 +11. -32 16 10 +12. -11 16 -6 +13. 10 16 10 +14. 31 16 26 +15. 52 16 42 +16. 73 16 58 +17. 94 16 74 +18. 115 16 90 +19. -121 16 74 +20. -100 16 58 +21. -79 16 42 +22. -58 16 26 +23. -37 16 10 +24. -16 16 -6 +25. 5 16 5 +26. 26 16 21 +27. 47 16 37 +28. 68 16 53 +29. 89 16 69 +30. 110 16 85 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 |