Skip to content

Commit f82b746

Browse files
authored
Merge pull request #163 from bjjwwang/master
Recur-mode -> Recur-handle
2 parents 32702cc + 256d688 commit f82b746

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ foreach(filename ${ae_overflow_files})
327327
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
328328
)
329329
add_test(
330-
NAME ae_recursion_tests/${filename}-widen-top
331-
COMMAND ae -overflow -recur-mode=widen-top -field-limit=1024 ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
330+
NAME ae_recursion_tests/${filename}-widen-narrow
331+
COMMAND ae -overflow -handle-recur=widen-narrow -field-limit=1024 ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
332332
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
333333
)
334334
endforeach()
@@ -350,7 +350,7 @@ file(GLOB ae_recursion_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRE
350350
foreach(filename ${ae_recursion_files})
351351
add_test(
352352
NAME ae_recursion_tests/${filename}-widen-narrow
353-
COMMAND ae -overflow -recur-mode=widen-narrow -field-limit=1024 -widen-delay=10 ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
353+
COMMAND ae -overflow -handle-recur=widen-narrow -field-limit=1024 -widen-delay=10 ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
354354
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
355355
)
356356
endforeach()

src/ae_recursion_tests/demo.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "stdbool.h"
2+
extern void svf_assert(bool);
3+
extern void svf_print(int, char*);
4+
5+
int demo(int a) {
6+
if (a >= 10000)
7+
return a;
8+
demo(a+1);
9+
}
10+
11+
int main() {
12+
int result = demo(0);
13+
svf_print(result, "result");
14+
svf_assert(result == 10000);
15+
}
16+
17+
// TOP: [-oo, +oo]
18+
// WIDEN_ONLY: [10000, +oo]
19+
// WIDEN_NARROW: [10000, 10000]

0 commit comments

Comments
 (0)