File tree 4 files changed +36
-0
lines changed
intTests/test0061_path_sat
4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include <stdint.h>
2
+
3
+ uint64_t g1 (uint64_t x ) {
4
+ int i = 0 ;
5
+ uint64_t r = x ;
6
+ do {
7
+ r = r + 1 ;
8
+ } while ( i ++ < 3 && r == 0 );
9
+ return r ;
10
+ }
11
+
12
+ // NB the termination of the following loop
13
+ // is a bit tricky because of the interaction
14
+ // between short-cutting '&&' and the 'i++'
15
+ // expression.
16
+ uint64_t g2 (uint64_t x ) {
17
+ int i = 0 ;
18
+ uint64_t r = x ;
19
+ do {
20
+ r = r + 1 ;
21
+ } while ( r == 0 && i ++ < 3 );
22
+ return r ;
23
+ }
Original file line number Diff line number Diff line change
1
+ m <- llvm_load_module "termination.bc";
2
+
3
+ let g_spec = do {
4
+ x <- crucible_fresh_var "x" (llvm_int 64);
5
+ crucible_execute_func [crucible_term x];
6
+ };
7
+
8
+ crucible_llvm_verify m "g1" [] false g_spec z3;
9
+
10
+ // NB: path sat checking is required for this
11
+ // to terminate in a reasonable time
12
+ crucible_llvm_verify m "g2" [] true g_spec z3;
Original file line number Diff line number Diff line change
1
+ $SAW test.saw
You can’t perform that action at this time.
0 commit comments