diff --git a/src/test/correct/arrays_simple/clang/arrays_simple.expected b/src/test/correct/arrays_simple/clang/arrays_simple.expected index ca54b2d0a..121e04c73 100644 --- a/src/test/correct/arrays_simple/clang/arrays_simple.expected +++ b/src/test/correct/arrays_simple/clang/arrays_simple.expected @@ -194,5 +194,11 @@ procedure main() assume {:captureState "%000008b7"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/arrays_simple/clang_O2/arrays_simple.expected b/src/test/correct/arrays_simple/clang_O2/arrays_simple.expected index b904c03a5..91c86ad15 100644 --- a/src/test/correct/arrays_simple/clang_O2/arrays_simple.expected +++ b/src/test/correct/arrays_simple/clang_O2/arrays_simple.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/arrays_simple/clang_no_plt_no_pic/arrays_simple.expected b/src/test/correct/arrays_simple/clang_no_plt_no_pic/arrays_simple.expected index ca54b2d0a..121e04c73 100644 --- a/src/test/correct/arrays_simple/clang_no_plt_no_pic/arrays_simple.expected +++ b/src/test/correct/arrays_simple/clang_no_plt_no_pic/arrays_simple.expected @@ -194,5 +194,11 @@ procedure main() assume {:captureState "%000008b7"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/arrays_simple/clang_pic/arrays_simple.expected b/src/test/correct/arrays_simple/clang_pic/arrays_simple.expected index ca54b2d0a..121e04c73 100644 --- a/src/test/correct/arrays_simple/clang_pic/arrays_simple.expected +++ b/src/test/correct/arrays_simple/clang_pic/arrays_simple.expected @@ -194,5 +194,11 @@ procedure main() assume {:captureState "%000008b7"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/arrays_simple/gcc_O2/arrays_simple.expected b/src/test/correct/arrays_simple/gcc_O2/arrays_simple.expected index 306991d20..0918aa3d9 100644 --- a/src/test/correct/arrays_simple/gcc_O2/arrays_simple.expected +++ b/src/test/correct/arrays_simple/gcc_O2/arrays_simple.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_read/clang/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/clang/basic_arrays_read.expected index 4bdf41446..6d2a0c9d2 100644 --- a/src/test/correct/basic_arrays_read/clang/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/clang/basic_arrays_read.expected @@ -203,5 +203,11 @@ procedure main() call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 52bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 52bv64)) || L(mem, bvadd64(R8, 52bv64))); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_read/clang_O2/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/clang_O2/basic_arrays_read.expected index 053a779de..d1baabff3 100644 --- a/src/test/correct/basic_arrays_read/clang_O2/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/clang_O2/basic_arrays_read.expected @@ -187,5 +187,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 52bv64), 0bv32), gamma_store32(Gamma_mem, bvadd64(R8, 52bv64), true); assert true; assume {:captureState "%000002c9"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_read/clang_no_plt_no_pic/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/clang_no_plt_no_pic/basic_arrays_read.expected index 8fa9643f0..bd4286921 100644 --- a/src/test/correct/basic_arrays_read/clang_no_plt_no_pic/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/clang_no_plt_no_pic/basic_arrays_read.expected @@ -203,5 +203,11 @@ procedure main() call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 52bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 52bv64)) || L(mem, bvadd64(R8, 52bv64))); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_read/clang_pic/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/clang_pic/basic_arrays_read.expected index fe469ac3d..cbe3e8044 100644 --- a/src/test/correct/basic_arrays_read/clang_pic/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/clang_pic/basic_arrays_read.expected @@ -237,5 +237,11 @@ procedure main() call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_read/gcc/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/gcc/basic_arrays_read.expected index 39f86e8f0..2a41e5240 100644 --- a/src/test/correct/basic_arrays_read/gcc/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/gcc/basic_arrays_read.expected @@ -194,5 +194,11 @@ procedure main() R0, Gamma_R0 := bvadd64(R0, 24bv64), Gamma_R0; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_read/gcc_O2/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/gcc_O2/basic_arrays_read.expected index 897f29d0a..b92d78087 100644 --- a/src/test/correct/basic_arrays_read/gcc_O2/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/gcc_O2/basic_arrays_read.expected @@ -187,5 +187,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 24bv64), 0bv32), gamma_store32(Gamma_mem, bvadd64(R1, 24bv64), true); assert true; assume {:captureState "%000001b7"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_read/gcc_no_plt_no_pic/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/gcc_no_plt_no_pic/basic_arrays_read.expected index fe51c2369..e7066c199 100644 --- a/src/test/correct/basic_arrays_read/gcc_no_plt_no_pic/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/gcc_no_plt_no_pic/basic_arrays_read.expected @@ -194,5 +194,11 @@ procedure main() R0, Gamma_R0 := bvadd64(R0, 24bv64), Gamma_R0; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_read/gcc_pic/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/gcc_pic/basic_arrays_read.expected index b8d3ae1b0..08dab06b4 100644 --- a/src/test/correct/basic_arrays_read/gcc_pic/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/gcc_pic/basic_arrays_read.expected @@ -228,5 +228,11 @@ procedure main() R0, Gamma_R0 := memory_load64_le(mem, bvadd64(R0, 4080bv64)), (gamma_load64(Gamma_mem, bvadd64(R0, 4080bv64)) || L(mem, bvadd64(R0, 4080bv64))); call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_write/clang/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/clang/basic_arrays_write.expected index 802dd2fd8..2e71eee76 100644 --- a/src/test/correct/basic_arrays_write/clang/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/clang/basic_arrays_write.expected @@ -209,5 +209,11 @@ procedure main() assume {:captureState "%000002f4"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_write/clang_O2/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/clang_O2/basic_arrays_write.expected index 0b0f67500..ddaa5921f 100644 --- a/src/test/correct/basic_arrays_write/clang_O2/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/clang_O2/basic_arrays_write.expected @@ -194,5 +194,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assert (arr$0_old == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); assume {:captureState "%000002d4"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_write/clang_no_plt_no_pic/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/clang_no_plt_no_pic/basic_arrays_write.expected index 451345fbe..ef576eff0 100644 --- a/src/test/correct/basic_arrays_write/clang_no_plt_no_pic/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/clang_no_plt_no_pic/basic_arrays_write.expected @@ -209,5 +209,11 @@ procedure main() assume {:captureState "%0000089f"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_write/clang_pic/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/clang_pic/basic_arrays_write.expected index d97347e01..658cb2f3d 100644 --- a/src/test/correct/basic_arrays_write/clang_pic/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/clang_pic/basic_arrays_write.expected @@ -242,5 +242,11 @@ procedure main() assume {:captureState "%000002f5"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_write/gcc/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/gcc/basic_arrays_write.expected index 633928146..f322b3d3d 100644 --- a/src/test/correct/basic_arrays_write/gcc/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/gcc/basic_arrays_write.expected @@ -207,5 +207,11 @@ procedure main() assume {:captureState "%000002f4"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_write/gcc_O2/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/gcc_O2/basic_arrays_write.expected index 72ddd2b51..dc94f3d31 100644 --- a/src/test/correct/basic_arrays_write/gcc_O2/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/gcc_O2/basic_arrays_write.expected @@ -194,5 +194,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 28bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 28bv64), Gamma_R2); assert (arr$0_old == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); assume {:captureState "%000001be"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_write/gcc_no_plt_no_pic/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/gcc_no_plt_no_pic/basic_arrays_write.expected index acde06d29..133d6d05e 100644 --- a/src/test/correct/basic_arrays_write/gcc_no_plt_no_pic/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/gcc_no_plt_no_pic/basic_arrays_write.expected @@ -207,5 +207,11 @@ procedure main() assume {:captureState "%0000089f"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_arrays_write/gcc_pic/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/gcc_pic/basic_arrays_write.expected index f49966fbc..3c865b447 100644 --- a/src/test/correct/basic_arrays_write/gcc_pic/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/gcc_pic/basic_arrays_write.expected @@ -240,5 +240,11 @@ procedure main() assume {:captureState "%000002f5"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_assign/clang/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/clang/basic_assign_assign.expected index 45d3ed040..5108e2304 100644 --- a/src/test/correct/basic_assign_assign/clang/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/clang/basic_assign_assign.expected @@ -194,5 +194,11 @@ procedure main() assert ((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 5bv32)); assume {:captureState "%000002ce"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_assign/clang_O2/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/clang_O2/basic_assign_assign.expected index 00e811d26..cf2947341 100644 --- a/src/test/correct/basic_assign_assign/clang_O2/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/clang_O2/basic_assign_assign.expected @@ -194,5 +194,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 52bv64), R9[32:0]), gamma_store32(Gamma_mem, bvadd64(R8, 52bv64), Gamma_R9); assert ((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 5bv32)); assume {:captureState "%000002d3"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_assign/clang_no_plt_no_pic/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/clang_no_plt_no_pic/basic_assign_assign.expected index 1d38b377b..0ded243d0 100644 --- a/src/test/correct/basic_assign_assign/clang_no_plt_no_pic/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/clang_no_plt_no_pic/basic_assign_assign.expected @@ -194,5 +194,11 @@ procedure main() assert ((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 5bv32)); assume {:captureState "%00000845"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_assign/clang_pic/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/clang_pic/basic_assign_assign.expected index 17aef59a5..cad48175d 100644 --- a/src/test/correct/basic_assign_assign/clang_pic/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/clang_pic/basic_assign_assign.expected @@ -228,5 +228,11 @@ procedure main() assert ((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 5bv32)); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_assign/gcc/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/gcc/basic_assign_assign.expected index 238102d1a..9baf8d5de 100644 --- a/src/test/correct/basic_assign_assign/gcc/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/gcc/basic_assign_assign.expected @@ -193,5 +193,11 @@ procedure main() assert ((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 5bv32)); assume {:captureState "%000002d8"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_assign/gcc_O2/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/gcc_O2/basic_assign_assign.expected index 81d8fdece..b598dac2a 100644 --- a/src/test/correct/basic_assign_assign/gcc_O2/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/gcc_O2/basic_assign_assign.expected @@ -194,5 +194,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 20bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 20bv64), Gamma_R2); assert ((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 5bv32)); assume {:captureState "%000001bd"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_assign/gcc_no_plt_no_pic/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/gcc_no_plt_no_pic/basic_assign_assign.expected index 1b1ef4f87..fdf653f2e 100644 --- a/src/test/correct/basic_assign_assign/gcc_no_plt_no_pic/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/gcc_no_plt_no_pic/basic_assign_assign.expected @@ -193,5 +193,11 @@ procedure main() assert ((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 5bv32)); assume {:captureState "%0000085b"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_assign/gcc_pic/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/gcc_pic/basic_assign_assign.expected index ffd291153..b3ef83ae0 100644 --- a/src/test/correct/basic_assign_assign/gcc_pic/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/gcc_pic/basic_assign_assign.expected @@ -226,5 +226,11 @@ procedure main() assert ((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 5bv32)); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_increment/clang/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/clang/basic_assign_increment.expected index 528931a0f..151412d4f 100644 --- a/src/test/correct/basic_assign_increment/clang/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/clang/basic_assign_increment.expected @@ -202,5 +202,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); assume {:captureState "%000002da"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_increment/clang_O2/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/clang_O2/basic_assign_increment.expected index 68697865d..43ead9803 100644 --- a/src/test/correct/basic_assign_increment/clang_O2/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/clang_O2/basic_assign_increment.expected @@ -202,5 +202,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 52bv64), R9[32:0]), gamma_store32(Gamma_mem, bvadd64(R8, 52bv64), Gamma_R9); assert (((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); assume {:captureState "%000002df"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_increment/clang_no_plt_no_pic/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/clang_no_plt_no_pic/basic_assign_increment.expected index fcde38982..fee458995 100644 --- a/src/test/correct/basic_assign_increment/clang_no_plt_no_pic/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/clang_no_plt_no_pic/basic_assign_increment.expected @@ -202,5 +202,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); assume {:captureState "%0000085f"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_increment/clang_pic/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/clang_pic/basic_assign_increment.expected index 86e9d68ec..5285d851d 100644 --- a/src/test/correct/basic_assign_increment/clang_pic/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/clang_pic/basic_assign_increment.expected @@ -236,5 +236,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); assume {:captureState "%000002e5"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_increment/gcc/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/gcc/basic_assign_increment.expected index 1c13cd862..c83f21137 100644 --- a/src/test/correct/basic_assign_increment/gcc/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/gcc/basic_assign_increment.expected @@ -203,5 +203,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); assume {:captureState "%000002f7"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_increment/gcc_O2/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/gcc_O2/basic_assign_increment.expected index 07a2894d0..8523ccf09 100644 --- a/src/test/correct/basic_assign_increment/gcc_O2/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/gcc_O2/basic_assign_increment.expected @@ -202,5 +202,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R2, 20bv64), R1[32:0]), gamma_store32(Gamma_mem, bvadd64(R2, 20bv64), Gamma_R1); assert (((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); assume {:captureState "%000001c5"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_increment/gcc_no_plt_no_pic/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/gcc_no_plt_no_pic/basic_assign_increment.expected index 01ec2e5fb..1fdd85c43 100644 --- a/src/test/correct/basic_assign_increment/gcc_no_plt_no_pic/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/gcc_no_plt_no_pic/basic_assign_increment.expected @@ -203,5 +203,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); assume {:captureState "%0000089f"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_assign_increment/gcc_pic/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/gcc_pic/basic_assign_increment.expected index 0f73e2bfe..e7935f379 100644 --- a/src/test/correct/basic_assign_increment/gcc_pic/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/gcc_pic/basic_assign_increment.expected @@ -237,5 +237,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); assume {:captureState "%000002f9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_function_call_caller/clang/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/clang/basic_function_call_caller.expected index 6c8610d8c..f3e012683 100644 --- a/src/test/correct/basic_function_call_caller/clang/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/clang/basic_function_call_caller.expected @@ -268,6 +268,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -350,5 +356,11 @@ procedure zero() lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; + goto zero_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + zero_return: + assume {:captureState "zero_return"} true; return; } diff --git a/src/test/correct/basic_function_call_caller/clang_O2/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/clang_O2/basic_function_call_caller.expected index 74d7abc58..93d1add47 100644 --- a/src/test/correct/basic_function_call_caller/clang_O2/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/clang_O2/basic_function_call_caller.expected @@ -220,5 +220,11 @@ procedure main() assert ((x_old == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (Gamma_y_old ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); assume {:captureState "%000002fa"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_function_call_caller/clang_no_plt_no_pic/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/clang_no_plt_no_pic/basic_function_call_caller.expected index 04a6a5d25..74c72de44 100644 --- a/src/test/correct/basic_function_call_caller/clang_no_plt_no_pic/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/clang_no_plt_no_pic/basic_function_call_caller.expected @@ -240,6 +240,9 @@ procedure main() R30, Gamma_R30 := 1840bv64, true; call zero(); goto l00000938; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000938: assume {:captureState "l00000938"} true; R8, Gamma_R8 := 69632bv64, true; @@ -268,6 +271,9 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } @@ -350,5 +356,11 @@ procedure zero() lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; + goto zero_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + zero_return: + assume {:captureState "zero_return"} true; return; } diff --git a/src/test/correct/basic_function_call_caller/clang_pic/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/clang_pic/basic_function_call_caller.expected index 861158d4a..67d787008 100644 --- a/src/test/correct/basic_function_call_caller/clang_pic/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/clang_pic/basic_function_call_caller.expected @@ -320,6 +320,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -434,5 +440,11 @@ procedure zero() lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; + goto zero_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + zero_return: + assume {:captureState "zero_return"} true; return; } diff --git a/src/test/correct/basic_function_call_caller/gcc/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/gcc/basic_function_call_caller.expected index d350182f1..72fba0e7c 100644 --- a/src/test/correct/basic_function_call_caller/gcc/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/gcc/basic_function_call_caller.expected @@ -266,6 +266,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -348,5 +354,11 @@ procedure zero() lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; + goto zero_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + zero_return: + assume {:captureState "zero_return"} true; return; } diff --git a/src/test/correct/basic_function_call_caller/gcc_O2/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/gcc_O2/basic_function_call_caller.expected index 0d135f9f8..0c40f66b1 100644 --- a/src/test/correct/basic_function_call_caller/gcc_O2/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/gcc_O2/basic_function_call_caller.expected @@ -220,5 +220,11 @@ procedure main() assert ((x_old == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (Gamma_y_old ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); assume {:captureState "%000001df"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_function_call_caller/gcc_no_plt_no_pic/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/gcc_no_plt_no_pic/basic_function_call_caller.expected index 39a811b3e..0985dd9bd 100644 --- a/src/test/correct/basic_function_call_caller/gcc_no_plt_no_pic/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/gcc_no_plt_no_pic/basic_function_call_caller.expected @@ -266,6 +266,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -348,5 +354,11 @@ procedure zero() lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; + goto zero_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + zero_return: + assume {:captureState "zero_return"} true; return; } diff --git a/src/test/correct/basic_function_call_caller/gcc_pic/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/gcc_pic/basic_function_call_caller.expected index 75e7e00b2..479939e40 100644 --- a/src/test/correct/basic_function_call_caller/gcc_pic/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/gcc_pic/basic_function_call_caller.expected @@ -316,6 +316,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -430,5 +436,11 @@ procedure zero() lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; + goto zero_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + zero_return: + assume {:captureState "zero_return"} true; return; } diff --git a/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected index 40ca88286..751f75609 100644 --- a/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected @@ -234,41 +234,37 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000342, lmain_goto_l00000345; - l00000345: - assume {:captureState "l00000345"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000348; l00000342: assume {:captureState "l00000342"} true; R8, Gamma_R8 := 0bv64, true; goto l00000348; - l00000348: - assume {:captureState "l00000348"} true; - assert Gamma_R8; - goto l00000348_goto_l0000037a, l00000348_goto_l00000350; + l00000348_goto_l0000037a: + assume {:captureState "l00000348_goto_l0000037a"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000037a; + l00000365: + assume {:captureState "l00000365"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000350: assume {:captureState "l00000350"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); assume {:captureState "%00000362"} true; goto l00000365; - l0000037a: - assume {:captureState "l0000037a"} true; - goto l0000037b; - l0000037b: - assume {:captureState "l0000037b"} true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); - assume {:captureState "%00000383"} true; - goto l00000365; - l00000365: - assume {:captureState "l00000365"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; lmain_goto_l00000342: assume {:captureState "lmain_goto_l00000342"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000342; + l00000345: + assume {:captureState "l00000345"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000348; + l00000348: + assume {:captureState "l00000348"} true; + assert Gamma_R8; + goto l00000348_goto_l0000037a, l00000348_goto_l00000350; lmain_goto_l00000345: assume {:captureState "lmain_goto_l00000345"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); @@ -277,8 +273,18 @@ procedure main() assume {:captureState "l00000348_goto_l00000350"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000350; - l00000348_goto_l0000037a: - assume {:captureState "l00000348_goto_l0000037a"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l0000037a; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l0000037a: + assume {:captureState "l0000037a"} true; + goto l0000037b; + l0000037b: + assume {:captureState "l0000037b"} true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); + assume {:captureState "%00000383"} true; + goto l00000365; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected index 297801a4b..189216d6c 100644 --- a/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected @@ -216,23 +216,29 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000002fd, lmain_goto_l000002f9; - l000002fd: - assume {:captureState "l000002fd"} true; - R0, Gamma_R0 := zero_extend32_32(R9[32:0]), Gamma_R9; - goto l00000300; + lmain_goto_l000002fd: + assume {:captureState "lmain_goto_l000002fd"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000002fd; l000002f9: assume {:captureState "l000002f9"} true; R0, Gamma_R0 := 0bv64, true; goto l00000300; - l00000300: - assume {:captureState "l00000300"} true; - return; lmain_goto_l000002f9: assume {:captureState "lmain_goto_l000002f9"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000002f9; - lmain_goto_l000002fd: - assume {:captureState "lmain_goto_l000002fd"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000002fd; + l000002fd: + assume {:captureState "l000002fd"} true; + R0, Gamma_R0 := zero_extend32_32(R9[32:0]), Gamma_R9; + goto l00000300; + l00000300: + assume {:captureState "l00000300"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected index 5e2f83ca1..e2af142df 100644 --- a/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected @@ -234,41 +234,21 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000985, lmain_goto_l00000988; - l00000988: - assume {:captureState "l00000988"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000098b; - l00000985: - assume {:captureState "l00000985"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000098b; - l0000098b: - assume {:captureState "l0000098b"} true; - assert Gamma_R8; - goto l0000098b_goto_l000009bd, l0000098b_goto_l00000993; l00000993: assume {:captureState "l00000993"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); assume {:captureState "%000009a5"} true; goto l000009a8; - l000009bd: - assume {:captureState "l000009bd"} true; - goto l000009be; - l000009be: - assume {:captureState "l000009be"} true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); - assume {:captureState "%000009c6"} true; - goto l000009a8; - l000009a8: - assume {:captureState "l000009a8"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; lmain_goto_l00000985: assume {:captureState "lmain_goto_l00000985"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000985; + l000009a8: + assume {:captureState "l000009a8"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; lmain_goto_l00000988: assume {:captureState "lmain_goto_l00000988"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); @@ -277,8 +257,34 @@ procedure main() assume {:captureState "l0000098b_goto_l00000993"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000993; + l000009bd: + assume {:captureState "l000009bd"} true; + goto l000009be; + l00000988: + assume {:captureState "l00000988"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000098b; + l00000985: + assume {:captureState "l00000985"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000098b; l0000098b_goto_l000009bd: assume {:captureState "l0000098b_goto_l000009bd"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l000009bd; + l0000098b: + assume {:captureState "l0000098b"} true; + assert Gamma_R8; + goto l0000098b_goto_l000009bd, l0000098b_goto_l00000993; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l000009be: + assume {:captureState "l000009be"} true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); + assume {:captureState "%000009c6"} true; + goto l000009a8; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected index 4ade8ab46..ee48d8ef9 100644 --- a/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected @@ -294,51 +294,57 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000358, lmain_goto_l0000035b; - l0000035b: - assume {:captureState "l0000035b"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000035e; - l00000358: - assume {:captureState "l00000358"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000035e; - l0000035e: - assume {:captureState "l0000035e"} true; - assert Gamma_R8; - goto l0000035e_goto_l00000366, l0000035e_goto_l00000390; - l00000366: - assume {:captureState "l00000366"} true; - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); - assume {:captureState "%00000378"} true; - goto l0000037b; - l00000390: - assume {:captureState "l00000390"} true; - goto l00000391; l00000391: assume {:captureState "l00000391"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); assume {:captureState "%00000399"} true; goto l0000037b; - l0000037b: - assume {:captureState "l0000037b"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000358: - assume {:captureState "lmain_goto_l00000358"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000358; + l00000390: + assume {:captureState "l00000390"} true; + goto l00000391; lmain_goto_l0000035b: assume {:captureState "lmain_goto_l0000035b"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l0000035b; - l0000035e_goto_l00000366: - assume {:captureState "l0000035e_goto_l00000366"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000366; l0000035e_goto_l00000390: assume {:captureState "l0000035e_goto_l00000390"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000390; + lmain_goto_l00000358: + assume {:captureState "lmain_goto_l00000358"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000358; + l00000366: + assume {:captureState "l00000366"} true; + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); + assume {:captureState "%00000378"} true; + goto l0000037b; + l00000358: + assume {:captureState "l00000358"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000035e; + l0000035b: + assume {:captureState "l0000035b"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000035e; + l0000035e: + assume {:captureState "l0000035e"} true; + assert Gamma_R8; + goto l0000035e_goto_l00000366, l0000035e_goto_l00000390; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l0000035e_goto_l00000366: + assume {:captureState "l0000035e_goto_l00000366"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000366; + l0000037b: + assume {:captureState "l0000037b"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected index 5f063faf5..7233c276f 100644 --- a/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected @@ -231,10 +231,6 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000349, lmain_goto_l00000332; - l00000332: - assume {:captureState "l00000332"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - goto l0000033e; l00000349: assume {:captureState "l00000349"} true; R0, Gamma_R0 := 0bv64, true; @@ -242,13 +238,23 @@ procedure main() l0000033e: assume {:captureState "l0000033e"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + goto main_return; lmain_goto_l00000332: assume {:captureState "lmain_goto_l00000332"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l00000332; + l00000332: + assume {:captureState "l00000332"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + goto l0000033e; lmain_goto_l00000349: assume {:captureState "lmain_goto_l00000349"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000349; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected index 32456e254..76e6603d7 100644 --- a/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected @@ -190,20 +190,26 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R0, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R0, 20bv64)) || L(mem, bvadd64(R0, 20bv64))); assert Gamma_R0; goto lmain_goto_l00000398, lmain_goto_l000001bc; + lmain_goto_l00000398: + assume {:captureState "lmain_goto_l00000398"} true; + assume (bvcomp32(R0[32:0], 0bv32) == 0bv1); + goto l00000398; + lmain_goto_l000001bc: + assume {:captureState "lmain_goto_l000001bc"} true; + assume (bvcomp32(R0[32:0], 0bv32) != 0bv1); + goto l000001bc; + l000001bc: + assume {:captureState "l000001bc"} true; + goto main_return; l00000398: assume {:captureState "l00000398"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 4bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 4bv64)) || L(mem, bvadd64(R1, 4bv64))); goto l000001bc; - l000001bc: - assume {:captureState "l000001bc"} true; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l000001bc: - assume {:captureState "lmain_goto_l000001bc"} true; - assume (bvcomp32(R0[32:0], 0bv32) != 0bv1); - goto l000001bc; - lmain_goto_l00000398: - assume {:captureState "lmain_goto_l00000398"} true; - assume (bvcomp32(R0[32:0], 0bv32) == 0bv1); - goto l00000398; } diff --git a/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected index 4e6114cb7..484f6bcd0 100644 --- a/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected @@ -231,10 +231,6 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000094e, lmain_goto_l00000937; - l00000937: - assume {:captureState "l00000937"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - goto l00000943; l0000094e: assume {:captureState "l0000094e"} true; R0, Gamma_R0 := 0bv64, true; @@ -242,13 +238,23 @@ procedure main() l00000943: assume {:captureState "l00000943"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000937: - assume {:captureState "lmain_goto_l00000937"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000937; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; lmain_goto_l0000094e: assume {:captureState "lmain_goto_l0000094e"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000094e; + lmain_goto_l00000937: + assume {:captureState "lmain_goto_l00000937"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000937; + l00000937: + assume {:captureState "l00000937"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + goto l00000943; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected index 00bc7a897..f6a889a26 100644 --- a/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected @@ -289,24 +289,30 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000034b, lmain_goto_l00000334; + lmain_goto_l0000034b: + assume {:captureState "lmain_goto_l0000034b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000034b; l00000334: assume {:captureState "l00000334"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); goto l00000340; + lmain_goto_l00000334: + assume {:captureState "lmain_goto_l00000334"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000334; l0000034b: assume {:captureState "l0000034b"} true; R0, Gamma_R0 := 0bv64, true; goto l00000340; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000340: assume {:captureState "l00000340"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l00000334: - assume {:captureState "lmain_goto_l00000334"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000334; - lmain_goto_l0000034b: - assume {:captureState "lmain_goto_l0000034b"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l0000034b; } diff --git a/src/test/correct/basic_lock_read/clang/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang/basic_lock_read.expected index 1c3a5a3f7..af934dfb1 100644 --- a/src/test/correct/basic_lock_read/clang/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang/basic_lock_read.expected @@ -229,21 +229,18 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000330, lmain_goto_l0000032d; - l00000330: - assume {:captureState "l00000330"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000333; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000330; l0000032d: assume {:captureState "l0000032d"} true; R8, Gamma_R8 := 0bv64, true; goto l00000333; - l00000333: - assume {:captureState "l00000333"} true; - assert Gamma_R8; - goto l00000333_goto_l0000033b, l00000333_goto_l00000352; - l00000352: - assume {:captureState "l00000352"} true; - goto l00000353; + lmain_goto_l0000032d: + assume {:captureState "lmain_goto_l0000032d"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000032d; l00000353: assume {:captureState "l00000353"} true; R8, Gamma_R8 := 69632bv64, true; @@ -258,19 +255,25 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%0000036f"} true; goto l0000033b; + l00000352: + assume {:captureState "l00000352"} true; + goto l00000353; + l00000330: + assume {:captureState "l00000330"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000333; + l00000333: + assume {:captureState "l00000333"} true; + assert Gamma_R8; + goto l00000333_goto_l0000033b, l00000333_goto_l00000352; l0000033b: assume {:captureState "l0000033b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l0000032d: - assume {:captureState "lmain_goto_l0000032d"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000032d; - lmain_goto_l00000330: - assume {:captureState "lmain_goto_l00000330"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000330; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000333_goto_l0000033b: assume {:captureState "l00000333_goto_l0000033b"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); @@ -279,4 +282,7 @@ procedure main() assume {:captureState "l00000333_goto_l00000352"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000352; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected index cddb678c2..4bcf85bf9 100644 --- a/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected @@ -195,6 +195,14 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 52bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 52bv64)) || L(mem, bvadd64(R8, 52bv64))); assert Gamma_R8; goto lmain_goto_l000002dc, lmain_goto_l000002f7; + lmain_goto_l000002dc: + assume {:captureState "lmain_goto_l000002dc"} true; + assume (bvcomp32(R8[32:0], 0bv32) != 0bv1); + goto l000002dc; + lmain_goto_l000002f7: + assume {:captureState "lmain_goto_l000002f7"} true; + assume (bvcomp32(R8[32:0], 0bv32) == 0bv1); + goto l000002f7; l000002dc: assume {:captureState "l000002dc"} true; R8, Gamma_R8 := 69632bv64, true; @@ -205,17 +213,15 @@ procedure main() assert (memory_load32_le(mem, $z_addr) == z_old); assume {:captureState "%000002eb"} true; R0, Gamma_R0 := 0bv64, true; - return; + goto main_return; l000002f7: assume {:captureState "l000002f7"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l000002dc: - assume {:captureState "lmain_goto_l000002dc"} true; - assume (bvcomp32(R8[32:0], 0bv32) != 0bv1); - goto l000002dc; - lmain_goto_l000002f7: - assume {:captureState "lmain_goto_l000002f7"} true; - assume (bvcomp32(R8[32:0], 0bv32) == 0bv1); - goto l000002f7; } diff --git a/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected index fa4bbf9ea..6982dd8c7 100644 --- a/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected @@ -229,14 +229,11 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000095b, lmain_goto_l00000958; - l0000095b: - assume {:captureState "l0000095b"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000095e; - l00000958: - assume {:captureState "l00000958"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000095e; + l00000966: + assume {:captureState "l00000966"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l0000095e: assume {:captureState "l0000095e"} true; assert Gamma_R8; @@ -244,6 +241,10 @@ procedure main() l0000097d: assume {:captureState "l0000097d"} true; goto l0000097e; + l0000095b: + assume {:captureState "l0000095b"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000095e; l0000097e: assume {:captureState "l0000097e"} true; R8, Gamma_R8 := 69632bv64, true; @@ -258,25 +259,30 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%0000099a"} true; goto l00000966; - l00000966: - assume {:captureState "l00000966"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000958: - assume {:captureState "lmain_goto_l00000958"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000958; - lmain_goto_l0000095b: - assume {:captureState "lmain_goto_l0000095b"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000095b; l0000095e_goto_l00000966: assume {:captureState "l0000095e_goto_l00000966"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000966; + lmain_goto_l0000095b: + assume {:captureState "lmain_goto_l0000095b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000095b; l0000095e_goto_l0000097d: assume {:captureState "l0000095e_goto_l0000097d"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000097d; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000958: + assume {:captureState "l00000958"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000095e; + lmain_goto_l00000958: + assume {:captureState "lmain_goto_l00000958"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000958; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected index e28d3c353..c7ea4b821 100644 --- a/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected @@ -287,21 +287,42 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000033f, lmain_goto_l0000033c; + l00000342_goto_l0000034a: + assume {:captureState "l00000342_goto_l0000034a"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000034a; + lmain_goto_l0000033c: + assume {:captureState "lmain_goto_l0000033c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000033c; + l00000342_goto_l00000361: + assume {:captureState "l00000342_goto_l00000361"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000361; l0000033f: assume {:captureState "l0000033f"} true; R8, Gamma_R8 := 1bv64, true; goto l00000342; - l0000033c: - assume {:captureState "l0000033c"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000342; l00000342: assume {:captureState "l00000342"} true; assert Gamma_R8; goto l00000342_goto_l0000034a, l00000342_goto_l00000361; - l00000361: - assume {:captureState "l00000361"} true; - goto l00000362; + l0000034a: + assume {:captureState "l0000034a"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + lmain_goto_l0000033f: + assume {:captureState "lmain_goto_l0000033f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000033f; + l0000033c: + assume {:captureState "l0000033c"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000342; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000362: assume {:captureState "l00000362"} true; R8, Gamma_R8 := 65536bv64, true; @@ -318,25 +339,10 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%00000385"} true; goto l0000034a; - l0000034a: - assume {:captureState "l0000034a"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + l00000361: + assume {:captureState "l00000361"} true; + goto l00000362; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l0000033c: - assume {:captureState "lmain_goto_l0000033c"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000033c; - lmain_goto_l0000033f: - assume {:captureState "lmain_goto_l0000033f"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000033f; - l00000342_goto_l0000034a: - assume {:captureState "l00000342_goto_l0000034a"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l0000034a; - l00000342_goto_l00000361: - assume {:captureState "l00000342_goto_l00000361"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000361; } diff --git a/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected index f3d1f915f..32c50f26b 100644 --- a/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected @@ -225,6 +225,11 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000327, lmain_goto_l0000033e; + l00000327: + assume {:captureState "l00000327"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l0000033e: assume {:captureState "l0000033e"} true; R0, Gamma_R0 := 69632bv64, true; @@ -242,17 +247,18 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%00000368"} true; goto l00000327; - l00000327: - assume {:captureState "l00000327"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000327: - assume {:captureState "lmain_goto_l00000327"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000327; lmain_goto_l0000033e: assume {:captureState "lmain_goto_l0000033e"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000033e; + lmain_goto_l00000327: + assume {:captureState "lmain_goto_l00000327"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000327; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected index 269cc87f0..c3f5bd96d 100644 --- a/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected @@ -197,6 +197,17 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R0, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R0, 20bv64)) || L(mem, bvadd64(R0, 20bv64))); assert Gamma_R0; goto lmain_goto_l000001bd, lmain_goto_l0000039c; + lmain_goto_l000001bd: + assume {:captureState "lmain_goto_l000001bd"} true; + assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) != 0bv1); + goto l000001bd; + l000001bd: + assume {:captureState "l000001bd"} true; + R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000039c: assume {:captureState "l0000039c"} true; call rely(); @@ -206,16 +217,11 @@ procedure main() assert (memory_load32_le(mem, $z_addr) == z_old); assume {:captureState "%000003a1"} true; goto l000001bd; - l000001bd: - assume {:captureState "l000001bd"} true; - R0, Gamma_R0 := 0bv64, true; - return; - lmain_goto_l000001bd: - assume {:captureState "lmain_goto_l000001bd"} true; - assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) != 0bv1); - goto l000001bd; lmain_goto_l0000039c: assume {:captureState "lmain_goto_l0000039c"} true; assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) == 0bv1); goto l0000039c; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected index 3d86091ff..38e60630f 100644 --- a/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected @@ -242,17 +242,23 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%00000989"} true; goto l00000948; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + lmain_goto_l0000095f: + assume {:captureState "lmain_goto_l0000095f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000095f; + lmain_goto_l00000948: + assume {:captureState "lmain_goto_l00000948"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000948; l00000948: assume {:captureState "l00000948"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l00000948: - assume {:captureState "lmain_goto_l00000948"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000948; - lmain_goto_l0000095f: - assume {:captureState "lmain_goto_l0000095f"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l0000095f; } diff --git a/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected index 8d9b04baa..b6ecab503 100644 --- a/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected @@ -282,6 +282,11 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000033f, lmain_goto_l00000328; + l00000328: + assume {:captureState "l00000328"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l0000033f: assume {:captureState "l0000033f"} true; R0, Gamma_R0 := 65536bv64, true; @@ -301,17 +306,18 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%0000036b"} true; goto l00000328; - l00000328: - assume {:captureState "l00000328"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000328: - assume {:captureState "lmain_goto_l00000328"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000328; lmain_goto_l0000033f: assume {:captureState "lmain_goto_l0000033f"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000033f; + lmain_goto_l00000328: + assume {:captureState "lmain_goto_l00000328"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000328; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected index 82b5f57d7..a979ced01 100644 --- a/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected @@ -227,21 +227,14 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000329, lmain_goto_l0000032c; - l0000032c: - assume {:captureState "l0000032c"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000032f; l00000329: assume {:captureState "l00000329"} true; R8, Gamma_R8 := 0bv64, true; goto l0000032f; - l0000032f: - assume {:captureState "l0000032f"} true; - assert Gamma_R8; - goto l0000032f_goto_l0000034e, l0000032f_goto_l00000337; - l0000034e: - assume {:captureState "l0000034e"} true; - goto l0000034f; + l0000032f_goto_l0000034e: + assume {:captureState "l0000032f_goto_l0000034e"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000034e; l0000034f: assume {:captureState "l0000034f"} true; R8, Gamma_R8 := 69632bv64, true; @@ -250,25 +243,38 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%00000364"} true; goto l00000337; + l0000034e: + assume {:captureState "l0000034e"} true; + goto l0000034f; + l0000032c: + assume {:captureState "l0000032c"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000032f; + l0000032f: + assume {:captureState "l0000032f"} true; + assert Gamma_R8; + goto l0000032f_goto_l0000034e, l0000032f_goto_l00000337; l00000337: assume {:captureState "l00000337"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000329: - assume {:captureState "lmain_goto_l00000329"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000329; - lmain_goto_l0000032c: - assume {:captureState "lmain_goto_l0000032c"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000032c; + goto main_return; l0000032f_goto_l00000337: assume {:captureState "l0000032f_goto_l00000337"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000337; - l0000032f_goto_l0000034e: - assume {:captureState "l0000032f_goto_l0000034e"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l0000034e; + lmain_goto_l0000032c: + assume {:captureState "lmain_goto_l0000032c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000032c; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + lmain_goto_l00000329: + assume {:captureState "lmain_goto_l00000329"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000329; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected index 17802c3cc..2707a6f37 100644 --- a/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected @@ -212,23 +212,29 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000002fd, lmain_goto_l000002fa; + lmain_goto_l000002fd: + assume {:captureState "lmain_goto_l000002fd"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000002fd; l000002fd: assume {:captureState "l000002fd"} true; R0, Gamma_R0 := 0bv64, true; goto l00000300; + l00000300: + assume {:captureState "l00000300"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000002fa: assume {:captureState "l000002fa"} true; R0, Gamma_R0 := zero_extend32_32(R9[32:0]), Gamma_R9; goto l00000300; - l00000300: - assume {:captureState "l00000300"} true; - return; lmain_goto_l000002fa: assume {:captureState "lmain_goto_l000002fa"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000002fa; - lmain_goto_l000002fd: - assume {:captureState "lmain_goto_l000002fd"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000002fd; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected index de955442e..60ed644d1 100644 --- a/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected @@ -227,18 +227,19 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000094a, lmain_goto_l00000947; - l0000094a: - assume {:captureState "l0000094a"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000094d; - l00000947: - assume {:captureState "l00000947"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000094d; l0000094d: assume {:captureState "l0000094d"} true; assert Gamma_R8; goto l0000094d_goto_l00000955, l0000094d_goto_l0000096c; + l00000955: + assume {:captureState "l00000955"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l0000094a: + assume {:captureState "l0000094a"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000094d; l0000096c: assume {:captureState "l0000096c"} true; goto l0000096d; @@ -250,25 +251,30 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%00000982"} true; goto l00000955; - l00000955: - assume {:captureState "l00000955"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000947: - assume {:captureState "lmain_goto_l00000947"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000947; lmain_goto_l0000094a: assume {:captureState "lmain_goto_l0000094a"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l0000094a; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000094d_goto_l00000955: assume {:captureState "l0000094d_goto_l00000955"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000955; + l00000947: + assume {:captureState "l00000947"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000094d; l0000094d_goto_l0000096c: assume {:captureState "l0000094d_goto_l0000096c"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000096c; + lmain_goto_l00000947: + assume {:captureState "lmain_goto_l00000947"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000947; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected index dda912b72..4467c6f88 100644 --- a/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected @@ -285,10 +285,6 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000338, lmain_goto_l0000033b; - l0000033b: - assume {:captureState "l0000033b"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000033e; l00000338: assume {:captureState "l00000338"} true; R8, Gamma_R8 := 0bv64, true; @@ -297,9 +293,15 @@ procedure main() assume {:captureState "l0000033e"} true; assert Gamma_R8; goto l0000033e_goto_l0000035d, l0000033e_goto_l00000346; - l0000035d: - assume {:captureState "l0000035d"} true; - goto l0000035e; + l00000346: + assume {:captureState "l00000346"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + lmain_goto_l0000033b: + assume {:captureState "lmain_goto_l0000033b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000033b; l0000035e: assume {:captureState "l0000035e"} true; R8, Gamma_R8 := 65536bv64, true; @@ -310,25 +312,29 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%0000037a"} true; goto l00000346; - l00000346: - assume {:captureState "l00000346"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + l0000035d: + assume {:captureState "l0000035d"} true; + goto l0000035e; + l0000033b: + assume {:captureState "l0000033b"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000033e; lmain_goto_l00000338: assume {:captureState "lmain_goto_l00000338"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000338; - lmain_goto_l0000033b: - assume {:captureState "lmain_goto_l0000033b"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000033b; - l0000033e_goto_l00000346: - assume {:captureState "l0000033e_goto_l00000346"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000346; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000033e_goto_l0000035d: assume {:captureState "l0000033e_goto_l0000035d"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000035d; + l0000033e_goto_l00000346: + assume {:captureState "l0000033e_goto_l00000346"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000346; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected index 0aae07f2c..16d6b2608 100644 --- a/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected @@ -223,6 +223,19 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000332, lmain_goto_l0000031b; + l0000031b: + assume {:captureState "l0000031b"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + lmain_goto_l00000332: + assume {:captureState "lmain_goto_l00000332"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000332; + lmain_goto_l0000031b: + assume {:captureState "lmain_goto_l0000031b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000031b; l00000332: assume {:captureState "l00000332"} true; R0, Gamma_R0 := 69632bv64, true; @@ -232,17 +245,10 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%0000034a"} true; goto l0000031b; - l0000031b: - assume {:captureState "l0000031b"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l0000031b: - assume {:captureState "lmain_goto_l0000031b"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l0000031b; - lmain_goto_l00000332: - assume {:captureState "lmain_goto_l00000332"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000332; } diff --git a/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected index e439d3e8c..d01bd3aa2 100644 --- a/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected @@ -190,20 +190,26 @@ procedure main() R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 20bv64)) || L(mem, bvadd64(R1, 20bv64))); assert Gamma_R1; goto lmain_goto_l000001c2, lmain_goto_l0000039c; + lmain_goto_l000001c2: + assume {:captureState "lmain_goto_l000001c2"} true; + assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1); + goto l000001c2; + l000001c2: + assume {:captureState "l000001c2"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000039c: assume {:captureState "l0000039c"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R2, 4bv64))), (gamma_load32(Gamma_mem, bvadd64(R2, 4bv64)) || L(mem, bvadd64(R2, 4bv64))); goto l000001c2; - l000001c2: - assume {:captureState "l000001c2"} true; - return; - lmain_goto_l000001c2: - assume {:captureState "lmain_goto_l000001c2"} true; - assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1); - goto l000001c2; lmain_goto_l0000039c: assume {:captureState "lmain_goto_l0000039c"} true; assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); goto l0000039c; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected index 2a17426c5..7180ce0d5 100644 --- a/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected @@ -223,6 +223,22 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000918, lmain_goto_l0000092f; + lmain_goto_l00000918: + assume {:captureState "lmain_goto_l00000918"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000918; + l00000918: + assume {:captureState "l00000918"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + lmain_goto_l0000092f: + assume {:captureState "lmain_goto_l0000092f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000092f; l0000092f: assume {:captureState "l0000092f"} true; R0, Gamma_R0 := 69632bv64, true; @@ -232,17 +248,7 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%00000947"} true; goto l00000918; - l00000918: - assume {:captureState "l00000918"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l00000918: - assume {:captureState "lmain_goto_l00000918"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000918; - lmain_goto_l0000092f: - assume {:captureState "lmain_goto_l0000092f"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l0000092f; } diff --git a/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected index edee39617..a9070a0fc 100644 --- a/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected @@ -280,6 +280,19 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000333, lmain_goto_l0000031c; + l0000031c: + assume {:captureState "l0000031c"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + lmain_goto_l00000333: + assume {:captureState "lmain_goto_l00000333"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000333; + lmain_goto_l0000031c: + assume {:captureState "lmain_goto_l0000031c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000031c; l00000333: assume {:captureState "l00000333"} true; R0, Gamma_R0 := 65536bv64, true; @@ -290,17 +303,10 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%0000034c"} true; goto l0000031c; - l0000031c: - assume {:captureState "l0000031c"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l0000031c: - assume {:captureState "lmain_goto_l0000031c"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l0000031c; - lmain_goto_l00000333: - assume {:captureState "lmain_goto_l00000333"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000333; } diff --git a/src/test/correct/basic_lock_security_write/clang/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/clang/basic_lock_security_write.expected index f2f05a0b1..df5066676 100644 --- a/src/test/correct/basic_lock_security_write/clang/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/clang/basic_lock_security_write.expected @@ -247,5 +247,11 @@ procedure main() assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%00000323"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_security_write/clang_O2/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/clang_O2/basic_lock_security_write.expected index dd56def9f..083f2427c 100644 --- a/src/test/correct/basic_lock_security_write/clang_O2/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/clang_O2/basic_lock_security_write.expected @@ -214,5 +214,11 @@ procedure main() assert ((bvadd64(R9, 52bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%000002dd"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_security_write/clang_no_plt_no_pic/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/clang_no_plt_no_pic/basic_lock_security_write.expected index f38c4c74d..d4d3b145e 100644 --- a/src/test/correct/basic_lock_security_write/clang_no_plt_no_pic/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/clang_no_plt_no_pic/basic_lock_security_write.expected @@ -247,5 +247,11 @@ procedure main() assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%00000900"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_security_write/clang_pic/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/clang_pic/basic_lock_security_write.expected index f99743610..02e7807b9 100644 --- a/src/test/correct/basic_lock_security_write/clang_pic/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/clang_pic/basic_lock_security_write.expected @@ -307,5 +307,11 @@ procedure main() assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%00000339"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_security_write/gcc/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/gcc/basic_lock_security_write.expected index ba5c4d59d..3c95913ad 100644 --- a/src/test/correct/basic_lock_security_write/gcc/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/gcc/basic_lock_security_write.expected @@ -249,5 +249,11 @@ procedure main() assume {:captureState "%00000358"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_security_write/gcc_O2/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/gcc_O2/basic_lock_security_write.expected index 4bbaa34c0..443fd92e0 100644 --- a/src/test/correct/basic_lock_security_write/gcc_O2/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/gcc_O2/basic_lock_security_write.expected @@ -214,5 +214,11 @@ procedure main() assert ((bvadd64(R2, 4bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%000001c4"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_security_write/gcc_no_plt_no_pic/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/gcc_no_plt_no_pic/basic_lock_security_write.expected index b374205cf..bbed43fdf 100644 --- a/src/test/correct/basic_lock_security_write/gcc_no_plt_no_pic/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/gcc_no_plt_no_pic/basic_lock_security_write.expected @@ -249,5 +249,11 @@ procedure main() assume {:captureState "%0000097b"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_security_write/gcc_pic/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/gcc_pic/basic_lock_security_write.expected index cb4b9c8ca..8574be31a 100644 --- a/src/test/correct/basic_lock_security_write/gcc_pic/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/gcc_pic/basic_lock_security_write.expected @@ -309,5 +309,11 @@ procedure main() assume {:captureState "%0000035c"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_unlock/clang/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/clang/basic_lock_unlock.expected index 52936b563..08da21341 100644 --- a/src/test/correct/basic_lock_unlock/clang/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/clang/basic_lock_unlock.expected @@ -205,5 +205,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 56bv64), 0bv32), gamma_store32(Gamma_mem, bvadd64(R8, 56bv64), true); assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%000002e7"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_unlock/clang_O2/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/clang_O2/basic_lock_unlock.expected index d052faebb..a378e6351 100644 --- a/src/test/correct/basic_lock_unlock/clang_O2/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/clang_O2/basic_lock_unlock.expected @@ -207,5 +207,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R10, 56bv64), 0bv32), gamma_store32(Gamma_mem, bvadd64(R10, 56bv64), true); assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%000002e7"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_unlock/clang_no_plt_no_pic/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/clang_no_plt_no_pic/basic_lock_unlock.expected index 934a892e7..20985befb 100644 --- a/src/test/correct/basic_lock_unlock/clang_no_plt_no_pic/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/clang_no_plt_no_pic/basic_lock_unlock.expected @@ -205,5 +205,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 56bv64), 0bv32), gamma_store32(Gamma_mem, bvadd64(R8, 56bv64), true); assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%00000876"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_unlock/clang_pic/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/clang_pic/basic_lock_unlock.expected index 1b825317d..411ddfb1b 100644 --- a/src/test/correct/basic_lock_unlock/clang_pic/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/clang_pic/basic_lock_unlock.expected @@ -265,5 +265,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R8, 0bv32), gamma_store32(Gamma_mem, R8, true); assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%000002fd"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_unlock/gcc/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/gcc/basic_lock_unlock.expected index 45c3f0f16..de3dd25c7 100644 --- a/src/test/correct/basic_lock_unlock/gcc/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/gcc/basic_lock_unlock.expected @@ -205,5 +205,11 @@ procedure main() assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%000002f6"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_unlock/gcc_O2/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/gcc_O2/basic_lock_unlock.expected index 4bb063905..42f5987c8 100644 --- a/src/test/correct/basic_lock_unlock/gcc_O2/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/gcc_O2/basic_lock_unlock.expected @@ -207,5 +207,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R2, 4bv64), 0bv32), gamma_store32(Gamma_mem, bvadd64(R2, 4bv64), true); assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%000001ca"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_unlock/gcc_no_plt_no_pic/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/gcc_no_plt_no_pic/basic_lock_unlock.expected index 7de6a308f..efdcfa128 100644 --- a/src/test/correct/basic_lock_unlock/gcc_no_plt_no_pic/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/gcc_no_plt_no_pic/basic_lock_unlock.expected @@ -205,5 +205,11 @@ procedure main() assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%0000089d"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_lock_unlock/gcc_pic/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/gcc_pic/basic_lock_unlock.expected index e7f59e5d7..96f9859ff 100644 --- a/src/test/correct/basic_lock_unlock/gcc_pic/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/gcc_pic/basic_lock_unlock.expected @@ -263,5 +263,11 @@ procedure main() assert ((z_old == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == x_old) && (memory_load32_le(mem, $z_addr) == z_old))); assume {:captureState "%000002f8"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_loop_assign/clang/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/clang/basic_loop_assign.expected index 1702ab871..ee4e60ca2 100644 --- a/src/test/correct/basic_loop_assign/clang/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/clang/basic_loop_assign.expected @@ -196,5 +196,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (x_old == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(x_old, 10bv32))); assume {:captureState "%000002ce"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_loop_assign/clang_O2/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/clang_O2/basic_loop_assign.expected index 8031b1142..43ce0fc33 100644 --- a/src/test/correct/basic_loop_assign/clang_O2/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/clang_O2/basic_loop_assign.expected @@ -196,5 +196,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 52bv64), R9[32:0]), gamma_store32(Gamma_mem, bvadd64(R8, 52bv64), Gamma_R9); assert (((memory_load32_le(mem, $x_addr) == x_old) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (x_old == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(x_old, 10bv32))); assume {:captureState "%000002d3"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_loop_assign/clang_no_plt_no_pic/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/clang_no_plt_no_pic/basic_loop_assign.expected index 45a841343..a3c388072 100644 --- a/src/test/correct/basic_loop_assign/clang_no_plt_no_pic/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/clang_no_plt_no_pic/basic_loop_assign.expected @@ -196,5 +196,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (x_old == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(x_old, 10bv32))); assume {:captureState "%00000845"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_loop_assign/clang_pic/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/clang_pic/basic_loop_assign.expected index 9c2937fd7..028ca06bc 100644 --- a/src/test/correct/basic_loop_assign/clang_pic/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/clang_pic/basic_loop_assign.expected @@ -230,5 +230,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (x_old == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(x_old, 10bv32))); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_loop_assign/gcc/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/gcc/basic_loop_assign.expected index 55d86092d..dfa2c4f74 100644 --- a/src/test/correct/basic_loop_assign/gcc/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/gcc/basic_loop_assign.expected @@ -195,5 +195,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (x_old == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(x_old, 10bv32))); assume {:captureState "%000002d8"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_loop_assign/gcc_O2/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/gcc_O2/basic_loop_assign.expected index 8a5abed56..62e7740c9 100644 --- a/src/test/correct/basic_loop_assign/gcc_O2/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/gcc_O2/basic_loop_assign.expected @@ -196,5 +196,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 20bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 20bv64), Gamma_R2); assert (((memory_load32_le(mem, $x_addr) == x_old) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (x_old == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(x_old, 10bv32))); assume {:captureState "%000001bd"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_loop_assign/gcc_no_plt_no_pic/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/gcc_no_plt_no_pic/basic_loop_assign.expected index 406846cdd..c2c65066e 100644 --- a/src/test/correct/basic_loop_assign/gcc_no_plt_no_pic/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/gcc_no_plt_no_pic/basic_loop_assign.expected @@ -195,5 +195,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (x_old == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(x_old, 10bv32))); assume {:captureState "%0000085b"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_loop_assign/gcc_pic/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/gcc_pic/basic_loop_assign.expected index 4296b2ef3..3c28f5b65 100644 --- a/src/test/correct/basic_loop_assign/gcc_pic/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/gcc_pic/basic_loop_assign.expected @@ -228,5 +228,11 @@ procedure main() assert (((memory_load32_le(mem, $x_addr) == x_old) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (x_old == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(x_old, 10bv32))); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected index 1b7086b6a..f39128900 100644 --- a/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected @@ -255,14 +255,18 @@ procedure main() R10, Gamma_R10 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); assert Gamma_R10; goto lmain_goto_l000003c9, lmain_goto_l000003ce; - l000003ce: - assume {:captureState "l000003ce"} true; - R9, Gamma_R9 := zero_extend32_32(bvsdiv33(sign_extend1_32(R8[32:0]), sign_extend1_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R8); - goto l000003d1; l000003c9: assume {:captureState "l000003c9"} true; R9, Gamma_R9 := 0bv64, true; goto l000003d1; + l000003ce: + assume {:captureState "l000003ce"} true; + R9, Gamma_R9 := zero_extend32_32(bvsdiv33(sign_extend1_32(R8[32:0]), sign_extend1_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R8); + goto l000003d1; + lmain_goto_l000003ce: + assume {:captureState "lmain_goto_l000003ce"} true; + assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); + goto l000003ce; l000003d1: assume {:captureState "l000003d1"} true; R9, Gamma_R9 := zero_extend32_32(bvmul64(zero_extend32_32(R9[32:0]), zero_extend32_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R9); @@ -276,13 +280,15 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); assume {:captureState "%00000407"} true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; + goto main_return; lmain_goto_l000003c9: assume {:captureState "lmain_goto_l000003c9"} true; assume (bvcomp32(R10[32:0], 0bv32) != 0bv1); goto l000003c9; - lmain_goto_l000003ce: - assume {:captureState "lmain_goto_l000003ce"} true; - assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); - goto l000003ce; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_operation_evaluation/clang_O2/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang_O2/basic_operation_evaluation.expected index b904c03a5..91c86ad15 100644 --- a/src/test/correct/basic_operation_evaluation/clang_O2/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang_O2/basic_operation_evaluation.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected index dd3e282d6..777803502 100644 --- a/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected @@ -255,14 +255,14 @@ procedure main() R10, Gamma_R10 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); assert Gamma_R10; goto lmain_goto_l00000ab1, lmain_goto_l00000aac; - l00000ab1: - assume {:captureState "l00000ab1"} true; - R9, Gamma_R9 := zero_extend32_32(bvsdiv33(sign_extend1_32(R8[32:0]), sign_extend1_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R8); - goto l00000ab4; - l00000aac: - assume {:captureState "l00000aac"} true; - R9, Gamma_R9 := 0bv64, true; - goto l00000ab4; + lmain_goto_l00000ab1: + assume {:captureState "lmain_goto_l00000ab1"} true; + assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); + goto l00000ab1; + lmain_goto_l00000aac: + assume {:captureState "lmain_goto_l00000aac"} true; + assume (bvcomp32(R10[32:0], 0bv32) != 0bv1); + goto l00000aac; l00000ab4: assume {:captureState "l00000ab4"} true; R9, Gamma_R9 := zero_extend32_32(bvmul64(zero_extend32_32(R9[32:0]), zero_extend32_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R9); @@ -276,13 +276,19 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); assume {:captureState "%00000aea"} true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + l00000aac: + assume {:captureState "l00000aac"} true; + R9, Gamma_R9 := 0bv64, true; + goto l00000ab4; + l00000ab1: + assume {:captureState "l00000ab1"} true; + R9, Gamma_R9 := zero_extend32_32(bvsdiv33(sign_extend1_32(R8[32:0]), sign_extend1_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R8); + goto l00000ab4; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l00000aac: - assume {:captureState "lmain_goto_l00000aac"} true; - assume (bvcomp32(R10[32:0], 0bv32) != 0bv1); - goto l00000aac; - lmain_goto_l00000ab1: - assume {:captureState "lmain_goto_l00000ab1"} true; - assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); - goto l00000ab1; } diff --git a/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected index dd3e282d6..777803502 100644 --- a/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected @@ -255,14 +255,14 @@ procedure main() R10, Gamma_R10 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); assert Gamma_R10; goto lmain_goto_l00000ab1, lmain_goto_l00000aac; - l00000ab1: - assume {:captureState "l00000ab1"} true; - R9, Gamma_R9 := zero_extend32_32(bvsdiv33(sign_extend1_32(R8[32:0]), sign_extend1_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R8); - goto l00000ab4; - l00000aac: - assume {:captureState "l00000aac"} true; - R9, Gamma_R9 := 0bv64, true; - goto l00000ab4; + lmain_goto_l00000ab1: + assume {:captureState "lmain_goto_l00000ab1"} true; + assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); + goto l00000ab1; + lmain_goto_l00000aac: + assume {:captureState "lmain_goto_l00000aac"} true; + assume (bvcomp32(R10[32:0], 0bv32) != 0bv1); + goto l00000aac; l00000ab4: assume {:captureState "l00000ab4"} true; R9, Gamma_R9 := zero_extend32_32(bvmul64(zero_extend32_32(R9[32:0]), zero_extend32_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R9); @@ -276,13 +276,19 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); assume {:captureState "%00000aea"} true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + l00000aac: + assume {:captureState "l00000aac"} true; + R9, Gamma_R9 := 0bv64, true; + goto l00000ab4; + l00000ab1: + assume {:captureState "l00000ab1"} true; + R9, Gamma_R9 := zero_extend32_32(bvsdiv33(sign_extend1_32(R8[32:0]), sign_extend1_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R8); + goto l00000ab4; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l00000aac: - assume {:captureState "lmain_goto_l00000aac"} true; - assume (bvcomp32(R10[32:0], 0bv32) != 0bv1); - goto l00000aac; - lmain_goto_l00000ab1: - assume {:captureState "lmain_goto_l00000ab1"} true; - assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); - goto l00000ab1; } diff --git a/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected index 9c550f842..b0f7a3933 100644 --- a/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected @@ -239,6 +239,10 @@ procedure main() assume {:captureState "l000003b3"} true; R2, Gamma_R2 := 0bv64, true; goto l000003bb; + lmain_goto_l000003b3: + assume {:captureState "lmain_goto_l000003b3"} true; + assume (bvcomp32(R1[32:0], 0bv32) != 0bv1); + goto l000003b3; l000003bb: assume {:captureState "l000003bb"} true; R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 24bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 24bv64)); @@ -248,13 +252,15 @@ procedure main() assume {:captureState "%000003dc"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l000003b3: - assume {:captureState "lmain_goto_l000003b3"} true; - assume (bvcomp32(R1[32:0], 0bv32) != 0bv1); - goto l000003b3; + goto main_return; lmain_goto_l000003b8: assume {:captureState "lmain_goto_l000003b8"} true; assume (bvcomp32(R1[32:0], 0bv32) == 0bv1); goto l000003b8; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_operation_evaluation/gcc_O2/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc_O2/basic_operation_evaluation.expected index 306991d20..0918aa3d9 100644 --- a/src/test/correct/basic_operation_evaluation/gcc_O2/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc_O2/basic_operation_evaluation.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected index b0c230c36..e0ec1c246 100644 --- a/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected @@ -231,10 +231,10 @@ procedure main() R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 24bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 24bv64)); assert Gamma_R1; goto lmain_goto_l00000a6e, lmain_goto_l00000a73; - l00000a73: - assume {:captureState "l00000a73"} true; - R2, Gamma_R2 := zero_extend32_32(bvsdiv33(sign_extend1_32(R0[32:0]), sign_extend1_32(R1[32:0]))[32:0]), (Gamma_R1 && Gamma_R0); - goto l00000a76; + lmain_goto_l00000a6e: + assume {:captureState "lmain_goto_l00000a6e"} true; + assume (bvcomp32(R1[32:0], 0bv32) != 0bv1); + goto l00000a6e; l00000a6e: assume {:captureState "l00000a6e"} true; R2, Gamma_R2 := 0bv64, true; @@ -248,13 +248,19 @@ procedure main() assume {:captureState "%00000a97"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l00000a6e: - assume {:captureState "lmain_goto_l00000a6e"} true; - assume (bvcomp32(R1[32:0], 0bv32) != 0bv1); - goto l00000a6e; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; lmain_goto_l00000a73: assume {:captureState "lmain_goto_l00000a73"} true; assume (bvcomp32(R1[32:0], 0bv32) == 0bv1); goto l00000a73; + l00000a73: + assume {:captureState "l00000a73"} true; + R2, Gamma_R2 := zero_extend32_32(bvsdiv33(sign_extend1_32(R0[32:0]), sign_extend1_32(R1[32:0]))[32:0]), (Gamma_R1 && Gamma_R0); + goto l00000a76; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected index b0c230c36..e0ec1c246 100644 --- a/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected @@ -231,10 +231,10 @@ procedure main() R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 24bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 24bv64)); assert Gamma_R1; goto lmain_goto_l00000a6e, lmain_goto_l00000a73; - l00000a73: - assume {:captureState "l00000a73"} true; - R2, Gamma_R2 := zero_extend32_32(bvsdiv33(sign_extend1_32(R0[32:0]), sign_extend1_32(R1[32:0]))[32:0]), (Gamma_R1 && Gamma_R0); - goto l00000a76; + lmain_goto_l00000a6e: + assume {:captureState "lmain_goto_l00000a6e"} true; + assume (bvcomp32(R1[32:0], 0bv32) != 0bv1); + goto l00000a6e; l00000a6e: assume {:captureState "l00000a6e"} true; R2, Gamma_R2 := 0bv64, true; @@ -248,13 +248,19 @@ procedure main() assume {:captureState "%00000a97"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l00000a6e: - assume {:captureState "lmain_goto_l00000a6e"} true; - assume (bvcomp32(R1[32:0], 0bv32) != 0bv1); - goto l00000a6e; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; lmain_goto_l00000a73: assume {:captureState "lmain_goto_l00000a73"} true; assume (bvcomp32(R1[32:0], 0bv32) == 0bv1); goto l00000a73; + l00000a73: + assume {:captureState "l00000a73"} true; + R2, Gamma_R2 := zero_extend32_32(bvsdiv33(sign_extend1_32(R0[32:0]), sign_extend1_32(R1[32:0]))[32:0]), (Gamma_R1 && Gamma_R0); + goto l00000a76; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected index ffbad047c..63c8713e6 100644 --- a/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected @@ -238,27 +238,31 @@ procedure main() assume {:captureState "l00000336"} true; R8, Gamma_R8 := 0bv64, true; goto l0000033c; - l0000033c: - assume {:captureState "l0000033c"} true; - assert Gamma_R8; - goto l0000033c_goto_l0000035b, l0000033c_goto_l00000344; - l0000035b: - assume {:captureState "l0000035b"} true; - goto l0000035c; + l0000033c_goto_l0000035b: + assume {:captureState "l0000033c_goto_l0000035b"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000035b; l0000035c: assume {:captureState "l0000035c"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), true); assume {:captureState "%00000364"} true; goto l00000344; - l00000344: - assume {:captureState "l00000344"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + l0000035b: + assume {:captureState "l0000035b"} true; + goto l0000035c; lmain_goto_l00000336: assume {:captureState "lmain_goto_l00000336"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l00000336; + l00000344: + assume {:captureState "l00000344"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l0000033c: + assume {:captureState "l0000033c"} true; + assert Gamma_R8; + goto l0000033c_goto_l0000035b, l0000033c_goto_l00000344; lmain_goto_l00000339: assume {:captureState "lmain_goto_l00000339"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); @@ -267,8 +271,10 @@ procedure main() assume {:captureState "l0000033c_goto_l00000344"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000344; - l0000033c_goto_l0000035b: - assume {:captureState "l0000033c_goto_l0000035b"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l0000035b; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected index f53a693c9..f106b6baa 100644 --- a/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected @@ -212,23 +212,29 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000002fd, lmain_goto_l000002fa; + lmain_goto_l000002fd: + assume {:captureState "lmain_goto_l000002fd"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000002fd; l000002fd: assume {:captureState "l000002fd"} true; R0, Gamma_R0 := 0bv64, true; goto l00000300; + l00000300: + assume {:captureState "l00000300"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000002fa: assume {:captureState "l000002fa"} true; R0, Gamma_R0 := zero_extend32_32(R9[32:0]), Gamma_R9; goto l00000300; - l00000300: - assume {:captureState "l00000300"} true; - return; lmain_goto_l000002fa: assume {:captureState "lmain_goto_l000002fa"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000002fa; - lmain_goto_l000002fd: - assume {:captureState "lmain_goto_l000002fd"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000002fd; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected index 230807188..33c15e2f7 100644 --- a/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected @@ -230,45 +230,51 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000954, lmain_goto_l00000957; + l0000095a_goto_l00000962: + assume {:captureState "l0000095a_goto_l00000962"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000962; l00000957: assume {:captureState "l00000957"} true; R8, Gamma_R8 := 1bv64, true; goto l0000095a; + l00000979: + assume {:captureState "l00000979"} true; + goto l0000097a; l00000954: assume {:captureState "l00000954"} true; R8, Gamma_R8 := 0bv64, true; goto l0000095a; + l00000962: + assume {:captureState "l00000962"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l0000095a: assume {:captureState "l0000095a"} true; assert Gamma_R8; goto l0000095a_goto_l00000962, l0000095a_goto_l00000979; - l00000979: - assume {:captureState "l00000979"} true; - goto l0000097a; l0000097a: assume {:captureState "l0000097a"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), true); assume {:captureState "%00000982"} true; goto l00000962; - l00000962: - assume {:captureState "l00000962"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + l0000095a_goto_l00000979: + assume {:captureState "l0000095a_goto_l00000979"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000979; lmain_goto_l00000954: assume {:captureState "lmain_goto_l00000954"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l00000954; + terminate: + assume {:captureState "terminate"} true; + goto terminate; lmain_goto_l00000957: assume {:captureState "lmain_goto_l00000957"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000957; - l0000095a_goto_l00000962: - assume {:captureState "l0000095a_goto_l00000962"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000962; - l0000095a_goto_l00000979: - assume {:captureState "l0000095a_goto_l00000979"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000979; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected index b69676cde..6439b542e 100644 --- a/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected @@ -290,45 +290,51 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000034c, lmain_goto_l0000034f; + l00000352_goto_l00000371: + assume {:captureState "l00000352_goto_l00000371"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000371; + l00000352_goto_l0000035a: + assume {:captureState "l00000352_goto_l0000035a"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000035a; l0000034f: assume {:captureState "l0000034f"} true; R8, Gamma_R8 := 1bv64, true; goto l00000352; - l0000034c: - assume {:captureState "l0000034c"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000352; + lmain_goto_l0000034c: + assume {:captureState "lmain_goto_l0000034c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000034c; + lmain_goto_l0000034f: + assume {:captureState "lmain_goto_l0000034f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000034f; l00000352: assume {:captureState "l00000352"} true; assert Gamma_R8; goto l00000352_goto_l00000371, l00000352_goto_l0000035a; + l0000034c: + assume {:captureState "l0000034c"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000352; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000371: assume {:captureState "l00000371"} true; goto l00000372; + l0000035a: + assume {:captureState "l0000035a"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000372: assume {:captureState "l00000372"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), true); assume {:captureState "%0000037a"} true; goto l0000035a; - l0000035a: - assume {:captureState "l0000035a"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l0000034c: - assume {:captureState "lmain_goto_l0000034c"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l0000034c; - lmain_goto_l0000034f: - assume {:captureState "lmain_goto_l0000034f"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l0000034f; - l00000352_goto_l0000035a: - assume {:captureState "l00000352_goto_l0000035a"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l0000035a; - l00000352_goto_l00000371: - assume {:captureState "l00000352_goto_l00000371"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000371; } diff --git a/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected index 7bae9d7fb..3d6276516 100644 --- a/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected @@ -236,13 +236,19 @@ procedure main() assume {:captureState "l0000032e"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l0000032e: - assume {:captureState "lmain_goto_l0000032e"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000032e; + goto main_return; lmain_goto_l00000345: assume {:captureState "lmain_goto_l00000345"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000345; + lmain_goto_l0000032e: + assume {:captureState "lmain_goto_l0000032e"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000032e; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected index 44fc144b9..6769cf9f2 100644 --- a/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected @@ -190,20 +190,26 @@ procedure main() R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 20bv64)) || L(mem, bvadd64(R1, 20bv64))); assert Gamma_R1; goto lmain_goto_l000001c2, lmain_goto_l0000039c; + lmain_goto_l000001c2: + assume {:captureState "lmain_goto_l000001c2"} true; + assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1); + goto l000001c2; + l000001c2: + assume {:captureState "l000001c2"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000039c: assume {:captureState "l0000039c"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R2, 4bv64))), (gamma_load32(Gamma_mem, bvadd64(R2, 4bv64)) || L(mem, bvadd64(R2, 4bv64))); goto l000001c2; - l000001c2: - assume {:captureState "l000001c2"} true; - return; - lmain_goto_l000001c2: - assume {:captureState "lmain_goto_l000001c2"} true; - assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1); - goto l000001c2; lmain_goto_l0000039c: assume {:captureState "lmain_goto_l0000039c"} true; assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); goto l0000039c; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected index 3873bde91..1b24919fd 100644 --- a/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected @@ -227,22 +227,28 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000942, lmain_goto_l0000092b; - l00000942: - assume {:captureState "l00000942"} true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); - assume {:captureState "%00000947"} true; - goto l0000092b; l0000092b: assume {:captureState "l0000092b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l0000092b: - assume {:captureState "lmain_goto_l0000092b"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto main_return; + l00000942: + assume {:captureState "l00000942"} true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); + assume {:captureState "%00000947"} true; goto l0000092b; lmain_goto_l00000942: assume {:captureState "lmain_goto_l00000942"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000942; + lmain_goto_l0000092b: + assume {:captureState "lmain_goto_l0000092b"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000092b; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected index ee0280058..a3cda8213 100644 --- a/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected @@ -285,6 +285,10 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000347, lmain_goto_l00000330; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000330; l00000347: assume {:captureState "l00000347"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); @@ -294,13 +298,15 @@ procedure main() assume {:captureState "l00000330"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000330: - assume {:captureState "lmain_goto_l00000330"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000330; + goto main_return; lmain_goto_l00000347: assume {:captureState "lmain_goto_l00000347"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000347; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/basic_sec_policy_write/clang/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/clang/basic_sec_policy_write.expected index 201b37eeb..2cd41ee0d 100644 --- a/src/test/correct/basic_sec_policy_write/clang/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/clang/basic_sec_policy_write.expected @@ -242,5 +242,11 @@ procedure main() assert ((z_old != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); assume {:captureState "%0000032d"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_sec_policy_write/clang_O2/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/clang_O2/basic_sec_policy_write.expected index 9dac0c99a..a7d07d4f8 100644 --- a/src/test/correct/basic_sec_policy_write/clang_O2/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/clang_O2/basic_sec_policy_write.expected @@ -213,5 +213,11 @@ procedure main() assert ((bvadd64(R9, 52bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert ((z_old != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); assume {:captureState "%000002e7"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_sec_policy_write/clang_no_plt_no_pic/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/clang_no_plt_no_pic/basic_sec_policy_write.expected index bf97d9983..8afacc364 100644 --- a/src/test/correct/basic_sec_policy_write/clang_no_plt_no_pic/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/clang_no_plt_no_pic/basic_sec_policy_write.expected @@ -242,5 +242,11 @@ procedure main() assert ((z_old != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); assume {:captureState "%00000916"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_sec_policy_write/clang_pic/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/clang_pic/basic_sec_policy_write.expected index 36ab6f168..0e77ec7c2 100644 --- a/src/test/correct/basic_sec_policy_write/clang_pic/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/clang_pic/basic_sec_policy_write.expected @@ -302,5 +302,11 @@ procedure main() assert ((z_old != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); assume {:captureState "%00000343"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_sec_policy_write/gcc/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/gcc/basic_sec_policy_write.expected index e1602790f..960616bd0 100644 --- a/src/test/correct/basic_sec_policy_write/gcc/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/gcc/basic_sec_policy_write.expected @@ -244,5 +244,11 @@ procedure main() assume {:captureState "%00000362"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_sec_policy_write/gcc_O2/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/gcc_O2/basic_sec_policy_write.expected index 08c116932..1ab98e60b 100644 --- a/src/test/correct/basic_sec_policy_write/gcc_O2/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/gcc_O2/basic_sec_policy_write.expected @@ -213,5 +213,11 @@ procedure main() assert ((bvadd64(R2, 4bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert ((z_old != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); assume {:captureState "%000001ca"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_sec_policy_write/gcc_no_plt_no_pic/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/gcc_no_plt_no_pic/basic_sec_policy_write.expected index 959c60219..ce8841057 100644 --- a/src/test/correct/basic_sec_policy_write/gcc_no_plt_no_pic/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/gcc_no_plt_no_pic/basic_sec_policy_write.expected @@ -244,5 +244,11 @@ procedure main() assume {:captureState "%00000991"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basic_sec_policy_write/gcc_pic/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/gcc_pic/basic_sec_policy_write.expected index 1fd3aca8c..8fa02bba0 100644 --- a/src/test/correct/basic_sec_policy_write/gcc_pic/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/gcc_pic/basic_sec_policy_write.expected @@ -304,5 +304,11 @@ procedure main() assume {:captureState "%00000366"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicassign_gamma0/clang/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/clang/basicassign_gamma0.expected index 4fd51f050..79db2270d 100644 --- a/src/test/correct/basicassign_gamma0/clang/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/clang/basicassign_gamma0.expected @@ -196,5 +196,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicassign_gamma0/clang_O2/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/clang_O2/basicassign_gamma0.expected index 0a66841bf..d51b9ba7c 100644 --- a/src/test/correct/basicassign_gamma0/clang_O2/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/clang_O2/basicassign_gamma0.expected @@ -196,5 +196,11 @@ procedure main() assert (L(mem, bvadd64(R9, 56bv64)) ==> Gamma_R8); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assume {:captureState "%000002de"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicassign_gamma0/clang_no_plt_no_pic/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/clang_no_plt_no_pic/basicassign_gamma0.expected index 2a980ae8e..4526b469f 100644 --- a/src/test/correct/basicassign_gamma0/clang_no_plt_no_pic/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/clang_no_plt_no_pic/basicassign_gamma0.expected @@ -196,5 +196,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assume {:captureState "%0000085d"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicassign_gamma0/clang_pic/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/clang_pic/basicassign_gamma0.expected index 49233a65d..58d3372b5 100644 --- a/src/test/correct/basicassign_gamma0/clang_pic/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/clang_pic/basicassign_gamma0.expected @@ -256,5 +256,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R9, R8[32:0]), gamma_store32(Gamma_mem, R9, Gamma_R8); assume {:captureState "%000002ef"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicassign_gamma0/gcc/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/gcc/basicassign_gamma0.expected index 61c06314d..337e76d68 100644 --- a/src/test/correct/basicassign_gamma0/gcc/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/gcc/basicassign_gamma0.expected @@ -196,5 +196,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%000002ed"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicassign_gamma0/gcc_O2/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/gcc_O2/basicassign_gamma0.expected index 80ca6e118..b292fb2b9 100644 --- a/src/test/correct/basicassign_gamma0/gcc_O2/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/gcc_O2/basicassign_gamma0.expected @@ -196,5 +196,11 @@ procedure main() assert (L(mem, bvadd64(R1, 20bv64)) ==> Gamma_R2); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 20bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 20bv64), Gamma_R2); assume {:captureState "%000001c5"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicassign_gamma0/gcc_no_plt_no_pic/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/gcc_no_plt_no_pic/basicassign_gamma0.expected index f64a19b05..d5f19684f 100644 --- a/src/test/correct/basicassign_gamma0/gcc_no_plt_no_pic/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/gcc_no_plt_no_pic/basicassign_gamma0.expected @@ -196,5 +196,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%00000889"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicassign_gamma0/gcc_pic/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/gcc_pic/basicassign_gamma0.expected index 640aca070..0f0efdb00 100644 --- a/src/test/correct/basicassign_gamma0/gcc_pic/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/gcc_pic/basicassign_gamma0.expected @@ -254,5 +254,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%000002ef"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicfree/clang/basicfree.expected b/src/test/correct/basicfree/clang/basicfree.expected index 726176432..5ab7c0927 100644 --- a/src/test/correct/basicfree/clang/basicfree.expected +++ b/src/test/correct/basicfree/clang/basicfree.expected @@ -295,6 +295,13 @@ procedure main() R30, Gamma_R30 := 2024bv64, true; call malloc(); goto l0000030d; + l00000338: + assume {:captureState "l00000338"} true; + #5, Gamma_#5 := bvadd64(R31, 16bv64), Gamma_R31; + R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; l0000030d: assume {:captureState "l0000030d"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 8bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R0); @@ -309,12 +316,11 @@ procedure main() R30, Gamma_R30 := 2048bv64, true; call #free(); goto l00000338; - l00000338: - assume {:captureState "l00000338"} true; - #5, Gamma_#5 := bvadd64(R31, 16bv64), Gamma_R31; - R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicfree/clang_O2/basicfree.expected b/src/test/correct/basicfree/clang_O2/basicfree.expected index ae43ad872..abc430756 100644 --- a/src/test/correct/basicfree/clang_O2/basicfree.expected +++ b/src/test/correct/basicfree/clang_O2/basicfree.expected @@ -153,5 +153,11 @@ procedure main() { lmain: assume {:captureState "lmain"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicfree/clang_no_plt_no_pic/basicfree.expected b/src/test/correct/basicfree/clang_no_plt_no_pic/basicfree.expected index 76c2aa03f..736374024 100644 --- a/src/test/correct/basicfree/clang_no_plt_no_pic/basicfree.expected +++ b/src/test/correct/basicfree/clang_no_plt_no_pic/basicfree.expected @@ -315,6 +315,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicfree/clang_pic/basicfree.expected b/src/test/correct/basicfree/clang_pic/basicfree.expected index 76c2aa03f..736374024 100644 --- a/src/test/correct/basicfree/clang_pic/basicfree.expected +++ b/src/test/correct/basicfree/clang_pic/basicfree.expected @@ -315,6 +315,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicfree/gcc/basicfree.expected b/src/test/correct/basicfree/gcc/basicfree.expected index 0abdad17b..3c8846d26 100644 --- a/src/test/correct/basicfree/gcc/basicfree.expected +++ b/src/test/correct/basicfree/gcc/basicfree.expected @@ -310,6 +310,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicfree/gcc_O2/basicfree.expected b/src/test/correct/basicfree/gcc_O2/basicfree.expected index f96261171..ab6b5b132 100644 --- a/src/test/correct/basicfree/gcc_O2/basicfree.expected +++ b/src/test/correct/basicfree/gcc_O2/basicfree.expected @@ -153,5 +153,11 @@ procedure main() { lmain: assume {:captureState "lmain"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicfree/gcc_no_plt_no_pic/basicfree.expected b/src/test/correct/basicfree/gcc_no_plt_no_pic/basicfree.expected index 07b9f0233..21f7b7989 100644 --- a/src/test/correct/basicfree/gcc_no_plt_no_pic/basicfree.expected +++ b/src/test/correct/basicfree/gcc_no_plt_no_pic/basicfree.expected @@ -310,6 +310,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/basicfree/gcc_pic/basicfree.expected b/src/test/correct/basicfree/gcc_pic/basicfree.expected index 07b9f0233..21f7b7989 100644 --- a/src/test/correct/basicfree/gcc_pic/basicfree.expected +++ b/src/test/correct/basicfree/gcc_pic/basicfree.expected @@ -310,6 +310,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/cjump/clang/cjump.expected b/src/test/correct/cjump/clang/cjump.expected index 539ef9a99..ec0dfb505 100644 --- a/src/test/correct/cjump/clang/cjump.expected +++ b/src/test/correct/cjump/clang/cjump.expected @@ -229,18 +229,14 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000343, lmain_goto_l00000346; - l00000346: - assume {:captureState "l00000346"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000349; + l00000349_goto_l00000351: + assume {:captureState "l00000349_goto_l00000351"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000351; l00000343: assume {:captureState "l00000343"} true; R8, Gamma_R8 := 0bv64, true; goto l00000349; - l00000349: - assume {:captureState "l00000349"} true; - assert Gamma_R8; - goto l00000349_goto_l00000351, l00000349_goto_l0000037e; l00000351: assume {:captureState "l00000351"} true; R9, Gamma_R9 := 69632bv64, true; @@ -250,6 +246,27 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assume {:captureState "%00000366"} true; goto l00000369; + l00000349: + assume {:captureState "l00000349"} true; + assert Gamma_R8; + goto l00000349_goto_l00000351, l00000349_goto_l0000037e; + l00000346: + assume {:captureState "l00000346"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000349; + lmain_goto_l00000343: + assume {:captureState "lmain_goto_l00000343"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000343; + lmain_goto_l00000346: + assume {:captureState "lmain_goto_l00000346"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000346; + l00000369: + assume {:captureState "l00000369"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l0000037e: assume {:captureState "l0000037e"} true; goto l0000037f; @@ -262,25 +279,14 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assume {:captureState "%00000392"} true; goto l00000369; - l00000369: - assume {:captureState "l00000369"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000343: - assume {:captureState "lmain_goto_l00000343"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000343; - lmain_goto_l00000346: - assume {:captureState "lmain_goto_l00000346"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000346; - l00000349_goto_l00000351: - assume {:captureState "l00000349_goto_l00000351"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000351; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000349_goto_l0000037e: assume {:captureState "l00000349_goto_l0000037e"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000037e; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/cjump/clang_O2/cjump.expected b/src/test/correct/cjump/clang_O2/cjump.expected index d3e291679..4891e96d6 100644 --- a/src/test/correct/cjump/clang_O2/cjump.expected +++ b/src/test/correct/cjump/clang_O2/cjump.expected @@ -198,5 +198,11 @@ procedure main() assert (L(mem, bvadd64(R10, 56bv64)) ==> Gamma_R11); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R10, 56bv64), R11[32:0]), gamma_store32(Gamma_mem, bvadd64(R10, 56bv64), Gamma_R11); assume {:captureState "%000002f1"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected b/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected index 796eec6f1..5efe98b5c 100644 --- a/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected +++ b/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected @@ -229,58 +229,64 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000999, lmain_goto_l0000099c; - l0000099c: - assume {:captureState "l0000099c"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000099f; - l00000999: - assume {:captureState "l00000999"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000099f; - l0000099f: - assume {:captureState "l0000099f"} true; - assert Gamma_R8; - goto l0000099f_goto_l000009a7, l0000099f_goto_l000009d4; - l000009a7: - assume {:captureState "l000009a7"} true; + l000009d5: + assume {:captureState "l000009d5"} true; + R8, Gamma_R8 := 3bv64, true; R9, Gamma_R9 := 69632bv64, true; - R8, Gamma_R8 := 2bv64, true; call rely(); assert (L(mem, bvadd64(R9, 56bv64)) ==> Gamma_R8); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); - assume {:captureState "%000009bc"} true; + assume {:captureState "%000009e8"} true; goto l000009bf; l000009d4: assume {:captureState "l000009d4"} true; goto l000009d5; - l000009d5: - assume {:captureState "l000009d5"} true; - R8, Gamma_R8 := 3bv64, true; + l0000099f: + assume {:captureState "l0000099f"} true; + assert Gamma_R8; + goto l0000099f_goto_l000009a7, l0000099f_goto_l000009d4; + lmain_goto_l0000099c: + assume {:captureState "lmain_goto_l0000099c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000099c; + lmain_goto_l00000999: + assume {:captureState "lmain_goto_l00000999"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000999; + l000009a7: + assume {:captureState "l000009a7"} true; R9, Gamma_R9 := 69632bv64, true; + R8, Gamma_R8 := 2bv64, true; call rely(); assert (L(mem, bvadd64(R9, 56bv64)) ==> Gamma_R8); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); - assume {:captureState "%000009e8"} true; + assume {:captureState "%000009bc"} true; goto l000009bf; + l0000099f_goto_l000009d4: + assume {:captureState "l0000099f_goto_l000009d4"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l000009d4; + l00000999: + assume {:captureState "l00000999"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000099f; + l0000099f_goto_l000009a7: + assume {:captureState "l0000099f_goto_l000009a7"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000009a7; + l0000099c: + assume {:captureState "l0000099c"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000099f; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000009bf: assume {:captureState "l000009bf"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l00000999: - assume {:captureState "lmain_goto_l00000999"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000999; - lmain_goto_l0000099c: - assume {:captureState "lmain_goto_l0000099c"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l0000099c; - l0000099f_goto_l000009a7: - assume {:captureState "l0000099f_goto_l000009a7"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l000009a7; - l0000099f_goto_l000009d4: - assume {:captureState "l0000099f_goto_l000009d4"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l000009d4; } diff --git a/src/test/correct/cjump/clang_pic/cjump.expected b/src/test/correct/cjump/clang_pic/cjump.expected index b7f1ae582..1c6da8825 100644 --- a/src/test/correct/cjump/clang_pic/cjump.expected +++ b/src/test/correct/cjump/clang_pic/cjump.expected @@ -287,18 +287,6 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000359, lmain_goto_l00000356; - l00000359: - assume {:captureState "l00000359"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000035c; - l00000356: - assume {:captureState "l00000356"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000035c; - l0000035c: - assume {:captureState "l0000035c"} true; - assert Gamma_R8; - goto l0000035c_goto_l00000398, l0000035c_goto_l00000364; l00000364: assume {:captureState "l00000364"} true; R9, Gamma_R9 := 65536bv64, true; @@ -310,9 +298,10 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R9, R8[32:0]), gamma_store32(Gamma_mem, R9, Gamma_R8); assume {:captureState "%00000380"} true; goto l00000383; - l00000398: - assume {:captureState "l00000398"} true; - goto l00000399; + lmain_goto_l00000359: + assume {:captureState "lmain_goto_l00000359"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000359; l00000399: assume {:captureState "l00000399"} true; R8, Gamma_R8 := 3bv64, true; @@ -324,25 +313,42 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R9, R8[32:0]), gamma_store32(Gamma_mem, R9, Gamma_R8); assume {:captureState "%000003b3"} true; goto l00000383; + l00000398: + assume {:captureState "l00000398"} true; + goto l00000399; l00000383: assume {:captureState "l00000383"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + goto main_return; + l00000356: + assume {:captureState "l00000356"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000035c; + l00000359: + assume {:captureState "l00000359"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000035c; lmain_goto_l00000356: assume {:captureState "lmain_goto_l00000356"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l00000356; - lmain_goto_l00000359: - assume {:captureState "lmain_goto_l00000359"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000359; - l0000035c_goto_l00000364: - assume {:captureState "l0000035c_goto_l00000364"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000364; l0000035c_goto_l00000398: assume {:captureState "l0000035c_goto_l00000398"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000398; + l0000035c: + assume {:captureState "l0000035c"} true; + assert Gamma_R8; + goto l0000035c_goto_l00000398, l0000035c_goto_l00000364; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l0000035c_goto_l00000364: + assume {:captureState "l0000035c_goto_l00000364"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000364; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/cjump/gcc/cjump.expected b/src/test/correct/cjump/gcc/cjump.expected index dba45cd99..0e0ea9c1b 100644 --- a/src/test/correct/cjump/gcc/cjump.expected +++ b/src/test/correct/cjump/gcc/cjump.expected @@ -230,6 +230,18 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%00000359"} true; goto l0000035b; + lmain_goto_l00000365: + assume {:captureState "lmain_goto_l00000365"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000365; + lmain_goto_l0000033e: + assume {:captureState "lmain_goto_l0000033e"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000033e; + l0000035b: + assume {:captureState "l0000035b"} true; + R0, Gamma_R0 := 0bv64, true; + goto main_return; l00000365: assume {:captureState "l00000365"} true; R0, Gamma_R0 := 69632bv64, true; @@ -240,16 +252,10 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%0000037b"} true; goto l0000035b; - l0000035b: - assume {:captureState "l0000035b"} true; - R0, Gamma_R0 := 0bv64, true; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l0000033e: - assume {:captureState "lmain_goto_l0000033e"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000033e; - lmain_goto_l00000365: - assume {:captureState "lmain_goto_l00000365"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000365; } diff --git a/src/test/correct/cjump/gcc_O2/cjump.expected b/src/test/correct/cjump/gcc_O2/cjump.expected index a280e9d8a..8811d0fb2 100644 --- a/src/test/correct/cjump/gcc_O2/cjump.expected +++ b/src/test/correct/cjump/gcc_O2/cjump.expected @@ -196,5 +196,11 @@ procedure main() assert (L(mem, bvadd64(R1, 4bv64)) ==> Gamma_R2); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 4bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 4bv64), Gamma_R2); assume {:captureState "%000001d0"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected b/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected index c3719ff53..e46100cda 100644 --- a/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected +++ b/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected @@ -220,16 +220,6 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000009a3, lmain_goto_l0000097c; - l0000097c: - assume {:captureState "l0000097c"} true; - R0, Gamma_R0 := 69632bv64, true; - R0, Gamma_R0 := bvadd64(R0, 24bv64), Gamma_R0; - R1, Gamma_R1 := 2bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%00000997"} true; - goto l00000999; l000009a3: assume {:captureState "l000009a3"} true; R0, Gamma_R0 := 69632bv64, true; @@ -243,13 +233,29 @@ procedure main() l00000999: assume {:captureState "l00000999"} true; R0, Gamma_R0 := 0bv64, true; - return; + goto main_return; lmain_goto_l0000097c: assume {:captureState "lmain_goto_l0000097c"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l0000097c; + l0000097c: + assume {:captureState "l0000097c"} true; + R0, Gamma_R0 := 69632bv64, true; + R0, Gamma_R0 := bvadd64(R0, 24bv64), Gamma_R0; + R1, Gamma_R1 := 2bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%00000997"} true; + goto l00000999; + terminate: + assume {:captureState "terminate"} true; + goto terminate; lmain_goto_l000009a3: assume {:captureState "lmain_goto_l000009a3"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000009a3; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/cjump/gcc_pic/cjump.expected b/src/test/correct/cjump/gcc_pic/cjump.expected index 5ca9cc9fa..67d3acb56 100644 --- a/src/test/correct/cjump/gcc_pic/cjump.expected +++ b/src/test/correct/cjump/gcc_pic/cjump.expected @@ -278,17 +278,10 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000340, lmain_goto_l00000368; - l00000340: - assume {:captureState "l00000340"} true; - R0, Gamma_R0 := 65536bv64, true; - call rely(); - R0, Gamma_R0 := memory_load64_le(mem, bvadd64(R0, 4072bv64)), (gamma_load64(Gamma_mem, bvadd64(R0, 4072bv64)) || L(mem, bvadd64(R0, 4072bv64))); - R1, Gamma_R1 := 2bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%0000035c"} true; - goto l0000035e; + lmain_goto_l00000340: + assume {:captureState "lmain_goto_l00000340"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000340; l00000368: assume {:captureState "l00000368"} true; R0, Gamma_R0 := 65536bv64, true; @@ -300,16 +293,29 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%0000037f"} true; goto l0000035e; - l0000035e: - assume {:captureState "l0000035e"} true; - R0, Gamma_R0 := 0bv64, true; - return; - lmain_goto_l00000340: - assume {:captureState "lmain_goto_l00000340"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000340; lmain_goto_l00000368: assume {:captureState "lmain_goto_l00000368"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000368; + l0000035e: + assume {:captureState "l0000035e"} true; + R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000340: + assume {:captureState "l00000340"} true; + R0, Gamma_R0 := 65536bv64, true; + call rely(); + R0, Gamma_R0 := memory_load64_le(mem, bvadd64(R0, 4072bv64)), (gamma_load64(Gamma_mem, bvadd64(R0, 4072bv64)) || L(mem, bvadd64(R0, 4072bv64))); + R1, Gamma_R1 := 2bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%0000035c"} true; + goto l0000035e; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/function/clang/function.expected b/src/test/correct/function/clang/function.expected index 5f0453715..80985a02b 100644 --- a/src/test/correct/function/clang/function.expected +++ b/src/test/correct/function/clang/function.expected @@ -189,6 +189,12 @@ procedure get_two() lget_two: assume {:captureState "lget_two"} true; R0, Gamma_R0 := 2bv64, true; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -320,5 +326,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function/clang_O2/function.expected b/src/test/correct/function/clang_O2/function.expected index fd677be34..4de5fe980 100644 --- a/src/test/correct/function/clang_O2/function.expected +++ b/src/test/correct/function/clang_O2/function.expected @@ -198,5 +198,11 @@ procedure main() assert (L(mem, bvadd64(R10, 56bv64)) ==> Gamma_R11); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R10, 56bv64), R11[32:0]), gamma_store32(Gamma_mem, bvadd64(R10, 56bv64), Gamma_R11); assume {:captureState "%000002f9"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function/clang_no_plt_no_pic/function.expected b/src/test/correct/function/clang_no_plt_no_pic/function.expected index 5f0453715..80985a02b 100644 --- a/src/test/correct/function/clang_no_plt_no_pic/function.expected +++ b/src/test/correct/function/clang_no_plt_no_pic/function.expected @@ -189,6 +189,12 @@ procedure get_two() lget_two: assume {:captureState "lget_two"} true; R0, Gamma_R0 := 2bv64, true; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -320,5 +326,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function/clang_pic/function.expected b/src/test/correct/function/clang_pic/function.expected index 3937a0029..9a2687027 100644 --- a/src/test/correct/function/clang_pic/function.expected +++ b/src/test/correct/function/clang_pic/function.expected @@ -237,6 +237,12 @@ procedure get_two() lget_two: assume {:captureState "lget_two"} true; R0, Gamma_R0 := 2bv64, true; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -404,5 +410,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function/gcc/function.expected b/src/test/correct/function/gcc/function.expected index 81e902be8..329c32c1e 100644 --- a/src/test/correct/function/gcc/function.expected +++ b/src/test/correct/function/gcc/function.expected @@ -188,6 +188,12 @@ procedure get_two() lget_two: assume {:captureState "lget_two"} true; R0, Gamma_R0 := 2bv64, true; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -322,5 +328,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function/gcc_O2/function.expected b/src/test/correct/function/gcc_O2/function.expected index d1f3a9437..879bea546 100644 --- a/src/test/correct/function/gcc_O2/function.expected +++ b/src/test/correct/function/gcc_O2/function.expected @@ -196,5 +196,11 @@ procedure main() assert (L(mem, bvadd64(R1, 4bv64)) ==> Gamma_R2); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 4bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 4bv64), Gamma_R2); assume {:captureState "%000001e4"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function/gcc_no_plt_no_pic/function.expected b/src/test/correct/function/gcc_no_plt_no_pic/function.expected index 81e902be8..329c32c1e 100644 --- a/src/test/correct/function/gcc_no_plt_no_pic/function.expected +++ b/src/test/correct/function/gcc_no_plt_no_pic/function.expected @@ -188,6 +188,12 @@ procedure get_two() lget_two: assume {:captureState "lget_two"} true; R0, Gamma_R0 := 2bv64, true; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -322,5 +328,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function/gcc_pic/function.expected b/src/test/correct/function/gcc_pic/function.expected index ecdb2f43c..3a318b1a5 100644 --- a/src/test/correct/function/gcc_pic/function.expected +++ b/src/test/correct/function/gcc_pic/function.expected @@ -236,6 +236,12 @@ procedure get_two() lget_two: assume {:captureState "lget_two"} true; R0, Gamma_R0 := 2bv64, true; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -404,5 +410,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function1/clang/function1.expected b/src/test/correct/function1/clang/function1.expected index 22620843f..08a0e42b4 100644 --- a/src/test/correct/function1/clang/function1.expected +++ b/src/test/correct/function1/clang/function1.expected @@ -245,6 +245,12 @@ procedure get_two() R8, Gamma_R8 := bvadd64(R8, sign_extend32_32(R9[32:0])), (Gamma_R9 && Gamma_R8); R0, Gamma_R0 := zero_extend32_32(R8[32:0]), Gamma_R8; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -396,6 +402,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function1/clang_O2/function1.expected b/src/test/correct/function1/clang_O2/function1.expected index bddeefebb..08de9f209 100644 --- a/src/test/correct/function1/clang_O2/function1.expected +++ b/src/test/correct/function1/clang_O2/function1.expected @@ -257,12 +257,18 @@ procedure main() R30, Gamma_R30 := 1944bv64, true; call printf(); goto l00000371; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000371: assume {:captureState "l00000371"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function1/clang_no_plt_no_pic/function1.expected b/src/test/correct/function1/clang_no_plt_no_pic/function1.expected index aa6caaf17..35e574523 100644 --- a/src/test/correct/function1/clang_no_plt_no_pic/function1.expected +++ b/src/test/correct/function1/clang_no_plt_no_pic/function1.expected @@ -245,6 +245,12 @@ procedure get_two() R8, Gamma_R8 := bvadd64(R8, sign_extend32_32(R9[32:0])), (Gamma_R9 && Gamma_R8); R0, Gamma_R0 := zero_extend32_32(R8[32:0]), Gamma_R8; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -376,6 +382,13 @@ procedure main() R30, Gamma_R30 := 1968bv64, true; call get_two(); goto l00000adf; + l00000b06: + assume {:captureState "l00000b06"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000adf: assume {:captureState "l00000adf"} true; R8, Gamma_R8 := 69632bv64, true; @@ -390,12 +403,11 @@ procedure main() R30, Gamma_R30 := 1992bv64, true; call printf(); goto l00000b06; - l00000b06: - assume {:captureState "l00000b06"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function1/clang_pic/function1.expected b/src/test/correct/function1/clang_pic/function1.expected index 2c77c2294..998504616 100644 --- a/src/test/correct/function1/clang_pic/function1.expected +++ b/src/test/correct/function1/clang_pic/function1.expected @@ -293,6 +293,12 @@ procedure get_two() R8, Gamma_R8 := bvadd64(R8, sign_extend32_32(R9[32:0])), (Gamma_R9 && Gamma_R8); R0, Gamma_R0 := zero_extend32_32(R8[32:0]), Gamma_R8; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -458,6 +464,13 @@ procedure main() R30, Gamma_R30 := 2036bv64, true; call get_two(); goto l000003dd; + l0000040b: + assume {:captureState "l0000040b"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l000003dd: assume {:captureState "l000003dd"} true; R8, Gamma_R8 := 65536bv64, true; @@ -474,12 +487,11 @@ procedure main() R30, Gamma_R30 := 2064bv64, true; call printf(); goto l0000040b; - l0000040b: - assume {:captureState "l0000040b"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function1/gcc/function1.expected b/src/test/correct/function1/gcc/function1.expected index a95a503aa..a902ed78e 100644 --- a/src/test/correct/function1/gcc/function1.expected +++ b/src/test/correct/function1/gcc/function1.expected @@ -252,6 +252,12 @@ procedure get_two() R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R0, Gamma_R0 := zero_extend32_32(bvadd32(R1[32:0], R0[32:0])), (Gamma_R0 && Gamma_R1); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -417,6 +423,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function1/gcc_O2/function1.expected b/src/test/correct/function1/gcc_O2/function1.expected index 8296db663..3ae3c2281 100644 --- a/src/test/correct/function1/gcc_O2/function1.expected +++ b/src/test/correct/function1/gcc_O2/function1.expected @@ -360,5 +360,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function1/gcc_no_plt_no_pic/function1.expected b/src/test/correct/function1/gcc_no_plt_no_pic/function1.expected index 711e70cf1..e04c37dd9 100644 --- a/src/test/correct/function1/gcc_no_plt_no_pic/function1.expected +++ b/src/test/correct/function1/gcc_no_plt_no_pic/function1.expected @@ -252,6 +252,12 @@ procedure get_two() R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R0, Gamma_R0 := zero_extend32_32(bvadd32(R1[32:0], R0[32:0])), (Gamma_R0 && Gamma_R1); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -417,6 +423,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/function1/gcc_pic/function1.expected b/src/test/correct/function1/gcc_pic/function1.expected index 313d20eac..cf8fbb4b6 100644 --- a/src/test/correct/function1/gcc_pic/function1.expected +++ b/src/test/correct/function1/gcc_pic/function1.expected @@ -300,6 +300,12 @@ procedure get_two() R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R0, Gamma_R0 := zero_extend32_32(bvadd32(R1[32:0], R0[32:0])), (Gamma_R0 && Gamma_R1); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto get_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + get_two_return: + assume {:captureState "get_two_return"} true; return; } @@ -473,6 +479,13 @@ procedure main() R30, Gamma_R30 := 2036bv64, true; call get_two(); goto l000003ed; + l00000433: + assume {:captureState "l00000433"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l000003ed: assume {:captureState "l000003ed"} true; R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; @@ -494,12 +507,11 @@ procedure main() R30, Gamma_R30 := 2080bv64, true; call printf(); goto l00000433; - l00000433: - assume {:captureState "l00000433"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/functions_with_params/clang/functions_with_params.expected b/src/test/correct/functions_with_params/clang/functions_with_params.expected index dfe4dc6cb..78f7ee396 100644 --- a/src/test/correct/functions_with_params/clang/functions_with_params.expected +++ b/src/test/correct/functions_with_params/clang/functions_with_params.expected @@ -235,6 +235,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -323,5 +329,11 @@ procedure plus_one() R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R0, Gamma_R0 := zero_extend32_32(bvadd32(R8[32:0], 1bv32)), Gamma_R8; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto plus_one_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + plus_one_return: + assume {:captureState "plus_one_return"} true; return; } diff --git a/src/test/correct/functions_with_params/clang_O2/functions_with_params.expected b/src/test/correct/functions_with_params/clang_O2/functions_with_params.expected index c92fd296f..82e284cc8 100644 --- a/src/test/correct/functions_with_params/clang_O2/functions_with_params.expected +++ b/src/test/correct/functions_with_params/clang_O2/functions_with_params.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/functions_with_params/clang_no_plt_no_pic/functions_with_params.expected b/src/test/correct/functions_with_params/clang_no_plt_no_pic/functions_with_params.expected index 1136a902b..bc9463c3c 100644 --- a/src/test/correct/functions_with_params/clang_no_plt_no_pic/functions_with_params.expected +++ b/src/test/correct/functions_with_params/clang_no_plt_no_pic/functions_with_params.expected @@ -235,6 +235,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -323,5 +329,11 @@ procedure plus_one() R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R0, Gamma_R0 := zero_extend32_32(bvadd32(R8[32:0], 1bv32)), Gamma_R8; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto plus_one_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + plus_one_return: + assume {:captureState "plus_one_return"} true; return; } diff --git a/src/test/correct/functions_with_params/clang_pic/functions_with_params.expected b/src/test/correct/functions_with_params/clang_pic/functions_with_params.expected index 1136a902b..bc9463c3c 100644 --- a/src/test/correct/functions_with_params/clang_pic/functions_with_params.expected +++ b/src/test/correct/functions_with_params/clang_pic/functions_with_params.expected @@ -235,6 +235,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -323,5 +329,11 @@ procedure plus_one() R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R0, Gamma_R0 := zero_extend32_32(bvadd32(R8[32:0], 1bv32)), Gamma_R8; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto plus_one_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + plus_one_return: + assume {:captureState "plus_one_return"} true; return; } diff --git a/src/test/correct/functions_with_params/gcc/functions_with_params.expected b/src/test/correct/functions_with_params/gcc/functions_with_params.expected index 284845f2f..346b137c8 100644 --- a/src/test/correct/functions_with_params/gcc/functions_with_params.expected +++ b/src/test/correct/functions_with_params/gcc/functions_with_params.expected @@ -230,6 +230,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -318,5 +324,11 @@ procedure plus_one() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 1bv32)), Gamma_R0; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto plus_one_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + plus_one_return: + assume {:captureState "plus_one_return"} true; return; } diff --git a/src/test/correct/functions_with_params/gcc_O2/functions_with_params.expected b/src/test/correct/functions_with_params/gcc_O2/functions_with_params.expected index 031602cf6..79ad5fd8f 100644 --- a/src/test/correct/functions_with_params/gcc_O2/functions_with_params.expected +++ b/src/test/correct/functions_with_params/gcc_O2/functions_with_params.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/functions_with_params/gcc_no_plt_no_pic/functions_with_params.expected b/src/test/correct/functions_with_params/gcc_no_plt_no_pic/functions_with_params.expected index 03251913e..4b400c996 100644 --- a/src/test/correct/functions_with_params/gcc_no_plt_no_pic/functions_with_params.expected +++ b/src/test/correct/functions_with_params/gcc_no_plt_no_pic/functions_with_params.expected @@ -230,6 +230,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -318,5 +324,11 @@ procedure plus_one() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 1bv32)), Gamma_R0; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto plus_one_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + plus_one_return: + assume {:captureState "plus_one_return"} true; return; } diff --git a/src/test/correct/functions_with_params/gcc_pic/functions_with_params.expected b/src/test/correct/functions_with_params/gcc_pic/functions_with_params.expected index 03251913e..4b400c996 100644 --- a/src/test/correct/functions_with_params/gcc_pic/functions_with_params.expected +++ b/src/test/correct/functions_with_params/gcc_pic/functions_with_params.expected @@ -230,6 +230,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -318,5 +324,11 @@ procedure plus_one() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 1bv32)), Gamma_R0; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto plus_one_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + plus_one_return: + assume {:captureState "plus_one_return"} true; return; } diff --git a/src/test/correct/ifbranches/clang/ifbranches.expected b/src/test/correct/ifbranches/clang/ifbranches.expected index f43c98adb..d5dfd11c3 100644 --- a/src/test/correct/ifbranches/clang/ifbranches.expected +++ b/src/test/correct/ifbranches/clang/ifbranches.expected @@ -231,29 +231,35 @@ procedure main() assume {:captureState "l0000034f"} true; R8, Gamma_R8 := 1bv64, true; goto l00000352; - l0000034c: - assume {:captureState "l0000034c"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000352; + l00000352_goto_l00000397: + assume {:captureState "l00000352_goto_l00000397"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000397; + lmain_goto_l0000034c: + assume {:captureState "lmain_goto_l0000034c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000034c; + lmain_goto_l0000034f: + assume {:captureState "lmain_goto_l0000034f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000034f; + l00000397: + assume {:captureState "l00000397"} true; + goto l00000398; l00000352: assume {:captureState "l00000352"} true; assert Gamma_R8; goto l00000352_goto_l0000035a, l00000352_goto_l00000397; - l0000035a: - assume {:captureState "l0000035a"} true; - R8, Gamma_R8 := 2bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); - assume {:captureState "%0000036a"} true; - goto l0000036d; - l00000397: - assume {:captureState "l00000397"} true; - goto l00000398; l00000398: assume {:captureState "l00000398"} true; R8, Gamma_R8 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); assume {:captureState "%000003a6"} true; goto l0000036d; + l00000352_goto_l0000035a: + assume {:captureState "l00000352_goto_l0000035a"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000035a; l0000036d: assume {:captureState "l0000036d"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); @@ -262,21 +268,21 @@ procedure main() assume {:captureState "%00000383"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + l0000034c: + assume {:captureState "l0000034c"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000352; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l0000035a: + assume {:captureState "l0000035a"} true; + R8, Gamma_R8 := 2bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); + assume {:captureState "%0000036a"} true; + goto l0000036d; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l0000034c: - assume {:captureState "lmain_goto_l0000034c"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000034c; - lmain_goto_l0000034f: - assume {:captureState "lmain_goto_l0000034f"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000034f; - l00000352_goto_l0000035a: - assume {:captureState "l00000352_goto_l0000035a"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l0000035a; - l00000352_goto_l00000397: - assume {:captureState "l00000352_goto_l00000397"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000397; } diff --git a/src/test/correct/ifbranches/clang_O2/ifbranches.expected b/src/test/correct/ifbranches/clang_O2/ifbranches.expected index 4617d4c7f..69405008f 100644 --- a/src/test/correct/ifbranches/clang_O2/ifbranches.expected +++ b/src/test/correct/ifbranches/clang_O2/ifbranches.expected @@ -184,23 +184,29 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000002db, lmain_goto_l000002df; + lmain_goto_l000002db: + assume {:captureState "lmain_goto_l000002db"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000002db; l000002df: assume {:captureState "l000002df"} true; R0, Gamma_R0 := zero_extend32_32(bvadd32(R8[32:0], 1bv32)), Gamma_R8; goto l000002e2; + lmain_goto_l000002df: + assume {:captureState "lmain_goto_l000002df"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000002df; l000002db: assume {:captureState "l000002db"} true; R0, Gamma_R0 := zero_extend32_32(R8[32:0]), Gamma_R8; goto l000002e2; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000002e2: assume {:captureState "l000002e2"} true; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l000002db: - assume {:captureState "lmain_goto_l000002db"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000002db; - lmain_goto_l000002df: - assume {:captureState "lmain_goto_l000002df"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000002df; } diff --git a/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected b/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected index 852ead596..f18274e41 100644 --- a/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected @@ -227,24 +227,10 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000009b8, lmain_goto_l000009bb; - l000009bb: - assume {:captureState "l000009bb"} true; - R8, Gamma_R8 := 1bv64, true; - goto l000009be; - l000009b8: - assume {:captureState "l000009b8"} true; - R8, Gamma_R8 := 0bv64, true; - goto l000009be; - l000009be: - assume {:captureState "l000009be"} true; - assert Gamma_R8; - goto l000009be_goto_l000009c6, l000009be_goto_l00000a03; - l000009c6: - assume {:captureState "l000009c6"} true; - R8, Gamma_R8 := 2bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); - assume {:captureState "%000009d6"} true; - goto l000009d9; + l000009be_goto_l000009c6: + assume {:captureState "l000009be_goto_l000009c6"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000009c6; l00000a03: assume {:captureState "l00000a03"} true; goto l00000a04; @@ -254,6 +240,10 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); assume {:captureState "%00000a12"} true; goto l000009d9; + lmain_goto_l000009bb: + assume {:captureState "lmain_goto_l000009bb"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009bb; l000009d9: assume {:captureState "l000009d9"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); @@ -262,21 +252,37 @@ procedure main() assume {:captureState "%000009ef"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; + goto main_return; + l000009b8: + assume {:captureState "l000009b8"} true; + R8, Gamma_R8 := 0bv64, true; + goto l000009be; + l000009c6: + assume {:captureState "l000009c6"} true; + R8, Gamma_R8 := 2bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); + assume {:captureState "%000009d6"} true; + goto l000009d9; lmain_goto_l000009b8: assume {:captureState "lmain_goto_l000009b8"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000009b8; - lmain_goto_l000009bb: - assume {:captureState "lmain_goto_l000009bb"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000009bb; - l000009be_goto_l000009c6: - assume {:captureState "l000009be_goto_l000009c6"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l000009c6; + l000009bb: + assume {:captureState "l000009bb"} true; + R8, Gamma_R8 := 1bv64, true; + goto l000009be; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000009be_goto_l00000a03: assume {:captureState "l000009be_goto_l00000a03"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000a03; + l000009be: + assume {:captureState "l000009be"} true; + assert Gamma_R8; + goto l000009be_goto_l000009c6, l000009be_goto_l00000a03; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifbranches/clang_pic/ifbranches.expected b/src/test/correct/ifbranches/clang_pic/ifbranches.expected index 852ead596..f18274e41 100644 --- a/src/test/correct/ifbranches/clang_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/clang_pic/ifbranches.expected @@ -227,24 +227,10 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000009b8, lmain_goto_l000009bb; - l000009bb: - assume {:captureState "l000009bb"} true; - R8, Gamma_R8 := 1bv64, true; - goto l000009be; - l000009b8: - assume {:captureState "l000009b8"} true; - R8, Gamma_R8 := 0bv64, true; - goto l000009be; - l000009be: - assume {:captureState "l000009be"} true; - assert Gamma_R8; - goto l000009be_goto_l000009c6, l000009be_goto_l00000a03; - l000009c6: - assume {:captureState "l000009c6"} true; - R8, Gamma_R8 := 2bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); - assume {:captureState "%000009d6"} true; - goto l000009d9; + l000009be_goto_l000009c6: + assume {:captureState "l000009be_goto_l000009c6"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000009c6; l00000a03: assume {:captureState "l00000a03"} true; goto l00000a04; @@ -254,6 +240,10 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); assume {:captureState "%00000a12"} true; goto l000009d9; + lmain_goto_l000009bb: + assume {:captureState "lmain_goto_l000009bb"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009bb; l000009d9: assume {:captureState "l000009d9"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); @@ -262,21 +252,37 @@ procedure main() assume {:captureState "%000009ef"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; + goto main_return; + l000009b8: + assume {:captureState "l000009b8"} true; + R8, Gamma_R8 := 0bv64, true; + goto l000009be; + l000009c6: + assume {:captureState "l000009c6"} true; + R8, Gamma_R8 := 2bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); + assume {:captureState "%000009d6"} true; + goto l000009d9; lmain_goto_l000009b8: assume {:captureState "lmain_goto_l000009b8"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000009b8; - lmain_goto_l000009bb: - assume {:captureState "lmain_goto_l000009bb"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000009bb; - l000009be_goto_l000009c6: - assume {:captureState "l000009be_goto_l000009c6"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l000009c6; + l000009bb: + assume {:captureState "l000009bb"} true; + R8, Gamma_R8 := 1bv64, true; + goto l000009be; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000009be_goto_l00000a03: assume {:captureState "l000009be_goto_l00000a03"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000a03; + l000009be: + assume {:captureState "l000009be"} true; + assert Gamma_R8; + goto l000009be_goto_l000009c6, l000009be_goto_l00000a03; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifbranches/gcc/ifbranches.expected b/src/test/correct/ifbranches/gcc/ifbranches.expected index fc4b3fe3b..85bf7ce5a 100644 --- a/src/test/correct/ifbranches/gcc/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc/ifbranches.expected @@ -222,12 +222,10 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000369, lmain_goto_l00000330; - l00000330: - assume {:captureState "l00000330"} true; - R0, Gamma_R0 := 2bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 24bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); - assume {:captureState "%00000340"} true; - goto l00000342; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000330; l00000369: assume {:captureState "l00000369"} true; R0, Gamma_R0 := 1bv64, true; @@ -242,13 +240,21 @@ procedure main() assume {:captureState "%00000355"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l00000330: - assume {:captureState "lmain_goto_l00000330"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000330; + goto main_return; + l00000330: + assume {:captureState "l00000330"} true; + R0, Gamma_R0 := 2bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 24bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); + assume {:captureState "%00000340"} true; + goto l00000342; lmain_goto_l00000369: assume {:captureState "lmain_goto_l00000369"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000369; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifbranches/gcc_O2/ifbranches.expected b/src/test/correct/ifbranches/gcc_O2/ifbranches.expected index 6a212af81..51a188d46 100644 --- a/src/test/correct/ifbranches/gcc_O2/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc_O2/ifbranches.expected @@ -181,24 +181,30 @@ procedure main() NF, Gamma_NF := bvadd32(#1, 1bv32)[32:31], Gamma_#1; assert Gamma_ZF; goto lmain_goto_l000001c3, lmain_goto_l000001c6; + lmain_goto_l000001c3: + assume {:captureState "lmain_goto_l000001c3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000001c3; l000001c6: assume {:captureState "l000001c6"} true; R0, Gamma_R0 := 1bv64, true; goto l000001c9; - l000001c3: - assume {:captureState "l000001c3"} true; - R0, Gamma_R0 := 0bv64, true; - goto l000001c9; l000001c9: assume {:captureState "l000001c9"} true; R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 2bv32)), Gamma_R0; - return; - lmain_goto_l000001c3: - assume {:captureState "lmain_goto_l000001c3"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000001c3; + goto main_return; lmain_goto_l000001c6: assume {:captureState "lmain_goto_l000001c6"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000001c6; + l000001c3: + assume {:captureState "l000001c3"} true; + R0, Gamma_R0 := 0bv64, true; + goto l000001c9; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected b/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected index da091cc0a..a642b9102 100644 --- a/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected @@ -228,12 +228,10 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 24bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); assume {:captureState "%00000973"} true; goto l00000975; - l0000099c: - assume {:captureState "l0000099c"} true; - R0, Gamma_R0 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 24bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); - assume {:captureState "%000009a7"} true; - goto l00000975; + lmain_goto_l0000099c: + assume {:captureState "lmain_goto_l0000099c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000099c; l00000975: assume {:captureState "l00000975"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 24bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 24bv64)); @@ -242,13 +240,21 @@ procedure main() assume {:captureState "%00000988"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; + goto main_return; + l0000099c: + assume {:captureState "l0000099c"} true; + R0, Gamma_R0 := 1bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 24bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); + assume {:captureState "%000009a7"} true; + goto l00000975; lmain_goto_l00000963: assume {:captureState "lmain_goto_l00000963"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l00000963; - lmain_goto_l0000099c: - assume {:captureState "lmain_goto_l0000099c"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l0000099c; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifbranches/gcc_pic/ifbranches.expected b/src/test/correct/ifbranches/gcc_pic/ifbranches.expected index da091cc0a..a642b9102 100644 --- a/src/test/correct/ifbranches/gcc_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc_pic/ifbranches.expected @@ -228,12 +228,10 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 24bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); assume {:captureState "%00000973"} true; goto l00000975; - l0000099c: - assume {:captureState "l0000099c"} true; - R0, Gamma_R0 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 24bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); - assume {:captureState "%000009a7"} true; - goto l00000975; + lmain_goto_l0000099c: + assume {:captureState "lmain_goto_l0000099c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000099c; l00000975: assume {:captureState "l00000975"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 24bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 24bv64)); @@ -242,13 +240,21 @@ procedure main() assume {:captureState "%00000988"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; + goto main_return; + l0000099c: + assume {:captureState "l0000099c"} true; + R0, Gamma_R0 := 1bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 24bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); + assume {:captureState "%000009a7"} true; + goto l00000975; lmain_goto_l00000963: assume {:captureState "lmain_goto_l00000963"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l00000963; - lmain_goto_l0000099c: - assume {:captureState "lmain_goto_l0000099c"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l0000099c; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifglobal/clang/ifglobal.expected b/src/test/correct/ifglobal/clang/ifglobal.expected index 70d46adf3..2772c52d5 100644 --- a/src/test/correct/ifglobal/clang/ifglobal.expected +++ b/src/test/correct/ifglobal/clang/ifglobal.expected @@ -220,49 +220,55 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000031e, lmain_goto_l00000321; - l00000321: - assume {:captureState "l00000321"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000324; - l0000031e: - assume {:captureState "l0000031e"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000324; + l00000324_goto_l0000032c: + assume {:captureState "l00000324_goto_l0000032c"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000032c; l00000324: assume {:captureState "l00000324"} true; assert Gamma_R8; goto l00000324_goto_l0000032c, l00000324_goto_l00000343; - l00000343: - assume {:captureState "l00000343"} true; - goto l00000344; - l00000344: - assume {:captureState "l00000344"} true; - R8, Gamma_R8 := 1bv64, true; - R9, Gamma_R9 := 69632bv64, true; - call rely(); - assert (L(mem, bvadd64(R9, 52bv64)) ==> Gamma_R8); - mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 52bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 52bv64), Gamma_R8); - assume {:captureState "%00000357"} true; - goto l0000032c; l0000032c: assume {:captureState "l0000032c"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l0000031e: - assume {:captureState "lmain_goto_l0000031e"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000031e; + goto main_return; lmain_goto_l00000321: assume {:captureState "lmain_goto_l00000321"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000321; - l00000324_goto_l0000032c: - assume {:captureState "l00000324_goto_l0000032c"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l0000032c; l00000324_goto_l00000343: assume {:captureState "l00000324_goto_l00000343"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000343; + l0000031e: + assume {:captureState "l0000031e"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000324; + lmain_goto_l0000031e: + assume {:captureState "lmain_goto_l0000031e"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000031e; + l00000344: + assume {:captureState "l00000344"} true; + R8, Gamma_R8 := 1bv64, true; + R9, Gamma_R9 := 69632bv64, true; + call rely(); + assert (L(mem, bvadd64(R9, 52bv64)) ==> Gamma_R8); + mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 52bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 52bv64), Gamma_R8); + assume {:captureState "%00000357"} true; + goto l0000032c; + l00000321: + assume {:captureState "l00000321"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000324; + l00000343: + assume {:captureState "l00000343"} true; + goto l00000344; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifglobal/clang_O2/ifglobal.expected b/src/test/correct/ifglobal/clang_O2/ifglobal.expected index 2181d6c4f..af49c16ff 100644 --- a/src/test/correct/ifglobal/clang_O2/ifglobal.expected +++ b/src/test/correct/ifglobal/clang_O2/ifglobal.expected @@ -188,6 +188,18 @@ procedure main() R9, Gamma_R9 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 52bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 52bv64)) || L(mem, bvadd64(R8, 52bv64))); assert Gamma_R9; goto lmain_goto_l000002dc, lmain_goto_l000002f8; + lmain_goto_l000002dc: + assume {:captureState "lmain_goto_l000002dc"} true; + assume (bvcomp32(R9[32:0], 0bv32) != 0bv1); + goto l000002dc; + l000002f8: + assume {:captureState "l000002f8"} true; + R0, Gamma_R0 := 0bv64, true; + goto main_return; + lmain_goto_l000002f8: + assume {:captureState "lmain_goto_l000002f8"} true; + assume (bvcomp32(R9[32:0], 0bv32) == 0bv1); + goto l000002f8; l000002dc: assume {:captureState "l000002dc"} true; R9, Gamma_R9 := 1bv64, true; @@ -196,17 +208,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 52bv64), R9[32:0]), gamma_store32(Gamma_mem, bvadd64(R8, 52bv64), Gamma_R9); assume {:captureState "%000002ec"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - l000002f8: - assume {:captureState "l000002f8"} true; - R0, Gamma_R0 := 0bv64, true; - return; - lmain_goto_l000002dc: - assume {:captureState "lmain_goto_l000002dc"} true; - assume (bvcomp32(R9[32:0], 0bv32) != 0bv1); - goto l000002dc; - lmain_goto_l000002f8: - assume {:captureState "lmain_goto_l000002f8"} true; - assume (bvcomp32(R9[32:0], 0bv32) == 0bv1); - goto l000002f8; } diff --git a/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected b/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected index c434815ef..edfe619a2 100644 --- a/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected @@ -220,14 +220,15 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000930, lmain_goto_l0000092d; - l00000930: - assume {:captureState "l00000930"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000933; l0000092d: assume {:captureState "l0000092d"} true; R8, Gamma_R8 := 0bv64, true; goto l00000933; + l0000093b: + assume {:captureState "l0000093b"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000933: assume {:captureState "l00000933"} true; assert Gamma_R8; @@ -235,6 +236,10 @@ procedure main() l00000952: assume {:captureState "l00000952"} true; goto l00000953; + l00000930: + assume {:captureState "l00000930"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000933; l00000953: assume {:captureState "l00000953"} true; R8, Gamma_R8 := 1bv64, true; @@ -244,25 +249,26 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 52bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 52bv64), Gamma_R8); assume {:captureState "%00000966"} true; goto l0000093b; - l0000093b: - assume {:captureState "l0000093b"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l0000092d: - assume {:captureState "lmain_goto_l0000092d"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000092d; - lmain_goto_l00000930: - assume {:captureState "lmain_goto_l00000930"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000930; l00000933_goto_l0000093b: assume {:captureState "l00000933_goto_l0000093b"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l0000093b; + lmain_goto_l00000930: + assume {:captureState "lmain_goto_l00000930"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000930; l00000933_goto_l00000952: assume {:captureState "l00000933_goto_l00000952"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000952; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + lmain_goto_l0000092d: + assume {:captureState "lmain_goto_l0000092d"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000092d; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifglobal/clang_pic/ifglobal.expected b/src/test/correct/ifglobal/clang_pic/ifglobal.expected index f58241469..54a4b38a4 100644 --- a/src/test/correct/ifglobal/clang_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/clang_pic/ifglobal.expected @@ -254,21 +254,18 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000330, lmain_goto_l0000032d; - l00000330: - assume {:captureState "l00000330"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000333; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000330; l0000032d: assume {:captureState "l0000032d"} true; R8, Gamma_R8 := 0bv64, true; goto l00000333; - l00000333: - assume {:captureState "l00000333"} true; - assert Gamma_R8; - goto l00000333_goto_l0000033b, l00000333_goto_l00000352; - l00000352: - assume {:captureState "l00000352"} true; - goto l00000353; + lmain_goto_l0000032d: + assume {:captureState "lmain_goto_l0000032d"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000032d; l00000353: assume {:captureState "l00000353"} true; R8, Gamma_R8 := 1bv64, true; @@ -280,19 +277,25 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R9, R8[32:0]), gamma_store32(Gamma_mem, R9, Gamma_R8); assume {:captureState "%0000036d"} true; goto l0000033b; + l00000352: + assume {:captureState "l00000352"} true; + goto l00000353; + l00000330: + assume {:captureState "l00000330"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000333; + l00000333: + assume {:captureState "l00000333"} true; + assert Gamma_R8; + goto l00000333_goto_l0000033b, l00000333_goto_l00000352; l0000033b: assume {:captureState "l0000033b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l0000032d: - assume {:captureState "lmain_goto_l0000032d"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000032d; - lmain_goto_l00000330: - assume {:captureState "lmain_goto_l00000330"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000330; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000333_goto_l0000033b: assume {:captureState "l00000333_goto_l0000033b"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); @@ -301,4 +304,7 @@ procedure main() assume {:captureState "l00000333_goto_l00000352"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000352; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifglobal/gcc/ifglobal.expected b/src/test/correct/ifglobal/gcc/ifglobal.expected index ca03efa47..0e88f79c5 100644 --- a/src/test/correct/ifglobal/gcc/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc/ifglobal.expected @@ -209,6 +209,18 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000311, lmain_goto_l00000302; + l00000302: + assume {:captureState "l00000302"} true; + R0, Gamma_R0 := 0bv64, true; + goto main_return; + lmain_goto_l00000311: + assume {:captureState "lmain_goto_l00000311"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000311; + lmain_goto_l00000302: + assume {:captureState "lmain_goto_l00000302"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000302; l00000311: assume {:captureState "l00000311"} true; R0, Gamma_R0 := 69632bv64, true; @@ -219,16 +231,10 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%00000327"} true; goto l00000302; - l00000302: - assume {:captureState "l00000302"} true; - R0, Gamma_R0 := 0bv64, true; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l00000302: - assume {:captureState "lmain_goto_l00000302"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000302; - lmain_goto_l00000311: - assume {:captureState "lmain_goto_l00000311"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000311; } diff --git a/src/test/correct/ifglobal/gcc_O2/ifglobal.expected b/src/test/correct/ifglobal/gcc_O2/ifglobal.expected index 07170dee4..b535d3144 100644 --- a/src/test/correct/ifglobal/gcc_O2/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc_O2/ifglobal.expected @@ -187,6 +187,14 @@ procedure main() R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, bvadd64(R0, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R0, 20bv64)) || L(mem, bvadd64(R0, 20bv64))); assert Gamma_R1; goto lmain_goto_l000001b7, lmain_goto_l00000396; + lmain_goto_l00000396: + assume {:captureState "lmain_goto_l00000396"} true; + assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); + goto l00000396; + l000001b7: + assume {:captureState "l000001b7"} true; + R0, Gamma_R0 := 0bv64, true; + goto main_return; l00000396: assume {:captureState "l00000396"} true; R1, Gamma_R1 := 1bv64, true; @@ -195,16 +203,14 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R0, 20bv64), R1[32:0]), gamma_store32(Gamma_mem, bvadd64(R0, 20bv64), Gamma_R1); assume {:captureState "%000003a1"} true; goto l000001b7; - l000001b7: - assume {:captureState "l000001b7"} true; - R0, Gamma_R0 := 0bv64, true; - return; lmain_goto_l000001b7: assume {:captureState "lmain_goto_l000001b7"} true; assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1); goto l000001b7; - lmain_goto_l00000396: - assume {:captureState "lmain_goto_l00000396"} true; - assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); - goto l00000396; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected b/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected index 643fff971..5aaf4942c 100644 --- a/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected @@ -209,6 +209,10 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000008e5, lmain_goto_l000008d6; + l000008d6: + assume {:captureState "l000008d6"} true; + R0, Gamma_R0 := 0bv64, true; + goto main_return; l000008e5: assume {:captureState "l000008e5"} true; R0, Gamma_R0 := 69632bv64, true; @@ -219,16 +223,18 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%000008fb"} true; goto l000008d6; - l000008d6: - assume {:captureState "l000008d6"} true; - R0, Gamma_R0 := 0bv64, true; - return; - lmain_goto_l000008d6: - assume {:captureState "lmain_goto_l000008d6"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l000008d6; lmain_goto_l000008e5: assume {:captureState "lmain_goto_l000008e5"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000008e5; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + lmain_goto_l000008d6: + assume {:captureState "lmain_goto_l000008d6"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000008d6; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/ifglobal/gcc_pic/ifglobal.expected b/src/test/correct/ifglobal/gcc_pic/ifglobal.expected index 66adb7f43..cbf9a5a8d 100644 --- a/src/test/correct/ifglobal/gcc_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc_pic/ifglobal.expected @@ -256,13 +256,19 @@ procedure main() l00000303: assume {:captureState "l00000303"} true; R0, Gamma_R0 := 0bv64, true; - return; - lmain_goto_l00000303: - assume {:captureState "lmain_goto_l00000303"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000303; + goto main_return; lmain_goto_l00000312: assume {:captureState "lmain_goto_l00000312"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000312; + lmain_goto_l00000303: + assume {:captureState "lmain_goto_l00000303"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000303; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/indirect_call/clang_O2/indirect_call.expected b/src/test/correct/indirect_call/clang_O2/indirect_call.expected index d04773ed9..1f854f847 100644 --- a/src/test/correct/indirect_call/clang_O2/indirect_call.expected +++ b/src/test/correct/indirect_call/clang_O2/indirect_call.expected @@ -342,6 +342,12 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/indirect_call/gcc_O2/indirect_call.expected b/src/test/correct/indirect_call/gcc_O2/indirect_call.expected index 992bdfc81..5b6a59856 100644 --- a/src/test/correct/indirect_call/gcc_O2/indirect_call.expected +++ b/src/test/correct/indirect_call/gcc_O2/indirect_call.expected @@ -318,6 +318,12 @@ procedure greet() call puts(); //no return target assume false; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + greet_return: + assume {:captureState "greet_return"} true; + return; } procedure main() @@ -527,17 +533,23 @@ procedure main() R30, Gamma_R30 := 1620bv64, true; call puts(); goto l000001ef; - l000001ef: - assume {:captureState "l000001ef"} true; - R30, Gamma_R30 := 1624bv64, true; - call greet(); - goto l00000205; l00000205: assume {:captureState "l00000205"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l000001ef: + assume {:captureState "l000001ef"} true; + R30, Gamma_R30 := 1624bv64, true; + call greet(); + goto l00000205; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/initialisation/clang/initialisation.expected b/src/test/correct/initialisation/clang/initialisation.expected index 4a8b8a7ad..9806722fd 100644 --- a/src/test/correct/initialisation/clang/initialisation.expected +++ b/src/test/correct/initialisation/clang/initialisation.expected @@ -305,5 +305,11 @@ procedure main() mem, Gamma_mem := memory_store8_le(mem, bvadd64(R9, 52bv64), R8[8:0]), gamma_store8(Gamma_mem, bvadd64(R9, 52bv64), Gamma_R8); assume {:captureState "%00000381"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/initialisation/clang_O2/initialisation.expected b/src/test/correct/initialisation/clang_O2/initialisation.expected index 5bbd94028..566c1977f 100644 --- a/src/test/correct/initialisation/clang_O2/initialisation.expected +++ b/src/test/correct/initialisation/clang_O2/initialisation.expected @@ -291,5 +291,11 @@ procedure main() assert (L(mem, bvadd64(R12, 52bv64)) ==> Gamma_R10); mem, Gamma_mem := memory_store8_le(mem, bvadd64(R12, 52bv64), R10[8:0]), gamma_store8(Gamma_mem, bvadd64(R12, 52bv64), Gamma_R10); assume {:captureState "%00000367"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/initialisation/clang_no_plt_no_pic/initialisation.expected b/src/test/correct/initialisation/clang_no_plt_no_pic/initialisation.expected index 2487e0171..ba1dbdd5a 100644 --- a/src/test/correct/initialisation/clang_no_plt_no_pic/initialisation.expected +++ b/src/test/correct/initialisation/clang_no_plt_no_pic/initialisation.expected @@ -305,5 +305,11 @@ procedure main() mem, Gamma_mem := memory_store8_le(mem, bvadd64(R9, 52bv64), R8[8:0]), gamma_store8(Gamma_mem, bvadd64(R9, 52bv64), Gamma_R8); assume {:captureState "%000009c9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/initialisation/clang_pic/initialisation.expected b/src/test/correct/initialisation/clang_pic/initialisation.expected index 6fb983d9b..edfff2997 100644 --- a/src/test/correct/initialisation/clang_pic/initialisation.expected +++ b/src/test/correct/initialisation/clang_pic/initialisation.expected @@ -405,5 +405,11 @@ procedure main() mem, Gamma_mem := memory_store8_le(mem, R9, R8[8:0]), gamma_store8(Gamma_mem, R9, Gamma_R8); assume {:captureState "%0000039a"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/initialisation/gcc/initialisation.expected b/src/test/correct/initialisation/gcc/initialisation.expected index cd8f95208..76f16a5e6 100644 --- a/src/test/correct/initialisation/gcc/initialisation.expected +++ b/src/test/correct/initialisation/gcc/initialisation.expected @@ -289,5 +289,11 @@ procedure main() mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); assume {:captureState "%000003d6"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/initialisation/gcc_O2/initialisation.expected b/src/test/correct/initialisation/gcc_O2/initialisation.expected index 0b0da4f5d..765b0e105 100644 --- a/src/test/correct/initialisation/gcc_O2/initialisation.expected +++ b/src/test/correct/initialisation/gcc_O2/initialisation.expected @@ -285,5 +285,11 @@ procedure main() assert (L(mem, bvadd64(R1, 24bv64)) ==> Gamma_R2); mem, Gamma_mem := memory_store8_le(mem, bvadd64(R1, 24bv64), R2[8:0]), gamma_store8(Gamma_mem, bvadd64(R1, 24bv64), Gamma_R2); assume {:captureState "%0000020a"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/initialisation/gcc_no_plt_no_pic/initialisation.expected b/src/test/correct/initialisation/gcc_no_plt_no_pic/initialisation.expected index 418adaae6..babee9188 100644 --- a/src/test/correct/initialisation/gcc_no_plt_no_pic/initialisation.expected +++ b/src/test/correct/initialisation/gcc_no_plt_no_pic/initialisation.expected @@ -289,5 +289,11 @@ procedure main() mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); assume {:captureState "%00000a89"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/initialisation/gcc_pic/initialisation.expected b/src/test/correct/initialisation/gcc_pic/initialisation.expected index 4f95961a3..f5cc117c9 100644 --- a/src/test/correct/initialisation/gcc_pic/initialisation.expected +++ b/src/test/correct/initialisation/gcc_pic/initialisation.expected @@ -393,5 +393,11 @@ procedure main() mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); assume {:captureState "%000003de"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/jumptable/clang_O2/jumptable.expected b/src/test/correct/jumptable/clang_O2/jumptable.expected index 8de643ece..d6fac803d 100644 --- a/src/test/correct/jumptable/clang_O2/jumptable.expected +++ b/src/test/correct/jumptable/clang_O2/jumptable.expected @@ -198,5 +198,11 @@ procedure main() assert (L(mem, bvadd64(R8, 48bv64)) ==> Gamma_R9); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 48bv64), R9[32:0]), gamma_store32(Gamma_mem, bvadd64(R8, 48bv64), Gamma_R9); assume {:captureState "%00000378"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/jumptable/gcc_O2/jumptable.expected b/src/test/correct/jumptable/gcc_O2/jumptable.expected index 0b02b32d3..60e368f18 100644 --- a/src/test/correct/jumptable/gcc_O2/jumptable.expected +++ b/src/test/correct/jumptable/gcc_O2/jumptable.expected @@ -199,6 +199,12 @@ procedure add_six() assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); assume {:captureState "%00000252"} true; + goto add_six_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + add_six_return: + assume {:captureState "add_six_return"} true; return; } @@ -287,6 +293,12 @@ procedure add_two() assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); assume {:captureState "%00000233"} true; + goto add_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + add_two_return: + assume {:captureState "add_two_return"} true; return; } @@ -403,22 +415,28 @@ procedure main() R30, Gamma_R30 := 1548bv64, true; call add_two(); goto l0000027c; - l0000027c: - assume {:captureState "l0000027c"} true; - R30, Gamma_R30 := 1552bv64, true; - call add_six(); - goto l00000283; - l00000283: - assume {:captureState "l00000283"} true; - R30, Gamma_R30 := 1556bv64, true; - call sub_seven(); - goto l0000028a; l0000028a: assume {:captureState "l0000028a"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000283: + assume {:captureState "l00000283"} true; + R30, Gamma_R30 := 1556bv64, true; + call sub_seven(); + goto l0000028a; + l0000027c: + assume {:captureState "l0000027c"} true; + R30, Gamma_R30 := 1552bv64, true; + call add_six(); + goto l00000283; + main_return: + assume {:captureState "main_return"} true; return; } @@ -507,5 +525,11 @@ procedure sub_seven() assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); assume {:captureState "%00000275"} true; + goto sub_seven_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + sub_seven_return: + assume {:captureState "sub_seven_return"} true; return; } diff --git a/src/test/correct/jumptable3/gcc/jumptable3.expected b/src/test/correct/jumptable3/gcc/jumptable3.expected index 0fa14fbeb..09b2a2fc4 100644 --- a/src/test/correct/jumptable3/gcc/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc/jumptable3.expected @@ -206,6 +206,12 @@ procedure add_six() assert (L(mem, R0) ==> Gamma_R1); mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%00000511"} true; + goto add_six_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + add_six_return: + assume {:captureState "add_six_return"} true; return; } @@ -297,6 +303,12 @@ procedure add_two() assert (L(mem, R0) ==> Gamma_R1); mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%000004df"} true; + goto add_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + add_two_return: + assume {:captureState "add_two_return"} true; return; } @@ -475,16 +487,53 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto lmain_goto_l000005e0, lmain_goto_l00000599; - l000005e0: - assume {:captureState "l000005e0"} true; + l00000758_goto_l000005d7: + assume {:captureState "l00000758_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l000006a3: + assume {:captureState "l000006a3"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #6, Gamma_#6 := bvadd32(R0[32:0], 4294967284bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934581bv33))), (Gamma_R0 && Gamma_#6); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#6); - ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; - NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; + #10, Gamma_#10 := bvadd32(R0[32:0], 4294967286bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934583bv33))), (Gamma_R0 && Gamma_#10); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#10); + ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; + NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000005e0_goto_l000005d7, l000005e0_goto_l00000608; + goto l000006a3_goto_l000005d7, l000006a3_goto_l000006cb; + l0000088a_goto_l000008ab: + assume {:captureState "l0000088a_goto_l000008ab"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000008ab; + l0000097b_goto_l00000974: + assume {:captureState "l0000097b_goto_l00000974"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000974; + l00000643_goto_l0000066b: + assume {:captureState "l00000643_goto_l0000066b"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000066b; + l000007d5_goto_l00000809: + assume {:captureState "l000007d5_goto_l00000809"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000809; + l00000862_goto_l000005d7: + assume {:captureState "l00000862_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l00000964: + assume {:captureState "l00000964"} true; + R30, Gamma_R30 := 2208bv64, true; + call add_two(); + goto l00000970; + l000006a3_goto_l000005d7: + assume {:captureState "l000006a3_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l00000943_goto_l0000097b: + assume {:captureState "l00000943_goto_l0000097b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000097b; l00000608: assume {:captureState "l00000608"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -495,44 +544,62 @@ procedure main() NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; assert Gamma_ZF; goto l00000608_goto_l00000629, l00000608_goto_l00000643; - l00000629: - assume {:captureState "l00000629"} true; - R30, Gamma_R30 := 2288bv64, true; - call sub_seven(); - goto l00000635; - l00000635: - assume {:captureState "l00000635"} true; - R30, Gamma_R30 := 2292bv64, true; - call add_two(); - goto l0000063c; - l0000063c: - assume {:captureState "l0000063c"} true; - R30, Gamma_R30 := 2296bv64, true; - call add_six(); - goto l00000599; - l00000599: - assume {:captureState "l00000599"} true; - R30, Gamma_R30 := 2300bv64, true; - call sub_seven(); - goto l000005a5; - l000005a5: - assume {:captureState "l000005a5"} true; - R30, Gamma_R30 := 2304bv64, true; - call add_two(); - goto l000005ac; - l000005ac: - assume {:captureState "l000005ac"} true; - goto l000005ad; - l00000643: - assume {:captureState "l00000643"} true; + l000006cb_goto_l00000703: + assume {:captureState "l000006cb_goto_l00000703"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000703; + l00000780_goto_l000007ad: + assume {:captureState "l00000780_goto_l000007ad"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000007ad; + l00000809_goto_l000005d7: + assume {:captureState "l00000809_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l000007d5_goto_l000007f6: + assume {:captureState "l000007d5_goto_l000007f6"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000007f6; + l000008c2_goto_l000008ea: + assume {:captureState "l000008c2_goto_l000008ea"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000008ea; + l0000066b_goto_l000006a3: + assume {:captureState "l0000066b_goto_l000006a3"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000006a3; + l000007ad: + assume {:captureState "l000007ad"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #8, Gamma_#8 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#8); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#8); - ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; - NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; + #16, Gamma_#16 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#16, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#16); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#16, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#16); + ZF, Gamma_ZF := bvcomp32(bvadd32(#16, 1bv32), 0bv32), Gamma_#16; + NF, Gamma_NF := bvadd32(#16, 1bv32)[32:31], Gamma_#16; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000643_goto_l000005d7, l00000643_goto_l0000066b; + goto l000007ad_goto_l000007d5, l000007ad_goto_l000005d7; + l0000097b_goto_l000009a1: + assume {:captureState "l0000097b_goto_l000009a1"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009a1; + l00000831: + assume {:captureState "l00000831"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #19, Gamma_#19 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#19, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#19); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#19, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#19); + ZF, Gamma_ZF := bvcomp32(bvadd32(#19, 1bv32), 0bv32), Gamma_#19; + NF, Gamma_NF := bvadd32(#19, 1bv32)[32:31], Gamma_#19; + assert Gamma_ZF; + goto l00000831_goto_l00000862, l00000831_goto_l00000852; + l00000862_goto_l0000088a: + assume {:captureState "l00000862_goto_l0000088a"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000088a; + l0000088a_goto_l000008c2: + assume {:captureState "l0000088a_goto_l000008c2"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000008c2; l0000066b: assume {:captureState "l0000066b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -543,39 +610,42 @@ procedure main() NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; goto l0000066b_goto_l000006a3, l0000066b_goto_l0000068c; - l0000068c: - assume {:captureState "l0000068c"} true; - R30, Gamma_R30 := 2276bv64, true; - call add_two(); - goto l00000698; - l00000698: - assume {:captureState "l00000698"} true; - R30, Gamma_R30 := 2280bv64, true; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l000007a1: + assume {:captureState "l000007a1"} true; + R30, Gamma_R30 := 2256bv64, true; call add_six(); - goto l0000069f; - l0000069f: - assume {:captureState "l0000069f"} true; - goto l000005ad; - l000006a3: - assume {:captureState "l000006a3"} true; + goto l0000074c; + l000008c2: + assume {:captureState "l000008c2"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #10, Gamma_#10 := bvadd32(R0[32:0], 4294967286bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934583bv33))), (Gamma_R0 && Gamma_#10); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#10); - ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; - NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; + #22, Gamma_#22 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#22, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#22); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#22, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#22); + ZF, Gamma_ZF := bvcomp32(bvadd32(#22, 1bv32), 0bv32), Gamma_#22; + NF, Gamma_NF := bvadd32(#22, 1bv32)[32:31], Gamma_#22; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000006a3_goto_l000005d7, l000006a3_goto_l000006cb; - l000006cb: - assume {:captureState "l000006cb"} true; + goto l000008c2_goto_l000008ea, l000008c2_goto_l000005d7; + l000007ad_goto_l000007d5: + assume {:captureState "l000007ad_goto_l000007d5"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000007d5; + l000006a3_goto_l000006cb: + assume {:captureState "l000006a3_goto_l000006cb"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000006cb; + l00000780: + assume {:captureState "l00000780"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #11, Gamma_#11 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#11); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#11); - ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; - NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; + #15, Gamma_#15 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#15, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#15); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#15, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#15); + ZF, Gamma_ZF := bvcomp32(bvadd32(#15, 1bv32), 0bv32), Gamma_#15; + NF, Gamma_NF := bvadd32(#15, 1bv32)[32:31], Gamma_#15; assert Gamma_ZF; - goto l000006cb_goto_l00000703, l000006cb_goto_l000006ec; + goto l00000780_goto_l000007a1, l00000780_goto_l000007ad; l00000703: assume {:captureState "l00000703"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -586,127 +656,95 @@ procedure main() NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); goto l00000703_goto_l0000072b, l00000703_goto_l000005d7; - l0000072b: - assume {:captureState "l0000072b"} true; + l000008be: + assume {:captureState "l000008be"} true; + goto l000005ad; + l00000943: + assume {:captureState "l00000943"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #13, Gamma_#13 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#13, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#13); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#13, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#13); - ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; - NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; + #25, Gamma_#25 := bvadd32(R0[32:0], 4294967295bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#25, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 0bv33))), (Gamma_R0 && Gamma_#25); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#25, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967296bv33))), (Gamma_R0 && Gamma_#25); + ZF, Gamma_ZF := bvcomp32(bvadd32(#25, 1bv32), 0bv32), Gamma_#25; + NF, Gamma_NF := bvadd32(#25, 1bv32)[32:31], Gamma_#25; assert Gamma_ZF; - goto l0000072b_goto_l00000758, l0000072b_goto_l0000074c; - l00000758: - assume {:captureState "l00000758"} true; + goto l00000943_goto_l0000097b, l00000943_goto_l00000964; + l000006ff: + assume {:captureState "l000006ff"} true; + goto l000005ad; + l00000943_goto_l00000964: + assume {:captureState "l00000943_goto_l00000964"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000964; + l0000091b: + assume {:captureState "l0000091b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #14, Gamma_#14 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#14, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#14); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#14, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#14); - ZF, Gamma_ZF := bvcomp32(bvadd32(#14, 1bv32), 0bv32), Gamma_#14; - NF, Gamma_NF := bvadd32(#14, 1bv32)[32:31], Gamma_#14; + #24, Gamma_#24 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#24, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#24); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#24, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#24); + ZF, Gamma_ZF := bvcomp32(bvadd32(#24, 1bv32), 0bv32), Gamma_#24; + NF, Gamma_NF := bvadd32(#24, 1bv32)[32:31], Gamma_#24; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000758_goto_l000005d7, l00000758_goto_l00000780; - l00000780: - assume {:captureState "l00000780"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #15, Gamma_#15 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#15, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#15); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#15, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#15); - ZF, Gamma_ZF := bvcomp32(bvadd32(#15, 1bv32), 0bv32), Gamma_#15; - NF, Gamma_NF := bvadd32(#15, 1bv32)[32:31], Gamma_#15; - assert Gamma_ZF; - goto l00000780_goto_l000007a1, l00000780_goto_l000007ad; - l000007ad: - assume {:captureState "l000007ad"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #16, Gamma_#16 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#16, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#16); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#16, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#16); - ZF, Gamma_ZF := bvcomp32(bvadd32(#16, 1bv32), 0bv32), Gamma_#16; - NF, Gamma_NF := bvadd32(#16, 1bv32)[32:31], Gamma_#16; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000007ad_goto_l000007d5, l000007ad_goto_l000005d7; - l000007d5: - assume {:captureState "l000007d5"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #17, Gamma_#17 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#17, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#17); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#17, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#17); - ZF, Gamma_ZF := bvcomp32(bvadd32(#17, 1bv32), 0bv32), Gamma_#17; - NF, Gamma_NF := bvadd32(#17, 1bv32)[32:31], Gamma_#17; - assert Gamma_ZF; - goto l000007d5_goto_l00000809, l000007d5_goto_l000007f6; - l000007f6: - assume {:captureState "l000007f6"} true; - R30, Gamma_R30 := 2248bv64, true; + goto l0000091b_goto_l00000943, l0000091b_goto_l000005d7; + l000005d7: + assume {:captureState "l000005d7"} true; + R0, Gamma_R0 := 1bv64, true; + goto l000005c2; + l000006f8: + assume {:captureState "l000006f8"} true; + R30, Gamma_R30 := 2268bv64, true; call add_six(); - goto l00000802; - l00000802: - assume {:captureState "l00000802"} true; - R30, Gamma_R30 := 2252bv64, true; - call add_two(); - goto l000007a1; - l000007a1: - assume {:captureState "l000007a1"} true; - R30, Gamma_R30 := 2256bv64, true; + goto l000006ff; + l0000063c: + assume {:captureState "l0000063c"} true; + R30, Gamma_R30 := 2296bv64, true; call add_six(); - goto l0000074c; - l0000074c: - assume {:captureState "l0000074c"} true; - R30, Gamma_R30 := 2260bv64, true; + goto l00000599; + l00000758_goto_l00000780: + assume {:captureState "l00000758_goto_l00000780"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000780; + l000008b7: + assume {:captureState "l000008b7"} true; + R30, Gamma_R30 := 2232bv64, true; call sub_seven(); - goto l000006ec; + goto l000008be; + l000005e0_goto_l000005d7: + assume {:captureState "l000005e0_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l000008ab: + assume {:captureState "l000008ab"} true; + R30, Gamma_R30 := 2228bv64, true; + call add_two(); + goto l000008b7; l000006ec: assume {:captureState "l000006ec"} true; R30, Gamma_R30 := 2264bv64, true; call sub_seven(); goto l000006f8; - l000006f8: - assume {:captureState "l000006f8"} true; - R30, Gamma_R30 := 2268bv64, true; - call add_six(); - goto l000006ff; - l000006ff: - assume {:captureState "l000006ff"} true; - goto l000005ad; - l00000809: - assume {:captureState "l00000809"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #18, Gamma_#18 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#18, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#18); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#18, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#18); - ZF, Gamma_ZF := bvcomp32(bvadd32(#18, 1bv32), 0bv32), Gamma_#18; - NF, Gamma_NF := bvadd32(#18, 1bv32)[32:31], Gamma_#18; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000809_goto_l00000831, l00000809_goto_l000005d7; - l00000831: - assume {:captureState "l00000831"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #19, Gamma_#19 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#19, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#19); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#19, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#19); - ZF, Gamma_ZF := bvcomp32(bvadd32(#19, 1bv32), 0bv32), Gamma_#19; - NF, Gamma_NF := bvadd32(#19, 1bv32)[32:31], Gamma_#19; - assert Gamma_ZF; - goto l00000831_goto_l00000862, l00000831_goto_l00000852; - l00000852: - assume {:captureState "l00000852"} true; - R30, Gamma_R30 := 2240bv64, true; - call add_six(); - goto l0000085e; - l0000085e: - assume {:captureState "l0000085e"} true; - goto l000005ad; - l00000862: - assume {:captureState "l00000862"} true; + lmain_goto_l00000599: + assume {:captureState "lmain_goto_l00000599"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000599; + l00000703_goto_l0000072b: + assume {:captureState "l00000703_goto_l0000072b"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000072b; + l000005e0: + assume {:captureState "l000005e0"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #20, Gamma_#20 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#20, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#20); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#20, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#20); - ZF, Gamma_ZF := bvcomp32(bvadd32(#20, 1bv32), 0bv32), Gamma_#20; - NF, Gamma_NF := bvadd32(#20, 1bv32)[32:31], Gamma_#20; + #6, Gamma_#6 := bvadd32(R0[32:0], 4294967284bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934581bv33))), (Gamma_R0 && Gamma_#6); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#6); + ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; + NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000862_goto_l000005d7, l00000862_goto_l0000088a; + goto l000005e0_goto_l000005d7, l000005e0_goto_l00000608; + l0000066b_goto_l0000068c: + assume {:captureState "l0000066b_goto_l0000068c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000068c; l0000088a: assume {:captureState "l0000088a"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -717,67 +755,83 @@ procedure main() NF, Gamma_NF := bvadd32(#21, 1bv32)[32:31], Gamma_#21; assert Gamma_ZF; goto l0000088a_goto_l000008ab, l0000088a_goto_l000008c2; - l000008ab: - assume {:captureState "l000008ab"} true; - R30, Gamma_R30 := 2228bv64, true; - call add_two(); - goto l000008b7; - l000008b7: - assume {:captureState "l000008b7"} true; - R30, Gamma_R30 := 2232bv64, true; + l00000809_goto_l00000831: + assume {:captureState "l00000809_goto_l00000831"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000831; + l0000090b: + assume {:captureState "l0000090b"} true; + R30, Gamma_R30 := 2220bv64, true; call sub_seven(); - goto l000008be; - l000008be: - assume {:captureState "l000008be"} true; - goto l000005ad; - l000008c2: - assume {:captureState "l000008c2"} true; + goto l00000917; + l0000074c: + assume {:captureState "l0000074c"} true; + R30, Gamma_R30 := 2260bv64, true; + call sub_seven(); + goto l000006ec; + l0000072b_goto_l0000074c: + assume {:captureState "l0000072b_goto_l0000074c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000074c; + l000005c2: + assume {:captureState "l000005c2"} true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + l00000802: + assume {:captureState "l00000802"} true; + R30, Gamma_R30 := 2252bv64, true; + call add_two(); + goto l000007a1; + l00000608_goto_l00000629: + assume {:captureState "l00000608_goto_l00000629"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000629; + l00000831_goto_l00000862: + assume {:captureState "l00000831_goto_l00000862"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000862; + l00000643: + assume {:captureState "l00000643"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #22, Gamma_#22 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#22, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#22); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#22, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#22); - ZF, Gamma_ZF := bvcomp32(bvadd32(#22, 1bv32), 0bv32), Gamma_#22; - NF, Gamma_NF := bvadd32(#22, 1bv32)[32:31], Gamma_#22; + #8, Gamma_#8 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#8); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#8); + ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; + NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000008c2_goto_l000008ea, l000008c2_goto_l000005d7; - l000008ea: - assume {:captureState "l000008ea"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #23, Gamma_#23 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#23, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#23); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#23, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#23); - ZF, Gamma_ZF := bvcomp32(bvadd32(#23, 1bv32), 0bv32), Gamma_#23; - NF, Gamma_NF := bvadd32(#23, 1bv32)[32:31], Gamma_#23; - assert Gamma_ZF; - goto l000008ea_goto_l0000090b, l000008ea_goto_l0000091b; - l0000091b: - assume {:captureState "l0000091b"} true; + goto l00000643_goto_l000005d7, l00000643_goto_l0000066b; + l00000809: + assume {:captureState "l00000809"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #24, Gamma_#24 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#24, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#24); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#24, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#24); - ZF, Gamma_ZF := bvcomp32(bvadd32(#24, 1bv32), 0bv32), Gamma_#24; - NF, Gamma_NF := bvadd32(#24, 1bv32)[32:31], Gamma_#24; + #18, Gamma_#18 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#18, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#18); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#18, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#18); + ZF, Gamma_ZF := bvcomp32(bvadd32(#18, 1bv32), 0bv32), Gamma_#18; + NF, Gamma_NF := bvadd32(#18, 1bv32)[32:31], Gamma_#18; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l0000091b_goto_l00000943, l0000091b_goto_l000005d7; - l00000943: - assume {:captureState "l00000943"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #25, Gamma_#25 := bvadd32(R0[32:0], 4294967295bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#25, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 0bv33))), (Gamma_R0 && Gamma_#25); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#25, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967296bv33))), (Gamma_R0 && Gamma_#25); - ZF, Gamma_ZF := bvcomp32(bvadd32(#25, 1bv32), 0bv32), Gamma_#25; - NF, Gamma_NF := bvadd32(#25, 1bv32)[32:31], Gamma_#25; - assert Gamma_ZF; - goto l00000943_goto_l0000097b, l00000943_goto_l00000964; - l00000964: - assume {:captureState "l00000964"} true; - R30, Gamma_R30 := 2208bv64, true; - call add_two(); - goto l00000970; - l00000970: - assume {:captureState "l00000970"} true; + goto l00000809_goto_l00000831, l00000809_goto_l000005d7; + l0000091b_goto_l000005d7: + assume {:captureState "l0000091b_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l0000085e: + assume {:captureState "l0000085e"} true; goto l000005ad; + lmain_goto_l000005e0: + assume {:captureState "lmain_goto_l000005e0"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000005e0; + l000008c2_goto_l000005d7: + assume {:captureState "l000008c2_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l000007f6: + assume {:captureState "l000007f6"} true; + R30, Gamma_R30 := 2248bv64, true; + call add_six(); + goto l00000802; l0000097b: assume {:captureState "l0000097b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -788,215 +842,179 @@ procedure main() NF, Gamma_NF := bvadd32(#26, 1bv32)[32:31], Gamma_#26; assert Gamma_ZF; goto l0000097b_goto_l000009a1, l0000097b_goto_l00000974; - l00000974: - assume {:captureState "l00000974"} true; - R30, Gamma_R30 := 2216bv64, true; - call add_six(); - goto l0000090b; - l0000090b: - assume {:captureState "l0000090b"} true; - R30, Gamma_R30 := 2220bv64, true; - call sub_seven(); - goto l00000917; - l00000917: - assume {:captureState "l00000917"} true; - goto l000005ad; - l000005ad: - assume {:captureState "l000005ad"} true; - R0, Gamma_R0 := 69632bv64, true; - R0, Gamma_R0 := bvadd64(R0, 16bv64), Gamma_R0; - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); - goto l000005c2; - l000009a1: - assume {:captureState "l000009a1"} true; - goto l000005d7; - l000005d7: - assume {:captureState "l000005d7"} true; - R0, Gamma_R0 := 1bv64, true; - goto l000005c2; - l000005c2: - assume {:captureState "l000005c2"} true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l00000599: - assume {:captureState "lmain_goto_l00000599"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000599; - lmain_goto_l000005e0: - assume {:captureState "lmain_goto_l000005e0"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000005e0; - l000005e0_goto_l000005d7: - assume {:captureState "l000005e0_goto_l000005d7"} true; + l00000643_goto_l000005d7: + assume {:captureState "l00000643_goto_l000005d7"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l000005d7; - l000005e0_goto_l00000608: - assume {:captureState "l000005e0_goto_l00000608"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000608; - l00000608_goto_l00000629: - assume {:captureState "l00000608_goto_l00000629"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000629; l00000608_goto_l00000643: assume {:captureState "l00000608_goto_l00000643"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000643; - l00000643_goto_l000005d7: - assume {:captureState "l00000643_goto_l000005d7"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005d7; - l00000643_goto_l0000066b: - assume {:captureState "l00000643_goto_l0000066b"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l0000066b; - l0000066b_goto_l0000068c: - assume {:captureState "l0000066b_goto_l0000068c"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000068c; - l0000066b_goto_l000006a3: - assume {:captureState "l0000066b_goto_l000006a3"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000006a3; - l000006a3_goto_l000005d7: - assume {:captureState "l000006a3_goto_l000005d7"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005d7; - l000006a3_goto_l000006cb: - assume {:captureState "l000006a3_goto_l000006cb"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l000006cb; - l000006cb_goto_l000006ec: - assume {:captureState "l000006cb_goto_l000006ec"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000006ec; - l000006cb_goto_l00000703: - assume {:captureState "l000006cb_goto_l00000703"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000703; - l00000703_goto_l000005d7: - assume {:captureState "l00000703_goto_l000005d7"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005d7; - l00000703_goto_l0000072b: - assume {:captureState "l00000703_goto_l0000072b"} true; + l0000091b_goto_l00000943: + assume {:captureState "l0000091b_goto_l00000943"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l0000072b; - l0000072b_goto_l0000074c: - assume {:captureState "l0000072b_goto_l0000074c"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000074c; + goto l00000943; + l00000758: + assume {:captureState "l00000758"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #14, Gamma_#14 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#14, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#14); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#14, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#14); + ZF, Gamma_ZF := bvcomp32(bvadd32(#14, 1bv32), 0bv32), Gamma_#14; + NF, Gamma_NF := bvadd32(#14, 1bv32)[32:31], Gamma_#14; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000758_goto_l000005d7, l00000758_goto_l00000780; l0000072b_goto_l00000758: assume {:captureState "l0000072b_goto_l00000758"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000758; - l00000758_goto_l000005d7: - assume {:captureState "l00000758_goto_l000005d7"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005d7; - l00000758_goto_l00000780: - assume {:captureState "l00000758_goto_l00000780"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000780; - l00000780_goto_l000007a1: - assume {:captureState "l00000780_goto_l000007a1"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000007a1; - l00000780_goto_l000007ad: - assume {:captureState "l00000780_goto_l000007ad"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000007ad; - l000007ad_goto_l000005d7: - assume {:captureState "l000007ad_goto_l000005d7"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005d7; - l000007ad_goto_l000007d5: - assume {:captureState "l000007ad_goto_l000007d5"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l000007d5; - l000007d5_goto_l000007f6: - assume {:captureState "l000007d5_goto_l000007f6"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000007f6; - l000007d5_goto_l00000809: - assume {:captureState "l000007d5_goto_l00000809"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000809; - l00000809_goto_l000005d7: - assume {:captureState "l00000809_goto_l000005d7"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005d7; - l00000809_goto_l00000831: - assume {:captureState "l00000809_goto_l00000831"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000831; + l000005ad: + assume {:captureState "l000005ad"} true; + R0, Gamma_R0 := 69632bv64, true; + R0, Gamma_R0 := bvadd64(R0, 16bv64), Gamma_R0; + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + goto l000005c2; + l00000635: + assume {:captureState "l00000635"} true; + R30, Gamma_R30 := 2292bv64, true; + call add_two(); + goto l0000063c; + l000005ac: + assume {:captureState "l000005ac"} true; + goto l000005ad; l00000831_goto_l00000852: assume {:captureState "l00000831_goto_l00000852"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000852; - l00000831_goto_l00000862: - assume {:captureState "l00000831_goto_l00000862"} true; + l00000599: + assume {:captureState "l00000599"} true; + R30, Gamma_R30 := 2300bv64, true; + call sub_seven(); + goto l000005a5; + l000006cb: + assume {:captureState "l000006cb"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #11, Gamma_#11 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#11); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#11); + ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; + NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; + assert Gamma_ZF; + goto l000006cb_goto_l00000703, l000006cb_goto_l000006ec; + l00000917: + assume {:captureState "l00000917"} true; + goto l000005ad; + l000008ea_goto_l0000091b: + assume {:captureState "l000008ea_goto_l0000091b"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000862; - l00000862_goto_l000005d7: - assume {:captureState "l00000862_goto_l000005d7"} true; + goto l0000091b; + l000005a5: + assume {:captureState "l000005a5"} true; + R30, Gamma_R30 := 2304bv64, true; + call add_two(); + goto l000005ac; + l000009a1: + assume {:captureState "l000009a1"} true; + goto l000005d7; + l0000072b: + assume {:captureState "l0000072b"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #13, Gamma_#13 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#13, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#13); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#13, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#13); + ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; + NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; + assert Gamma_ZF; + goto l0000072b_goto_l00000758, l0000072b_goto_l0000074c; + l000007ad_goto_l000005d7: + assume {:captureState "l000007ad_goto_l000005d7"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l000005d7; - l00000862_goto_l0000088a: - assume {:captureState "l00000862_goto_l0000088a"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l0000088a; - l0000088a_goto_l000008ab: - assume {:captureState "l0000088a_goto_l000008ab"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000008ab; - l0000088a_goto_l000008c2: - assume {:captureState "l0000088a_goto_l000008c2"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000008c2; - l000008c2_goto_l000005d7: - assume {:captureState "l000008c2_goto_l000005d7"} true; + l00000862: + assume {:captureState "l00000862"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #20, Gamma_#20 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#20, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#20); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#20, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#20); + ZF, Gamma_ZF := bvcomp32(bvadd32(#20, 1bv32), 0bv32), Gamma_#20; + NF, Gamma_NF := bvadd32(#20, 1bv32)[32:31], Gamma_#20; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000862_goto_l000005d7, l00000862_goto_l0000088a; + l00000703_goto_l000005d7: + assume {:captureState "l00000703_goto_l000005d7"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l000005d7; - l000008c2_goto_l000008ea: - assume {:captureState "l000008c2_goto_l000008ea"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l000008ea; + l0000069f: + assume {:captureState "l0000069f"} true; + goto l000005ad; + l00000629: + assume {:captureState "l00000629"} true; + R30, Gamma_R30 := 2288bv64, true; + call sub_seven(); + goto l00000635; l000008ea_goto_l0000090b: assume {:captureState "l000008ea_goto_l0000090b"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l0000090b; - l000008ea_goto_l0000091b: - assume {:captureState "l000008ea_goto_l0000091b"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000091b; - l0000091b_goto_l000005d7: - assume {:captureState "l0000091b_goto_l000005d7"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005d7; - l0000091b_goto_l00000943: - assume {:captureState "l0000091b_goto_l00000943"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000943; - l00000943_goto_l00000964: - assume {:captureState "l00000943_goto_l00000964"} true; + l000007d5: + assume {:captureState "l000007d5"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #17, Gamma_#17 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#17, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#17); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#17, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#17); + ZF, Gamma_ZF := bvcomp32(bvadd32(#17, 1bv32), 0bv32), Gamma_#17; + NF, Gamma_NF := bvadd32(#17, 1bv32)[32:31], Gamma_#17; + assert Gamma_ZF; + goto l000007d5_goto_l00000809, l000007d5_goto_l000007f6; + l00000970: + assume {:captureState "l00000970"} true; + goto l000005ad; + l00000974: + assume {:captureState "l00000974"} true; + R30, Gamma_R30 := 2216bv64, true; + call add_six(); + goto l0000090b; + l000008ea: + assume {:captureState "l000008ea"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #23, Gamma_#23 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#23, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#23); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#23, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#23); + ZF, Gamma_ZF := bvcomp32(bvadd32(#23, 1bv32), 0bv32), Gamma_#23; + NF, Gamma_NF := bvadd32(#23, 1bv32)[32:31], Gamma_#23; + assert Gamma_ZF; + goto l000008ea_goto_l0000090b, l000008ea_goto_l0000091b; + l00000698: + assume {:captureState "l00000698"} true; + R30, Gamma_R30 := 2280bv64, true; + call add_six(); + goto l0000069f; + l00000852: + assume {:captureState "l00000852"} true; + R30, Gamma_R30 := 2240bv64, true; + call add_six(); + goto l0000085e; + l000006cb_goto_l000006ec: + assume {:captureState "l000006cb_goto_l000006ec"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000964; - l00000943_goto_l0000097b: - assume {:captureState "l00000943_goto_l0000097b"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000097b; - l0000097b_goto_l00000974: - assume {:captureState "l0000097b_goto_l00000974"} true; + goto l000006ec; + l00000780_goto_l000007a1: + assume {:captureState "l00000780_goto_l000007a1"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000974; - l0000097b_goto_l000009a1: - assume {:captureState "l0000097b_goto_l000009a1"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000009a1; + goto l000007a1; + l000005e0_goto_l00000608: + assume {:captureState "l000005e0_goto_l00000608"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000608; + l0000068c: + assume {:captureState "l0000068c"} true; + R30, Gamma_R30 := 2276bv64, true; + call add_two(); + goto l00000698; + main_return: + assume {:captureState "main_return"} true; + return; } procedure sub_seven() @@ -1087,5 +1105,11 @@ procedure sub_seven() assert (L(mem, R0) ==> Gamma_R1); mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%00000543"} true; + goto sub_seven_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + sub_seven_return: + assume {:captureState "sub_seven_return"} true; return; } diff --git a/src/test/correct/jumptable3/gcc_O2/jumptable3.expected b/src/test/correct/jumptable3/gcc_O2/jumptable3.expected index 35ab2a3e8..dee6571a6 100644 --- a/src/test/correct/jumptable3/gcc_O2/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc_O2/jumptable3.expected @@ -228,10 +228,14 @@ procedure main() NF, Gamma_NF := bvadd32(#1, 1bv32)[32:31], Gamma_#1; assert Gamma_ZF; goto lmain_goto_l00000317, lmain_goto_l00000753; - l00000753: - assume {:captureState "l00000753"} true; + l0000070c: + assume {:captureState "l0000070c"} true; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000753_goto_l0000075c, l00000753_goto_l000006e8; + goto l0000070c_goto_l00000644, l0000070c_goto_l00000715; + l0000077b_goto_l00000784: + assume {:captureState "l0000077b_goto_l00000784"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000784; l000006e8: assume {:captureState "l000006e8"} true; R1, Gamma_R1 := 69632bv64, true; @@ -242,20 +246,45 @@ procedure main() NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; assert Gamma_ZF; goto l000006e8_goto_l000005f9, l000006e8_goto_l0000070c; - l000005f9: - assume {:captureState "l000005f9"} true; + l00000753_goto_l0000075c: + assume {:captureState "l00000753_goto_l0000075c"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000075c; + l00000682: + assume {:captureState "l00000682"} true; + R1, Gamma_R1 := 69632bv64, true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 8bv32)), Gamma_R0; call rely(); assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%0000060c"} true; - goto l00000360; - l0000070c: - assume {:captureState "l0000070c"} true; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l0000070c_goto_l00000644, l0000070c_goto_l00000715; + assume {:captureState "%0000069a"} true; + goto l00000317; + l00000784_goto_l000006ba: + assume {:captureState "l00000784_goto_l000006ba"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000006ba; + l00000360: + assume {:captureState "l00000360"} true; + goto main_return; + l00000663_goto_l00000347: + assume {:captureState "l00000663_goto_l00000347"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000347; + l00000368: + assume {:captureState "l00000368"} true; + assert Gamma_R0; + goto l00000368_goto_l000005a3, l00000368_goto_l0000036b; + l000005bc: + assume {:captureState "l000005bc"} true; + #5, Gamma_#5 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + assert Gamma_ZF; + goto l000005bc_goto_l00000682, l000005bc_goto_l000005d6; l00000644: assume {:captureState "l00000644"} true; #6, Gamma_#6 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; @@ -265,15 +294,42 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; goto l00000644_goto_l00000663, l00000644_goto_l00000331; - l00000663: - assume {:captureState "l00000663"} true; - #7, Gamma_#7 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#7); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#7); - ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; - NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; - assert Gamma_ZF; - goto l00000663_goto_l00000347, l00000663_goto_l0000036b; + l0000070c_goto_l00000715: + assume {:captureState "l0000070c_goto_l00000715"} true; + assume (bvnot1(bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1))) == 0bv1); + goto l00000715; + l000005bc_goto_l00000682: + assume {:captureState "l000005bc_goto_l00000682"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000682; + l000005f9: + assume {:captureState "l000005f9"} true; + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); + R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 8bv32)), Gamma_R0; + call rely(); + assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); + mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); + assume {:captureState "%0000060c"} true; + goto l00000360; + l00000644_goto_l00000331: + assume {:captureState "l00000644_goto_l00000331"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000331; + l000007a8_goto_l00000368: + assume {:captureState "l000007a8_goto_l00000368"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000368; + l00000317: + assume {:captureState "l00000317"} true; + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); + R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 6bv32)), Gamma_R0; + call rely(); + assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); + mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); + assume {:captureState "%0000032f"} true; + goto l00000331; l00000715: assume {:captureState "l00000715"} true; #9, Gamma_#9 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; @@ -283,290 +339,240 @@ procedure main() NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; goto l00000715_goto_l00000612, l00000715_goto_l00000734; - l00000612: - assume {:captureState "l00000612"} true; + l00000784_goto_l000007a8: + assume {:captureState "l00000784_goto_l000007a8"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000007a8; + l00000753: + assume {:captureState "l00000753"} true; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000753_goto_l0000075c, l00000753_goto_l000006e8; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000663_goto_l0000036b: + assume {:captureState "l00000663_goto_l0000036b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000036b; + l00000368_goto_l000005a3: + assume {:captureState "l00000368_goto_l000005a3"} true; + assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) == 0bv1); + goto l000005a3; + l0000077b_goto_l000005bc: + assume {:captureState "l0000077b_goto_l000005bc"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005bc; + l000005a3: + assume {:captureState "l000005a3"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); - R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 1bv32)), Gamma_R0; + R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 2bv32)), Gamma_R0; call rely(); assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%00000625"} true; - goto l00000628; - l00000734: - assume {:captureState "l00000734"} true; - #10, Gamma_#10 := bvadd32(R0[32:0], 4294967284bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934581bv33))), (Gamma_R0 && Gamma_#10); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#10); - ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; - NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; + assume {:captureState "%000005b6"} true; + goto l00000360; + l00000715_goto_l00000612: + assume {:captureState "l00000715_goto_l00000612"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000612; + l00000784: + assume {:captureState "l00000784"} true; + R1, Gamma_R1 := 69632bv64, true; + #12, Gamma_#12 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#12, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#12); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#12); + ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; + NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; assert Gamma_ZF; - goto l00000734_goto_l0000036b, l00000734_goto_l00000628; - l00000628: - assume {:captureState "l00000628"} true; + goto l00000784_goto_l000006ba, l00000784_goto_l000007a8; + l00000663: + assume {:captureState "l00000663"} true; + #7, Gamma_#7 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#7); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#7); + ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; + NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; + assert Gamma_ZF; + goto l00000663_goto_l00000347, l00000663_goto_l0000036b; + l000007a8: + assume {:captureState "l000007a8"} true; + #13, Gamma_#13 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#13, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#13); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#13, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#13); + ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; + NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; + assert Gamma_ZF; + goto l000007a8_goto_l000006d0, l000007a8_goto_l00000368; + l00000734_goto_l0000036b: + assume {:captureState "l00000734_goto_l0000036b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000036b; + l0000075c_goto_l0000077b: + assume {:captureState "l0000075c_goto_l0000077b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000077b; + l00000347: + assume {:captureState "l00000347"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); - R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 4294967291bv32)), Gamma_R0; + R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 4294967295bv32)), Gamma_R0; call rely(); assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%0000063e"} true; + assume {:captureState "%0000035d"} true; goto l00000360; - l0000075c: - assume {:captureState "l0000075c"} true; - #11, Gamma_#11 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#11); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#11); - ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; - NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; - assert Gamma_ZF; - goto l0000075c_goto_l0000077b, l0000075c_goto_l0000069c; - l0000069c: - assume {:captureState "l0000069c"} true; - R1, Gamma_R1 := 69632bv64, true; + l000006ba: + assume {:captureState "l000006ba"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); - R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 4294967291bv32)), Gamma_R0; + R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 6bv32)), Gamma_R0; call rely(); assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%000006b4"} true; - goto l00000360; + assume {:captureState "%000006cd"} true; + goto l000006d0; + l00000368_goto_l0000036b: + assume {:captureState "l00000368_goto_l0000036b"} true; + assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) != 0bv1); + goto l0000036b; l0000077b: assume {:captureState "l0000077b"} true; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); goto l0000077b_goto_l00000784, l0000077b_goto_l000005bc; - l000005bc: - assume {:captureState "l000005bc"} true; - #5, Gamma_#5 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - assert Gamma_ZF; - goto l000005bc_goto_l00000682, l000005bc_goto_l000005d6; - l000005d6: - assume {:captureState "l000005d6"} true; - R1, Gamma_R1 := 69632bv64, true; + l000006d0: + assume {:captureState "l000006d0"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); - R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 6bv32)), Gamma_R0; + R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 4294967289bv32)), Gamma_R0; call rely(); assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%000005f3"} true; + assume {:captureState "%000006e6"} true; goto l00000360; - l00000682: - assume {:captureState "l00000682"} true; + l0000069c: + assume {:captureState "l0000069c"} true; R1, Gamma_R1 := 69632bv64, true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); - R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 8bv32)), Gamma_R0; - call rely(); - assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); - mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%0000069a"} true; - goto l00000317; - l00000317: - assume {:captureState "l00000317"} true; - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); - R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 6bv32)), Gamma_R0; - call rely(); - assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); - mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%0000032f"} true; - goto l00000331; - l00000331: - assume {:captureState "l00000331"} true; - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); - R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 4294967289bv32)), Gamma_R0; + R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 4294967291bv32)), Gamma_R0; call rely(); assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%00000344"} true; - goto l00000347; - l00000347: - assume {:captureState "l00000347"} true; + assume {:captureState "%000006b4"} true; + goto l00000360; + l00000628: + assume {:captureState "l00000628"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); - R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 4294967295bv32)), Gamma_R0; + R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 4294967291bv32)), Gamma_R0; call rely(); assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%0000035d"} true; + assume {:captureState "%0000063e"} true; goto l00000360; - l00000784: - assume {:captureState "l00000784"} true; + l000006e8_goto_l0000070c: + assume {:captureState "l000006e8_goto_l0000070c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000070c; + l000005d6: + assume {:captureState "l000005d6"} true; R1, Gamma_R1 := 69632bv64, true; - #12, Gamma_#12 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#12, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#12); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#12); - ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; - NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; - assert Gamma_ZF; - goto l00000784_goto_l000006ba, l00000784_goto_l000007a8; - l000006ba: - assume {:captureState "l000006ba"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 6bv32)), Gamma_R0; call rely(); assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%000006cd"} true; - goto l000006d0; - l000007a8: - assume {:captureState "l000007a8"} true; - #13, Gamma_#13 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#13, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#13); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#13, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#13); - ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; - NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; - assert Gamma_ZF; - goto l000007a8_goto_l000006d0, l000007a8_goto_l00000368; - l00000368: - assume {:captureState "l00000368"} true; - assert Gamma_R0; - goto l00000368_goto_l000005a3, l00000368_goto_l0000036b; - l0000036b: - assume {:captureState "l0000036b"} true; - R0, Gamma_R0 := 1bv64, true; - return; - l000005a3: - assume {:captureState "l000005a3"} true; - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); - R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 2bv32)), Gamma_R0; - call rely(); - assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); - mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%000005b6"} true; + assume {:captureState "%000005f3"} true; goto l00000360; - l000006d0: - assume {:captureState "l000006d0"} true; + l0000075c: + assume {:captureState "l0000075c"} true; + #11, Gamma_#11 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#11); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#11); + ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; + NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; + assert Gamma_ZF; + goto l0000075c_goto_l0000077b, l0000075c_goto_l0000069c; + l00000331: + assume {:captureState "l00000331"} true; call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 4294967289bv32)), Gamma_R0; call rely(); assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); - assume {:captureState "%000006e6"} true; - goto l00000360; - l00000360: - assume {:captureState "l00000360"} true; - return; + assume {:captureState "%00000344"} true; + goto l00000347; lmain_goto_l00000317: assume {:captureState "lmain_goto_l00000317"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000317; - lmain_goto_l00000753: - assume {:captureState "lmain_goto_l00000753"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000753; - l00000753_goto_l000006e8: - assume {:captureState "l00000753_goto_l000006e8"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000006e8; - l00000753_goto_l0000075c: - assume {:captureState "l00000753_goto_l0000075c"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l0000075c; - l000006e8_goto_l000005f9: - assume {:captureState "l000006e8_goto_l000005f9"} true; + l0000075c_goto_l0000069c: + assume {:captureState "l0000075c_goto_l0000069c"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000005f9; - l000006e8_goto_l0000070c: - assume {:captureState "l000006e8_goto_l0000070c"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000070c; + goto l0000069c; l0000070c_goto_l00000644: assume {:captureState "l0000070c_goto_l00000644"} true; assume (bvnot1(bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1))) != 0bv1); goto l00000644; - l0000070c_goto_l00000715: - assume {:captureState "l0000070c_goto_l00000715"} true; - assume (bvnot1(bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1))) == 0bv1); - goto l00000715; - l00000644_goto_l00000331: - assume {:captureState "l00000644_goto_l00000331"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000331; + l00000753_goto_l000006e8: + assume {:captureState "l00000753_goto_l000006e8"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000006e8; l00000644_goto_l00000663: assume {:captureState "l00000644_goto_l00000663"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000663; - l00000663_goto_l0000036b: - assume {:captureState "l00000663_goto_l0000036b"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l0000036b; - l00000663_goto_l00000347: - assume {:captureState "l00000663_goto_l00000347"} true; + l000007a8_goto_l000006d0: + assume {:captureState "l000007a8_goto_l000006d0"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000347; - l00000715_goto_l00000612: - assume {:captureState "l00000715_goto_l00000612"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000612; + goto l000006d0; + l00000734: + assume {:captureState "l00000734"} true; + #10, Gamma_#10 := bvadd32(R0[32:0], 4294967284bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934581bv33))), (Gamma_R0 && Gamma_#10); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#10); + ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; + NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; + assert Gamma_ZF; + goto l00000734_goto_l0000036b, l00000734_goto_l00000628; + l00000612: + assume {:captureState "l00000612"} true; + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 16bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 16bv64)) || L(mem, bvadd64(R1, 16bv64))); + R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 1bv32)), Gamma_R0; + call rely(); + assert (L(mem, bvadd64(R1, 16bv64)) ==> Gamma_R0); + mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 16bv64), R0[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 16bv64), Gamma_R0); + assume {:captureState "%00000625"} true; + goto l00000628; l00000715_goto_l00000734: assume {:captureState "l00000715_goto_l00000734"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000734; - l00000734_goto_l0000036b: - assume {:captureState "l00000734_goto_l0000036b"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l0000036b; + lmain_goto_l00000753: + assume {:captureState "lmain_goto_l00000753"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000753; + l000006e8_goto_l000005f9: + assume {:captureState "l000006e8_goto_l000005f9"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000005f9; + l0000036b: + assume {:captureState "l0000036b"} true; + R0, Gamma_R0 := 1bv64, true; + goto main_return; l00000734_goto_l00000628: assume {:captureState "l00000734_goto_l00000628"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000628; - l0000075c_goto_l0000069c: - assume {:captureState "l0000075c_goto_l0000069c"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000069c; - l0000075c_goto_l0000077b: - assume {:captureState "l0000075c_goto_l0000077b"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000077b; - l0000077b_goto_l000005bc: - assume {:captureState "l0000077b_goto_l000005bc"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005bc; - l0000077b_goto_l00000784: - assume {:captureState "l0000077b_goto_l00000784"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000784; l000005bc_goto_l000005d6: assume {:captureState "l000005bc_goto_l000005d6"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000005d6; - l000005bc_goto_l00000682: - assume {:captureState "l000005bc_goto_l00000682"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000682; - l00000784_goto_l000006ba: - assume {:captureState "l00000784_goto_l000006ba"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000006ba; - l00000784_goto_l000007a8: - assume {:captureState "l00000784_goto_l000007a8"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000007a8; - l000007a8_goto_l00000368: - assume {:captureState "l000007a8_goto_l00000368"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000368; - l000007a8_goto_l000006d0: - assume {:captureState "l000007a8_goto_l000006d0"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l000006d0; - l00000368_goto_l0000036b: - assume {:captureState "l00000368_goto_l0000036b"} true; - assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) != 0bv1); - goto l0000036b; - l00000368_goto_l000005a3: - assume {:captureState "l00000368_goto_l000005a3"} true; - assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) == 0bv1); - goto l000005a3; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected b/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected index b0842bac6..05ccf4f57 100644 --- a/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected @@ -206,6 +206,12 @@ procedure add_six() assert (L(mem, R0) ==> Gamma_R1); mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%0000126c"} true; + goto add_six_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + add_six_return: + assume {:captureState "add_six_return"} true; return; } @@ -297,6 +303,12 @@ procedure add_two() assert (L(mem, R0) ==> Gamma_R1); mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%0000123a"} true; + goto add_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + add_two_return: + assume {:captureState "add_two_return"} true; return; } @@ -475,87 +487,59 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto lmain_goto_l0000133b, lmain_goto_l000012f4; - l0000133b: - assume {:captureState "l0000133b"} true; + l000014b3: + assume {:captureState "l000014b3"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #6, Gamma_#6 := bvadd32(R0[32:0], 4294967284bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934581bv33))), (Gamma_R0 && Gamma_#6); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#6); - ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; - NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; + #14, Gamma_#14 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#14, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#14); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#14, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#14); + ZF, Gamma_ZF := bvcomp32(bvadd32(#14, 1bv32), 0bv32), Gamma_#14; + NF, Gamma_NF := bvadd32(#14, 1bv32)[32:31], Gamma_#14; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l0000133b_goto_l00001363, l0000133b_goto_l00001332; - l00001363: - assume {:captureState "l00001363"} true; + goto l000014b3_goto_l00001332, l000014b3_goto_l000014db; + l00001530: + assume {:captureState "l00001530"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #7, Gamma_#7 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#7); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#7); - ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; - NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; + #17, Gamma_#17 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#17, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#17); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#17, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#17); + ZF, Gamma_ZF := bvcomp32(bvadd32(#17, 1bv32), 0bv32), Gamma_#17; + NF, Gamma_NF := bvadd32(#17, 1bv32)[32:31], Gamma_#17; assert Gamma_ZF; - goto l00001363_goto_l0000139e, l00001363_goto_l00001384; - l00001384: - assume {:captureState "l00001384"} true; - R30, Gamma_R30 := 2288bv64, true; - call sub_seven(); - goto l00001390; - l00001390: - assume {:captureState "l00001390"} true; - R30, Gamma_R30 := 2292bv64, true; - call add_two(); - goto l00001397; - l00001397: - assume {:captureState "l00001397"} true; - R30, Gamma_R30 := 2296bv64, true; - call add_six(); - goto l000012f4; - l000012f4: - assume {:captureState "l000012f4"} true; - R30, Gamma_R30 := 2300bv64, true; + goto l00001530_goto_l00001564, l00001530_goto_l00001551; + l00001645_goto_l00001676: + assume {:captureState "l00001645_goto_l00001676"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00001676; + l000015bd_goto_l000015e5: + assume {:captureState "l000015bd_goto_l000015e5"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000015e5; + l00001486_goto_l000014a7: + assume {:captureState "l00001486_goto_l000014a7"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000014a7; + l000013c6_goto_l000013e7: + assume {:captureState "l000013c6_goto_l000013e7"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000013e7; + l000014b3_goto_l000014db: + assume {:captureState "l000014b3_goto_l000014db"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000014db; + l000014a7: + assume {:captureState "l000014a7"} true; + R30, Gamma_R30 := 2260bv64, true; call sub_seven(); - goto l00001300; - l00001300: - assume {:captureState "l00001300"} true; - R30, Gamma_R30 := 2304bv64, true; - call add_two(); - goto l00001307; - l00001307: - assume {:captureState "l00001307"} true; - goto l00001308; - l0000139e: - assume {:captureState "l0000139e"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #8, Gamma_#8 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#8); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#8); - ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; - NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l0000139e_goto_l000013c6, l0000139e_goto_l00001332; - l000013c6: - assume {:captureState "l000013c6"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #9, Gamma_#9 := bvadd32(R0[32:0], 4294967286bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934583bv33))), (Gamma_R0 && Gamma_#9); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#9); - ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; - NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; - assert Gamma_ZF; - goto l000013c6_goto_l000013e7, l000013c6_goto_l000013fe; - l000013e7: - assume {:captureState "l000013e7"} true; - R30, Gamma_R30 := 2276bv64, true; - call add_two(); - goto l000013f3; - l000013f3: - assume {:captureState "l000013f3"} true; - R30, Gamma_R30 := 2280bv64, true; - call add_six(); - goto l000013fa; - l000013fa: - assume {:captureState "l000013fa"} true; - goto l00001308; + goto l00001447; + l000014db_goto_l000014fc: + assume {:captureState "l000014db_goto_l000014fc"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000014fc; + l000014db_goto_l00001508: + assume {:captureState "l000014db_goto_l00001508"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00001508; l000013fe: assume {:captureState "l000013fe"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -566,26 +550,6 @@ procedure main() NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); goto l000013fe_goto_l00001332, l000013fe_goto_l00001426; - l00001426: - assume {:captureState "l00001426"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #11, Gamma_#11 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#11); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#11); - ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; - NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; - assert Gamma_ZF; - goto l00001426_goto_l0000145e, l00001426_goto_l00001447; - l0000145e: - assume {:captureState "l0000145e"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #12, Gamma_#12 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#12, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#12); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#12); - ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; - NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l0000145e_goto_l00001486, l0000145e_goto_l00001332; l00001486: assume {:captureState "l00001486"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -596,89 +560,111 @@ procedure main() NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; assert Gamma_ZF; goto l00001486_goto_l000014a7, l00001486_goto_l000014b3; - l000014b3: - assume {:captureState "l000014b3"} true; + l000016d6_goto_l000016cf: + assume {:captureState "l000016d6_goto_l000016cf"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000016cf; + l00001363: + assume {:captureState "l00001363"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #14, Gamma_#14 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#14, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#14); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#14, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#14); - ZF, Gamma_ZF := bvcomp32(bvadd32(#14, 1bv32), 0bv32), Gamma_#14; - NF, Gamma_NF := bvadd32(#14, 1bv32)[32:31], Gamma_#14; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000014b3_goto_l00001332, l000014b3_goto_l000014db; - l000014db: - assume {:captureState "l000014db"} true; + #7, Gamma_#7 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#7); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#7); + ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; + NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; + assert Gamma_ZF; + goto l00001363_goto_l0000139e, l00001363_goto_l00001384; + l00001645_goto_l00001666: + assume {:captureState "l00001645_goto_l00001666"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00001666; + l000013fa: + assume {:captureState "l000013fa"} true; + goto l00001308; + l00001645: + assume {:captureState "l00001645"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #15, Gamma_#15 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#15, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#15); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#15, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#15); - ZF, Gamma_ZF := bvcomp32(bvadd32(#15, 1bv32), 0bv32), Gamma_#15; - NF, Gamma_NF := bvadd32(#15, 1bv32)[32:31], Gamma_#15; + #23, Gamma_#23 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#23, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#23); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#23, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#23); + ZF, Gamma_ZF := bvcomp32(bvadd32(#23, 1bv32), 0bv32), Gamma_#23; + NF, Gamma_NF := bvadd32(#23, 1bv32)[32:31], Gamma_#23; assert Gamma_ZF; - goto l000014db_goto_l00001508, l000014db_goto_l000014fc; - l00001508: - assume {:captureState "l00001508"} true; + goto l00001645_goto_l00001676, l00001645_goto_l00001666; + l000015bd: + assume {:captureState "l000015bd"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #16, Gamma_#16 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#16, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#16); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#16, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#16); - ZF, Gamma_ZF := bvcomp32(bvadd32(#16, 1bv32), 0bv32), Gamma_#16; - NF, Gamma_NF := bvadd32(#16, 1bv32)[32:31], Gamma_#16; + #20, Gamma_#20 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#20, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#20); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#20, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#20); + ZF, Gamma_ZF := bvcomp32(bvadd32(#20, 1bv32), 0bv32), Gamma_#20; + NF, Gamma_NF := bvadd32(#20, 1bv32)[32:31], Gamma_#20; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00001508_goto_l00001332, l00001508_goto_l00001530; - l00001530: - assume {:captureState "l00001530"} true; + goto l000015bd_goto_l000015e5, l000015bd_goto_l00001332; + l00001486_goto_l000014b3: + assume {:captureState "l00001486_goto_l000014b3"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000014b3; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l000012f4: + assume {:captureState "l000012f4"} true; + R30, Gamma_R30 := 2300bv64, true; + call sub_seven(); + goto l00001300; + l00001564_goto_l00001332: + assume {:captureState "l00001564_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l000015b9: + assume {:captureState "l000015b9"} true; + goto l00001308; + l0000158c_goto_l000015bd: + assume {:captureState "l0000158c_goto_l000015bd"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000015bd; + l0000161d: + assume {:captureState "l0000161d"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #17, Gamma_#17 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#17, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#17); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#17, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#17); - ZF, Gamma_ZF := bvcomp32(bvadd32(#17, 1bv32), 0bv32), Gamma_#17; - NF, Gamma_NF := bvadd32(#17, 1bv32)[32:31], Gamma_#17; + #22, Gamma_#22 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#22, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#22); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#22, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#22); + ZF, Gamma_ZF := bvcomp32(bvadd32(#22, 1bv32), 0bv32), Gamma_#22; + NF, Gamma_NF := bvadd32(#22, 1bv32)[32:31], Gamma_#22; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000161d_goto_l00001332, l0000161d_goto_l00001645; + l000016d6: + assume {:captureState "l000016d6"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #26, Gamma_#26 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#26, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#26); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#26, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#26); + ZF, Gamma_ZF := bvcomp32(bvadd32(#26, 1bv32), 0bv32), Gamma_#26; + NF, Gamma_NF := bvadd32(#26, 1bv32)[32:31], Gamma_#26; assert Gamma_ZF; - goto l00001530_goto_l00001564, l00001530_goto_l00001551; - l00001551: - assume {:captureState "l00001551"} true; - R30, Gamma_R30 := 2248bv64, true; - call add_six(); - goto l0000155d; - l0000155d: - assume {:captureState "l0000155d"} true; - R30, Gamma_R30 := 2252bv64, true; - call add_two(); - goto l000014fc; - l000014fc: - assume {:captureState "l000014fc"} true; - R30, Gamma_R30 := 2256bv64, true; + goto l000016d6_goto_l000016cf, l000016d6_goto_l000016fc; + l00001676_goto_l0000169e: + assume {:captureState "l00001676_goto_l0000169e"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000169e; + l000016cf: + assume {:captureState "l000016cf"} true; + R30, Gamma_R30 := 2216bv64, true; call add_six(); - goto l000014a7; - l000014a7: - assume {:captureState "l000014a7"} true; - R30, Gamma_R30 := 2260bv64, true; - call sub_seven(); - goto l00001447; - l00001447: - assume {:captureState "l00001447"} true; - R30, Gamma_R30 := 2264bv64, true; - call sub_seven(); - goto l00001453; - l00001453: - assume {:captureState "l00001453"} true; - R30, Gamma_R30 := 2268bv64, true; + goto l00001666; + l00001530_goto_l00001564: + assume {:captureState "l00001530_goto_l00001564"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00001564; + l000015ad: + assume {:captureState "l000015ad"} true; + R30, Gamma_R30 := 2240bv64, true; call add_six(); - goto l0000145a; - l0000145a: - assume {:captureState "l0000145a"} true; + goto l000015b9; + l000016cb: + assume {:captureState "l000016cb"} true; goto l00001308; - l00001564: - assume {:captureState "l00001564"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #18, Gamma_#18 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#18, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#18); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#18, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#18); - ZF, Gamma_ZF := bvcomp32(bvadd32(#18, 1bv32), 0bv32), Gamma_#18; - NF, Gamma_NF := bvadd32(#18, 1bv32)[32:31], Gamma_#18; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00001564_goto_l0000158c, l00001564_goto_l00001332; l0000158c: assume {:captureState "l0000158c"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -689,77 +675,65 @@ procedure main() NF, Gamma_NF := bvadd32(#19, 1bv32)[32:31], Gamma_#19; assert Gamma_ZF; goto l0000158c_goto_l000015bd, l0000158c_goto_l000015ad; - l000015ad: - assume {:captureState "l000015ad"} true; - R30, Gamma_R30 := 2240bv64, true; + l0000133b_goto_l00001363: + assume {:captureState "l0000133b_goto_l00001363"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00001363; + l0000158c_goto_l000015ad: + assume {:captureState "l0000158c_goto_l000015ad"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000015ad; + l000013e7: + assume {:captureState "l000013e7"} true; + R30, Gamma_R30 := 2276bv64, true; + call add_two(); + goto l000013f3; + l000014fc: + assume {:captureState "l000014fc"} true; + R30, Gamma_R30 := 2256bv64, true; call add_six(); - goto l000015b9; - l000015b9: - assume {:captureState "l000015b9"} true; - goto l00001308; - l000015bd: - assume {:captureState "l000015bd"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #20, Gamma_#20 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#20, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#20); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#20, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#20); - ZF, Gamma_ZF := bvcomp32(bvadd32(#20, 1bv32), 0bv32), Gamma_#20; - NF, Gamma_NF := bvadd32(#20, 1bv32)[32:31], Gamma_#20; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000015bd_goto_l000015e5, l000015bd_goto_l00001332; - l000015e5: - assume {:captureState "l000015e5"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #21, Gamma_#21 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#21, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#21); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#21, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#21); - ZF, Gamma_ZF := bvcomp32(bvadd32(#21, 1bv32), 0bv32), Gamma_#21; - NF, Gamma_NF := bvadd32(#21, 1bv32)[32:31], Gamma_#21; - assert Gamma_ZF; - goto l000015e5_goto_l0000161d, l000015e5_goto_l00001606; - l00001606: - assume {:captureState "l00001606"} true; - R30, Gamma_R30 := 2228bv64, true; + goto l000014a7; + l00001564_goto_l0000158c: + assume {:captureState "l00001564_goto_l0000158c"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000158c; + l00001508_goto_l00001530: + assume {:captureState "l00001508_goto_l00001530"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00001530; + l000016bf: + assume {:captureState "l000016bf"} true; + R30, Gamma_R30 := 2208bv64, true; call add_two(); - goto l00001612; - l00001612: - assume {:captureState "l00001612"} true; - R30, Gamma_R30 := 2232bv64, true; - call sub_seven(); - goto l00001619; - l00001619: - assume {:captureState "l00001619"} true; - goto l00001308; - l0000161d: - assume {:captureState "l0000161d"} true; + goto l000016cb; + l0000139e_goto_l00001332: + assume {:captureState "l0000139e_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l0000145e: + assume {:captureState "l0000145e"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #22, Gamma_#22 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#22, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#22); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#22, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#22); - ZF, Gamma_ZF := bvcomp32(bvadd32(#22, 1bv32), 0bv32), Gamma_#22; - NF, Gamma_NF := bvadd32(#22, 1bv32)[32:31], Gamma_#22; + #12, Gamma_#12 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#12, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#12); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#12); + ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; + NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l0000161d_goto_l00001332, l0000161d_goto_l00001645; - l00001645: - assume {:captureState "l00001645"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #23, Gamma_#23 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#23, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#23); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#23, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#23); - ZF, Gamma_ZF := bvcomp32(bvadd32(#23, 1bv32), 0bv32), Gamma_#23; - NF, Gamma_NF := bvadd32(#23, 1bv32)[32:31], Gamma_#23; - assert Gamma_ZF; - goto l00001645_goto_l00001676, l00001645_goto_l00001666; - l00001676: - assume {:captureState "l00001676"} true; + goto l0000145e_goto_l00001486, l0000145e_goto_l00001332; + l000014b3_goto_l00001332: + assume {:captureState "l000014b3_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l0000133b: + assume {:captureState "l0000133b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #24, Gamma_#24 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#24, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#24); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#24, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#24); - ZF, Gamma_ZF := bvcomp32(bvadd32(#24, 1bv32), 0bv32), Gamma_#24; - NF, Gamma_NF := bvadd32(#24, 1bv32)[32:31], Gamma_#24; + #6, Gamma_#6 := bvadd32(R0[32:0], 4294967284bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934581bv33))), (Gamma_R0 && Gamma_#6); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#6); + ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; + NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00001676_goto_l00001332, l00001676_goto_l0000169e; + goto l0000133b_goto_l00001363, l0000133b_goto_l00001332; l0000169e: assume {:captureState "l0000169e"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -770,189 +744,136 @@ procedure main() NF, Gamma_NF := bvadd32(#25, 1bv32)[32:31], Gamma_#25; assert Gamma_ZF; goto l0000169e_goto_l000016bf, l0000169e_goto_l000016d6; - l000016bf: - assume {:captureState "l000016bf"} true; - R30, Gamma_R30 := 2208bv64, true; - call add_two(); - goto l000016cb; - l000016cb: - assume {:captureState "l000016cb"} true; - goto l00001308; - l000016d6: - assume {:captureState "l000016d6"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #26, Gamma_#26 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#26, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#26); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#26, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#26); - ZF, Gamma_ZF := bvcomp32(bvadd32(#26, 1bv32), 0bv32), Gamma_#26; - NF, Gamma_NF := bvadd32(#26, 1bv32)[32:31], Gamma_#26; - assert Gamma_ZF; - goto l000016d6_goto_l000016cf, l000016d6_goto_l000016fc; - l000016cf: - assume {:captureState "l000016cf"} true; - R30, Gamma_R30 := 2216bv64, true; + l00001676_goto_l00001332: + assume {:captureState "l00001676_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l000013fe_goto_l00001332: + assume {:captureState "l000013fe_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l0000145e_goto_l00001332: + assume {:captureState "l0000145e_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l000013f3: + assume {:captureState "l000013f3"} true; + R30, Gamma_R30 := 2280bv64, true; call add_six(); - goto l00001666; - l00001666: - assume {:captureState "l00001666"} true; - R30, Gamma_R30 := 2220bv64, true; - call sub_seven(); - goto l00001672; - l00001672: - assume {:captureState "l00001672"} true; + goto l000013fa; + l0000145a: + assume {:captureState "l0000145a"} true; goto l00001308; - l00001308: - assume {:captureState "l00001308"} true; - R0, Gamma_R0 := 69632bv64, true; - R0, Gamma_R0 := bvadd64(R0, 16bv64), Gamma_R0; - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); - goto l0000131d; - l000016fc: - assume {:captureState "l000016fc"} true; - goto l00001332; - l00001332: - assume {:captureState "l00001332"} true; - R0, Gamma_R0 := 1bv64, true; - goto l0000131d; + l00001508: + assume {:captureState "l00001508"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #16, Gamma_#16 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#16, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#16); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#16, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#16); + ZF, Gamma_ZF := bvcomp32(bvadd32(#16, 1bv32), 0bv32), Gamma_#16; + NF, Gamma_NF := bvadd32(#16, 1bv32)[32:31], Gamma_#16; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00001508_goto_l00001332, l00001508_goto_l00001530; l0000131d: assume {:captureState "l0000131d"} true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l000012f4: - assume {:captureState "lmain_goto_l000012f4"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000012f4; - lmain_goto_l0000133b: - assume {:captureState "lmain_goto_l0000133b"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000133b; - l0000133b_goto_l00001332: - assume {:captureState "l0000133b_goto_l00001332"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00001332; - l0000133b_goto_l00001363: - assume {:captureState "l0000133b_goto_l00001363"} true; + goto main_return; + l0000139e_goto_l000013c6: + assume {:captureState "l0000139e_goto_l000013c6"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00001363; - l00001363_goto_l00001384: - assume {:captureState "l00001363_goto_l00001384"} true; + goto l000013c6; + l00001332: + assume {:captureState "l00001332"} true; + R0, Gamma_R0 := 1bv64, true; + goto l0000131d; + l00001453: + assume {:captureState "l00001453"} true; + R30, Gamma_R30 := 2268bv64, true; + call add_six(); + goto l0000145a; + l0000169e_goto_l000016bf: + assume {:captureState "l0000169e_goto_l000016bf"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00001384; + goto l000016bf; + l00001612: + assume {:captureState "l00001612"} true; + R30, Gamma_R30 := 2232bv64, true; + call sub_seven(); + goto l00001619; l00001363_goto_l0000139e: assume {:captureState "l00001363_goto_l0000139e"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l0000139e; - l0000139e_goto_l00001332: - assume {:captureState "l0000139e_goto_l00001332"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00001332; - l0000139e_goto_l000013c6: - assume {:captureState "l0000139e_goto_l000013c6"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l000013c6; - l000013c6_goto_l000013e7: - assume {:captureState "l000013c6_goto_l000013e7"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000013e7; - l000013c6_goto_l000013fe: - assume {:captureState "l000013c6_goto_l000013fe"} true; + l000016d6_goto_l000016fc: + assume {:captureState "l000016d6_goto_l000016fc"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000013fe; - l000013fe_goto_l00001332: - assume {:captureState "l000013fe_goto_l00001332"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00001332; - l000013fe_goto_l00001426: - assume {:captureState "l000013fe_goto_l00001426"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00001426; + goto l000016fc; + l00001619: + assume {:captureState "l00001619"} true; + goto l00001308; + lmain_goto_l0000133b: + assume {:captureState "lmain_goto_l0000133b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000133b; l00001426_goto_l00001447: assume {:captureState "l00001426_goto_l00001447"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00001447; - l00001426_goto_l0000145e: - assume {:captureState "l00001426_goto_l0000145e"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000145e; - l0000145e_goto_l00001332: - assume {:captureState "l0000145e_goto_l00001332"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00001332; - l0000145e_goto_l00001486: - assume {:captureState "l0000145e_goto_l00001486"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00001486; - l00001486_goto_l000014a7: - assume {:captureState "l00001486_goto_l000014a7"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000014a7; - l00001486_goto_l000014b3: - assume {:captureState "l00001486_goto_l000014b3"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000014b3; - l000014b3_goto_l00001332: - assume {:captureState "l000014b3_goto_l00001332"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00001332; - l000014b3_goto_l000014db: - assume {:captureState "l000014b3_goto_l000014db"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l000014db; - l000014db_goto_l000014fc: - assume {:captureState "l000014db_goto_l000014fc"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000014fc; - l000014db_goto_l00001508: - assume {:captureState "l000014db_goto_l00001508"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00001508; - l00001508_goto_l00001332: - assume {:captureState "l00001508_goto_l00001332"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00001332; - l00001508_goto_l00001530: - assume {:captureState "l00001508_goto_l00001530"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00001530; + l000013c6: + assume {:captureState "l000013c6"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #9, Gamma_#9 := bvadd32(R0[32:0], 4294967286bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934583bv33))), (Gamma_R0 && Gamma_#9); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#9); + ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; + NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; + assert Gamma_ZF; + goto l000013c6_goto_l000013e7, l000013c6_goto_l000013fe; + l00001564: + assume {:captureState "l00001564"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #18, Gamma_#18 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#18, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#18); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#18, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#18); + ZF, Gamma_ZF := bvcomp32(bvadd32(#18, 1bv32), 0bv32), Gamma_#18; + NF, Gamma_NF := bvadd32(#18, 1bv32)[32:31], Gamma_#18; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00001564_goto_l0000158c, l00001564_goto_l00001332; + l000014db: + assume {:captureState "l000014db"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #15, Gamma_#15 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#15, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#15); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#15, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#15); + ZF, Gamma_ZF := bvcomp32(bvadd32(#15, 1bv32), 0bv32), Gamma_#15; + NF, Gamma_NF := bvadd32(#15, 1bv32)[32:31], Gamma_#15; + assert Gamma_ZF; + goto l000014db_goto_l00001508, l000014db_goto_l000014fc; + l00001606: + assume {:captureState "l00001606"} true; + R30, Gamma_R30 := 2228bv64, true; + call add_two(); + goto l00001612; + l00001447: + assume {:captureState "l00001447"} true; + R30, Gamma_R30 := 2264bv64, true; + call sub_seven(); + goto l00001453; l00001530_goto_l00001551: assume {:captureState "l00001530_goto_l00001551"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00001551; - l00001530_goto_l00001564: - assume {:captureState "l00001530_goto_l00001564"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00001564; - l00001564_goto_l00001332: - assume {:captureState "l00001564_goto_l00001332"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00001332; - l00001564_goto_l0000158c: - assume {:captureState "l00001564_goto_l0000158c"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l0000158c; - l0000158c_goto_l000015ad: - assume {:captureState "l0000158c_goto_l000015ad"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000015ad; - l0000158c_goto_l000015bd: - assume {:captureState "l0000158c_goto_l000015bd"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000015bd; l000015bd_goto_l00001332: assume {:captureState "l000015bd_goto_l00001332"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l00001332; - l000015bd_goto_l000015e5: - assume {:captureState "l000015bd_goto_l000015e5"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l000015e5; - l000015e5_goto_l00001606: - assume {:captureState "l000015e5_goto_l00001606"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00001606; + l0000155d: + assume {:captureState "l0000155d"} true; + R30, Gamma_R30 := 2252bv64, true; + call add_two(); + goto l000014fc; l000015e5_goto_l0000161d: assume {:captureState "l000015e5_goto_l0000161d"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); @@ -961,42 +882,139 @@ procedure main() assume {:captureState "l0000161d_goto_l00001332"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l00001332; + l0000139e: + assume {:captureState "l0000139e"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #8, Gamma_#8 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#8); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#8); + ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; + NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000139e_goto_l000013c6, l0000139e_goto_l00001332; + l0000169e_goto_l000016d6: + assume {:captureState "l0000169e_goto_l000016d6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000016d6; + l0000133b_goto_l00001332: + assume {:captureState "l0000133b_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l00001390: + assume {:captureState "l00001390"} true; + R30, Gamma_R30 := 2292bv64, true; + call add_two(); + goto l00001397; + l000015e5_goto_l00001606: + assume {:captureState "l000015e5_goto_l00001606"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00001606; + l00001363_goto_l00001384: + assume {:captureState "l00001363_goto_l00001384"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00001384; l0000161d_goto_l00001645: assume {:captureState "l0000161d_goto_l00001645"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); goto l00001645; - l00001645_goto_l00001666: - assume {:captureState "l00001645_goto_l00001666"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00001666; - l00001645_goto_l00001676: - assume {:captureState "l00001645_goto_l00001676"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00001676; - l00001676_goto_l00001332: - assume {:captureState "l00001676_goto_l00001332"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00001332; - l00001676_goto_l0000169e: - assume {:captureState "l00001676_goto_l0000169e"} true; + l00001397: + assume {:captureState "l00001397"} true; + R30, Gamma_R30 := 2296bv64, true; + call add_six(); + goto l000012f4; + l00001551: + assume {:captureState "l00001551"} true; + R30, Gamma_R30 := 2248bv64, true; + call add_six(); + goto l0000155d; + l00001672: + assume {:captureState "l00001672"} true; + goto l00001308; + l00001676: + assume {:captureState "l00001676"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #24, Gamma_#24 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#24, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#24); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#24, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#24); + ZF, Gamma_ZF := bvcomp32(bvadd32(#24, 1bv32), 0bv32), Gamma_#24; + NF, Gamma_NF := bvadd32(#24, 1bv32)[32:31], Gamma_#24; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00001676_goto_l00001332, l00001676_goto_l0000169e; + l000013fe_goto_l00001426: + assume {:captureState "l000013fe_goto_l00001426"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l0000169e; - l0000169e_goto_l000016bf: - assume {:captureState "l0000169e_goto_l000016bf"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000016bf; - l0000169e_goto_l000016d6: - assume {:captureState "l0000169e_goto_l000016d6"} true; + goto l00001426; + l000013c6_goto_l000013fe: + assume {:captureState "l000013c6_goto_l000013fe"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000016d6; - l000016d6_goto_l000016cf: - assume {:captureState "l000016d6_goto_l000016cf"} true; + goto l000013fe; + l0000145e_goto_l00001486: + assume {:captureState "l0000145e_goto_l00001486"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00001486; + lmain_goto_l000012f4: + assume {:captureState "lmain_goto_l000012f4"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000016cf; - l000016d6_goto_l000016fc: - assume {:captureState "l000016d6_goto_l000016fc"} true; + goto l000012f4; + l000015e5: + assume {:captureState "l000015e5"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #21, Gamma_#21 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#21, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#21); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#21, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#21); + ZF, Gamma_ZF := bvcomp32(bvadd32(#21, 1bv32), 0bv32), Gamma_#21; + NF, Gamma_NF := bvadd32(#21, 1bv32)[32:31], Gamma_#21; + assert Gamma_ZF; + goto l000015e5_goto_l0000161d, l000015e5_goto_l00001606; + l00001300: + assume {:captureState "l00001300"} true; + R30, Gamma_R30 := 2304bv64, true; + call add_two(); + goto l00001307; + l000016fc: + assume {:captureState "l000016fc"} true; + goto l00001332; + l00001426_goto_l0000145e: + assume {:captureState "l00001426_goto_l0000145e"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000016fc; + goto l0000145e; + l00001384: + assume {:captureState "l00001384"} true; + R30, Gamma_R30 := 2288bv64, true; + call sub_seven(); + goto l00001390; + l00001308: + assume {:captureState "l00001308"} true; + R0, Gamma_R0 := 69632bv64, true; + R0, Gamma_R0 := bvadd64(R0, 16bv64), Gamma_R0; + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + goto l0000131d; + l00001508_goto_l00001332: + assume {:captureState "l00001508_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l00001307: + assume {:captureState "l00001307"} true; + goto l00001308; + l00001426: + assume {:captureState "l00001426"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #11, Gamma_#11 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#11); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#11); + ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; + NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; + assert Gamma_ZF; + goto l00001426_goto_l0000145e, l00001426_goto_l00001447; + l00001666: + assume {:captureState "l00001666"} true; + R30, Gamma_R30 := 2220bv64, true; + call sub_seven(); + goto l00001672; + main_return: + assume {:captureState "main_return"} true; + return; } procedure sub_seven() @@ -1087,5 +1105,11 @@ procedure sub_seven() assert (L(mem, R0) ==> Gamma_R1); mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%0000129e"} true; + goto sub_seven_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + sub_seven_return: + assume {:captureState "sub_seven_return"} true; return; } diff --git a/src/test/correct/jumptable3/gcc_pic/jumptable3.expected b/src/test/correct/jumptable3/gcc_pic/jumptable3.expected index e03bfb332..15eee74c7 100644 --- a/src/test/correct/jumptable3/gcc_pic/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc_pic/jumptable3.expected @@ -232,6 +232,12 @@ procedure add_six() assert (L(mem, R0) ==> Gamma_R1); mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%00000515"} true; + goto add_six_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + add_six_return: + assume {:captureState "add_six_return"} true; return; } @@ -341,6 +347,12 @@ procedure add_two() assert (L(mem, R0) ==> Gamma_R1); mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%000004e1"} true; + goto add_two_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + add_two_return: + assume {:captureState "add_two_return"} true; return; } @@ -535,107 +547,13 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto lmain_goto_l000005e7, lmain_goto_l0000059f; - l000005e7: - assume {:captureState "l000005e7"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #6, Gamma_#6 := bvadd32(R0[32:0], 4294967284bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934581bv33))), (Gamma_R0 && Gamma_#6); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#6); - ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; - NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000005e7_goto_l000005de, l000005e7_goto_l0000060f; - l0000060f: - assume {:captureState "l0000060f"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #7, Gamma_#7 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#7); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#7); - ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; - NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; - assert Gamma_ZF; - goto l0000060f_goto_l00000630, l0000060f_goto_l0000064a; - l00000630: - assume {:captureState "l00000630"} true; - R30, Gamma_R30 := 2352bv64, true; - call sub_seven(); - goto l0000063c; - l0000063c: - assume {:captureState "l0000063c"} true; - R30, Gamma_R30 := 2356bv64, true; - call add_two(); - goto l00000643; - l00000643: - assume {:captureState "l00000643"} true; - R30, Gamma_R30 := 2360bv64, true; - call add_six(); - goto l0000059f; - l0000059f: - assume {:captureState "l0000059f"} true; - R30, Gamma_R30 := 2364bv64, true; - call sub_seven(); - goto l000005ab; - l000005ab: - assume {:captureState "l000005ab"} true; - R30, Gamma_R30 := 2368bv64, true; - call add_two(); - goto l000005b2; - l000005b2: - assume {:captureState "l000005b2"} true; - goto l000005b3; - l0000064a: - assume {:captureState "l0000064a"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #8, Gamma_#8 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#8); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#8); - ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; - NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l0000064a_goto_l000005de, l0000064a_goto_l00000672; - l00000672: - assume {:captureState "l00000672"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #9, Gamma_#9 := bvadd32(R0[32:0], 4294967286bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934583bv33))), (Gamma_R0 && Gamma_#9); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#9); - ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; - NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; - assert Gamma_ZF; - goto l00000672_goto_l00000693, l00000672_goto_l000006aa; - l00000693: - assume {:captureState "l00000693"} true; - R30, Gamma_R30 := 2340bv64, true; - call add_two(); - goto l0000069f; - l0000069f: - assume {:captureState "l0000069f"} true; - R30, Gamma_R30 := 2344bv64, true; - call add_six(); - goto l000006a6; l000006a6: assume {:captureState "l000006a6"} true; goto l000005b3; - l000006aa: - assume {:captureState "l000006aa"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #10, Gamma_#10 := bvadd32(R0[32:0], 4294967286bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934583bv33))), (Gamma_R0 && Gamma_#10); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#10); - ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; - NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000006aa_goto_l000006d2, l000006aa_goto_l000005de; - l000006d2: - assume {:captureState "l000006d2"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #11, Gamma_#11 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#11); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#11); - ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; - NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; - assert Gamma_ZF; - goto l000006d2_goto_l0000070a, l000006d2_goto_l000006f3; + l000006d2_goto_l0000070a: + assume {:captureState "l000006d2_goto_l0000070a"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000070a; l0000070a: assume {:captureState "l0000070a"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -646,36 +564,74 @@ procedure main() NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); goto l0000070a_goto_l000005de, l0000070a_goto_l00000732; - l00000732: - assume {:captureState "l00000732"} true; + l0000094a: + assume {:captureState "l0000094a"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #13, Gamma_#13 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#13, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#13); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#13, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#13); - ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; - NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; + #25, Gamma_#25 := bvadd32(R0[32:0], 4294967295bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#25, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 0bv33))), (Gamma_R0 && Gamma_#25); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#25, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967296bv33))), (Gamma_R0 && Gamma_#25); + ZF, Gamma_ZF := bvcomp32(bvadd32(#25, 1bv32), 0bv32), Gamma_#25; + NF, Gamma_NF := bvadd32(#25, 1bv32)[32:31], Gamma_#25; assert Gamma_ZF; - goto l00000732_goto_l0000075f, l00000732_goto_l00000753; - l0000075f: - assume {:captureState "l0000075f"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #14, Gamma_#14 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#14, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#14); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#14, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#14); - ZF, Gamma_ZF := bvcomp32(bvadd32(#14, 1bv32), 0bv32), Gamma_#14; - NF, Gamma_NF := bvadd32(#14, 1bv32)[32:31], Gamma_#14; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l0000075f_goto_l00000787, l0000075f_goto_l000005de; - l00000787: - assume {:captureState "l00000787"} true; + goto l0000094a_goto_l00000982, l0000094a_goto_l0000096b; + l000008c9_goto_l000008f1: + assume {:captureState "l000008c9_goto_l000008f1"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000008f1; + l000007dc_goto_l00000810: + assume {:captureState "l000007dc_goto_l00000810"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000810; + l00000787_goto_l000007b4: + assume {:captureState "l00000787_goto_l000007b4"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000007b4; + l00000982_goto_l000009a8: + assume {:captureState "l00000982_goto_l000009a8"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009a8; + l00000810_goto_l000005de: + assume {:captureState "l00000810_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l00000891_goto_l000008c9: + assume {:captureState "l00000891_goto_l000008c9"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000008c9; + l000008f1_goto_l00000922: + assume {:captureState "l000008f1_goto_l00000922"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000922; + l000006aa_goto_l000005de: + assume {:captureState "l000006aa_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l0000075f_goto_l00000787: + assume {:captureState "l0000075f_goto_l00000787"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000787; + l0000075f_goto_l000005de: + assume {:captureState "l0000075f_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l000008f1: + assume {:captureState "l000008f1"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #15, Gamma_#15 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#15, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#15); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#15, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#15); - ZF, Gamma_ZF := bvcomp32(bvadd32(#15, 1bv32), 0bv32), Gamma_#15; - NF, Gamma_NF := bvadd32(#15, 1bv32)[32:31], Gamma_#15; + #23, Gamma_#23 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#23, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#23); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#23, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#23); + ZF, Gamma_ZF := bvcomp32(bvadd32(#23, 1bv32), 0bv32), Gamma_#23; + NF, Gamma_NF := bvadd32(#23, 1bv32)[32:31], Gamma_#23; assert Gamma_ZF; - goto l00000787_goto_l000007b4, l00000787_goto_l000007a8; + goto l000008f1_goto_l00000912, l000008f1_goto_l00000922; + l00000982_goto_l0000097b: + assume {:captureState "l00000982_goto_l0000097b"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000097b; + l000007dc_goto_l000007fd: + assume {:captureState "l000007dc_goto_l000007fd"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000007fd; l000007b4: assume {:captureState "l000007b4"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -686,59 +642,35 @@ procedure main() NF, Gamma_NF := bvadd32(#16, 1bv32)[32:31], Gamma_#16; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); goto l000007b4_goto_l000007dc, l000007b4_goto_l000005de; - l000007dc: - assume {:captureState "l000007dc"} true; + l000005e7_goto_l000005de: + assume {:captureState "l000005e7_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l00000810_goto_l00000838: + assume {:captureState "l00000810_goto_l00000838"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000838; + l00000672: + assume {:captureState "l00000672"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #17, Gamma_#17 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#17, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#17); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#17, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#17); - ZF, Gamma_ZF := bvcomp32(bvadd32(#17, 1bv32), 0bv32), Gamma_#17; - NF, Gamma_NF := bvadd32(#17, 1bv32)[32:31], Gamma_#17; + #9, Gamma_#9 := bvadd32(R0[32:0], 4294967286bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934583bv33))), (Gamma_R0 && Gamma_#9); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#9); + ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; + NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; - goto l000007dc_goto_l000007fd, l000007dc_goto_l00000810; - l000007fd: - assume {:captureState "l000007fd"} true; - R30, Gamma_R30 := 2312bv64, true; - call add_six(); - goto l00000809; - l00000809: - assume {:captureState "l00000809"} true; - R30, Gamma_R30 := 2316bv64, true; - call add_two(); - goto l000007a8; - l000007a8: - assume {:captureState "l000007a8"} true; - R30, Gamma_R30 := 2320bv64, true; - call add_six(); - goto l00000753; - l00000753: - assume {:captureState "l00000753"} true; - R30, Gamma_R30 := 2324bv64, true; - call sub_seven(); - goto l000006f3; - l000006f3: - assume {:captureState "l000006f3"} true; - R30, Gamma_R30 := 2328bv64, true; - call sub_seven(); - goto l000006ff; - l000006ff: - assume {:captureState "l000006ff"} true; - R30, Gamma_R30 := 2332bv64, true; - call add_six(); - goto l00000706; - l00000706: - assume {:captureState "l00000706"} true; - goto l000005b3; - l00000810: - assume {:captureState "l00000810"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #18, Gamma_#18 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#18, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#18); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#18, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#18); - ZF, Gamma_ZF := bvcomp32(bvadd32(#18, 1bv32), 0bv32), Gamma_#18; - NF, Gamma_NF := bvadd32(#18, 1bv32)[32:31], Gamma_#18; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000810_goto_l000005de, l00000810_goto_l00000838; + goto l00000672_goto_l00000693, l00000672_goto_l000006aa; + l0000070a_goto_l000005de: + assume {:captureState "l0000070a_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l00000869_goto_l00000891: + assume {:captureState "l00000869_goto_l00000891"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000891; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000838: assume {:captureState "l00000838"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -749,24 +681,113 @@ procedure main() NF, Gamma_NF := bvadd32(#19, 1bv32)[32:31], Gamma_#19; assert Gamma_ZF; goto l00000838_goto_l00000869, l00000838_goto_l00000859; - l00000859: - assume {:captureState "l00000859"} true; - R30, Gamma_R30 := 2304bv64, true; + l000008c5: + assume {:captureState "l000008c5"} true; + goto l000005b3; + l0000064a_goto_l00000672: + assume {:captureState "l0000064a_goto_l00000672"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000672; + l000005e7: + assume {:captureState "l000005e7"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #6, Gamma_#6 := bvadd32(R0[32:0], 4294967284bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934581bv33))), (Gamma_R0 && Gamma_#6); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#6); + ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; + NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000005e7_goto_l000005de, l000005e7_goto_l0000060f; + lmain_goto_l0000059f: + assume {:captureState "lmain_goto_l0000059f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000059f; + l000007a8: + assume {:captureState "l000007a8"} true; + R30, Gamma_R30 := 2320bv64, true; call add_six(); - goto l00000865; - l00000865: - assume {:captureState "l00000865"} true; + goto l00000753; + l000008c9: + assume {:captureState "l000008c9"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #22, Gamma_#22 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#22, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#22); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#22, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#22); + ZF, Gamma_ZF := bvcomp32(bvadd32(#22, 1bv32), 0bv32), Gamma_#22; + NF, Gamma_NF := bvadd32(#22, 1bv32)[32:31], Gamma_#22; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000008c9_goto_l000008f1, l000008c9_goto_l000005de; + l0000070a_goto_l00000732: + assume {:captureState "l0000070a_goto_l00000732"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000732; + l000008be: + assume {:captureState "l000008be"} true; + R30, Gamma_R30 := 2296bv64, true; + call sub_seven(); + goto l000008c5; + l00000891_goto_l000008b2: + assume {:captureState "l00000891_goto_l000008b2"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000008b2; + l00000787: + assume {:captureState "l00000787"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #15, Gamma_#15 := bvadd32(R0[32:0], 4294967289bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#15, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934586bv33))), (Gamma_R0 && Gamma_#15); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#15, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#15); + ZF, Gamma_ZF := bvcomp32(bvadd32(#15, 1bv32), 0bv32), Gamma_#15; + NF, Gamma_NF := bvadd32(#15, 1bv32)[32:31], Gamma_#15; + assert Gamma_ZF; + goto l00000787_goto_l000007b4, l00000787_goto_l000007a8; + l000005de: + assume {:captureState "l000005de"} true; + R0, Gamma_R0 := 1bv64, true; + goto l000005c9; + l000006ff: + assume {:captureState "l000006ff"} true; + R30, Gamma_R30 := 2332bv64, true; + call add_six(); + goto l00000706; + l000008c9_goto_l000005de: + assume {:captureState "l000008c9_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l000007b4_goto_l000007dc: + assume {:captureState "l000007b4_goto_l000007dc"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000007dc; + l00000869_goto_l000005de: + assume {:captureState "l00000869_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l00000706: + assume {:captureState "l00000706"} true; goto l000005b3; - l00000869: - assume {:captureState "l00000869"} true; + l0000075f: + assume {:captureState "l0000075f"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #20, Gamma_#20 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#20, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#20); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#20, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#20); - ZF, Gamma_ZF := bvcomp32(bvadd32(#20, 1bv32), 0bv32), Gamma_#20; - NF, Gamma_NF := bvadd32(#20, 1bv32)[32:31], Gamma_#20; + #14, Gamma_#14 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#14, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#14); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#14, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#14); + ZF, Gamma_ZF := bvcomp32(bvadd32(#14, 1bv32), 0bv32), Gamma_#14; + NF, Gamma_NF := bvadd32(#14, 1bv32)[32:31], Gamma_#14; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000869_goto_l00000891, l00000869_goto_l000005de; + goto l0000075f_goto_l00000787, l0000075f_goto_l000005de; + l000008b2: + assume {:captureState "l000008b2"} true; + R30, Gamma_R30 := 2292bv64, true; + call add_two(); + goto l000008be; + l0000063c: + assume {:captureState "l0000063c"} true; + R30, Gamma_R30 := 2356bv64, true; + call add_two(); + goto l00000643; + l000006d2_goto_l000006f3: + assume {:captureState "l000006d2_goto_l000006f3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000006f3; l00000891: assume {:captureState "l00000891"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -777,39 +798,67 @@ procedure main() NF, Gamma_NF := bvadd32(#21, 1bv32)[32:31], Gamma_#21; assert Gamma_ZF; goto l00000891_goto_l000008b2, l00000891_goto_l000008c9; - l000008b2: - assume {:captureState "l000008b2"} true; - R30, Gamma_R30 := 2292bv64, true; - call add_two(); - goto l000008be; - l000008be: - assume {:captureState "l000008be"} true; - R30, Gamma_R30 := 2296bv64, true; - call sub_seven(); - goto l000008c5; - l000008c5: - assume {:captureState "l000008c5"} true; + l0000060f_goto_l00000630: + assume {:captureState "l0000060f_goto_l00000630"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000630; + l0000091e: + assume {:captureState "l0000091e"} true; goto l000005b3; - l000008c9: - assume {:captureState "l000008c9"} true; + l00000838_goto_l00000869: + assume {:captureState "l00000838_goto_l00000869"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000869; + l000008f1_goto_l00000912: + assume {:captureState "l000008f1_goto_l00000912"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000912; + l00000810: + assume {:captureState "l00000810"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #22, Gamma_#22 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#22, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#22); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#22, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#22); - ZF, Gamma_ZF := bvcomp32(bvadd32(#22, 1bv32), 0bv32), Gamma_#22; - NF, Gamma_NF := bvadd32(#22, 1bv32)[32:31], Gamma_#22; + #18, Gamma_#18 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#18, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#18); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#18, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#18); + ZF, Gamma_ZF := bvcomp32(bvadd32(#18, 1bv32), 0bv32), Gamma_#18; + NF, Gamma_NF := bvadd32(#18, 1bv32)[32:31], Gamma_#18; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000008c9_goto_l000008f1, l000008c9_goto_l000005de; - l000008f1: - assume {:captureState "l000008f1"} true; + goto l00000810_goto_l000005de, l00000810_goto_l00000838; + l0000064a: + assume {:captureState "l0000064a"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #23, Gamma_#23 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#23, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#23); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#23, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#23); - ZF, Gamma_ZF := bvcomp32(bvadd32(#23, 1bv32), 0bv32), Gamma_#23; - NF, Gamma_NF := bvadd32(#23, 1bv32)[32:31], Gamma_#23; - assert Gamma_ZF; - goto l000008f1_goto_l00000912, l000008f1_goto_l00000922; + #8, Gamma_#8 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#8); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#8); + ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; + NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000064a_goto_l000005de, l0000064a_goto_l00000672; + l00000922_goto_l0000094a: + assume {:captureState "l00000922_goto_l0000094a"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000094a; + l00000732_goto_l0000075f: + assume {:captureState "l00000732_goto_l0000075f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000075f; + l000006aa_goto_l000006d2: + assume {:captureState "l000006aa_goto_l000006d2"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000006d2; + l000005c9: + assume {:captureState "l000005c9"} true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + l00000922_goto_l000005de: + assume {:captureState "l00000922_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l00000838_goto_l00000859: + assume {:captureState "l00000838_goto_l00000859"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000859; l00000922: assume {:captureState "l00000922"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -820,47 +869,39 @@ procedure main() NF, Gamma_NF := bvadd32(#24, 1bv32)[32:31], Gamma_#24; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); goto l00000922_goto_l0000094a, l00000922_goto_l000005de; - l0000094a: - assume {:captureState "l0000094a"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #25, Gamma_#25 := bvadd32(R0[32:0], 4294967295bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#25, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 0bv33))), (Gamma_R0 && Gamma_#25); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#25, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967296bv33))), (Gamma_R0 && Gamma_#25); - ZF, Gamma_ZF := bvcomp32(bvadd32(#25, 1bv32), 0bv32), Gamma_#25; - NF, Gamma_NF := bvadd32(#25, 1bv32)[32:31], Gamma_#25; - assert Gamma_ZF; - goto l0000094a_goto_l00000982, l0000094a_goto_l0000096b; - l0000096b: - assume {:captureState "l0000096b"} true; - R30, Gamma_R30 := 2272bv64, true; - call add_two(); - goto l00000977; - l00000977: - assume {:captureState "l00000977"} true; - goto l000005b3; - l00000982: - assume {:captureState "l00000982"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #26, Gamma_#26 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#26, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#26); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#26, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#26); - ZF, Gamma_ZF := bvcomp32(bvadd32(#26, 1bv32), 0bv32), Gamma_#26; - NF, Gamma_NF := bvadd32(#26, 1bv32)[32:31], Gamma_#26; - assert Gamma_ZF; - goto l00000982_goto_l000009a8, l00000982_goto_l0000097b; - l0000097b: - assume {:captureState "l0000097b"} true; - R30, Gamma_R30 := 2280bv64, true; + l00000643: + assume {:captureState "l00000643"} true; + R30, Gamma_R30 := 2360bv64, true; call add_six(); - goto l00000912; - l00000912: - assume {:captureState "l00000912"} true; - R30, Gamma_R30 := 2284bv64, true; - call sub_seven(); - goto l0000091e; - l0000091e: - assume {:captureState "l0000091e"} true; - goto l000005b3; + goto l0000059f; + l000007fd: + assume {:captureState "l000007fd"} true; + R30, Gamma_R30 := 2312bv64, true; + call add_six(); + goto l00000809; + l0000059f: + assume {:captureState "l0000059f"} true; + R30, Gamma_R30 := 2364bv64, true; + call sub_seven(); + goto l000005ab; + lmain_goto_l000005e7: + assume {:captureState "lmain_goto_l000005e7"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000005e7; + l000006f3: + assume {:captureState "l000006f3"} true; + R30, Gamma_R30 := 2328bv64, true; + call sub_seven(); + goto l000006ff; + l00000809: + assume {:captureState "l00000809"} true; + R30, Gamma_R30 := 2316bv64, true; + call add_two(); + goto l000007a8; + l0000064a_goto_l000005de: + assume {:captureState "l0000064a_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; l000005b3: assume {:captureState "l000005b3"} true; R0, Gamma_R0 := 65536bv64, true; @@ -869,195 +910,172 @@ procedure main() call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); goto l000005c9; - l000009a8: - assume {:captureState "l000009a8"} true; - goto l000005de; - l000005de: - assume {:captureState "l000005de"} true; - R0, Gamma_R0 := 1bv64, true; - goto l000005c9; - l000005c9: - assume {:captureState "l000005c9"} true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l0000059f: - assume {:captureState "lmain_goto_l0000059f"} true; + l0000097b: + assume {:captureState "l0000097b"} true; + R30, Gamma_R30 := 2280bv64, true; + call add_six(); + goto l00000912; + l000006d2: + assume {:captureState "l000006d2"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #11, Gamma_#11 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934584bv33))), (Gamma_R0 && Gamma_#11); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#11); + ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; + NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; + assert Gamma_ZF; + goto l000006d2_goto_l0000070a, l000006d2_goto_l000006f3; + l000005b2: + assume {:captureState "l000005b2"} true; + goto l000005b3; + l00000630: + assume {:captureState "l00000630"} true; + R30, Gamma_R30 := 2352bv64, true; + call sub_seven(); + goto l0000063c; + l00000912: + assume {:captureState "l00000912"} true; + R30, Gamma_R30 := 2284bv64, true; + call sub_seven(); + goto l0000091e; + l000005ab: + assume {:captureState "l000005ab"} true; + R30, Gamma_R30 := 2368bv64, true; + call add_two(); + goto l000005b2; + l00000732_goto_l00000753: + assume {:captureState "l00000732_goto_l00000753"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000059f; - lmain_goto_l000005e7: - assume {:captureState "lmain_goto_l000005e7"} true; + goto l00000753; + l00000753: + assume {:captureState "l00000753"} true; + R30, Gamma_R30 := 2324bv64, true; + call sub_seven(); + goto l000006f3; + l0000060f_goto_l0000064a: + assume {:captureState "l0000060f_goto_l0000064a"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000005e7; - l000005e7_goto_l000005de: - assume {:captureState "l000005e7_goto_l000005de"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005de; + goto l0000064a; l000005e7_goto_l0000060f: assume {:captureState "l000005e7_goto_l0000060f"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); goto l0000060f; - l0000060f_goto_l00000630: - assume {:captureState "l0000060f_goto_l00000630"} true; + l0000096b: + assume {:captureState "l0000096b"} true; + R30, Gamma_R30 := 2272bv64, true; + call add_two(); + goto l00000977; + l00000982: + assume {:captureState "l00000982"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #26, Gamma_#26 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#26, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#26); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#26, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#26); + ZF, Gamma_ZF := bvcomp32(bvadd32(#26, 1bv32), 0bv32), Gamma_#26; + NF, Gamma_NF := bvadd32(#26, 1bv32)[32:31], Gamma_#26; + assert Gamma_ZF; + goto l00000982_goto_l000009a8, l00000982_goto_l0000097b; + l000009a8: + assume {:captureState "l000009a8"} true; + goto l000005de; + l0000094a_goto_l0000096b: + assume {:captureState "l0000094a_goto_l0000096b"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000630; - l0000060f_goto_l0000064a: - assume {:captureState "l0000060f_goto_l0000064a"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000064a; - l0000064a_goto_l000005de: - assume {:captureState "l0000064a_goto_l000005de"} true; + goto l0000096b; + l0000060f: + assume {:captureState "l0000060f"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #7, Gamma_#7 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934582bv33))), (Gamma_R0 && Gamma_#7); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#7); + ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; + NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; + assert Gamma_ZF; + goto l0000060f_goto_l00000630, l0000060f_goto_l0000064a; + l00000869: + assume {:captureState "l00000869"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #20, Gamma_#20 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#20, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#20); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#20, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#20); + ZF, Gamma_ZF := bvcomp32(bvadd32(#20, 1bv32), 0bv32), Gamma_#20; + NF, Gamma_NF := bvadd32(#20, 1bv32)[32:31], Gamma_#20; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000869_goto_l00000891, l00000869_goto_l000005de; + l000007dc: + assume {:captureState "l000007dc"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #17, Gamma_#17 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#17, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#17); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#17, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#17); + ZF, Gamma_ZF := bvcomp32(bvadd32(#17, 1bv32), 0bv32), Gamma_#17; + NF, Gamma_NF := bvadd32(#17, 1bv32)[32:31], Gamma_#17; + assert Gamma_ZF; + goto l000007dc_goto_l000007fd, l000007dc_goto_l00000810; + l00000865: + assume {:captureState "l00000865"} true; + goto l000005b3; + l000007b4_goto_l000005de: + assume {:captureState "l000007b4_goto_l000005de"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l000005de; - l0000064a_goto_l00000672: - assume {:captureState "l0000064a_goto_l00000672"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000672; - l00000672_goto_l00000693: - assume {:captureState "l00000672_goto_l00000693"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000693; + l0000094a_goto_l00000982: + assume {:captureState "l0000094a_goto_l00000982"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000982; + l0000069f: + assume {:captureState "l0000069f"} true; + R30, Gamma_R30 := 2344bv64, true; + call add_six(); + goto l000006a6; l00000672_goto_l000006aa: assume {:captureState "l00000672_goto_l000006aa"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000006aa; - l000006aa_goto_l000005de: - assume {:captureState "l000006aa_goto_l000005de"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005de; - l000006aa_goto_l000006d2: - assume {:captureState "l000006aa_goto_l000006d2"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l000006d2; - l000006d2_goto_l000006f3: - assume {:captureState "l000006d2_goto_l000006f3"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000006f3; - l000006d2_goto_l0000070a: - assume {:captureState "l000006d2_goto_l0000070a"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000070a; - l0000070a_goto_l000005de: - assume {:captureState "l0000070a_goto_l000005de"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005de; - l0000070a_goto_l00000732: - assume {:captureState "l0000070a_goto_l00000732"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000732; - l00000732_goto_l00000753: - assume {:captureState "l00000732_goto_l00000753"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000753; - l00000732_goto_l0000075f: - assume {:captureState "l00000732_goto_l0000075f"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000075f; - l0000075f_goto_l000005de: - assume {:captureState "l0000075f_goto_l000005de"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005de; - l0000075f_goto_l00000787: - assume {:captureState "l0000075f_goto_l00000787"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000787; l00000787_goto_l000007a8: assume {:captureState "l00000787_goto_l000007a8"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000007a8; - l00000787_goto_l000007b4: - assume {:captureState "l00000787_goto_l000007b4"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000007b4; - l000007b4_goto_l000005de: - assume {:captureState "l000007b4_goto_l000005de"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005de; - l000007b4_goto_l000007dc: - assume {:captureState "l000007b4_goto_l000007dc"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l000007dc; - l000007dc_goto_l000007fd: - assume {:captureState "l000007dc_goto_l000007fd"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000007fd; - l000007dc_goto_l00000810: - assume {:captureState "l000007dc_goto_l00000810"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000810; - l00000810_goto_l000005de: - assume {:captureState "l00000810_goto_l000005de"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005de; - l00000810_goto_l00000838: - assume {:captureState "l00000810_goto_l00000838"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000838; - l00000838_goto_l00000859: - assume {:captureState "l00000838_goto_l00000859"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000859; - l00000838_goto_l00000869: - assume {:captureState "l00000838_goto_l00000869"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000869; - l00000869_goto_l000005de: - assume {:captureState "l00000869_goto_l000005de"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005de; - l00000869_goto_l00000891: - assume {:captureState "l00000869_goto_l00000891"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000891; - l00000891_goto_l000008b2: - assume {:captureState "l00000891_goto_l000008b2"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000008b2; - l00000891_goto_l000008c9: - assume {:captureState "l00000891_goto_l000008c9"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000008c9; - l000008c9_goto_l000005de: - assume {:captureState "l000008c9_goto_l000005de"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005de; - l000008c9_goto_l000008f1: - assume {:captureState "l000008c9_goto_l000008f1"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l000008f1; - l000008f1_goto_l00000912: - assume {:captureState "l000008f1_goto_l00000912"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000912; - l000008f1_goto_l00000922: - assume {:captureState "l000008f1_goto_l00000922"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000922; - l00000922_goto_l000005de: - assume {:captureState "l00000922_goto_l000005de"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000005de; - l00000922_goto_l0000094a: - assume {:captureState "l00000922_goto_l0000094a"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l0000094a; - l0000094a_goto_l0000096b: - assume {:captureState "l0000094a_goto_l0000096b"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000096b; - l0000094a_goto_l00000982: - assume {:captureState "l0000094a_goto_l00000982"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000982; - l00000982_goto_l0000097b: - assume {:captureState "l00000982_goto_l0000097b"} true; + l00000672_goto_l00000693: + assume {:captureState "l00000672_goto_l00000693"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l0000097b; - l00000982_goto_l000009a8: - assume {:captureState "l00000982_goto_l000009a8"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000009a8; + goto l00000693; + l00000693: + assume {:captureState "l00000693"} true; + R30, Gamma_R30 := 2340bv64, true; + call add_two(); + goto l0000069f; + l00000977: + assume {:captureState "l00000977"} true; + goto l000005b3; + l00000732: + assume {:captureState "l00000732"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #13, Gamma_#13 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#13, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934585bv33))), (Gamma_R0 && Gamma_#13); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#13, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#13); + ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; + NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; + assert Gamma_ZF; + goto l00000732_goto_l0000075f, l00000732_goto_l00000753; + l000006aa: + assume {:captureState "l000006aa"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #10, Gamma_#10 := bvadd32(R0[32:0], 4294967286bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934583bv33))), (Gamma_R0 && Gamma_#10); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#10); + ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; + NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000006aa_goto_l000006d2, l000006aa_goto_l000005de; + l00000859: + assume {:captureState "l00000859"} true; + R30, Gamma_R30 := 2304bv64, true; + call add_six(); + goto l00000865; + main_return: + assume {:captureState "main_return"} true; + return; } procedure sub_seven() @@ -1166,5 +1184,11 @@ procedure sub_seven() assert (L(mem, R0) ==> Gamma_R1); mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%00000549"} true; + goto sub_seven_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + sub_seven_return: + assume {:captureState "sub_seven_return"} true; return; } diff --git a/src/test/correct/malloc_with_local/clang/malloc_with_local.expected b/src/test/correct/malloc_with_local/clang/malloc_with_local.expected index ecaf1a185..9682dff81 100644 --- a/src/test/correct/malloc_with_local/clang/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/clang/malloc_with_local.expected @@ -624,6 +624,14 @@ procedure main() R30, Gamma_R30 := 2100bv64, true; call malloc(); goto l00000391; + l00000459: + assume {:captureState "l00000459"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, R31)), gamma_load32(Gamma_stack, R31); + #5, Gamma_#5 := bvadd64(R31, 32bv64), Gamma_R31; + R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; l00000391: assume {:captureState "l00000391"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); @@ -632,6 +640,20 @@ procedure main() R30, Gamma_R30 := 2112bv64, true; call malloc(); goto l000003a5; + l00000423: + assume {:captureState "l00000423"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2293bv64), Gamma_R0; + R30, Gamma_R30 := 2204bv64, true; + call printf(); + goto l0000043c; + l0000043c: + assume {:captureState "l0000043c"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); + R30, Gamma_R30 := 2212bv64, true; + call #free(); + goto l0000044b; l000003a5: assume {:captureState "l000003a5"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 8bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R0); @@ -669,33 +691,17 @@ procedure main() R30, Gamma_R30 := 2188bv64, true; call printf(); goto l00000423; - l00000423: - assume {:captureState "l00000423"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2293bv64), Gamma_R0; - R30, Gamma_R30 := 2204bv64, true; - call printf(); - goto l0000043c; - l0000043c: - assume {:captureState "l0000043c"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); - R30, Gamma_R30 := 2212bv64, true; - call #free(); - goto l0000044b; l0000044b: assume {:captureState "l0000044b"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R30, Gamma_R30 := 2220bv64, true; call #free(); goto l00000459; - l00000459: - assume {:captureState "l00000459"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, R31)), gamma_load32(Gamma_stack, R31); - #5, Gamma_#5 := bvadd64(R31, 32bv64), Gamma_R31; - R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local/clang_O2/malloc_with_local.expected b/src/test/correct/malloc_with_local/clang_O2/malloc_with_local.expected index 775c83e11..f45ad3852 100644 --- a/src/test/correct/malloc_with_local/clang_O2/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/clang_O2/malloc_with_local.expected @@ -386,14 +386,6 @@ procedure main() R30, Gamma_R30 := 1900bv64, true; call printf(); goto l00000322; - l00000322: - assume {:captureState "l00000322"} true; - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 1985bv64), Gamma_R0; - R1, Gamma_R1 := 42bv64, true; - R30, Gamma_R30 := 1916bv64, true; - call printf(); - goto l00000339; l00000339: assume {:captureState "l00000339"} true; R0, Gamma_R0 := 0bv64, true; @@ -402,12 +394,26 @@ procedure main() R30, Gamma_R30 := 1932bv64, true; call printf(); goto l00000350; + l00000322: + assume {:captureState "l00000322"} true; + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 1985bv64), Gamma_R0; + R1, Gamma_R1 := 42bv64, true; + R30, Gamma_R30 := 1916bv64, true; + call printf(); + goto l00000339; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000350: assume {:captureState "l00000350"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local/clang_no_plt_no_pic/malloc_with_local.expected b/src/test/correct/malloc_with_local/clang_no_plt_no_pic/malloc_with_local.expected index 07ac928d3..a614eb452 100644 --- a/src/test/correct/malloc_with_local/clang_no_plt_no_pic/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/clang_no_plt_no_pic/malloc_with_local.expected @@ -624,14 +624,6 @@ procedure main() R30, Gamma_R30 := 2100bv64, true; call malloc(); goto l00000b03; - l00000b03: - assume {:captureState "l00000b03"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); - assume {:captureState "%00000b09"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2112bv64, true; - call malloc(); - goto l00000b17; l00000b17: assume {:captureState "l00000b17"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 8bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R0); @@ -659,24 +651,6 @@ procedure main() R30, Gamma_R30 := 2168bv64, true; call printf(); goto l00000b75; - l00000b75: - assume {:captureState "l00000b75"} true; - R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - call rely(); - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2277bv64), Gamma_R0; - R30, Gamma_R30 := 2188bv64, true; - call printf(); - goto l00000b95; - l00000b95: - assume {:captureState "l00000b95"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2293bv64), Gamma_R0; - R30, Gamma_R30 := 2204bv64, true; - call printf(); - goto l00000bae; l00000bae: assume {:captureState "l00000bae"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); @@ -689,6 +663,24 @@ procedure main() R30, Gamma_R30 := 2220bv64, true; call #free(); goto l00000bcb; + l00000b03: + assume {:captureState "l00000b03"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); + assume {:captureState "%00000b09"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2112bv64, true; + call malloc(); + goto l00000b17; + l00000b75: + assume {:captureState "l00000b75"} true; + R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + call rely(); + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2277bv64), Gamma_R0; + R30, Gamma_R30 := 2188bv64, true; + call printf(); + goto l00000b95; l00000bcb: assume {:captureState "l00000bcb"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, R31)), gamma_load32(Gamma_stack, R31); @@ -696,6 +688,20 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000b95: + assume {:captureState "l00000b95"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2293bv64), Gamma_R0; + R30, Gamma_R30 := 2204bv64, true; + call printf(); + goto l00000bae; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local/clang_pic/malloc_with_local.expected b/src/test/correct/malloc_with_local/clang_pic/malloc_with_local.expected index 07ac928d3..a614eb452 100644 --- a/src/test/correct/malloc_with_local/clang_pic/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/clang_pic/malloc_with_local.expected @@ -624,14 +624,6 @@ procedure main() R30, Gamma_R30 := 2100bv64, true; call malloc(); goto l00000b03; - l00000b03: - assume {:captureState "l00000b03"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); - assume {:captureState "%00000b09"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2112bv64, true; - call malloc(); - goto l00000b17; l00000b17: assume {:captureState "l00000b17"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 8bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R0); @@ -659,24 +651,6 @@ procedure main() R30, Gamma_R30 := 2168bv64, true; call printf(); goto l00000b75; - l00000b75: - assume {:captureState "l00000b75"} true; - R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - call rely(); - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2277bv64), Gamma_R0; - R30, Gamma_R30 := 2188bv64, true; - call printf(); - goto l00000b95; - l00000b95: - assume {:captureState "l00000b95"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2293bv64), Gamma_R0; - R30, Gamma_R30 := 2204bv64, true; - call printf(); - goto l00000bae; l00000bae: assume {:captureState "l00000bae"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); @@ -689,6 +663,24 @@ procedure main() R30, Gamma_R30 := 2220bv64, true; call #free(); goto l00000bcb; + l00000b03: + assume {:captureState "l00000b03"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); + assume {:captureState "%00000b09"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2112bv64, true; + call malloc(); + goto l00000b17; + l00000b75: + assume {:captureState "l00000b75"} true; + R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + call rely(); + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2277bv64), Gamma_R0; + R30, Gamma_R30 := 2188bv64, true; + call printf(); + goto l00000b95; l00000bcb: assume {:captureState "l00000bcb"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, R31)), gamma_load32(Gamma_stack, R31); @@ -696,6 +688,20 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000b95: + assume {:captureState "l00000b95"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2293bv64), Gamma_R0; + R30, Gamma_R30 := 2204bv64, true; + call printf(); + goto l00000bae; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local/gcc/malloc_with_local.expected b/src/test/correct/malloc_with_local/gcc/malloc_with_local.expected index 7853707b6..eb6ffd63c 100644 --- a/src/test/correct/malloc_with_local/gcc/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/gcc/malloc_with_local.expected @@ -668,6 +668,44 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l0000036f; + l0000040d: + assume {:captureState "l0000040d"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2296bv64), Gamma_R0; + R30, Gamma_R30 := 2196bv64, true; + call printf(); + goto l00000426; + l00000426: + assume {:captureState "l00000426"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + R30, Gamma_R30 := 2204bv64, true; + call #free(); + goto l00000435; + l000003e7: + assume {:captureState "l000003e7"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2280bv64), Gamma_R0; + R30, Gamma_R30 := 2180bv64, true; + call printf(); + goto l0000040d; + l00000435: + assume {:captureState "l00000435"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R30, Gamma_R30 := 2212bv64, true; + call #free(); + goto l00000443; + l00000443: + assume {:captureState "l00000443"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; l0000036f: assume {:captureState "l0000036f"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); @@ -676,6 +714,9 @@ procedure main() R30, Gamma_R30 := 2096bv64, true; call malloc(); goto l00000383; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000383: assume {:captureState "l00000383"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); @@ -704,43 +745,8 @@ procedure main() R30, Gamma_R30 := 2156bv64, true; call printf(); goto l000003e7; - l000003e7: - assume {:captureState "l000003e7"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); - R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2280bv64), Gamma_R0; - R30, Gamma_R30 := 2180bv64, true; - call printf(); - goto l0000040d; - l0000040d: - assume {:captureState "l0000040d"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2296bv64), Gamma_R0; - R30, Gamma_R30 := 2196bv64, true; - call printf(); - goto l00000426; - l00000426: - assume {:captureState "l00000426"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - R30, Gamma_R30 := 2204bv64, true; - call #free(); - goto l00000435; - l00000435: - assume {:captureState "l00000435"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R30, Gamma_R30 := 2212bv64, true; - call #free(); - goto l00000443; - l00000443: - assume {:captureState "l00000443"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local/gcc_O2/malloc_with_local.expected b/src/test/correct/malloc_with_local/gcc_O2/malloc_with_local.expected index 2f63e0068..ae465b1b2 100644 --- a/src/test/correct/malloc_with_local/gcc_O2/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/gcc_O2/malloc_with_local.expected @@ -639,6 +639,13 @@ procedure main() R30, Gamma_R30 := 1692bv64, true; call __printf_chk(); goto l00000221; + l00000259: + assume {:captureState "l00000259"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000221: assume {:captureState "l00000221"} true; R2, Gamma_R2 := 42bv64, true; @@ -657,11 +664,10 @@ procedure main() R30, Gamma_R30 := 1732bv64, true; call __printf_chk(); goto l00000259; - l00000259: - assume {:captureState "l00000259"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local/gcc_no_plt_no_pic/malloc_with_local.expected b/src/test/correct/malloc_with_local/gcc_no_plt_no_pic/malloc_with_local.expected index 91f3ea4d7..af3d2c995 100644 --- a/src/test/correct/malloc_with_local/gcc_no_plt_no_pic/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/gcc_no_plt_no_pic/malloc_with_local.expected @@ -668,42 +668,6 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l00000ac0; - l00000ac0: - assume {:captureState "l00000ac0"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); - assume {:captureState "%00000ac6"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2096bv64, true; - call malloc(); - goto l00000ad4; - l00000ad4: - assume {:captureState "l00000ad4"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); - assume {:captureState "%00000ada"} true; - R0, Gamma_R0 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%00000ae7"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - R1, Gamma_R1 := 65bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%00000afb"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R1, Gamma_R1 := 42bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%00000b0f"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - call rely(); - R0, Gamma_R0 := zero_extend56_8(memory_load8_le(mem, R0)), (gamma_load8(Gamma_mem, R0) || L(mem, R0)); - R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; - R30, Gamma_R30 := 2156bv64, true; - call printf(); - goto l00000b38; l00000b38: assume {:captureState "l00000b38"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); @@ -735,12 +699,54 @@ procedure main() R30, Gamma_R30 := 2212bv64, true; call #free(); goto l00000b94; + l00000ad4: + assume {:captureState "l00000ad4"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); + assume {:captureState "%00000ada"} true; + R0, Gamma_R0 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); + assume {:captureState "%00000ae7"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + R1, Gamma_R1 := 65bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%00000afb"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R1, Gamma_R1 := 42bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%00000b0f"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + call rely(); + R0, Gamma_R0 := zero_extend56_8(memory_load8_le(mem, R0)), (gamma_load8(Gamma_mem, R0) || L(mem, R0)); + R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; + R30, Gamma_R30 := 2156bv64, true; + call printf(); + goto l00000b38; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000ac0: + assume {:captureState "l00000ac0"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); + assume {:captureState "%00000ac6"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2096bv64, true; + call malloc(); + goto l00000ad4; l00000b94: assume {:captureState "l00000b94"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local/gcc_pic/malloc_with_local.expected b/src/test/correct/malloc_with_local/gcc_pic/malloc_with_local.expected index 91f3ea4d7..af3d2c995 100644 --- a/src/test/correct/malloc_with_local/gcc_pic/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/gcc_pic/malloc_with_local.expected @@ -668,42 +668,6 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l00000ac0; - l00000ac0: - assume {:captureState "l00000ac0"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); - assume {:captureState "%00000ac6"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2096bv64, true; - call malloc(); - goto l00000ad4; - l00000ad4: - assume {:captureState "l00000ad4"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); - assume {:captureState "%00000ada"} true; - R0, Gamma_R0 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%00000ae7"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - R1, Gamma_R1 := 65bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%00000afb"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R1, Gamma_R1 := 42bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%00000b0f"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - call rely(); - R0, Gamma_R0 := zero_extend56_8(memory_load8_le(mem, R0)), (gamma_load8(Gamma_mem, R0) || L(mem, R0)); - R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; - R30, Gamma_R30 := 2156bv64, true; - call printf(); - goto l00000b38; l00000b38: assume {:captureState "l00000b38"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); @@ -735,12 +699,54 @@ procedure main() R30, Gamma_R30 := 2212bv64, true; call #free(); goto l00000b94; + l00000ad4: + assume {:captureState "l00000ad4"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); + assume {:captureState "%00000ada"} true; + R0, Gamma_R0 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); + assume {:captureState "%00000ae7"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + R1, Gamma_R1 := 65bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%00000afb"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R1, Gamma_R1 := 42bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%00000b0f"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + call rely(); + R0, Gamma_R0 := zero_extend56_8(memory_load8_le(mem, R0)), (gamma_load8(Gamma_mem, R0) || L(mem, R0)); + R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; + R30, Gamma_R30 := 2156bv64, true; + call printf(); + goto l00000b38; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000ac0: + assume {:captureState "l00000ac0"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); + assume {:captureState "%00000ac6"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2096bv64, true; + call malloc(); + goto l00000ad4; l00000b94: assume {:captureState "l00000b94"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local2/clang/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/clang/malloc_with_local2.expected index 6030ae003..17f71adec 100644 --- a/src/test/correct/malloc_with_local2/clang/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/clang/malloc_with_local2.expected @@ -624,31 +624,6 @@ procedure main() R30, Gamma_R30 := 2100bv64, true; call malloc(); goto l000003b5; - l000003b5: - assume {:captureState "l000003b5"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R29, 18446744073709551600bv64), R0), gamma_store64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64), Gamma_R0); - assume {:captureState "%000003bb"} true; - R8, Gamma_R8 := 11bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R29, 18446744073709551596bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R29, 18446744073709551596bv64), Gamma_R8); - assume {:captureState "%000003c8"} true; - R0, Gamma_R0 := 4bv64, true; - stack, Gamma_stack := memory_store64_le(stack, R31, R0), gamma_store64(Gamma_stack, R31, Gamma_R0); - assume {:captureState "%000003d5"} true; - R30, Gamma_R30 := 2124bv64, true; - call malloc(); - goto l000003de; - l000003de: - assume {:captureState "l000003de"} true; - R8, Gamma_R8 := R0, Gamma_R0; - R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R8), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R8); - assume {:captureState "%000003f1"} true; - R8, Gamma_R8 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R8); - assume {:captureState "%000003fe"} true; - R30, Gamma_R30 := 2148bv64, true; - call malloc(); - goto l00000407; l00000407: assume {:captureState "l00000407"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); @@ -676,16 +651,45 @@ procedure main() R30, Gamma_R30 := 2204bv64, true; call printf(); goto l00000465; - l00000465: - assume {:captureState "l00000465"} true; - R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - call rely(); - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2313bv64), Gamma_R0; - R30, Gamma_R30 := 2224bv64, true; - call printf(); - goto l00000485; + l000003de: + assume {:captureState "l000003de"} true; + R8, Gamma_R8 := R0, Gamma_R0; + R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R8), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R8); + assume {:captureState "%000003f1"} true; + R8, Gamma_R8 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R8); + assume {:captureState "%000003fe"} true; + R30, Gamma_R30 := 2148bv64, true; + call malloc(); + goto l00000407; + l000004ad: + assume {:captureState "l000004ad"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + R30, Gamma_R30 := 2256bv64, true; + call #free(); + goto l000004bb; + l000004bb: + assume {:captureState "l000004bb"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #5, Gamma_#5 := bvadd64(R31, 64bv64), Gamma_R31; + R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + goto main_return; + l000003b5: + assume {:captureState "l000003b5"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R29, 18446744073709551600bv64), R0), gamma_store64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64), Gamma_R0); + assume {:captureState "%000003bb"} true; + R8, Gamma_R8 := 11bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R29, 18446744073709551596bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R29, 18446744073709551596bv64), Gamma_R8); + assume {:captureState "%000003c8"} true; + R0, Gamma_R0 := 4bv64, true; + stack, Gamma_stack := memory_store64_le(stack, R31, R0), gamma_store64(Gamma_stack, R31, Gamma_R0); + assume {:captureState "%000003d5"} true; + R30, Gamma_R30 := 2124bv64, true; + call malloc(); + goto l000003de; l00000485: assume {:captureState "l00000485"} true; R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -700,19 +704,21 @@ procedure main() R30, Gamma_R30 := 2248bv64, true; call #free(); goto l000004ad; - l000004ad: - assume {:captureState "l000004ad"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - R30, Gamma_R30 := 2256bv64, true; - call #free(); - goto l000004bb; - l000004bb: - assume {:captureState "l000004bb"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #5, Gamma_#5 := bvadd64(R31, 64bv64), Gamma_R31; - R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + l00000465: + assume {:captureState "l00000465"} true; + R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + call rely(); + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2313bv64), Gamma_R0; + R30, Gamma_R30 := 2224bv64, true; + call printf(); + goto l00000485; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local2/clang_O2/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/clang_O2/malloc_with_local2.expected index 775c83e11..f45ad3852 100644 --- a/src/test/correct/malloc_with_local2/clang_O2/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/clang_O2/malloc_with_local2.expected @@ -386,14 +386,6 @@ procedure main() R30, Gamma_R30 := 1900bv64, true; call printf(); goto l00000322; - l00000322: - assume {:captureState "l00000322"} true; - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 1985bv64), Gamma_R0; - R1, Gamma_R1 := 42bv64, true; - R30, Gamma_R30 := 1916bv64, true; - call printf(); - goto l00000339; l00000339: assume {:captureState "l00000339"} true; R0, Gamma_R0 := 0bv64, true; @@ -402,12 +394,26 @@ procedure main() R30, Gamma_R30 := 1932bv64, true; call printf(); goto l00000350; + l00000322: + assume {:captureState "l00000322"} true; + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 1985bv64), Gamma_R0; + R1, Gamma_R1 := 42bv64, true; + R30, Gamma_R30 := 1916bv64, true; + call printf(); + goto l00000339; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000350: assume {:captureState "l00000350"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local2/clang_no_plt_no_pic/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/clang_no_plt_no_pic/malloc_with_local2.expected index 8645f53a7..00a18b4c8 100644 --- a/src/test/correct/malloc_with_local2/clang_no_plt_no_pic/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/clang_no_plt_no_pic/malloc_with_local2.expected @@ -649,6 +649,14 @@ procedure main() R30, Gamma_R30 := 2148bv64, true; call malloc(); goto l00000be4; + l00000c98: + assume {:captureState "l00000c98"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #5, Gamma_#5 := bvadd64(R31, 64bv64), Gamma_R31; + R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + goto main_return; l00000be4: assume {:captureState "l00000be4"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); @@ -686,6 +694,15 @@ procedure main() R30, Gamma_R30 := 2224bv64, true; call printf(); goto l00000c62; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000c7b: + assume {:captureState "l00000c7b"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); + R30, Gamma_R30 := 2248bv64, true; + call #free(); + goto l00000c8a; l00000c62: assume {:captureState "l00000c62"} true; R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -694,25 +711,14 @@ procedure main() R30, Gamma_R30 := 2240bv64, true; call printf(); goto l00000c7b; - l00000c7b: - assume {:captureState "l00000c7b"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); - R30, Gamma_R30 := 2248bv64, true; - call #free(); - goto l00000c8a; l00000c8a: assume {:captureState "l00000c8a"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); R30, Gamma_R30 := 2256bv64, true; call #free(); goto l00000c98; - l00000c98: - assume {:captureState "l00000c98"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #5, Gamma_#5 := bvadd64(R31, 64bv64), Gamma_R31; - R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local2/clang_pic/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/clang_pic/malloc_with_local2.expected index 8645f53a7..00a18b4c8 100644 --- a/src/test/correct/malloc_with_local2/clang_pic/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/clang_pic/malloc_with_local2.expected @@ -649,6 +649,14 @@ procedure main() R30, Gamma_R30 := 2148bv64, true; call malloc(); goto l00000be4; + l00000c98: + assume {:captureState "l00000c98"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #5, Gamma_#5 := bvadd64(R31, 64bv64), Gamma_R31; + R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + goto main_return; l00000be4: assume {:captureState "l00000be4"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); @@ -686,6 +694,15 @@ procedure main() R30, Gamma_R30 := 2224bv64, true; call printf(); goto l00000c62; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000c7b: + assume {:captureState "l00000c7b"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); + R30, Gamma_R30 := 2248bv64, true; + call #free(); + goto l00000c8a; l00000c62: assume {:captureState "l00000c62"} true; R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -694,25 +711,14 @@ procedure main() R30, Gamma_R30 := 2240bv64, true; call printf(); goto l00000c7b; - l00000c7b: - assume {:captureState "l00000c7b"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); - R30, Gamma_R30 := 2248bv64, true; - call #free(); - goto l00000c8a; l00000c8a: assume {:captureState "l00000c8a"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); R30, Gamma_R30 := 2256bv64, true; call #free(); goto l00000c98; - l00000c98: - assume {:captureState "l00000c98"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #5, Gamma_#5 := bvadd64(R31, 64bv64), Gamma_R31; - R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local2/gcc/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/gcc/malloc_with_local2.expected index 503331b2c..109fef269 100644 --- a/src/test/correct/malloc_with_local2/gcc/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/gcc/malloc_with_local2.expected @@ -668,17 +668,6 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l0000038b; - l0000038b: - assume {:captureState "l0000038b"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); - assume {:captureState "%00000391"} true; - R0, Gamma_R0 := 11bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%0000039e"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2104bv64, true; - call malloc(); - goto l000003ac; l000003ac: assume {:captureState "l000003ac"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); @@ -718,6 +707,27 @@ procedure main() R30, Gamma_R30 := 2184bv64, true; call printf(); goto l00000431; + l00000457: + assume {:captureState "l00000457"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 32bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 32bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2320bv64), Gamma_R0; + R30, Gamma_R30 := 2224bv64, true; + call printf(); + goto l00000470; + l0000048d: + assume {:captureState "l0000048d"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + goto main_return; + l0000047f: + assume {:captureState "l0000047f"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); + R30, Gamma_R30 := 2240bv64, true; + call #free(); + goto l0000048d; l00000431: assume {:captureState "l00000431"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); @@ -729,32 +739,28 @@ procedure main() R30, Gamma_R30 := 2208bv64, true; call printf(); goto l00000457; - l00000457: - assume {:captureState "l00000457"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 32bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 32bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2320bv64), Gamma_R0; - R30, Gamma_R30 := 2224bv64, true; - call printf(); - goto l00000470; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000470: assume {:captureState "l00000470"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); R30, Gamma_R30 := 2232bv64, true; call #free(); goto l0000047f; - l0000047f: - assume {:captureState "l0000047f"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); - R30, Gamma_R30 := 2240bv64, true; - call #free(); - goto l0000048d; - l0000048d: - assume {:captureState "l0000048d"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + l0000038b: + assume {:captureState "l0000038b"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); + assume {:captureState "%00000391"} true; + R0, Gamma_R0 := 11bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); + assume {:captureState "%0000039e"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2104bv64, true; + call malloc(); + goto l000003ac; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local2/gcc_O2/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/gcc_O2/malloc_with_local2.expected index 2f63e0068..ae465b1b2 100644 --- a/src/test/correct/malloc_with_local2/gcc_O2/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/gcc_O2/malloc_with_local2.expected @@ -639,6 +639,13 @@ procedure main() R30, Gamma_R30 := 1692bv64, true; call __printf_chk(); goto l00000221; + l00000259: + assume {:captureState "l00000259"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000221: assume {:captureState "l00000221"} true; R2, Gamma_R2 := 42bv64, true; @@ -657,11 +664,10 @@ procedure main() R30, Gamma_R30 := 1732bv64, true; call __printf_chk(); goto l00000259; - l00000259: - assume {:captureState "l00000259"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local2/gcc_no_plt_no_pic/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/gcc_no_plt_no_pic/malloc_with_local2.expected index 76eed4543..ebb6bcaca 100644 --- a/src/test/correct/malloc_with_local2/gcc_no_plt_no_pic/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/gcc_no_plt_no_pic/malloc_with_local2.expected @@ -668,6 +668,19 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l00000b2d; + l00000c2f: + assume {:captureState "l00000c2f"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + goto main_return; + l00000c12: + assume {:captureState "l00000c12"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R30, Gamma_R30 := 2232bv64, true; + call #free(); + goto l00000c21; l00000b2d: assume {:captureState "l00000b2d"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); @@ -679,17 +692,20 @@ procedure main() R30, Gamma_R30 := 2104bv64, true; call malloc(); goto l00000b4e; - l00000b4e: - assume {:captureState "l00000b4e"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); - assume {:captureState "%00000b54"} true; - R0, Gamma_R0 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); - assume {:captureState "%00000b61"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2124bv64, true; - call malloc(); - goto l00000b6f; + l00000bf9: + assume {:captureState "l00000bf9"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 32bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 32bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2320bv64), Gamma_R0; + R30, Gamma_R30 := 2224bv64, true; + call printf(); + goto l00000c12; + l00000c21: + assume {:captureState "l00000c21"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); + R30, Gamma_R30 := 2240bv64, true; + call #free(); + goto l00000c2f; l00000b6f: assume {:captureState "l00000b6f"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 56bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 56bv64), Gamma_R0); @@ -718,6 +734,17 @@ procedure main() R30, Gamma_R30 := 2184bv64, true; call printf(); goto l00000bd3; + l00000b4e: + assume {:captureState "l00000b4e"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); + assume {:captureState "%00000b54"} true; + R0, Gamma_R0 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); + assume {:captureState "%00000b61"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2124bv64, true; + call malloc(); + goto l00000b6f; l00000bd3: assume {:captureState "l00000bd3"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); @@ -729,32 +756,11 @@ procedure main() R30, Gamma_R30 := 2208bv64, true; call printf(); goto l00000bf9; - l00000bf9: - assume {:captureState "l00000bf9"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 32bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 32bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2320bv64), Gamma_R0; - R30, Gamma_R30 := 2224bv64, true; - call printf(); - goto l00000c12; - l00000c12: - assume {:captureState "l00000c12"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R30, Gamma_R30 := 2232bv64, true; - call #free(); - goto l00000c21; - l00000c21: - assume {:captureState "l00000c21"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); - R30, Gamma_R30 := 2240bv64, true; - call #free(); - goto l00000c2f; - l00000c2f: - assume {:captureState "l00000c2f"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local2/gcc_pic/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/gcc_pic/malloc_with_local2.expected index 76eed4543..ebb6bcaca 100644 --- a/src/test/correct/malloc_with_local2/gcc_pic/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/gcc_pic/malloc_with_local2.expected @@ -668,6 +668,19 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l00000b2d; + l00000c2f: + assume {:captureState "l00000c2f"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + goto main_return; + l00000c12: + assume {:captureState "l00000c12"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R30, Gamma_R30 := 2232bv64, true; + call #free(); + goto l00000c21; l00000b2d: assume {:captureState "l00000b2d"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); @@ -679,17 +692,20 @@ procedure main() R30, Gamma_R30 := 2104bv64, true; call malloc(); goto l00000b4e; - l00000b4e: - assume {:captureState "l00000b4e"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); - assume {:captureState "%00000b54"} true; - R0, Gamma_R0 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); - assume {:captureState "%00000b61"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2124bv64, true; - call malloc(); - goto l00000b6f; + l00000bf9: + assume {:captureState "l00000bf9"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 32bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 32bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2320bv64), Gamma_R0; + R30, Gamma_R30 := 2224bv64, true; + call printf(); + goto l00000c12; + l00000c21: + assume {:captureState "l00000c21"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); + R30, Gamma_R30 := 2240bv64, true; + call #free(); + goto l00000c2f; l00000b6f: assume {:captureState "l00000b6f"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 56bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 56bv64), Gamma_R0); @@ -718,6 +734,17 @@ procedure main() R30, Gamma_R30 := 2184bv64, true; call printf(); goto l00000bd3; + l00000b4e: + assume {:captureState "l00000b4e"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); + assume {:captureState "%00000b54"} true; + R0, Gamma_R0 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); + assume {:captureState "%00000b61"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2124bv64, true; + call malloc(); + goto l00000b6f; l00000bd3: assume {:captureState "l00000bd3"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); @@ -729,32 +756,11 @@ procedure main() R30, Gamma_R30 := 2208bv64, true; call printf(); goto l00000bf9; - l00000bf9: - assume {:captureState "l00000bf9"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 32bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 32bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2320bv64), Gamma_R0; - R30, Gamma_R30 := 2224bv64, true; - call printf(); - goto l00000c12; - l00000c12: - assume {:captureState "l00000c12"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R30, Gamma_R30 := 2232bv64, true; - call #free(); - goto l00000c21; - l00000c21: - assume {:captureState "l00000c21"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); - R30, Gamma_R30 := 2240bv64, true; - call #free(); - goto l00000c2f; - l00000c2f: - assume {:captureState "l00000c2f"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local3/clang/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/clang/malloc_with_local3.expected index f97fa4098..84a07762c 100644 --- a/src/test/correct/malloc_with_local3/clang/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/clang/malloc_with_local3.expected @@ -655,6 +655,34 @@ procedure main() R30, Gamma_R30 := 2100bv64, true; call malloc(); goto l000003e9; + l00000504: + assume {:captureState "l00000504"} true; + R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + call rely(); + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2348bv64), Gamma_R0; + R30, Gamma_R30 := 2212bv64, true; + call printf(); + goto l00000524; + l00000412: + assume {:captureState "l00000412"} true; + R8, Gamma_R8 := R0, Gamma_R0; + R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R8), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R8); + assume {:captureState "%00000425"} true; + R8, Gamma_R8 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R8); + assume {:captureState "%00000432"} true; + R30, Gamma_R30 := 2148bv64, true; + call malloc(); + goto l0000043b; + l0000054c: + assume {:captureState "l0000054c"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + R30, Gamma_R30 := 2244bv64, true; + call #free(); + goto l0000055a; l000003e9: assume {:captureState "l000003e9"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R29, 18446744073709551600bv64), R0), gamma_store64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64), Gamma_R0); @@ -668,18 +696,28 @@ procedure main() R30, Gamma_R30 := 2124bv64, true; call malloc(); goto l00000412; - l00000412: - assume {:captureState "l00000412"} true; - R8, Gamma_R8 := R0, Gamma_R0; - R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R8), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R8); - assume {:captureState "%00000425"} true; - R8, Gamma_R8 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R8); - assume {:captureState "%00000432"} true; - R30, Gamma_R30 := 2148bv64, true; - call malloc(); - goto l0000043b; + l00000524: + assume {:captureState "l00000524"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2364bv64), Gamma_R0; + R30, Gamma_R30 := 2228bv64, true; + call printf(); + goto l0000053d; + l0000053d: + assume {:captureState "l0000053d"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); + R30, Gamma_R30 := 2236bv64, true; + call #free(); + goto l0000054c; + l0000055a: + assume {:captureState "l0000055a"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #7, Gamma_#7 := bvadd64(R31, 64bv64), Gamma_R31; + R29, Gamma_R29 := memory_load64_le(stack, #7), gamma_load64(Gamma_stack, #7); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#7, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#7, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + goto main_return; l0000043b: assume {:captureState "l0000043b"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); @@ -703,43 +741,11 @@ procedure main() R30, Gamma_R30 := 2192bv64, true; call printCharValue(); goto l00000504; - l00000504: - assume {:captureState "l00000504"} true; - R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - call rely(); - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2348bv64), Gamma_R0; - R30, Gamma_R30 := 2212bv64, true; - call printf(); - goto l00000524; - l00000524: - assume {:captureState "l00000524"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2364bv64), Gamma_R0; - R30, Gamma_R30 := 2228bv64, true; - call printf(); - goto l0000053d; - l0000053d: - assume {:captureState "l0000053d"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); - R30, Gamma_R30 := 2236bv64, true; - call #free(); - goto l0000054c; - l0000054c: - assume {:captureState "l0000054c"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - R30, Gamma_R30 := 2244bv64, true; - call #free(); - goto l0000055a; - l0000055a: - assume {:captureState "l0000055a"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #7, Gamma_#7 := bvadd64(R31, 64bv64), Gamma_R31; - R29, Gamma_R29 := memory_load64_le(stack, #7), gamma_load64(Gamma_stack, #7); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#7, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#7, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } @@ -1198,6 +1204,12 @@ procedure printCharValue() R29, Gamma_R29 := memory_load64_le(stack, #6), gamma_load64(Gamma_stack, #6); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#6, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#6, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto printCharValue_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + printCharValue_return: + assume {:captureState "printCharValue_return"} true; return; } diff --git a/src/test/correct/malloc_with_local3/clang_O2/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/clang_O2/malloc_with_local3.expected index de0df8c0a..83b48b5ce 100644 --- a/src/test/correct/malloc_with_local3/clang_O2/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/clang_O2/malloc_with_local3.expected @@ -404,14 +404,6 @@ procedure main() R30, Gamma_R30 := 1900bv64, true; call printf(); goto l00000342; - l00000342: - assume {:captureState "l00000342"} true; - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2000bv64), Gamma_R0; - R1, Gamma_R1 := 42bv64, true; - R30, Gamma_R30 := 1916bv64, true; - call printf(); - goto l00000359; l00000359: assume {:captureState "l00000359"} true; R0, Gamma_R0 := 0bv64, true; @@ -420,12 +412,26 @@ procedure main() R30, Gamma_R30 := 1932bv64, true; call printf(); goto l00000370; + l00000342: + assume {:captureState "l00000342"} true; + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2000bv64), Gamma_R0; + R1, Gamma_R1 := 42bv64, true; + R30, Gamma_R30 := 1916bv64, true; + call printf(); + goto l00000359; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000370: assume {:captureState "l00000370"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/malloc_with_local3/clang_no_plt_no_pic/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/clang_no_plt_no_pic/malloc_with_local3.expected index 4e8f07b3e..d02be9c89 100644 --- a/src/test/correct/malloc_with_local3/clang_no_plt_no_pic/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/clang_no_plt_no_pic/malloc_with_local3.expected @@ -655,31 +655,20 @@ procedure main() R30, Gamma_R30 := 2100bv64, true; call malloc(); goto l00000c74; - l00000c74: - assume {:captureState "l00000c74"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R29, 18446744073709551600bv64), R0), gamma_store64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64), Gamma_R0); - assume {:captureState "%00000c7a"} true; - R8, Gamma_R8 := 11bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R29, 18446744073709551596bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R29, 18446744073709551596bv64), Gamma_R8); - assume {:captureState "%00000c87"} true; - R0, Gamma_R0 := 4bv64, true; - stack, Gamma_stack := memory_store64_le(stack, R31, R0), gamma_store64(Gamma_stack, R31, Gamma_R0); - assume {:captureState "%00000c94"} true; - R30, Gamma_R30 := 2124bv64, true; - call malloc(); - goto l00000c9d; - l00000c9d: - assume {:captureState "l00000c9d"} true; - R8, Gamma_R8 := R0, Gamma_R0; - R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R8), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R8); - assume {:captureState "%00000cb0"} true; - R8, Gamma_R8 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R8); - assume {:captureState "%00000cbd"} true; - R30, Gamma_R30 := 2148bv64, true; - call malloc(); - goto l00000cc6; + l00000daf: + assume {:captureState "l00000daf"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2364bv64), Gamma_R0; + R30, Gamma_R30 := 2228bv64, true; + call printf(); + goto l00000dc8; + l00000dc8: + assume {:captureState "l00000dc8"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); + R30, Gamma_R30 := 2236bv64, true; + call #free(); + goto l00000dd7; l00000cc6: assume {:captureState "l00000cc6"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); @@ -703,30 +692,6 @@ procedure main() R30, Gamma_R30 := 2192bv64, true; call printCharValue(); goto l00000d8f; - l00000d8f: - assume {:captureState "l00000d8f"} true; - R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - call rely(); - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2348bv64), Gamma_R0; - R30, Gamma_R30 := 2212bv64, true; - call printf(); - goto l00000daf; - l00000daf: - assume {:captureState "l00000daf"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2364bv64), Gamma_R0; - R30, Gamma_R30 := 2228bv64, true; - call printf(); - goto l00000dc8; - l00000dc8: - assume {:captureState "l00000dc8"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); - R30, Gamma_R30 := 2236bv64, true; - call #free(); - goto l00000dd7; l00000dd7: assume {:captureState "l00000dd7"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); @@ -740,6 +705,47 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #7), gamma_load64(Gamma_stack, #7); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#7, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#7, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + goto main_return; + l00000d8f: + assume {:captureState "l00000d8f"} true; + R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + call rely(); + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2348bv64), Gamma_R0; + R30, Gamma_R30 := 2212bv64, true; + call printf(); + goto l00000daf; + l00000c74: + assume {:captureState "l00000c74"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R29, 18446744073709551600bv64), R0), gamma_store64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64), Gamma_R0); + assume {:captureState "%00000c7a"} true; + R8, Gamma_R8 := 11bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R29, 18446744073709551596bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R29, 18446744073709551596bv64), Gamma_R8); + assume {:captureState "%00000c87"} true; + R0, Gamma_R0 := 4bv64, true; + stack, Gamma_stack := memory_store64_le(stack, R31, R0), gamma_store64(Gamma_stack, R31, Gamma_R0); + assume {:captureState "%00000c94"} true; + R30, Gamma_R30 := 2124bv64, true; + call malloc(); + goto l00000c9d; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000c9d: + assume {:captureState "l00000c9d"} true; + R8, Gamma_R8 := R0, Gamma_R0; + R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R8), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R8); + assume {:captureState "%00000cb0"} true; + R8, Gamma_R8 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R8); + assume {:captureState "%00000cbd"} true; + R30, Gamma_R30 := 2148bv64, true; + call malloc(); + goto l00000cc6; + main_return: + assume {:captureState "main_return"} true; return; } @@ -1198,6 +1204,12 @@ procedure printCharValue() R29, Gamma_R29 := memory_load64_le(stack, #6), gamma_load64(Gamma_stack, #6); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#6, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#6, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto printCharValue_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + printCharValue_return: + assume {:captureState "printCharValue_return"} true; return; } diff --git a/src/test/correct/malloc_with_local3/clang_pic/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/clang_pic/malloc_with_local3.expected index 4e8f07b3e..d02be9c89 100644 --- a/src/test/correct/malloc_with_local3/clang_pic/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/clang_pic/malloc_with_local3.expected @@ -655,31 +655,20 @@ procedure main() R30, Gamma_R30 := 2100bv64, true; call malloc(); goto l00000c74; - l00000c74: - assume {:captureState "l00000c74"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R29, 18446744073709551600bv64), R0), gamma_store64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64), Gamma_R0); - assume {:captureState "%00000c7a"} true; - R8, Gamma_R8 := 11bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R29, 18446744073709551596bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R29, 18446744073709551596bv64), Gamma_R8); - assume {:captureState "%00000c87"} true; - R0, Gamma_R0 := 4bv64, true; - stack, Gamma_stack := memory_store64_le(stack, R31, R0), gamma_store64(Gamma_stack, R31, Gamma_R0); - assume {:captureState "%00000c94"} true; - R30, Gamma_R30 := 2124bv64, true; - call malloc(); - goto l00000c9d; - l00000c9d: - assume {:captureState "l00000c9d"} true; - R8, Gamma_R8 := R0, Gamma_R0; - R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R8), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R8); - assume {:captureState "%00000cb0"} true; - R8, Gamma_R8 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R8); - assume {:captureState "%00000cbd"} true; - R30, Gamma_R30 := 2148bv64, true; - call malloc(); - goto l00000cc6; + l00000daf: + assume {:captureState "l00000daf"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2364bv64), Gamma_R0; + R30, Gamma_R30 := 2228bv64, true; + call printf(); + goto l00000dc8; + l00000dc8: + assume {:captureState "l00000dc8"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); + R30, Gamma_R30 := 2236bv64, true; + call #free(); + goto l00000dd7; l00000cc6: assume {:captureState "l00000cc6"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); @@ -703,30 +692,6 @@ procedure main() R30, Gamma_R30 := 2192bv64, true; call printCharValue(); goto l00000d8f; - l00000d8f: - assume {:captureState "l00000d8f"} true; - R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); - call rely(); - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2348bv64), Gamma_R0; - R30, Gamma_R30 := 2212bv64, true; - call printf(); - goto l00000daf; - l00000daf: - assume {:captureState "l00000daf"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2364bv64), Gamma_R0; - R30, Gamma_R30 := 2228bv64, true; - call printf(); - goto l00000dc8; - l00000dc8: - assume {:captureState "l00000dc8"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R29, 18446744073709551600bv64)), gamma_load64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64)); - R30, Gamma_R30 := 2236bv64, true; - call #free(); - goto l00000dd7; l00000dd7: assume {:captureState "l00000dd7"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); @@ -740,6 +705,47 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #7), gamma_load64(Gamma_stack, #7); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#7, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#7, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 80bv64), Gamma_R31; + goto main_return; + l00000d8f: + assume {:captureState "l00000d8f"} true; + R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 32bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 32bv64)); + call rely(); + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2348bv64), Gamma_R0; + R30, Gamma_R30 := 2212bv64, true; + call printf(); + goto l00000daf; + l00000c74: + assume {:captureState "l00000c74"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R29, 18446744073709551600bv64), R0), gamma_store64(Gamma_stack, bvadd64(R29, 18446744073709551600bv64), Gamma_R0); + assume {:captureState "%00000c7a"} true; + R8, Gamma_R8 := 11bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R29, 18446744073709551596bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R29, 18446744073709551596bv64), Gamma_R8); + assume {:captureState "%00000c87"} true; + R0, Gamma_R0 := 4bv64, true; + stack, Gamma_stack := memory_store64_le(stack, R31, R0), gamma_store64(Gamma_stack, R31, Gamma_R0); + assume {:captureState "%00000c94"} true; + R30, Gamma_R30 := 2124bv64, true; + call malloc(); + goto l00000c9d; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000c9d: + assume {:captureState "l00000c9d"} true; + R8, Gamma_R8 := R0, Gamma_R0; + R0, Gamma_R0 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 32bv64), R8), gamma_store64(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R8); + assume {:captureState "%00000cb0"} true; + R8, Gamma_R8 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R8); + assume {:captureState "%00000cbd"} true; + R30, Gamma_R30 := 2148bv64, true; + call malloc(); + goto l00000cc6; + main_return: + assume {:captureState "main_return"} true; return; } @@ -1198,6 +1204,12 @@ procedure printCharValue() R29, Gamma_R29 := memory_load64_le(stack, #6), gamma_load64(Gamma_stack, #6); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#6, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#6, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto printCharValue_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + printCharValue_return: + assume {:captureState "printCharValue_return"} true; return; } diff --git a/src/test/correct/malloc_with_local3/gcc/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/gcc/malloc_with_local3.expected index 84eaf0dd9..448fa0cac 100644 --- a/src/test/correct/malloc_with_local3/gcc/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/gcc/malloc_with_local3.expected @@ -689,28 +689,13 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l000003c3; - l000003c3: - assume {:captureState "l000003c3"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); - assume {:captureState "%000003c9"} true; - R0, Gamma_R0 := 11bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%000003d6"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2104bv64, true; - call malloc(); - goto l000003e4; - l000003e4: - assume {:captureState "l000003e4"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); - assume {:captureState "%000003ea"} true; - R0, Gamma_R0 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); - assume {:captureState "%000003f7"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2124bv64, true; - call malloc(); - goto l00000405; + l00000537: + assume {:captureState "l00000537"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + goto main_return; l00000405: assume {:captureState "l00000405"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 56bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 56bv64), Gamma_R0); @@ -734,6 +719,20 @@ procedure main() R30, Gamma_R30 := 2168bv64, true; call printCharValue(); goto l000004db; + l0000051a: + assume {:captureState "l0000051a"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R30, Gamma_R30 := 2216bv64, true; + call #free(); + goto l00000529; + l00000501: + assume {:captureState "l00000501"} true; + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 32bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 32bv64)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2352bv64), Gamma_R0; + R30, Gamma_R30 := 2208bv64, true; + call printf(); + goto l0000051a; l000004db: assume {:captureState "l000004db"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); @@ -745,32 +744,39 @@ procedure main() R30, Gamma_R30 := 2192bv64, true; call printf(); goto l00000501; - l00000501: - assume {:captureState "l00000501"} true; - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 32bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 32bv64)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2352bv64), Gamma_R0; - R30, Gamma_R30 := 2208bv64, true; - call printf(); - goto l0000051a; - l0000051a: - assume {:captureState "l0000051a"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R30, Gamma_R30 := 2216bv64, true; - call #free(); - goto l00000529; + l000003c3: + assume {:captureState "l000003c3"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 40bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 40bv64), Gamma_R0); + assume {:captureState "%000003c9"} true; + R0, Gamma_R0 := 11bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); + assume {:captureState "%000003d6"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2104bv64, true; + call malloc(); + goto l000003e4; + l000003e4: + assume {:captureState "l000003e4"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); + assume {:captureState "%000003ea"} true; + R0, Gamma_R0 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); + assume {:captureState "%000003f7"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2124bv64, true; + call malloc(); + goto l00000405; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000529: assume {:captureState "l00000529"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); R30, Gamma_R30 := 2224bv64, true; call #free(); goto l00000537; - l00000537: - assume {:captureState "l00000537"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + main_return: + assume {:captureState "main_return"} true; return; } @@ -1265,6 +1271,12 @@ procedure printCharValue() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto printCharValue_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + printCharValue_return: + assume {:captureState "printCharValue_return"} true; return; } diff --git a/src/test/correct/malloc_with_local3/gcc_O2/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/gcc_O2/malloc_with_local3.expected index cb33d38b0..172781bea 100644 --- a/src/test/correct/malloc_with_local3/gcc_O2/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/gcc_O2/malloc_with_local3.expected @@ -880,6 +880,15 @@ procedure main() R30, Gamma_R30 := 1812bv64, true; call malloc(); goto l00000249; + l0000029a: + assume {:captureState "l0000029a"} true; + R2, Gamma_R2 := 42bv64, true; + R1, Gamma_R1 := 0bv64, true; + R0, Gamma_R0 := 1bv64, true; + R1, Gamma_R1 := bvadd64(R1, 2296bv64), Gamma_R1; + R30, Gamma_R30 := 1848bv64, true; + call __printf_chk(); + goto l000002b6; l00000249: assume {:captureState "l00000249"} true; R1, Gamma_R1 := 65bv64, true; @@ -891,15 +900,6 @@ procedure main() R30, Gamma_R30 := 1828bv64, true; call printCharValue(); goto l0000029a; - l0000029a: - assume {:captureState "l0000029a"} true; - R2, Gamma_R2 := 42bv64, true; - R1, Gamma_R1 := 0bv64, true; - R0, Gamma_R0 := 1bv64, true; - R1, Gamma_R1 := bvadd64(R1, 2296bv64), Gamma_R1; - R30, Gamma_R30 := 1848bv64, true; - call __printf_chk(); - goto l000002b6; l000002b6: assume {:captureState "l000002b6"} true; R1, Gamma_R1 := 0bv64, true; @@ -915,6 +915,9 @@ procedure main() R30, Gamma_R30 := 1876bv64, true; call #free(); goto l000002e0; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000002e0: assume {:captureState "l000002e0"} true; R0, Gamma_R0 := 0bv64, true; @@ -922,6 +925,9 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } @@ -1376,4 +1382,10 @@ procedure printCharValue() call __printf_chk(); //no return target assume false; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + printCharValue_return: + assume {:captureState "printCharValue_return"} true; + return; } diff --git a/src/test/correct/malloc_with_local3/gcc_no_plt_no_pic/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/gcc_no_plt_no_pic/malloc_with_local3.expected index 5b5324742..42e445b67 100644 --- a/src/test/correct/malloc_with_local3/gcc_no_plt_no_pic/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/gcc_no_plt_no_pic/malloc_with_local3.expected @@ -700,40 +700,6 @@ procedure main() R30, Gamma_R30 := 2104bv64, true; call malloc(); goto l00000c40; - l00000c40: - assume {:captureState "l00000c40"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); - assume {:captureState "%00000c46"} true; - R0, Gamma_R0 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); - assume {:captureState "%00000c53"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2124bv64, true; - call malloc(); - goto l00000c61; - l00000c61: - assume {:captureState "l00000c61"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 56bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 56bv64), Gamma_R0); - assume {:captureState "%00000c67"} true; - R0, Gamma_R0 := 9bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 36bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 36bv64), Gamma_R0); - assume {:captureState "%00000c74"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R1, Gamma_R1 := 65bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%00000c88"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); - R1, Gamma_R1 := 42bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%00000c9c"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R30, Gamma_R30 := 2168bv64, true; - call printCharValue(); - goto l00000d37; l00000d37: assume {:captureState "l00000d37"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); @@ -765,12 +731,52 @@ procedure main() R30, Gamma_R30 := 2224bv64, true; call #free(); goto l00000d93; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000c61: + assume {:captureState "l00000c61"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 56bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 56bv64), Gamma_R0); + assume {:captureState "%00000c67"} true; + R0, Gamma_R0 := 9bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 36bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 36bv64), Gamma_R0); + assume {:captureState "%00000c74"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R1, Gamma_R1 := 65bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%00000c88"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); + R1, Gamma_R1 := 42bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%00000c9c"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R30, Gamma_R30 := 2168bv64, true; + call printCharValue(); + goto l00000d37; l00000d93: assume {:captureState "l00000d93"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + goto main_return; + l00000c40: + assume {:captureState "l00000c40"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); + assume {:captureState "%00000c46"} true; + R0, Gamma_R0 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); + assume {:captureState "%00000c53"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2124bv64, true; + call malloc(); + goto l00000c61; + main_return: + assume {:captureState "main_return"} true; return; } @@ -1265,6 +1271,12 @@ procedure printCharValue() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto printCharValue_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + printCharValue_return: + assume {:captureState "printCharValue_return"} true; return; } diff --git a/src/test/correct/malloc_with_local3/gcc_pic/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/gcc_pic/malloc_with_local3.expected index 5b5324742..42e445b67 100644 --- a/src/test/correct/malloc_with_local3/gcc_pic/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/gcc_pic/malloc_with_local3.expected @@ -700,40 +700,6 @@ procedure main() R30, Gamma_R30 := 2104bv64, true; call malloc(); goto l00000c40; - l00000c40: - assume {:captureState "l00000c40"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); - assume {:captureState "%00000c46"} true; - R0, Gamma_R0 := 10bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); - assume {:captureState "%00000c53"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2124bv64, true; - call malloc(); - goto l00000c61; - l00000c61: - assume {:captureState "l00000c61"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 56bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 56bv64), Gamma_R0); - assume {:captureState "%00000c67"} true; - R0, Gamma_R0 := 9bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 36bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 36bv64), Gamma_R0); - assume {:captureState "%00000c74"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R1, Gamma_R1 := 65bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%00000c88"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); - R1, Gamma_R1 := 42bv64, true; - call rely(); - assert (L(mem, R0) ==> Gamma_R1); - mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); - assume {:captureState "%00000c9c"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); - R30, Gamma_R30 := 2168bv64, true; - call printCharValue(); - goto l00000d37; l00000d37: assume {:captureState "l00000d37"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); @@ -765,12 +731,52 @@ procedure main() R30, Gamma_R30 := 2224bv64, true; call #free(); goto l00000d93; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000c61: + assume {:captureState "l00000c61"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 56bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 56bv64), Gamma_R0); + assume {:captureState "%00000c67"} true; + R0, Gamma_R0 := 9bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 36bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 36bv64), Gamma_R0); + assume {:captureState "%00000c74"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R1, Gamma_R1 := 65bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store8_le(mem, R0, R1[8:0]), gamma_store8(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%00000c88"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 48bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 48bv64)); + R1, Gamma_R1 := 42bv64, true; + call rely(); + assert (L(mem, R0) ==> Gamma_R1); + mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); + assume {:captureState "%00000c9c"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 40bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 40bv64)); + R30, Gamma_R30 := 2168bv64, true; + call printCharValue(); + goto l00000d37; l00000d93: assume {:captureState "l00000d93"} true; R0, Gamma_R0 := 0bv64, true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 64bv64), Gamma_R31; + goto main_return; + l00000c40: + assume {:captureState "l00000c40"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 48bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 48bv64), Gamma_R0); + assume {:captureState "%00000c46"} true; + R0, Gamma_R0 := 10bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 32bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 32bv64), Gamma_R0); + assume {:captureState "%00000c53"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2124bv64, true; + call malloc(); + goto l00000c61; + main_return: + assume {:captureState "main_return"} true; return; } @@ -1265,6 +1271,12 @@ procedure printCharValue() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto printCharValue_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + printCharValue_return: + assume {:captureState "printCharValue_return"} true; return; } diff --git a/src/test/correct/multi_malloc/clang/multi_malloc.expected b/src/test/correct/multi_malloc/clang/multi_malloc.expected index 829a6b1d3..74a2cc464 100644 --- a/src/test/correct/multi_malloc/clang/multi_malloc.expected +++ b/src/test/correct/multi_malloc/clang/multi_malloc.expected @@ -489,6 +489,20 @@ procedure main() R30, Gamma_R30 := 2100bv64, true; call malloc(); goto l00000379; + l0000040d: + assume {:captureState "l0000040d"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R30, Gamma_R30 := 2196bv64, true; + call #free(); + goto l0000041b; + l0000041b: + assume {:captureState "l0000041b"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + #5, Gamma_#5 := bvadd64(R31, 32bv64), Gamma_R31; + R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; l00000379: assume {:captureState "l00000379"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); @@ -497,6 +511,25 @@ procedure main() R30, Gamma_R30 := 2112bv64, true; call malloc(); goto l0000038d; + l000003de: + assume {:captureState "l000003de"} true; + R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + call rely(); + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2253bv64), Gamma_R0; + R30, Gamma_R30 := 2180bv64, true; + call printf(); + goto l000003fe; + l000003fe: + assume {:captureState "l000003fe"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); + R30, Gamma_R30 := 2188bv64, true; + call #free(); + goto l0000040d; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000038d: assume {:captureState "l0000038d"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 8bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R0); @@ -521,35 +554,8 @@ procedure main() R30, Gamma_R30 := 2160bv64, true; call printf(); goto l000003de; - l000003de: - assume {:captureState "l000003de"} true; - R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - call rely(); - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2253bv64), Gamma_R0; - R30, Gamma_R30 := 2180bv64, true; - call printf(); - goto l000003fe; - l000003fe: - assume {:captureState "l000003fe"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); - R30, Gamma_R30 := 2188bv64, true; - call #free(); - goto l0000040d; - l0000040d: - assume {:captureState "l0000040d"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R30, Gamma_R30 := 2196bv64, true; - call #free(); - goto l0000041b; - l0000041b: - assume {:captureState "l0000041b"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - #5, Gamma_#5 := bvadd64(R31, 32bv64), Gamma_R31; - R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/multi_malloc/clang_O2/multi_malloc.expected b/src/test/correct/multi_malloc/clang_O2/multi_malloc.expected index d1762ce6b..978c7cdae 100644 --- a/src/test/correct/multi_malloc/clang_O2/multi_malloc.expected +++ b/src/test/correct/multi_malloc/clang_O2/multi_malloc.expected @@ -305,6 +305,13 @@ procedure main() R30, Gamma_R30 := 1900bv64, true; call printf(); goto l00000312; + l00000329: + assume {:captureState "l00000329"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000312: assume {:captureState "l00000312"} true; R0, Gamma_R0 := 0bv64, true; @@ -313,12 +320,11 @@ procedure main() R30, Gamma_R30 := 1916bv64, true; call printf(); goto l00000329; - l00000329: - assume {:captureState "l00000329"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/multi_malloc/clang_no_plt_no_pic/multi_malloc.expected b/src/test/correct/multi_malloc/clang_no_plt_no_pic/multi_malloc.expected index 002ba1344..b822714e1 100644 --- a/src/test/correct/multi_malloc/clang_no_plt_no_pic/multi_malloc.expected +++ b/src/test/correct/multi_malloc/clang_no_plt_no_pic/multi_malloc.expected @@ -497,6 +497,30 @@ procedure main() R30, Gamma_R30 := 2112bv64, true; call malloc(); goto l00000abb; + l00000b49: + assume {:captureState "l00000b49"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + #5, Gamma_#5 := bvadd64(R31, 32bv64), Gamma_R31; + R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + l00000b0c: + assume {:captureState "l00000b0c"} true; + R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + call rely(); + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2253bv64), Gamma_R0; + R30, Gamma_R30 := 2180bv64, true; + call printf(); + goto l00000b2c; + l00000b2c: + assume {:captureState "l00000b2c"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); + R30, Gamma_R30 := 2188bv64, true; + call #free(); + goto l00000b3b; l00000abb: assume {:captureState "l00000abb"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 8bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R0); @@ -521,35 +545,17 @@ procedure main() R30, Gamma_R30 := 2160bv64, true; call printf(); goto l00000b0c; - l00000b0c: - assume {:captureState "l00000b0c"} true; - R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - call rely(); - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2253bv64), Gamma_R0; - R30, Gamma_R30 := 2180bv64, true; - call printf(); - goto l00000b2c; - l00000b2c: - assume {:captureState "l00000b2c"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); - R30, Gamma_R30 := 2188bv64, true; - call #free(); - goto l00000b3b; l00000b3b: assume {:captureState "l00000b3b"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R30, Gamma_R30 := 2196bv64, true; call #free(); goto l00000b49; - l00000b49: - assume {:captureState "l00000b49"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - #5, Gamma_#5 := bvadd64(R31, 32bv64), Gamma_R31; - R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/multi_malloc/clang_pic/multi_malloc.expected b/src/test/correct/multi_malloc/clang_pic/multi_malloc.expected index 002ba1344..b822714e1 100644 --- a/src/test/correct/multi_malloc/clang_pic/multi_malloc.expected +++ b/src/test/correct/multi_malloc/clang_pic/multi_malloc.expected @@ -497,6 +497,30 @@ procedure main() R30, Gamma_R30 := 2112bv64, true; call malloc(); goto l00000abb; + l00000b49: + assume {:captureState "l00000b49"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + #5, Gamma_#5 := bvadd64(R31, 32bv64), Gamma_R31; + R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + l00000b0c: + assume {:captureState "l00000b0c"} true; + R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + call rely(); + R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2253bv64), Gamma_R0; + R30, Gamma_R30 := 2180bv64, true; + call printf(); + goto l00000b2c; + l00000b2c: + assume {:captureState "l00000b2c"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); + R30, Gamma_R30 := 2188bv64, true; + call #free(); + goto l00000b3b; l00000abb: assume {:captureState "l00000abb"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 8bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R0); @@ -521,35 +545,17 @@ procedure main() R30, Gamma_R30 := 2160bv64, true; call printf(); goto l00000b0c; - l00000b0c: - assume {:captureState "l00000b0c"} true; - R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - call rely(); - R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, R8)), (gamma_load32(Gamma_mem, R8) || L(mem, R8)); - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2253bv64), Gamma_R0; - R30, Gamma_R30 := 2180bv64, true; - call printf(); - goto l00000b2c; - l00000b2c: - assume {:captureState "l00000b2c"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); - R30, Gamma_R30 := 2188bv64, true; - call #free(); - goto l00000b3b; l00000b3b: assume {:captureState "l00000b3b"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R30, Gamma_R30 := 2196bv64, true; call #free(); goto l00000b49; - l00000b49: - assume {:captureState "l00000b49"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - #5, Gamma_#5 := bvadd64(R31, 32bv64), Gamma_R31; - R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/multi_malloc/gcc/multi_malloc.expected b/src/test/correct/multi_malloc/gcc/multi_malloc.expected index 183a05c34..431047675 100644 --- a/src/test/correct/multi_malloc/gcc/multi_malloc.expected +++ b/src/test/correct/multi_malloc/gcc/multi_malloc.expected @@ -533,6 +533,13 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l00000357; + l00000405: + assume {:captureState "l00000405"} true; + R0, Gamma_R0 := 0bv64, true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; l00000357: assume {:captureState "l00000357"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); @@ -541,6 +548,32 @@ procedure main() R30, Gamma_R30 := 2096bv64, true; call malloc(); goto l0000036b; + l000003f7: + assume {:captureState "l000003f7"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); + R30, Gamma_R30 := 2188bv64, true; + call #free(); + goto l00000405; + l000003e8: + assume {:captureState "l000003e8"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); + R30, Gamma_R30 := 2180bv64, true; + call #free(); + goto l000003f7; + l000003c2: + assume {:captureState "l000003c2"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; + R30, Gamma_R30 := 2172bv64, true; + call printf(); + goto l000003e8; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000036b: assume {:captureState "l0000036b"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 24bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); @@ -566,35 +599,8 @@ procedure main() R30, Gamma_R30 := 2148bv64, true; call printf(); goto l000003c2; - l000003c2: - assume {:captureState "l000003c2"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); - R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; - R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; - R30, Gamma_R30 := 2172bv64, true; - call printf(); - goto l000003e8; - l000003e8: - assume {:captureState "l000003e8"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); - R30, Gamma_R30 := 2180bv64, true; - call #free(); - goto l000003f7; - l000003f7: - assume {:captureState "l000003f7"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); - R30, Gamma_R30 := 2188bv64, true; - call #free(); - goto l00000405; - l00000405: - assume {:captureState "l00000405"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/multi_malloc/gcc_O2/multi_malloc.expected b/src/test/correct/multi_malloc/gcc_O2/multi_malloc.expected index 4fa5bf17f..f89076ba9 100644 --- a/src/test/correct/multi_malloc/gcc_O2/multi_malloc.expected +++ b/src/test/correct/multi_malloc/gcc_O2/multi_malloc.expected @@ -504,6 +504,9 @@ procedure main() R30, Gamma_R30 := 1692bv64, true; call __printf_chk(); goto l000001e1; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000001e1: assume {:captureState "l000001e1"} true; R2, Gamma_R2 := 42bv64, true; @@ -519,5 +522,8 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/multi_malloc/gcc_no_plt_no_pic/multi_malloc.expected b/src/test/correct/multi_malloc/gcc_no_plt_no_pic/multi_malloc.expected index 417806157..0e6ad18e2 100644 --- a/src/test/correct/multi_malloc/gcc_no_plt_no_pic/multi_malloc.expected +++ b/src/test/correct/multi_malloc/gcc_no_plt_no_pic/multi_malloc.expected @@ -533,14 +533,23 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l00000a64; - l00000a64: - assume {:captureState "l00000a64"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); - assume {:captureState "%00000a6a"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2096bv64, true; - call malloc(); - goto l00000a78; + l00000b04: + assume {:captureState "l00000b04"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); + R30, Gamma_R30 := 2188bv64, true; + call #free(); + goto l00000b12; + l00000acf: + assume {:captureState "l00000acf"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; + R30, Gamma_R30 := 2172bv64, true; + call printf(); + goto l00000af5; l00000a78: assume {:captureState "l00000a78"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 24bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); @@ -566,35 +575,32 @@ procedure main() R30, Gamma_R30 := 2148bv64, true; call printf(); goto l00000acf; - l00000acf: - assume {:captureState "l00000acf"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); - R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; + l00000b12: + assume {:captureState "l00000b12"} true; R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; - R30, Gamma_R30 := 2172bv64, true; - call printf(); - goto l00000af5; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; l00000af5: assume {:captureState "l00000af5"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); R30, Gamma_R30 := 2180bv64, true; call #free(); goto l00000b04; - l00000b04: - assume {:captureState "l00000b04"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); - R30, Gamma_R30 := 2188bv64, true; - call #free(); - goto l00000b12; - l00000b12: - assume {:captureState "l00000b12"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000a64: + assume {:captureState "l00000a64"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); + assume {:captureState "%00000a6a"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2096bv64, true; + call malloc(); + goto l00000a78; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/multi_malloc/gcc_pic/multi_malloc.expected b/src/test/correct/multi_malloc/gcc_pic/multi_malloc.expected index 417806157..0e6ad18e2 100644 --- a/src/test/correct/multi_malloc/gcc_pic/multi_malloc.expected +++ b/src/test/correct/multi_malloc/gcc_pic/multi_malloc.expected @@ -533,14 +533,23 @@ procedure main() R30, Gamma_R30 := 2084bv64, true; call malloc(); goto l00000a64; - l00000a64: - assume {:captureState "l00000a64"} true; - stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); - assume {:captureState "%00000a6a"} true; - R0, Gamma_R0 := 4bv64, true; - R30, Gamma_R30 := 2096bv64, true; - call malloc(); - goto l00000a78; + l00000b04: + assume {:captureState "l00000b04"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); + R30, Gamma_R30 := 2188bv64, true; + call #free(); + goto l00000b12; + l00000acf: + assume {:captureState "l00000acf"} true; + R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; + R0, Gamma_R0 := 0bv64, true; + R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; + R30, Gamma_R30 := 2172bv64, true; + call printf(); + goto l00000af5; l00000a78: assume {:captureState "l00000a78"} true; stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 24bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 24bv64), Gamma_R0); @@ -566,35 +575,32 @@ procedure main() R30, Gamma_R30 := 2148bv64, true; call printf(); goto l00000acf; - l00000acf: - assume {:captureState "l00000acf"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); - R1, Gamma_R1 := zero_extend32_32(R0[32:0]), Gamma_R0; + l00000b12: + assume {:captureState "l00000b12"} true; R0, Gamma_R0 := 0bv64, true; - R0, Gamma_R0 := bvadd64(R0, 2256bv64), Gamma_R0; - R30, Gamma_R30 := 2172bv64, true; - call printf(); - goto l00000af5; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; l00000af5: assume {:captureState "l00000af5"} true; R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 16bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 16bv64)); R30, Gamma_R30 := 2180bv64, true; call #free(); goto l00000b04; - l00000b04: - assume {:captureState "l00000b04"} true; - R0, Gamma_R0 := memory_load64_le(stack, bvadd64(R31, 24bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 24bv64)); - R30, Gamma_R30 := 2188bv64, true; - call #free(); - goto l00000b12; - l00000b12: - assume {:captureState "l00000b12"} true; - R0, Gamma_R0 := 0bv64, true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000a64: + assume {:captureState "l00000a64"} true; + stack, Gamma_stack := memory_store64_le(stack, bvadd64(R31, 16bv64), R0), gamma_store64(Gamma_stack, bvadd64(R31, 16bv64), Gamma_R0); + assume {:captureState "%00000a6a"} true; + R0, Gamma_R0 := 4bv64, true; + R30, Gamma_R30 := 2096bv64, true; + call malloc(); + goto l00000a78; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/nestedif/clang/nestedif.expected b/src/test/correct/nestedif/clang/nestedif.expected index 76f85d458..1d3419ecb 100644 --- a/src/test/correct/nestedif/clang/nestedif.expected +++ b/src/test/correct/nestedif/clang/nestedif.expected @@ -221,18 +221,51 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000037c, lmain_goto_l00000379; - l0000037c: - assume {:captureState "l0000037c"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000037f; - l00000379: - assume {:captureState "l00000379"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000037f; - l0000037f: - assume {:captureState "l0000037f"} true; - assert Gamma_R8; - goto l0000037f_goto_l00000442, l0000037f_goto_l00000387; + l00000387_goto_l000003b5: + assume {:captureState "l00000387_goto_l000003b5"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003b5; + lmain_goto_l0000037c: + assume {:captureState "lmain_goto_l0000037c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000037c; + l00000387_goto_l000003b2: + assume {:captureState "l00000387_goto_l000003b2"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003b2; + l0000037f_goto_l00000442: + assume {:captureState "l0000037f_goto_l00000442"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000442; + l0000037f_goto_l00000387: + assume {:captureState "l0000037f_goto_l00000387"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000387; + l0000042e: + assume {:captureState "l0000042e"} true; + R8, Gamma_R8 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%0000043c"} true; + goto l000003ff; + l000003b8_goto_l0000042d: + assume {:captureState "l000003b8_goto_l0000042d"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000042d; + l0000042d: + assume {:captureState "l0000042d"} true; + goto l0000042e; + l000003ff: + assume {:captureState "l000003ff"} true; + goto l00000403; + l00000443: + assume {:captureState "l00000443"} true; + R8, Gamma_R8 := 3bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000451"} true; + goto l00000403; + l00000442: + assume {:captureState "l00000442"} true; + goto l00000443; l00000387: assume {:captureState "l00000387"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -244,125 +277,98 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; goto l00000387_goto_l000003b5, l00000387_goto_l000003b2; - l000003b5: - assume {:captureState "l000003b5"} true; - R8, Gamma_R8 := 1bv64, true; - goto l000003b8; + l000003c0_goto_l000003eb: + assume {:captureState "l000003c0_goto_l000003eb"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003eb; + l000003f1_goto_l00000418: + assume {:captureState "l000003f1_goto_l00000418"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000418; + l000003c0_goto_l000003ee: + assume {:captureState "l000003c0_goto_l000003ee"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003ee; + l00000403: + assume {:captureState "l00000403"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l000003b2: assume {:captureState "l000003b2"} true; R8, Gamma_R8 := 0bv64, true; goto l000003b8; + l0000037f: + assume {:captureState "l0000037f"} true; + assert Gamma_R8; + goto l0000037f_goto_l00000442, l0000037f_goto_l00000387; + l0000037c: + assume {:captureState "l0000037c"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000037f; + l000003f1: + assume {:captureState "l000003f1"} true; + assert Gamma_R8; + goto l000003f1_goto_l000003f9, l000003f1_goto_l00000418; l000003b8: assume {:captureState "l000003b8"} true; assert Gamma_R8; goto l000003b8_goto_l000003c0, l000003b8_goto_l0000042d; - l000003c0: - assume {:captureState "l000003c0"} true; - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #6, Gamma_#6 := bvadd32(R8[32:0], 4294967293bv32), Gamma_R8; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934590bv33))), (Gamma_R8 && Gamma_#6); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967294bv33))), (Gamma_R8 && Gamma_#6); - ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; - NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; - assert Gamma_ZF; - goto l000003c0_goto_l000003eb, l000003c0_goto_l000003ee; - l000003ee: - assume {:captureState "l000003ee"} true; + l000003f9: + assume {:captureState "l000003f9"} true; + goto l000003ff; + l000003b5: + assume {:captureState "l000003b5"} true; R8, Gamma_R8 := 1bv64, true; - goto l000003f1; + goto l000003b8; l000003eb: assume {:captureState "l000003eb"} true; R8, Gamma_R8 := 0bv64, true; goto l000003f1; - l000003f1: - assume {:captureState "l000003f1"} true; - assert Gamma_R8; - goto l000003f1_goto_l000003f9, l000003f1_goto_l00000418; + l000003ee: + assume {:captureState "l000003ee"} true; + R8, Gamma_R8 := 1bv64, true; + goto l000003f1; l00000418: assume {:captureState "l00000418"} true; goto l00000419; - l00000419: - assume {:captureState "l00000419"} true; - R8, Gamma_R8 := 7bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000427"} true; - goto l000003f9; - l000003f9: - assume {:captureState "l000003f9"} true; - goto l000003ff; - l0000042d: - assume {:captureState "l0000042d"} true; - goto l0000042e; - l0000042e: - assume {:captureState "l0000042e"} true; - R8, Gamma_R8 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%0000043c"} true; - goto l000003ff; - l000003ff: - assume {:captureState "l000003ff"} true; - goto l00000403; - l00000442: - assume {:captureState "l00000442"} true; - goto l00000443; - l00000443: - assume {:captureState "l00000443"} true; - R8, Gamma_R8 := 3bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000451"} true; - goto l00000403; - l00000403: - assume {:captureState "l00000403"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + l00000379: + assume {:captureState "l00000379"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000037f; lmain_goto_l00000379: assume {:captureState "lmain_goto_l00000379"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000379; - lmain_goto_l0000037c: - assume {:captureState "lmain_goto_l0000037c"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000037c; - l0000037f_goto_l00000387: - assume {:captureState "l0000037f_goto_l00000387"} true; + l000003f1_goto_l000003f9: + assume {:captureState "l000003f1_goto_l000003f9"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000387; - l0000037f_goto_l00000442: - assume {:captureState "l0000037f_goto_l00000442"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000442; - l00000387_goto_l000003b2: - assume {:captureState "l00000387_goto_l000003b2"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000003b2; - l00000387_goto_l000003b5: - assume {:captureState "l00000387_goto_l000003b5"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000003b5; + goto l000003f9; + l000003c0: + assume {:captureState "l000003c0"} true; + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #6, Gamma_#6 := bvadd32(R8[32:0], 4294967293bv32), Gamma_R8; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934590bv33))), (Gamma_R8 && Gamma_#6); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967294bv33))), (Gamma_R8 && Gamma_#6); + ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; + NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; + R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; + assert Gamma_ZF; + goto l000003c0_goto_l000003eb, l000003c0_goto_l000003ee; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000003b8_goto_l000003c0: assume {:captureState "l000003b8_goto_l000003c0"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l000003c0; - l000003b8_goto_l0000042d: - assume {:captureState "l000003b8_goto_l0000042d"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l0000042d; - l000003c0_goto_l000003eb: - assume {:captureState "l000003c0_goto_l000003eb"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000003eb; - l000003c0_goto_l000003ee: - assume {:captureState "l000003c0_goto_l000003ee"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000003ee; - l000003f1_goto_l000003f9: - assume {:captureState "l000003f1_goto_l000003f9"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + l00000419: + assume {:captureState "l00000419"} true; + R8, Gamma_R8 := 7bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000427"} true; goto l000003f9; - l000003f1_goto_l00000418: - assume {:captureState "l000003f1_goto_l00000418"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000418; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/nestedif/clang_O2/nestedif.expected b/src/test/correct/nestedif/clang_O2/nestedif.expected index b904c03a5..91c86ad15 100644 --- a/src/test/correct/nestedif/clang_O2/nestedif.expected +++ b/src/test/correct/nestedif/clang_O2/nestedif.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected b/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected index 80c5beae2..3d639f655 100644 --- a/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected +++ b/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected @@ -221,41 +221,50 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000aaa, lmain_goto_l00000aad; - l00000aad: - assume {:captureState "l00000aad"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000ab0; - l00000aaa: - assume {:captureState "l00000aaa"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000ab0; + l00000ab8_goto_l00000ae6: + assume {:captureState "l00000ab8_goto_l00000ae6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000ae6; + lmain_goto_l00000aaa: + assume {:captureState "lmain_goto_l00000aaa"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000aaa; + l00000ab0_goto_l00000b73: + assume {:captureState "l00000ab0_goto_l00000b73"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b73; + l00000ab8_goto_l00000ae3: + assume {:captureState "l00000ab8_goto_l00000ae3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000ae3; + lmain_goto_l00000aad: + assume {:captureState "lmain_goto_l00000aad"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000aad; + l00000b22_goto_l00000b49: + assume {:captureState "l00000b22_goto_l00000b49"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b49; + l00000b49: + assume {:captureState "l00000b49"} true; + goto l00000b4a; + l00000b5e: + assume {:captureState "l00000b5e"} true; + goto l00000b5f; + l00000b5f: + assume {:captureState "l00000b5f"} true; + R8, Gamma_R8 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000b6d"} true; + goto l00000b30; l00000ab0: assume {:captureState "l00000ab0"} true; assert Gamma_R8; goto l00000ab0_goto_l00000b73, l00000ab0_goto_l00000ab8; - l00000ab8: - assume {:captureState "l00000ab8"} true; - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #5, Gamma_#5 := bvadd32(R8[32:0], 4294967294bv32), Gamma_R8; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934591bv33))), (Gamma_R8 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967295bv33))), (Gamma_R8 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; - assert Gamma_ZF; - goto l00000ab8_goto_l00000ae6, l00000ab8_goto_l00000ae3; - l00000ae6: - assume {:captureState "l00000ae6"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000ae9; - l00000ae3: - assume {:captureState "l00000ae3"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000ae9; - l00000ae9: - assume {:captureState "l00000ae9"} true; - assert Gamma_R8; - goto l00000ae9_goto_l00000af1, l00000ae9_goto_l00000b5e; + l00000ae9_goto_l00000b5e: + assume {:captureState "l00000ae9_goto_l00000b5e"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b5e; l00000af1: assume {:captureState "l00000af1"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -267,6 +276,17 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; goto l00000af1_goto_l00000b1c, l00000af1_goto_l00000b1f; + l00000ab8: + assume {:captureState "l00000ab8"} true; + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #5, Gamma_#5 := bvadd32(R8[32:0], 4294967294bv32), Gamma_R8; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934591bv33))), (Gamma_R8 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967295bv33))), (Gamma_R8 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; + assert Gamma_ZF; + goto l00000ab8_goto_l00000ae6, l00000ab8_goto_l00000ae3; l00000b1f: assume {:captureState "l00000b1f"} true; R8, Gamma_R8 := 1bv64, true; @@ -275,34 +295,19 @@ procedure main() assume {:captureState "l00000b1c"} true; R8, Gamma_R8 := 0bv64, true; goto l00000b22; - l00000b22: - assume {:captureState "l00000b22"} true; - assert Gamma_R8; - goto l00000b22_goto_l00000b49, l00000b22_goto_l00000b2a; - l00000b49: - assume {:captureState "l00000b49"} true; - goto l00000b4a; - l00000b4a: - assume {:captureState "l00000b4a"} true; - R8, Gamma_R8 := 7bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000b58"} true; - goto l00000b2a; - l00000b2a: - assume {:captureState "l00000b2a"} true; - goto l00000b30; - l00000b5e: - assume {:captureState "l00000b5e"} true; - goto l00000b5f; - l00000b5f: - assume {:captureState "l00000b5f"} true; - R8, Gamma_R8 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000b6d"} true; - goto l00000b30; - l00000b30: - assume {:captureState "l00000b30"} true; - goto l00000b34; + l00000b34: + assume {:captureState "l00000b34"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l00000ab0_goto_l00000ab8: + assume {:captureState "l00000ab0_goto_l00000ab8"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000ab8; + l00000aaa: + assume {:captureState "l00000aaa"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000ab0; l00000b73: assume {:captureState "l00000b73"} true; goto l00000b74; @@ -312,57 +317,58 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); assume {:captureState "%00000b82"} true; goto l00000b34; - l00000b34: - assume {:captureState "l00000b34"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000aaa: - assume {:captureState "lmain_goto_l00000aaa"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000aaa; - lmain_goto_l00000aad: - assume {:captureState "lmain_goto_l00000aad"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000aad; - l00000ab0_goto_l00000ab8: - assume {:captureState "l00000ab0_goto_l00000ab8"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000ab8; - l00000ab0_goto_l00000b73: - assume {:captureState "l00000ab0_goto_l00000b73"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000b73; - l00000ab8_goto_l00000ae3: - assume {:captureState "l00000ab8_goto_l00000ae3"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000ae3; - l00000ab8_goto_l00000ae6: - assume {:captureState "l00000ab8_goto_l00000ae6"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000ae6; - l00000ae9_goto_l00000af1: - assume {:captureState "l00000ae9_goto_l00000af1"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000af1; - l00000ae9_goto_l00000b5e: - assume {:captureState "l00000ae9_goto_l00000b5e"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000b5e; + l00000b30: + assume {:captureState "l00000b30"} true; + goto l00000b34; l00000af1_goto_l00000b1c: assume {:captureState "l00000af1_goto_l00000b1c"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000b1c; + l00000aad: + assume {:captureState "l00000aad"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000ab0; l00000af1_goto_l00000b1f: assume {:captureState "l00000af1_goto_l00000b1f"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000b1f; + l00000ae6: + assume {:captureState "l00000ae6"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000ae9; + l00000b2a: + assume {:captureState "l00000b2a"} true; + goto l00000b30; + l00000ae3: + assume {:captureState "l00000ae3"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000ae9; + l00000b4a: + assume {:captureState "l00000b4a"} true; + R8, Gamma_R8 := 7bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000b58"} true; + goto l00000b2a; + l00000ae9_goto_l00000af1: + assume {:captureState "l00000ae9_goto_l00000af1"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000af1; + l00000ae9: + assume {:captureState "l00000ae9"} true; + assert Gamma_R8; + goto l00000ae9_goto_l00000af1, l00000ae9_goto_l00000b5e; + l00000b22: + assume {:captureState "l00000b22"} true; + assert Gamma_R8; + goto l00000b22_goto_l00000b49, l00000b22_goto_l00000b2a; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000b22_goto_l00000b2a: assume {:captureState "l00000b22_goto_l00000b2a"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000b2a; - l00000b22_goto_l00000b49: - assume {:captureState "l00000b22_goto_l00000b49"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000b49; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/nestedif/clang_pic/nestedif.expected b/src/test/correct/nestedif/clang_pic/nestedif.expected index 80c5beae2..3d639f655 100644 --- a/src/test/correct/nestedif/clang_pic/nestedif.expected +++ b/src/test/correct/nestedif/clang_pic/nestedif.expected @@ -221,41 +221,50 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000aaa, lmain_goto_l00000aad; - l00000aad: - assume {:captureState "l00000aad"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000ab0; - l00000aaa: - assume {:captureState "l00000aaa"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000ab0; + l00000ab8_goto_l00000ae6: + assume {:captureState "l00000ab8_goto_l00000ae6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000ae6; + lmain_goto_l00000aaa: + assume {:captureState "lmain_goto_l00000aaa"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000aaa; + l00000ab0_goto_l00000b73: + assume {:captureState "l00000ab0_goto_l00000b73"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b73; + l00000ab8_goto_l00000ae3: + assume {:captureState "l00000ab8_goto_l00000ae3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000ae3; + lmain_goto_l00000aad: + assume {:captureState "lmain_goto_l00000aad"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000aad; + l00000b22_goto_l00000b49: + assume {:captureState "l00000b22_goto_l00000b49"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b49; + l00000b49: + assume {:captureState "l00000b49"} true; + goto l00000b4a; + l00000b5e: + assume {:captureState "l00000b5e"} true; + goto l00000b5f; + l00000b5f: + assume {:captureState "l00000b5f"} true; + R8, Gamma_R8 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000b6d"} true; + goto l00000b30; l00000ab0: assume {:captureState "l00000ab0"} true; assert Gamma_R8; goto l00000ab0_goto_l00000b73, l00000ab0_goto_l00000ab8; - l00000ab8: - assume {:captureState "l00000ab8"} true; - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #5, Gamma_#5 := bvadd32(R8[32:0], 4294967294bv32), Gamma_R8; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934591bv33))), (Gamma_R8 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967295bv33))), (Gamma_R8 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; - assert Gamma_ZF; - goto l00000ab8_goto_l00000ae6, l00000ab8_goto_l00000ae3; - l00000ae6: - assume {:captureState "l00000ae6"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000ae9; - l00000ae3: - assume {:captureState "l00000ae3"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000ae9; - l00000ae9: - assume {:captureState "l00000ae9"} true; - assert Gamma_R8; - goto l00000ae9_goto_l00000af1, l00000ae9_goto_l00000b5e; + l00000ae9_goto_l00000b5e: + assume {:captureState "l00000ae9_goto_l00000b5e"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b5e; l00000af1: assume {:captureState "l00000af1"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -267,6 +276,17 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; goto l00000af1_goto_l00000b1c, l00000af1_goto_l00000b1f; + l00000ab8: + assume {:captureState "l00000ab8"} true; + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #5, Gamma_#5 := bvadd32(R8[32:0], 4294967294bv32), Gamma_R8; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934591bv33))), (Gamma_R8 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967295bv33))), (Gamma_R8 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; + assert Gamma_ZF; + goto l00000ab8_goto_l00000ae6, l00000ab8_goto_l00000ae3; l00000b1f: assume {:captureState "l00000b1f"} true; R8, Gamma_R8 := 1bv64, true; @@ -275,34 +295,19 @@ procedure main() assume {:captureState "l00000b1c"} true; R8, Gamma_R8 := 0bv64, true; goto l00000b22; - l00000b22: - assume {:captureState "l00000b22"} true; - assert Gamma_R8; - goto l00000b22_goto_l00000b49, l00000b22_goto_l00000b2a; - l00000b49: - assume {:captureState "l00000b49"} true; - goto l00000b4a; - l00000b4a: - assume {:captureState "l00000b4a"} true; - R8, Gamma_R8 := 7bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000b58"} true; - goto l00000b2a; - l00000b2a: - assume {:captureState "l00000b2a"} true; - goto l00000b30; - l00000b5e: - assume {:captureState "l00000b5e"} true; - goto l00000b5f; - l00000b5f: - assume {:captureState "l00000b5f"} true; - R8, Gamma_R8 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000b6d"} true; - goto l00000b30; - l00000b30: - assume {:captureState "l00000b30"} true; - goto l00000b34; + l00000b34: + assume {:captureState "l00000b34"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l00000ab0_goto_l00000ab8: + assume {:captureState "l00000ab0_goto_l00000ab8"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000ab8; + l00000aaa: + assume {:captureState "l00000aaa"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000ab0; l00000b73: assume {:captureState "l00000b73"} true; goto l00000b74; @@ -312,57 +317,58 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); assume {:captureState "%00000b82"} true; goto l00000b34; - l00000b34: - assume {:captureState "l00000b34"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000aaa: - assume {:captureState "lmain_goto_l00000aaa"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000aaa; - lmain_goto_l00000aad: - assume {:captureState "lmain_goto_l00000aad"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000aad; - l00000ab0_goto_l00000ab8: - assume {:captureState "l00000ab0_goto_l00000ab8"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000ab8; - l00000ab0_goto_l00000b73: - assume {:captureState "l00000ab0_goto_l00000b73"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000b73; - l00000ab8_goto_l00000ae3: - assume {:captureState "l00000ab8_goto_l00000ae3"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000ae3; - l00000ab8_goto_l00000ae6: - assume {:captureState "l00000ab8_goto_l00000ae6"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000ae6; - l00000ae9_goto_l00000af1: - assume {:captureState "l00000ae9_goto_l00000af1"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000af1; - l00000ae9_goto_l00000b5e: - assume {:captureState "l00000ae9_goto_l00000b5e"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000b5e; + l00000b30: + assume {:captureState "l00000b30"} true; + goto l00000b34; l00000af1_goto_l00000b1c: assume {:captureState "l00000af1_goto_l00000b1c"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000b1c; + l00000aad: + assume {:captureState "l00000aad"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000ab0; l00000af1_goto_l00000b1f: assume {:captureState "l00000af1_goto_l00000b1f"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000b1f; + l00000ae6: + assume {:captureState "l00000ae6"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000ae9; + l00000b2a: + assume {:captureState "l00000b2a"} true; + goto l00000b30; + l00000ae3: + assume {:captureState "l00000ae3"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000ae9; + l00000b4a: + assume {:captureState "l00000b4a"} true; + R8, Gamma_R8 := 7bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000b58"} true; + goto l00000b2a; + l00000ae9_goto_l00000af1: + assume {:captureState "l00000ae9_goto_l00000af1"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000af1; + l00000ae9: + assume {:captureState "l00000ae9"} true; + assert Gamma_R8; + goto l00000ae9_goto_l00000af1, l00000ae9_goto_l00000b5e; + l00000b22: + assume {:captureState "l00000b22"} true; + assert Gamma_R8; + goto l00000b22_goto_l00000b49, l00000b22_goto_l00000b2a; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000b22_goto_l00000b2a: assume {:captureState "l00000b22_goto_l00000b2a"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000b2a; - l00000b22_goto_l00000b49: - assume {:captureState "l00000b22_goto_l00000b49"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000b49; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/nestedif/gcc/nestedif.expected b/src/test/correct/nestedif/gcc/nestedif.expected index 01fc15bd5..6d0a8fc32 100644 --- a/src/test/correct/nestedif/gcc/nestedif.expected +++ b/src/test/correct/nestedif/gcc/nestedif.expected @@ -216,6 +216,45 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000345, lmain_goto_l000003c4; + l000003a6: + assume {:captureState "l000003a6"} true; + R0, Gamma_R0 := 7bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%000003b1"} true; + goto l00000391; + l00000345_goto_l0000036b: + assume {:captureState "l00000345_goto_l0000036b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000036b; + l00000391: + assume {:captureState "l00000391"} true; + R0, Gamma_R0 := 0bv64, true; + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l000003c4: + assume {:captureState "l000003c4"} true; + R0, Gamma_R0 := 3bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%000003cf"} true; + goto l00000391; + l000003b3: + assume {:captureState "l000003b3"} true; + R0, Gamma_R0 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%000003be"} true; + goto l00000391; + lmain_goto_l000003c4: + assume {:captureState "lmain_goto_l000003c4"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000003c4; + l0000036b_goto_l000003a6: + assume {:captureState "l0000036b_goto_l000003a6"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000003a6; + l0000036b_goto_l00000391: + assume {:captureState "l0000036b_goto_l00000391"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000391; l00000345: assume {:captureState "l00000345"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -226,6 +265,13 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto l00000345_goto_l0000036b, l00000345_goto_l000003b3; + lmain_goto_l00000345: + assume {:captureState "lmain_goto_l00000345"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000345; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000036b: assume {:captureState "l0000036b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -236,51 +282,11 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; goto l0000036b_goto_l000003a6, l0000036b_goto_l00000391; - l000003a6: - assume {:captureState "l000003a6"} true; - R0, Gamma_R0 := 7bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%000003b1"} true; - goto l00000391; - l000003b3: - assume {:captureState "l000003b3"} true; - R0, Gamma_R0 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%000003be"} true; - goto l00000391; - l000003c4: - assume {:captureState "l000003c4"} true; - R0, Gamma_R0 := 3bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%000003cf"} true; - goto l00000391; - l00000391: - assume {:captureState "l00000391"} true; - R0, Gamma_R0 := 0bv64, true; - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000345: - assume {:captureState "lmain_goto_l00000345"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000345; - lmain_goto_l000003c4: - assume {:captureState "lmain_goto_l000003c4"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l000003c4; - l00000345_goto_l0000036b: - assume {:captureState "l00000345_goto_l0000036b"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l0000036b; l00000345_goto_l000003b3: assume {:captureState "l00000345_goto_l000003b3"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000003b3; - l0000036b_goto_l00000391: - assume {:captureState "l0000036b_goto_l00000391"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000391; - l0000036b_goto_l000003a6: - assume {:captureState "l0000036b_goto_l000003a6"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l000003a6; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/nestedif/gcc_O2/nestedif.expected b/src/test/correct/nestedif/gcc_O2/nestedif.expected index 306991d20..0918aa3d9 100644 --- a/src/test/correct/nestedif/gcc_O2/nestedif.expected +++ b/src/test/correct/nestedif/gcc_O2/nestedif.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected b/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected index 10003d950..2ef618ea9 100644 --- a/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected +++ b/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected @@ -216,16 +216,6 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000009e1, lmain_goto_l00000a60; - l000009e1: - assume {:captureState "l000009e1"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #5, Gamma_#5 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - assert Gamma_ZF; - goto l000009e1_goto_l00000a07, l000009e1_goto_l00000a4f; l00000a07: assume {:captureState "l00000a07"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -236,51 +226,67 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; goto l00000a07_goto_l00000a2d, l00000a07_goto_l00000a42; - l00000a42: - assume {:captureState "l00000a42"} true; - R0, Gamma_R0 := 7bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%00000a4d"} true; - goto l00000a2d; + l000009e1_goto_l00000a4f: + assume {:captureState "l000009e1_goto_l00000a4f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a4f; + lmain_goto_l000009e1: + assume {:captureState "lmain_goto_l000009e1"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000009e1; + l00000a07_goto_l00000a42: + assume {:captureState "l00000a07_goto_l00000a42"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a42; + l000009e1: + assume {:captureState "l000009e1"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #5, Gamma_#5 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + assert Gamma_ZF; + goto l000009e1_goto_l00000a07, l000009e1_goto_l00000a4f; + l00000a2d: + assume {:captureState "l00000a2d"} true; + R0, Gamma_R0 := 0bv64, true; + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000a4f: assume {:captureState "l00000a4f"} true; R0, Gamma_R0 := 5bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%00000a5a"} true; goto l00000a2d; + lmain_goto_l00000a60: + assume {:captureState "lmain_goto_l00000a60"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a60; l00000a60: assume {:captureState "l00000a60"} true; R0, Gamma_R0 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%00000a6b"} true; goto l00000a2d; - l00000a2d: - assume {:captureState "l00000a2d"} true; - R0, Gamma_R0 := 0bv64, true; - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l000009e1: - assume {:captureState "lmain_goto_l000009e1"} true; + l00000a07_goto_l00000a2d: + assume {:captureState "l00000a07_goto_l00000a2d"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l000009e1; - lmain_goto_l00000a60: - assume {:captureState "lmain_goto_l00000a60"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000a60; + goto l00000a2d; l000009e1_goto_l00000a07: assume {:captureState "l000009e1_goto_l00000a07"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l00000a07; - l000009e1_goto_l00000a4f: - assume {:captureState "l000009e1_goto_l00000a4f"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000a4f; - l00000a07_goto_l00000a2d: - assume {:captureState "l00000a07_goto_l00000a2d"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000a42: + assume {:captureState "l00000a42"} true; + R0, Gamma_R0 := 7bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%00000a4d"} true; goto l00000a2d; - l00000a07_goto_l00000a42: - assume {:captureState "l00000a07_goto_l00000a42"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000a42; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/nestedif/gcc_pic/nestedif.expected b/src/test/correct/nestedif/gcc_pic/nestedif.expected index 10003d950..2ef618ea9 100644 --- a/src/test/correct/nestedif/gcc_pic/nestedif.expected +++ b/src/test/correct/nestedif/gcc_pic/nestedif.expected @@ -216,16 +216,6 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000009e1, lmain_goto_l00000a60; - l000009e1: - assume {:captureState "l000009e1"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #5, Gamma_#5 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - assert Gamma_ZF; - goto l000009e1_goto_l00000a07, l000009e1_goto_l00000a4f; l00000a07: assume {:captureState "l00000a07"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -236,51 +226,67 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; goto l00000a07_goto_l00000a2d, l00000a07_goto_l00000a42; - l00000a42: - assume {:captureState "l00000a42"} true; - R0, Gamma_R0 := 7bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%00000a4d"} true; - goto l00000a2d; + l000009e1_goto_l00000a4f: + assume {:captureState "l000009e1_goto_l00000a4f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a4f; + lmain_goto_l000009e1: + assume {:captureState "lmain_goto_l000009e1"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000009e1; + l00000a07_goto_l00000a42: + assume {:captureState "l00000a07_goto_l00000a42"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a42; + l000009e1: + assume {:captureState "l000009e1"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #5, Gamma_#5 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + assert Gamma_ZF; + goto l000009e1_goto_l00000a07, l000009e1_goto_l00000a4f; + l00000a2d: + assume {:captureState "l00000a2d"} true; + R0, Gamma_R0 := 0bv64, true; + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000a4f: assume {:captureState "l00000a4f"} true; R0, Gamma_R0 := 5bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%00000a5a"} true; goto l00000a2d; + lmain_goto_l00000a60: + assume {:captureState "lmain_goto_l00000a60"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a60; l00000a60: assume {:captureState "l00000a60"} true; R0, Gamma_R0 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%00000a6b"} true; goto l00000a2d; - l00000a2d: - assume {:captureState "l00000a2d"} true; - R0, Gamma_R0 := 0bv64, true; - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l000009e1: - assume {:captureState "lmain_goto_l000009e1"} true; + l00000a07_goto_l00000a2d: + assume {:captureState "l00000a07_goto_l00000a2d"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l000009e1; - lmain_goto_l00000a60: - assume {:captureState "lmain_goto_l00000a60"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000a60; + goto l00000a2d; l000009e1_goto_l00000a07: assume {:captureState "l000009e1_goto_l00000a07"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l00000a07; - l000009e1_goto_l00000a4f: - assume {:captureState "l000009e1_goto_l00000a4f"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000a4f; - l00000a07_goto_l00000a2d: - assume {:captureState "l00000a07_goto_l00000a2d"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000a42: + assume {:captureState "l00000a42"} true; + R0, Gamma_R0 := 7bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%00000a4d"} true; goto l00000a2d; - l00000a07_goto_l00000a42: - assume {:captureState "l00000a07_goto_l00000a42"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000a42; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/no_interference_update_x/clang/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/clang/no_interference_update_x.expected index 7a6a27fd0..009e6ae45 100644 --- a/src/test/correct/no_interference_update_x/clang/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/clang/no_interference_update_x.expected @@ -195,5 +195,11 @@ procedure main() assert (memory_load32_le(mem, $y_addr) == y_old); assume {:captureState "%000002ce"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_x/clang_O2/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/clang_O2/no_interference_update_x.expected index 740a585c8..5bdc78f2c 100644 --- a/src/test/correct/no_interference_update_x/clang_O2/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/clang_O2/no_interference_update_x.expected @@ -195,5 +195,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 52bv64), R9[32:0]), gamma_store32(Gamma_mem, bvadd64(R8, 52bv64), Gamma_R9); assert (memory_load32_le(mem, $y_addr) == y_old); assume {:captureState "%000002d3"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_x/clang_no_plt_no_pic/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/clang_no_plt_no_pic/no_interference_update_x.expected index 293d1dbc9..e930a15fe 100644 --- a/src/test/correct/no_interference_update_x/clang_no_plt_no_pic/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/clang_no_plt_no_pic/no_interference_update_x.expected @@ -195,5 +195,11 @@ procedure main() assert (memory_load32_le(mem, $y_addr) == y_old); assume {:captureState "%00000845"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_x/clang_pic/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/clang_pic/no_interference_update_x.expected index a5a054cf9..e59f5333a 100644 --- a/src/test/correct/no_interference_update_x/clang_pic/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/clang_pic/no_interference_update_x.expected @@ -229,5 +229,11 @@ procedure main() assert (memory_load32_le(mem, $y_addr) == y_old); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_x/gcc/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/gcc/no_interference_update_x.expected index 48ecd68b7..5cbe32bf9 100644 --- a/src/test/correct/no_interference_update_x/gcc/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/gcc/no_interference_update_x.expected @@ -194,5 +194,11 @@ procedure main() assert (memory_load32_le(mem, $y_addr) == y_old); assume {:captureState "%000002d8"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_x/gcc_O2/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/gcc_O2/no_interference_update_x.expected index ef1344e1e..fb0cfcf5b 100644 --- a/src/test/correct/no_interference_update_x/gcc_O2/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/gcc_O2/no_interference_update_x.expected @@ -195,5 +195,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 20bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 20bv64), Gamma_R2); assert (memory_load32_le(mem, $y_addr) == y_old); assume {:captureState "%000001bd"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_x/gcc_no_plt_no_pic/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/gcc_no_plt_no_pic/no_interference_update_x.expected index 09a38ab49..2f16d6159 100644 --- a/src/test/correct/no_interference_update_x/gcc_no_plt_no_pic/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/gcc_no_plt_no_pic/no_interference_update_x.expected @@ -194,5 +194,11 @@ procedure main() assert (memory_load32_le(mem, $y_addr) == y_old); assume {:captureState "%0000085b"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_x/gcc_pic/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/gcc_pic/no_interference_update_x.expected index b07082212..51d8ed8f9 100644 --- a/src/test/correct/no_interference_update_x/gcc_pic/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/gcc_pic/no_interference_update_x.expected @@ -227,5 +227,11 @@ procedure main() assert (memory_load32_le(mem, $y_addr) == y_old); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_y/clang/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/clang/no_interference_update_y.expected index 2bb856649..8cdef6db0 100644 --- a/src/test/correct/no_interference_update_y/clang/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/clang/no_interference_update_y.expected @@ -195,5 +195,11 @@ procedure main() assert (memory_load32_le(mem, $x_addr) == x_old); assume {:captureState "%000002ce"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_y/clang_O2/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/clang_O2/no_interference_update_y.expected index 81e2f7c66..86206551f 100644 --- a/src/test/correct/no_interference_update_y/clang_O2/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/clang_O2/no_interference_update_y.expected @@ -195,5 +195,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R8, 52bv64), R9[32:0]), gamma_store32(Gamma_mem, bvadd64(R8, 52bv64), Gamma_R9); assert (memory_load32_le(mem, $x_addr) == x_old); assume {:captureState "%000002d3"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_y/clang_no_plt_no_pic/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/clang_no_plt_no_pic/no_interference_update_y.expected index ac0a8d545..80c33d6ed 100644 --- a/src/test/correct/no_interference_update_y/clang_no_plt_no_pic/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/clang_no_plt_no_pic/no_interference_update_y.expected @@ -195,5 +195,11 @@ procedure main() assert (memory_load32_le(mem, $x_addr) == x_old); assume {:captureState "%00000845"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_y/clang_pic/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/clang_pic/no_interference_update_y.expected index 963551bd0..e37d80782 100644 --- a/src/test/correct/no_interference_update_y/clang_pic/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/clang_pic/no_interference_update_y.expected @@ -229,5 +229,11 @@ procedure main() assert (memory_load32_le(mem, $x_addr) == x_old); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_y/gcc/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/gcc/no_interference_update_y.expected index 20a7bf882..e53abcb67 100644 --- a/src/test/correct/no_interference_update_y/gcc/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/gcc/no_interference_update_y.expected @@ -194,5 +194,11 @@ procedure main() assert (memory_load32_le(mem, $x_addr) == x_old); assume {:captureState "%000002d8"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_y/gcc_O2/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/gcc_O2/no_interference_update_y.expected index 01c79156a..670bf9dce 100644 --- a/src/test/correct/no_interference_update_y/gcc_O2/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/gcc_O2/no_interference_update_y.expected @@ -195,5 +195,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 20bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 20bv64), Gamma_R2); assert (memory_load32_le(mem, $x_addr) == x_old); assume {:captureState "%000001bd"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_y/gcc_no_plt_no_pic/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/gcc_no_plt_no_pic/no_interference_update_y.expected index 658b4eb22..20ebed36e 100644 --- a/src/test/correct/no_interference_update_y/gcc_no_plt_no_pic/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/gcc_no_plt_no_pic/no_interference_update_y.expected @@ -194,5 +194,11 @@ procedure main() assert (memory_load32_le(mem, $x_addr) == x_old); assume {:captureState "%0000085b"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/no_interference_update_y/gcc_pic/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/gcc_pic/no_interference_update_y.expected index 0cd4b1423..60923f161 100644 --- a/src/test/correct/no_interference_update_y/gcc_pic/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/gcc_pic/no_interference_update_y.expected @@ -227,5 +227,11 @@ procedure main() assert (memory_load32_le(mem, $x_addr) == x_old); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/secret_write/clang/secret_write.expected b/src/test/correct/secret_write/clang/secret_write.expected index 731e47319..16724cc83 100644 --- a/src/test/correct/secret_write/clang/secret_write.expected +++ b/src/test/correct/secret_write/clang/secret_write.expected @@ -257,5 +257,11 @@ procedure main() assert ((bvadd64(R9, 52bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert bvsge32(memory_load32_le(mem, $z_addr), z_old); assume {:captureState "%0000033f"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/secret_write/clang_O2/secret_write.expected b/src/test/correct/secret_write/clang_O2/secret_write.expected index 0adc7d048..de15862c0 100644 --- a/src/test/correct/secret_write/clang_O2/secret_write.expected +++ b/src/test/correct/secret_write/clang_O2/secret_write.expected @@ -223,5 +223,11 @@ procedure main() assert ((bvadd64(R9, 52bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert bvsge32(memory_load32_le(mem, $z_addr), z_old); assume {:captureState "%000002e7"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/secret_write/clang_no_plt_no_pic/secret_write.expected b/src/test/correct/secret_write/clang_no_plt_no_pic/secret_write.expected index 2e4c0f4d2..030e3be43 100644 --- a/src/test/correct/secret_write/clang_no_plt_no_pic/secret_write.expected +++ b/src/test/correct/secret_write/clang_no_plt_no_pic/secret_write.expected @@ -257,5 +257,11 @@ procedure main() assert ((bvadd64(R9, 52bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert bvsge32(memory_load32_le(mem, $z_addr), z_old); assume {:captureState "%00000936"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/secret_write/clang_pic/secret_write.expected b/src/test/correct/secret_write/clang_pic/secret_write.expected index 53c9b519b..ad9cb3006 100644 --- a/src/test/correct/secret_write/clang_pic/secret_write.expected +++ b/src/test/correct/secret_write/clang_pic/secret_write.expected @@ -343,5 +343,11 @@ procedure main() assert ((R9 == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert bvsge32(memory_load32_le(mem, $z_addr), z_old); assume {:captureState "%00000360"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/secret_write/gcc/secret_write.expected b/src/test/correct/secret_write/gcc/secret_write.expected index fbb8b7faf..04ecbda5f 100644 --- a/src/test/correct/secret_write/gcc/secret_write.expected +++ b/src/test/correct/secret_write/gcc/secret_write.expected @@ -266,5 +266,11 @@ procedure main() assert bvsge32(memory_load32_le(mem, $z_addr), z_old); assume {:captureState "%000003b7"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/secret_write/gcc_O2/secret_write.expected b/src/test/correct/secret_write/gcc_O2/secret_write.expected index 393a51bf6..53529e4f5 100644 --- a/src/test/correct/secret_write/gcc_O2/secret_write.expected +++ b/src/test/correct/secret_write/gcc_O2/secret_write.expected @@ -223,5 +223,11 @@ procedure main() assert ((bvadd64(R2, 4bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert bvsge32(memory_load32_le(mem, $z_addr), z_old); assume {:captureState "%000001ca"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/secret_write/gcc_no_plt_no_pic/secret_write.expected b/src/test/correct/secret_write/gcc_no_plt_no_pic/secret_write.expected index 9d6a27f3f..d3fa78bba 100644 --- a/src/test/correct/secret_write/gcc_no_plt_no_pic/secret_write.expected +++ b/src/test/correct/secret_write/gcc_no_plt_no_pic/secret_write.expected @@ -266,5 +266,11 @@ procedure main() assert bvsge32(memory_load32_le(mem, $z_addr), z_old); assume {:captureState "%00000a45"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/secret_write/gcc_pic/secret_write.expected b/src/test/correct/secret_write/gcc_pic/secret_write.expected index 2275cb362..ff4632805 100644 --- a/src/test/correct/secret_write/gcc_pic/secret_write.expected +++ b/src/test/correct/secret_write/gcc_pic/secret_write.expected @@ -354,5 +354,11 @@ procedure main() assert bvsge32(memory_load32_le(mem, $z_addr), z_old); assume {:captureState "%000003bf"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/simple_jump/clang/simple_jump.expected b/src/test/correct/simple_jump/clang/simple_jump.expected index 8ae879c7e..32def4468 100644 --- a/src/test/correct/simple_jump/clang/simple_jump.expected +++ b/src/test/correct/simple_jump/clang/simple_jump.expected @@ -219,42 +219,48 @@ procedure main() assume {:captureState "l00000329"} true; R8, Gamma_R8 := 1bv64, true; goto l0000032c; - l00000326: - assume {:captureState "l00000326"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000032c; l0000032c: assume {:captureState "l0000032c"} true; assert Gamma_R8; goto l0000032c_goto_l00000334, l0000032c_goto_l0000034b; + l00000334: + assume {:captureState "l00000334"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l00000326: + assume {:captureState "l00000326"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000032c; l0000034b: assume {:captureState "l0000034b"} true; goto l0000034c; + lmain_goto_l00000326: + assume {:captureState "lmain_goto_l00000326"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000326; l0000034c: assume {:captureState "l0000034c"} true; R8, Gamma_R8 := 6bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%0000035a"} true; goto l00000334; - l00000334: - assume {:captureState "l00000334"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000326: - assume {:captureState "lmain_goto_l00000326"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000326; - lmain_goto_l00000329: - assume {:captureState "lmain_goto_l00000329"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000329; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000032c_goto_l00000334: assume {:captureState "l0000032c_goto_l00000334"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000334; + lmain_goto_l00000329: + assume {:captureState "lmain_goto_l00000329"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000329; l0000032c_goto_l0000034b: assume {:captureState "l0000032c_goto_l0000034b"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000034b; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/simple_jump/clang_O2/simple_jump.expected b/src/test/correct/simple_jump/clang_O2/simple_jump.expected index b904c03a5..91c86ad15 100644 --- a/src/test/correct/simple_jump/clang_O2/simple_jump.expected +++ b/src/test/correct/simple_jump/clang_O2/simple_jump.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected b/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected index 7d5b217e6..1c39d87d8 100644 --- a/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected @@ -215,18 +215,23 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000938, lmain_goto_l0000093b; - l0000093b: - assume {:captureState "l0000093b"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000093e; - l00000938: - assume {:captureState "l00000938"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000093e; l0000093e: assume {:captureState "l0000093e"} true; assert Gamma_R8; goto l0000093e_goto_l00000946, l0000093e_goto_l0000095d; + l00000946: + assume {:captureState "l00000946"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + lmain_goto_l00000938: + assume {:captureState "lmain_goto_l00000938"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000938; + l0000093b: + assume {:captureState "l0000093b"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000093e; l0000095d: assume {:captureState "l0000095d"} true; goto l0000095e; @@ -236,19 +241,6 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%0000096c"} true; goto l00000946; - l00000946: - assume {:captureState "l00000946"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000938: - assume {:captureState "lmain_goto_l00000938"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000938; - lmain_goto_l0000093b: - assume {:captureState "lmain_goto_l0000093b"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000093b; l0000093e_goto_l00000946: assume {:captureState "l0000093e_goto_l00000946"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); @@ -257,4 +249,18 @@ procedure main() assume {:captureState "l0000093e_goto_l0000095d"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000095d; + lmain_goto_l0000093b: + assume {:captureState "lmain_goto_l0000093b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000093b; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000938: + assume {:captureState "l00000938"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000093e; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/simple_jump/clang_pic/simple_jump.expected b/src/test/correct/simple_jump/clang_pic/simple_jump.expected index 7d5b217e6..1c39d87d8 100644 --- a/src/test/correct/simple_jump/clang_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/clang_pic/simple_jump.expected @@ -215,18 +215,23 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000938, lmain_goto_l0000093b; - l0000093b: - assume {:captureState "l0000093b"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000093e; - l00000938: - assume {:captureState "l00000938"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000093e; l0000093e: assume {:captureState "l0000093e"} true; assert Gamma_R8; goto l0000093e_goto_l00000946, l0000093e_goto_l0000095d; + l00000946: + assume {:captureState "l00000946"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + lmain_goto_l00000938: + assume {:captureState "lmain_goto_l00000938"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000938; + l0000093b: + assume {:captureState "l0000093b"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000093e; l0000095d: assume {:captureState "l0000095d"} true; goto l0000095e; @@ -236,19 +241,6 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%0000096c"} true; goto l00000946; - l00000946: - assume {:captureState "l00000946"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000938: - assume {:captureState "lmain_goto_l00000938"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000938; - lmain_goto_l0000093b: - assume {:captureState "lmain_goto_l0000093b"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l0000093b; l0000093e_goto_l00000946: assume {:captureState "l0000093e_goto_l00000946"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); @@ -257,4 +249,18 @@ procedure main() assume {:captureState "l0000093e_goto_l0000095d"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000095d; + lmain_goto_l0000093b: + assume {:captureState "lmain_goto_l0000093b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000093b; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000938: + assume {:captureState "l00000938"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000093e; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/simple_jump/gcc/simple_jump.expected b/src/test/correct/simple_jump/gcc/simple_jump.expected index 4195b886a..4845c038c 100644 --- a/src/test/correct/simple_jump/gcc/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc/simple_jump.expected @@ -220,7 +220,7 @@ procedure main() assume {:captureState "l0000030a"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + goto main_return; lmain_goto_l0000030a: assume {:captureState "lmain_goto_l0000030a"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); @@ -229,4 +229,10 @@ procedure main() assume {:captureState "lmain_goto_l0000031f"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000031f; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/simple_jump/gcc_O2/simple_jump.expected b/src/test/correct/simple_jump/gcc_O2/simple_jump.expected index 306991d20..0918aa3d9 100644 --- a/src/test/correct/simple_jump/gcc_O2/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc_O2/simple_jump.expected @@ -157,5 +157,11 @@ procedure main() lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected b/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected index cb9614234..89636d949 100644 --- a/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected @@ -220,7 +220,7 @@ procedure main() assume {:captureState "l000008e1"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + goto main_return; lmain_goto_l000008e1: assume {:captureState "lmain_goto_l000008e1"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); @@ -229,4 +229,10 @@ procedure main() assume {:captureState "lmain_goto_l000008f6"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000008f6; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/simple_jump/gcc_pic/simple_jump.expected b/src/test/correct/simple_jump/gcc_pic/simple_jump.expected index cb9614234..89636d949 100644 --- a/src/test/correct/simple_jump/gcc_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc_pic/simple_jump.expected @@ -220,7 +220,7 @@ procedure main() assume {:captureState "l000008e1"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + goto main_return; lmain_goto_l000008e1: assume {:captureState "lmain_goto_l000008e1"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); @@ -229,4 +229,10 @@ procedure main() assume {:captureState "lmain_goto_l000008f6"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000008f6; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/switch/clang/switch.expected b/src/test/correct/switch/clang/switch.expected index b33b54140..ab60b0f1e 100644 --- a/src/test/correct/switch/clang/switch.expected +++ b/src/test/correct/switch/clang/switch.expected @@ -217,99 +217,105 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000035a, lmain_goto_l0000035d; - l0000035d: - assume {:captureState "l0000035d"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000360; - l0000035a: - assume {:captureState "l0000035a"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000360; - l00000360: - assume {:captureState "l00000360"} true; - assert Gamma_R8; - goto l00000360_goto_l00000368, l00000360_goto_l0000039a; - l0000039a: - assume {:captureState "l0000039a"} true; - goto l0000039b; - l0000039b: - assume {:captureState "l0000039b"} true; - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - #5, Gamma_#5 := bvadd32(R8[32:0], 4294967292bv32), Gamma_R8; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934589bv33))), (Gamma_R8 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967293bv33))), (Gamma_R8 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; - assert Gamma_ZF; - goto l0000039b_goto_l000003c4, l0000039b_goto_l000003c7; - l000003c7: - assume {:captureState "l000003c7"} true; - R8, Gamma_R8 := 1bv64, true; - goto l000003ca; + lmain_goto_l0000035a: + assume {:captureState "lmain_goto_l0000035a"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000035a; l000003c4: assume {:captureState "l000003c4"} true; R8, Gamma_R8 := 0bv64, true; goto l000003ca; - l000003ca: - assume {:captureState "l000003ca"} true; - assert Gamma_R8; - goto l000003ca_goto_l00000389, l000003ca_goto_l000003d7; - l00000389: - assume {:captureState "l00000389"} true; - R8, Gamma_R8 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); - assume {:captureState "%00000394"} true; - goto l0000037b; - l000003d7: - assume {:captureState "l000003d7"} true; - goto l000003d8; + lmain_goto_l0000035d: + assume {:captureState "lmain_goto_l0000035d"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000035d; l000003d8: assume {:captureState "l000003d8"} true; R8, Gamma_R8 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%000003e6"} true; goto l00000368; - l00000368: - assume {:captureState "l00000368"} true; + l000003c7: + assume {:captureState "l000003c7"} true; R8, Gamma_R8 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); - assume {:captureState "%00000378"} true; - goto l0000037b; - l0000037b: - assume {:captureState "l0000037b"} true; - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l0000035a: - assume {:captureState "lmain_goto_l0000035a"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l0000035a; - lmain_goto_l0000035d: - assume {:captureState "lmain_goto_l0000035d"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l0000035d; - l00000360_goto_l00000368: - assume {:captureState "l00000360_goto_l00000368"} true; + goto l000003ca; + l000003d7: + assume {:captureState "l000003d7"} true; + goto l000003d8; + l000003ca_goto_l00000389: + assume {:captureState "l000003ca_goto_l00000389"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000368; - l00000360_goto_l0000039a: - assume {:captureState "l00000360_goto_l0000039a"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l0000039a; + goto l00000389; + l000003ca: + assume {:captureState "l000003ca"} true; + assert Gamma_R8; + goto l000003ca_goto_l00000389, l000003ca_goto_l000003d7; l0000039b_goto_l000003c4: assume {:captureState "l0000039b_goto_l000003c4"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000003c4; + l00000360: + assume {:captureState "l00000360"} true; + assert Gamma_R8; + goto l00000360_goto_l00000368, l00000360_goto_l0000039a; + l00000360_goto_l00000368: + assume {:captureState "l00000360_goto_l00000368"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000368; l0000039b_goto_l000003c7: assume {:captureState "l0000039b_goto_l000003c7"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000003c7; - l000003ca_goto_l00000389: - assume {:captureState "l000003ca_goto_l00000389"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000389; + l0000039a: + assume {:captureState "l0000039a"} true; + goto l0000039b; + l00000368: + assume {:captureState "l00000368"} true; + R8, Gamma_R8 := 1bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); + assume {:captureState "%00000378"} true; + goto l0000037b; + l00000389: + assume {:captureState "l00000389"} true; + R8, Gamma_R8 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); + assume {:captureState "%00000394"} true; + goto l0000037b; l000003ca_goto_l000003d7: assume {:captureState "l000003ca_goto_l000003d7"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l000003d7; + l00000360_goto_l0000039a: + assume {:captureState "l00000360_goto_l0000039a"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000039a; + l0000035d: + assume {:captureState "l0000035d"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000360; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l0000039b: + assume {:captureState "l0000039b"} true; + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + #5, Gamma_#5 := bvadd32(R8[32:0], 4294967292bv32), Gamma_R8; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934589bv33))), (Gamma_R8 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967293bv33))), (Gamma_R8 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; + assert Gamma_ZF; + goto l0000039b_goto_l000003c4, l0000039b_goto_l000003c7; + l0000035a: + assume {:captureState "l0000035a"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000360; + l0000037b: + assume {:captureState "l0000037b"} true; + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/switch/clang_O2/switch.expected b/src/test/correct/switch/clang_O2/switch.expected index ae43ad872..abc430756 100644 --- a/src/test/correct/switch/clang_O2/switch.expected +++ b/src/test/correct/switch/clang_O2/switch.expected @@ -153,5 +153,11 @@ procedure main() { lmain: assume {:captureState "lmain"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/switch/clang_no_plt_no_pic/switch.expected b/src/test/correct/switch/clang_no_plt_no_pic/switch.expected index aaf01b543..cd59561db 100644 --- a/src/test/correct/switch/clang_no_plt_no_pic/switch.expected +++ b/src/test/correct/switch/clang_no_plt_no_pic/switch.expected @@ -217,50 +217,39 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000a0f, lmain_goto_l00000a12; - l00000a12: - assume {:captureState "l00000a12"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000a15; - l00000a0f: - assume {:captureState "l00000a0f"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000a15; + l00000a50_goto_l00000a7c: + assume {:captureState "l00000a50_goto_l00000a7c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000a7c; + lmain_goto_l00000a12: + assume {:captureState "lmain_goto_l00000a12"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a12; l00000a15: assume {:captureState "l00000a15"} true; assert Gamma_R8; goto l00000a15_goto_l00000a1d, l00000a15_goto_l00000a4f; + l00000a3e: + assume {:captureState "l00000a3e"} true; + R8, Gamma_R8 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); + assume {:captureState "%00000a49"} true; + goto l00000a30; l00000a4f: assume {:captureState "l00000a4f"} true; goto l00000a50; - l00000a50: - assume {:captureState "l00000a50"} true; - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - #5, Gamma_#5 := bvadd32(R8[32:0], 4294967292bv32), Gamma_R8; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934589bv33))), (Gamma_R8 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967293bv33))), (Gamma_R8 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; - assert Gamma_ZF; - goto l00000a50_goto_l00000a7c, l00000a50_goto_l00000a79; - l00000a7c: - assume {:captureState "l00000a7c"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000a7f; - l00000a79: - assume {:captureState "l00000a79"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000a7f; + l00000a7f_goto_l00000a3e: + assume {:captureState "l00000a7f_goto_l00000a3e"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000a3e; l00000a7f: assume {:captureState "l00000a7f"} true; assert Gamma_R8; goto l00000a7f_goto_l00000a3e, l00000a7f_goto_l00000a8c; - l00000a3e: - assume {:captureState "l00000a3e"} true; - R8, Gamma_R8 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); - assume {:captureState "%00000a49"} true; - goto l00000a30; + lmain_goto_l00000a0f: + assume {:captureState "lmain_goto_l00000a0f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a0f; l00000a8c: assume {:captureState "l00000a8c"} true; goto l00000a8d; @@ -270,46 +259,63 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%00000a9b"} true; goto l00000a1d; + l00000a7c: + assume {:captureState "l00000a7c"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000a7f; + l00000a7f_goto_l00000a8c: + assume {:captureState "l00000a7f_goto_l00000a8c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000a8c; + l00000a15_goto_l00000a1d: + assume {:captureState "l00000a15_goto_l00000a1d"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000a1d; + l00000a0f: + assume {:captureState "l00000a0f"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000a15; l00000a1d: assume {:captureState "l00000a1d"} true; R8, Gamma_R8 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%00000a2d"} true; goto l00000a30; - l00000a30: - assume {:captureState "l00000a30"} true; - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000a0f: - assume {:captureState "lmain_goto_l00000a0f"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000a0f; - lmain_goto_l00000a12: - assume {:captureState "lmain_goto_l00000a12"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000a12; - l00000a15_goto_l00000a1d: - assume {:captureState "l00000a15_goto_l00000a1d"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000a1d; l00000a15_goto_l00000a4f: assume {:captureState "l00000a15_goto_l00000a4f"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000a4f; + l00000a12: + assume {:captureState "l00000a12"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000a15; + l00000a79: + assume {:captureState "l00000a79"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000a7f; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000a30: + assume {:captureState "l00000a30"} true; + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000a50_goto_l00000a79: assume {:captureState "l00000a50_goto_l00000a79"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000a79; - l00000a50_goto_l00000a7c: - assume {:captureState "l00000a50_goto_l00000a7c"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000a7c; - l00000a7f_goto_l00000a3e: - assume {:captureState "l00000a7f_goto_l00000a3e"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000a3e; - l00000a7f_goto_l00000a8c: - assume {:captureState "l00000a7f_goto_l00000a8c"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000a8c; + l00000a50: + assume {:captureState "l00000a50"} true; + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + #5, Gamma_#5 := bvadd32(R8[32:0], 4294967292bv32), Gamma_R8; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934589bv33))), (Gamma_R8 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967293bv33))), (Gamma_R8 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; + assert Gamma_ZF; + goto l00000a50_goto_l00000a7c, l00000a50_goto_l00000a79; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/switch/clang_pic/switch.expected b/src/test/correct/switch/clang_pic/switch.expected index aaf01b543..cd59561db 100644 --- a/src/test/correct/switch/clang_pic/switch.expected +++ b/src/test/correct/switch/clang_pic/switch.expected @@ -217,50 +217,39 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000a0f, lmain_goto_l00000a12; - l00000a12: - assume {:captureState "l00000a12"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000a15; - l00000a0f: - assume {:captureState "l00000a0f"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000a15; + l00000a50_goto_l00000a7c: + assume {:captureState "l00000a50_goto_l00000a7c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000a7c; + lmain_goto_l00000a12: + assume {:captureState "lmain_goto_l00000a12"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a12; l00000a15: assume {:captureState "l00000a15"} true; assert Gamma_R8; goto l00000a15_goto_l00000a1d, l00000a15_goto_l00000a4f; + l00000a3e: + assume {:captureState "l00000a3e"} true; + R8, Gamma_R8 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); + assume {:captureState "%00000a49"} true; + goto l00000a30; l00000a4f: assume {:captureState "l00000a4f"} true; goto l00000a50; - l00000a50: - assume {:captureState "l00000a50"} true; - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - #5, Gamma_#5 := bvadd32(R8[32:0], 4294967292bv32), Gamma_R8; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934589bv33))), (Gamma_R8 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967293bv33))), (Gamma_R8 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; - assert Gamma_ZF; - goto l00000a50_goto_l00000a7c, l00000a50_goto_l00000a79; - l00000a7c: - assume {:captureState "l00000a7c"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000a7f; - l00000a79: - assume {:captureState "l00000a79"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000a7f; + l00000a7f_goto_l00000a3e: + assume {:captureState "l00000a7f_goto_l00000a3e"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000a3e; l00000a7f: assume {:captureState "l00000a7f"} true; assert Gamma_R8; goto l00000a7f_goto_l00000a3e, l00000a7f_goto_l00000a8c; - l00000a3e: - assume {:captureState "l00000a3e"} true; - R8, Gamma_R8 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); - assume {:captureState "%00000a49"} true; - goto l00000a30; + lmain_goto_l00000a0f: + assume {:captureState "lmain_goto_l00000a0f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a0f; l00000a8c: assume {:captureState "l00000a8c"} true; goto l00000a8d; @@ -270,46 +259,63 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%00000a9b"} true; goto l00000a1d; + l00000a7c: + assume {:captureState "l00000a7c"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000a7f; + l00000a7f_goto_l00000a8c: + assume {:captureState "l00000a7f_goto_l00000a8c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000a8c; + l00000a15_goto_l00000a1d: + assume {:captureState "l00000a15_goto_l00000a1d"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000a1d; + l00000a0f: + assume {:captureState "l00000a0f"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000a15; l00000a1d: assume {:captureState "l00000a1d"} true; R8, Gamma_R8 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); assume {:captureState "%00000a2d"} true; goto l00000a30; - l00000a30: - assume {:captureState "l00000a30"} true; - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000a0f: - assume {:captureState "lmain_goto_l00000a0f"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000a0f; - lmain_goto_l00000a12: - assume {:captureState "lmain_goto_l00000a12"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000a12; - l00000a15_goto_l00000a1d: - assume {:captureState "l00000a15_goto_l00000a1d"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000a1d; l00000a15_goto_l00000a4f: assume {:captureState "l00000a15_goto_l00000a4f"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000a4f; + l00000a12: + assume {:captureState "l00000a12"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000a15; + l00000a79: + assume {:captureState "l00000a79"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000a7f; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000a30: + assume {:captureState "l00000a30"} true; + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l00000a50_goto_l00000a79: assume {:captureState "l00000a50_goto_l00000a79"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000a79; - l00000a50_goto_l00000a7c: - assume {:captureState "l00000a50_goto_l00000a7c"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000a7c; - l00000a7f_goto_l00000a3e: - assume {:captureState "l00000a7f_goto_l00000a3e"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000a3e; - l00000a7f_goto_l00000a8c: - assume {:captureState "l00000a7f_goto_l00000a8c"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000a8c; + l00000a50: + assume {:captureState "l00000a50"} true; + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + #5, Gamma_#5 := bvadd32(R8[32:0], 4294967292bv32), Gamma_R8; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934589bv33))), (Gamma_R8 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967293bv33))), (Gamma_R8 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; + assert Gamma_ZF; + goto l00000a50_goto_l00000a7c, l00000a50_goto_l00000a79; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/switch/gcc/switch.expected b/src/test/correct/switch/gcc/switch.expected index 93a705102..90db08d2e 100644 --- a/src/test/correct/switch/gcc/switch.expected +++ b/src/test/correct/switch/gcc/switch.expected @@ -214,42 +214,12 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000036b, lmain_goto_l00000339; - l0000036b: - assume {:captureState "l0000036b"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); - #5, Gamma_#5 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - assert Gamma_ZF; - goto l0000036b_goto_l0000035c, l0000036b_goto_l00000391; - l0000035c: - assume {:captureState "l0000035c"} true; - R0, Gamma_R0 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%00000367"} true; - goto l0000034c; - l00000391: - assume {:captureState "l00000391"} true; - R0, Gamma_R0 := 3bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%0000039c"} true; - goto l00000339; l00000339: assume {:captureState "l00000339"} true; R0, Gamma_R0 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%00000349"} true; goto l0000034c; - l0000034c: - assume {:captureState "l0000034c"} true; - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000339: - assume {:captureState "lmain_goto_l00000339"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000339; lmain_goto_l0000036b: assume {:captureState "lmain_goto_l0000036b"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); @@ -258,8 +228,44 @@ procedure main() assume {:captureState "l0000036b_goto_l0000035c"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l0000035c; + l00000391: + assume {:captureState "l00000391"} true; + R0, Gamma_R0 := 3bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%0000039c"} true; + goto l00000339; + l0000035c: + assume {:captureState "l0000035c"} true; + R0, Gamma_R0 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%00000367"} true; + goto l0000034c; + lmain_goto_l00000339: + assume {:captureState "lmain_goto_l00000339"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000339; l0000036b_goto_l00000391: assume {:captureState "l0000036b_goto_l00000391"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000391; + l0000034c: + assume {:captureState "l0000034c"} true; + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l0000036b: + assume {:captureState "l0000036b"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); + #5, Gamma_#5 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + assert Gamma_ZF; + goto l0000036b_goto_l0000035c, l0000036b_goto_l00000391; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/switch/gcc_O2/switch.expected b/src/test/correct/switch/gcc_O2/switch.expected index f96261171..ab6b5b132 100644 --- a/src/test/correct/switch/gcc_O2/switch.expected +++ b/src/test/correct/switch/gcc_O2/switch.expected @@ -153,5 +153,11 @@ procedure main() { lmain: assume {:captureState "lmain"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected b/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected index 6e21b2c50..5046a0757 100644 --- a/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected +++ b/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected @@ -214,6 +214,22 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000998, lmain_goto_l000009ca; + l000009ab: + assume {:captureState "l000009ab"} true; + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l00000998: + assume {:captureState "l00000998"} true; + R0, Gamma_R0 := 1bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%000009a8"} true; + goto l000009ab; + l000009bb: + assume {:captureState "l000009bb"} true; + R0, Gamma_R0 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%000009c6"} true; + goto l000009ab; l000009ca: assume {:captureState "l000009ca"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -224,28 +240,16 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto l000009ca_goto_l000009bb, l000009ca_goto_l000009f0; - l000009bb: - assume {:captureState "l000009bb"} true; - R0, Gamma_R0 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%000009c6"} true; - goto l000009ab; + l000009ca_goto_l000009f0: + assume {:captureState "l000009ca_goto_l000009f0"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000009f0; l000009f0: assume {:captureState "l000009f0"} true; R0, Gamma_R0 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%000009fb"} true; goto l00000998; - l00000998: - assume {:captureState "l00000998"} true; - R0, Gamma_R0 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%000009a8"} true; - goto l000009ab; - l000009ab: - assume {:captureState "l000009ab"} true; - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; lmain_goto_l00000998: assume {:captureState "lmain_goto_l00000998"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); @@ -254,12 +258,14 @@ procedure main() assume {:captureState "lmain_goto_l000009ca"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000009ca; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000009ca_goto_l000009bb: assume {:captureState "l000009ca_goto_l000009bb"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l000009bb; - l000009ca_goto_l000009f0: - assume {:captureState "l000009ca_goto_l000009f0"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l000009f0; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/switch/gcc_pic/switch.expected b/src/test/correct/switch/gcc_pic/switch.expected index 6e21b2c50..5046a0757 100644 --- a/src/test/correct/switch/gcc_pic/switch.expected +++ b/src/test/correct/switch/gcc_pic/switch.expected @@ -214,6 +214,22 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000998, lmain_goto_l000009ca; + l000009ab: + assume {:captureState "l000009ab"} true; + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l00000998: + assume {:captureState "l00000998"} true; + R0, Gamma_R0 := 1bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%000009a8"} true; + goto l000009ab; + l000009bb: + assume {:captureState "l000009bb"} true; + R0, Gamma_R0 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); + assume {:captureState "%000009c6"} true; + goto l000009ab; l000009ca: assume {:captureState "l000009ca"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -224,28 +240,16 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto l000009ca_goto_l000009bb, l000009ca_goto_l000009f0; - l000009bb: - assume {:captureState "l000009bb"} true; - R0, Gamma_R0 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%000009c6"} true; - goto l000009ab; + l000009ca_goto_l000009f0: + assume {:captureState "l000009ca_goto_l000009f0"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000009f0; l000009f0: assume {:captureState "l000009f0"} true; R0, Gamma_R0 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); assume {:captureState "%000009fb"} true; goto l00000998; - l00000998: - assume {:captureState "l00000998"} true; - R0, Gamma_R0 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); - assume {:captureState "%000009a8"} true; - goto l000009ab; - l000009ab: - assume {:captureState "l000009ab"} true; - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; lmain_goto_l00000998: assume {:captureState "lmain_goto_l00000998"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); @@ -254,12 +258,14 @@ procedure main() assume {:captureState "lmain_goto_l000009ca"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000009ca; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000009ca_goto_l000009bb: assume {:captureState "l000009ca_goto_l000009bb"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l000009bb; - l000009ca_goto_l000009f0: - assume {:captureState "l000009ca_goto_l000009f0"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l000009f0; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/switch2/clang_O2/switch2.expected b/src/test/correct/switch2/clang_O2/switch2.expected index 9083f1e41..4e38cac8c 100644 --- a/src/test/correct/switch2/clang_O2/switch2.expected +++ b/src/test/correct/switch2/clang_O2/switch2.expected @@ -153,5 +153,11 @@ procedure main() { lmain: assume {:captureState "lmain"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/switch2/gcc/switch2.expected b/src/test/correct/switch2/gcc/switch2.expected index 7443d262f..04e893fba 100644 --- a/src/test/correct/switch2/gcc/switch2.expected +++ b/src/test/correct/switch2/gcc/switch2.expected @@ -259,12 +259,86 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto lmain_goto_l000003d0, lmain_goto_l00000408; - l000003d0: - assume {:captureState "l000003d0"} true; - R0, Gamma_R0 := 4bv64, true; + lmain_goto_l000003d0: + assume {:captureState "lmain_goto_l000003d0"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003d0; + l000004e2_goto_l0000050a: + assume {:captureState "l000004e2_goto_l0000050a"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000050a; + l00000467_goto_l0000048f: + assume {:captureState "l00000467_goto_l0000048f"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000048f; + l0000050a: + assume {:captureState "l0000050a"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #11, Gamma_#11 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#11); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#11); + ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; + NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; + assert Gamma_ZF; + goto l0000050a_goto_l000004c4, l0000050a_goto_l00000530; + l000004c4: + assume {:captureState "l000004c4"} true; + R0, Gamma_R0 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%000003e0"} true; + assume {:captureState "%000004cf"} true; + goto l000003f1; + l00000408_goto_l000003e2: + assume {:captureState "l00000408_goto_l000003e2"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000003e2; + l000004e2_goto_l000003e2: + assume {:captureState "l000004e2_goto_l000003e2"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000003e2; + lmain_goto_l00000408: + assume {:captureState "lmain_goto_l00000408"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000408; + l0000048f_goto_l000004b0: + assume {:captureState "l0000048f_goto_l000004b0"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000004b0; + l00000467: + assume {:captureState "l00000467"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #8, Gamma_#8 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#8); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#8); + ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; + NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000467_goto_l000003e2, l00000467_goto_l0000048f; + l000004bc: + assume {:captureState "l000004bc"} true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%000004c2"} true; + goto l000004c4; + l0000050a_goto_l000004c4: + assume {:captureState "l0000050a_goto_l000004c4"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000004c4; + l000004b0: + assume {:captureState "l000004b0"} true; + R30, Gamma_R30 := 1944bv64, true; + call r(); + goto l000004bc; + l00000530_goto_l000004d5: + assume {:captureState "l00000530_goto_l000004d5"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000004d5; + l00000467_goto_l000003e2: + assume {:captureState "l00000467_goto_l000003e2"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l000003e2; + l00000430_goto_l00000467: + assume {:captureState "l00000430_goto_l00000467"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000467; l00000408: assume {:captureState "l00000408"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -275,6 +349,24 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); goto l00000408_goto_l000003e2, l00000408_goto_l00000430; + l000003d0: + assume {:captureState "l000003d0"} true; + R0, Gamma_R0 := 4bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%000003e0"} true; + goto l000003e2; + l000003f1: + assume {:captureState "l000003f1"} true; + R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); + R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); + R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + l000004d5: + assume {:captureState "l000004d5"} true; + R0, Gamma_R0 := 2bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%000004e0"} true; + goto l00000451; l00000430: assume {:captureState "l00000430"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -285,61 +377,11 @@ procedure main() NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; assert Gamma_ZF; goto l00000430_goto_l00000451, l00000430_goto_l00000467; - l00000467: - assume {:captureState "l00000467"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #8, Gamma_#8 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#8); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#8); - ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; - NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000467_goto_l000003e2, l00000467_goto_l0000048f; - l0000048f: - assume {:captureState "l0000048f"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #9, Gamma_#9 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#9); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#9); - ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; - NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; - assert Gamma_ZF; - goto l0000048f_goto_l000004b0, l0000048f_goto_l000004e2; - l000004b0: - assume {:captureState "l000004b0"} true; - R30, Gamma_R30 := 1944bv64, true; - call r(); - goto l000004bc; - l000004bc: - assume {:captureState "l000004bc"} true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%000004c2"} true; - goto l000004c4; - l000004e2: - assume {:captureState "l000004e2"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #10, Gamma_#10 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#10); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#10); - ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; - NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l000004e2_goto_l0000050a, l000004e2_goto_l000003e2; - l0000050a: - assume {:captureState "l0000050a"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #11, Gamma_#11 := bvadd32(R0[32:0], 4294967294bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#11, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934591bv33))), (Gamma_R0 && Gamma_#11); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#11, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967295bv33))), (Gamma_R0 && Gamma_#11); - ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; - NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; - assert Gamma_ZF; - goto l0000050a_goto_l000004c4, l0000050a_goto_l00000530; - l000004c4: - assume {:captureState "l000004c4"} true; - R0, Gamma_R0 := 1bv64, true; + l00000451: + assume {:captureState "l00000451"} true; + R0, Gamma_R0 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%000004cf"} true; + assume {:captureState "%00000461"} true; goto l000003f1; l00000530: assume {:captureState "l00000530"} true; @@ -351,97 +393,61 @@ procedure main() NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; assert Gamma_ZF; goto l00000530_goto_l000004d5, l00000530_goto_l00000556; - l000004d5: - assume {:captureState "l000004d5"} true; - R0, Gamma_R0 := 2bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%000004e0"} true; - goto l00000451; - l00000451: - assume {:captureState "l00000451"} true; - R0, Gamma_R0 := 3bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%00000461"} true; - goto l000003f1; - l00000556: - assume {:captureState "l00000556"} true; - goto l000003e2; - l000003e2: - assume {:captureState "l000003e2"} true; - R0, Gamma_R0 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%000003ed"} true; - goto l000003f1; - l000003f1: - assume {:captureState "l000003f1"} true; - R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); - R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); - R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; - return; - lmain_goto_l000003d0: - assume {:captureState "lmain_goto_l000003d0"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000003d0; - lmain_goto_l00000408: - assume {:captureState "lmain_goto_l00000408"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000408; - l00000408_goto_l000003e2: - assume {:captureState "l00000408_goto_l000003e2"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000003e2; - l00000408_goto_l00000430: - assume {:captureState "l00000408_goto_l00000430"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000430; - l00000430_goto_l00000451: - assume {:captureState "l00000430_goto_l00000451"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000451; - l00000430_goto_l00000467: - assume {:captureState "l00000430_goto_l00000467"} true; + l00000530_goto_l00000556: + assume {:captureState "l00000530_goto_l00000556"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000467; - l00000467_goto_l000003e2: - assume {:captureState "l00000467_goto_l000003e2"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000003e2; - l00000467_goto_l0000048f: - assume {:captureState "l00000467_goto_l0000048f"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l0000048f; - l0000048f_goto_l000004b0: - assume {:captureState "l0000048f_goto_l000004b0"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000004b0; + goto l00000556; l0000048f_goto_l000004e2: assume {:captureState "l0000048f_goto_l000004e2"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000004e2; - l000004e2_goto_l000003e2: - assume {:captureState "l000004e2_goto_l000003e2"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l000003e2; - l000004e2_goto_l0000050a: - assume {:captureState "l000004e2_goto_l0000050a"} true; + l00000408_goto_l00000430: + assume {:captureState "l00000408_goto_l00000430"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l0000050a; - l0000050a_goto_l000004c4: - assume {:captureState "l0000050a_goto_l000004c4"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000004c4; + goto l00000430; l0000050a_goto_l00000530: assume {:captureState "l0000050a_goto_l00000530"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000530; - l00000530_goto_l000004d5: - assume {:captureState "l00000530_goto_l000004d5"} true; + l00000556: + assume {:captureState "l00000556"} true; + goto l000003e2; + l00000430_goto_l00000451: + assume {:captureState "l00000430_goto_l00000451"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000004d5; - l00000530_goto_l00000556: - assume {:captureState "l00000530_goto_l00000556"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000556; + goto l00000451; + l000003e2: + assume {:captureState "l000003e2"} true; + R0, Gamma_R0 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%000003ed"} true; + goto l000003f1; + l0000048f: + assume {:captureState "l0000048f"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #9, Gamma_#9 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#9); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#9); + ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; + NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; + assert Gamma_ZF; + goto l0000048f_goto_l000004b0, l0000048f_goto_l000004e2; + l000004e2: + assume {:captureState "l000004e2"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #10, Gamma_#10 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#10); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#10); + ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; + NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000004e2_goto_l0000050a, l000004e2_goto_l000003e2; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } procedure r() @@ -522,5 +528,11 @@ procedure r() lr: assume {:captureState "lr"} true; R0, Gamma_R0 := 1bv64, true; + goto r_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + r_return: + assume {:captureState "r_return"} true; return; } diff --git a/src/test/correct/switch2/gcc_O2/switch2.expected b/src/test/correct/switch2/gcc_O2/switch2.expected index 8dd64e5d7..086d15477 100644 --- a/src/test/correct/switch2/gcc_O2/switch2.expected +++ b/src/test/correct/switch2/gcc_O2/switch2.expected @@ -153,5 +153,11 @@ procedure main() { lmain: assume {:captureState "lmain"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected b/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected index 21091a5b1..c9bcc5f08 100644 --- a/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected +++ b/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected @@ -259,72 +259,10 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto lmain_goto_l00000c2f, lmain_goto_l00000c67; - l00000c2f: - assume {:captureState "l00000c2f"} true; - R0, Gamma_R0 := 4bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%00000c3f"} true; - goto l00000c41; - l00000c67: - assume {:captureState "l00000c67"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #6, Gamma_#6 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#6); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#6); - ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; - NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000c67_goto_l00000c41, l00000c67_goto_l00000c8f; - l00000c8f: - assume {:captureState "l00000c8f"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #7, Gamma_#7 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#7); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#7); - ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; - NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; - assert Gamma_ZF; - goto l00000c8f_goto_l00000cb0, l00000c8f_goto_l00000cc6; - l00000cc6: - assume {:captureState "l00000cc6"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #8, Gamma_#8 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#8); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#8); - ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; - NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000cc6_goto_l00000cee, l00000cc6_goto_l00000c41; - l00000cee: - assume {:captureState "l00000cee"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #9, Gamma_#9 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#9); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#9); - ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; - NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; - assert Gamma_ZF; - goto l00000cee_goto_l00000d41, l00000cee_goto_l00000d0f; - l00000d0f: - assume {:captureState "l00000d0f"} true; - R30, Gamma_R30 := 1944bv64, true; - call r(); - goto l00000d1b; - l00000d1b: - assume {:captureState "l00000d1b"} true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%00000d21"} true; - goto l00000d23; - l00000d41: - assume {:captureState "l00000d41"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #10, Gamma_#10 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#10); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#10); - ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; - NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000d41_goto_l00000d69, l00000d41_goto_l00000c41; + l00000cee_goto_l00000d41: + assume {:captureState "l00000cee_goto_l00000d41"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000d41; l00000d69: assume {:captureState "l00000d69"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -335,113 +273,181 @@ procedure main() NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; assert Gamma_ZF; goto l00000d69_goto_l00000d8f, l00000d69_goto_l00000d23; + l00000c67: + assume {:captureState "l00000c67"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #6, Gamma_#6 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#6); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#6); + ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; + NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000c67_goto_l00000c41, l00000c67_goto_l00000c8f; l00000d23: assume {:captureState "l00000d23"} true; R0, Gamma_R0 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); assume {:captureState "%00000d2e"} true; goto l00000c50; - l00000d8f: - assume {:captureState "l00000d8f"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #12, Gamma_#12 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#12, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#12); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#12); - ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; - NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; - assert Gamma_ZF; - goto l00000d8f_goto_l00000d34, l00000d8f_goto_l00000db5; - l00000d34: - assume {:captureState "l00000d34"} true; - R0, Gamma_R0 := 2bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%00000d3f"} true; - goto l00000cb0; l00000cb0: assume {:captureState "l00000cb0"} true; R0, Gamma_R0 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); assume {:captureState "%00000cc0"} true; goto l00000c50; + l00000c8f_goto_l00000cc6: + assume {:captureState "l00000c8f_goto_l00000cc6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000cc6; + l00000d41_goto_l00000c41: + assume {:captureState "l00000d41_goto_l00000c41"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00000c41; l00000db5: assume {:captureState "l00000db5"} true; goto l00000c41; - l00000c41: - assume {:captureState "l00000c41"} true; - R0, Gamma_R0 := 5bv64, true; + l00000d1b: + assume {:captureState "l00000d1b"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%00000c4c"} true; - goto l00000c50; + assume {:captureState "%00000d21"} true; + goto l00000d23; + l00000d41_goto_l00000d69: + assume {:captureState "l00000d41_goto_l00000d69"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000d69; + l00000cc6_goto_l00000cee: + assume {:captureState "l00000cc6_goto_l00000cee"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000cee; + l00000cee: + assume {:captureState "l00000cee"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #9, Gamma_#9 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#9); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#9); + ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; + NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; + assert Gamma_ZF; + goto l00000cee_goto_l00000d41, l00000cee_goto_l00000d0f; + l00000d69_goto_l00000d8f: + assume {:captureState "l00000d69_goto_l00000d8f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000d8f; l00000c50: assume {:captureState "l00000c50"} true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; - return; - lmain_goto_l00000c2f: - assume {:captureState "lmain_goto_l00000c2f"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000c2f; - lmain_goto_l00000c67: - assume {:captureState "lmain_goto_l00000c67"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000c67; + goto main_return; l00000c67_goto_l00000c41: assume {:captureState "l00000c67_goto_l00000c41"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l00000c41; - l00000c67_goto_l00000c8f: - assume {:captureState "l00000c67_goto_l00000c8f"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000c8f; - l00000c8f_goto_l00000cb0: - assume {:captureState "l00000c8f_goto_l00000cb0"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000cb0; - l00000c8f_goto_l00000cc6: - assume {:captureState "l00000c8f_goto_l00000cc6"} true; + l00000d8f_goto_l00000db5: + assume {:captureState "l00000d8f_goto_l00000db5"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000cc6; + goto l00000db5; l00000cc6_goto_l00000c41: assume {:captureState "l00000cc6_goto_l00000c41"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l00000c41; - l00000cc6_goto_l00000cee: - assume {:captureState "l00000cc6_goto_l00000cee"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000cee; - l00000cee_goto_l00000d0f: - assume {:captureState "l00000cee_goto_l00000d0f"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000d0f; - l00000cee_goto_l00000d41: - assume {:captureState "l00000cee_goto_l00000d41"} true; + lmain_goto_l00000c67: + assume {:captureState "lmain_goto_l00000c67"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000d41; - l00000d41_goto_l00000c41: - assume {:captureState "l00000d41_goto_l00000c41"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00000c41; - l00000d41_goto_l00000d69: - assume {:captureState "l00000d41_goto_l00000d69"} true; + goto l00000c67; + l00000d34: + assume {:captureState "l00000d34"} true; + R0, Gamma_R0 := 2bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%00000d3f"} true; + goto l00000cb0; + l00000d8f: + assume {:captureState "l00000d8f"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #12, Gamma_#12 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#12, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#12); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#12); + ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; + NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; + assert Gamma_ZF; + goto l00000d8f_goto_l00000d34, l00000d8f_goto_l00000db5; + l00000c8f: + assume {:captureState "l00000c8f"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #7, Gamma_#7 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#7); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#7); + ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; + NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; + assert Gamma_ZF; + goto l00000c8f_goto_l00000cb0, l00000c8f_goto_l00000cc6; + lmain_goto_l00000c2f: + assume {:captureState "lmain_goto_l00000c2f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000c2f; + l00000c67_goto_l00000c8f: + assume {:captureState "l00000c67_goto_l00000c8f"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000d69; + goto l00000c8f; + l00000d0f: + assume {:captureState "l00000d0f"} true; + R30, Gamma_R30 := 1944bv64, true; + call r(); + goto l00000d1b; + l00000cc6: + assume {:captureState "l00000cc6"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #8, Gamma_#8 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#8); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#8); + ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; + NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000cc6_goto_l00000cee, l00000cc6_goto_l00000c41; + l00000c2f: + assume {:captureState "l00000c2f"} true; + R0, Gamma_R0 := 4bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%00000c3f"} true; + goto l00000c41; l00000d69_goto_l00000d23: assume {:captureState "l00000d69_goto_l00000d23"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000d23; - l00000d69_goto_l00000d8f: - assume {:captureState "l00000d69_goto_l00000d8f"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000d8f; + l00000c8f_goto_l00000cb0: + assume {:captureState "l00000c8f_goto_l00000cb0"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000cb0; l00000d8f_goto_l00000d34: assume {:captureState "l00000d8f_goto_l00000d34"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000d34; - l00000d8f_goto_l00000db5: - assume {:captureState "l00000d8f_goto_l00000db5"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000db5; + l00000c41: + assume {:captureState "l00000c41"} true; + R0, Gamma_R0 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%00000c4c"} true; + goto l00000c50; + l00000d41: + assume {:captureState "l00000d41"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #10, Gamma_#10 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#10); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#10); + ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; + NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000d41_goto_l00000d69, l00000d41_goto_l00000c41; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000cee_goto_l00000d0f: + assume {:captureState "l00000cee_goto_l00000d0f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000d0f; + main_return: + assume {:captureState "main_return"} true; + return; } procedure r() @@ -522,5 +528,11 @@ procedure r() lr: assume {:captureState "lr"} true; R0, Gamma_R0 := 1bv64, true; + goto r_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + r_return: + assume {:captureState "r_return"} true; return; } diff --git a/src/test/correct/switch2/gcc_pic/switch2.expected b/src/test/correct/switch2/gcc_pic/switch2.expected index 21091a5b1..c9bcc5f08 100644 --- a/src/test/correct/switch2/gcc_pic/switch2.expected +++ b/src/test/correct/switch2/gcc_pic/switch2.expected @@ -259,72 +259,10 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto lmain_goto_l00000c2f, lmain_goto_l00000c67; - l00000c2f: - assume {:captureState "l00000c2f"} true; - R0, Gamma_R0 := 4bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%00000c3f"} true; - goto l00000c41; - l00000c67: - assume {:captureState "l00000c67"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #6, Gamma_#6 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#6); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#6); - ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; - NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000c67_goto_l00000c41, l00000c67_goto_l00000c8f; - l00000c8f: - assume {:captureState "l00000c8f"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #7, Gamma_#7 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#7); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#7); - ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; - NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; - assert Gamma_ZF; - goto l00000c8f_goto_l00000cb0, l00000c8f_goto_l00000cc6; - l00000cc6: - assume {:captureState "l00000cc6"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #8, Gamma_#8 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#8); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#8); - ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; - NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000cc6_goto_l00000cee, l00000cc6_goto_l00000c41; - l00000cee: - assume {:captureState "l00000cee"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #9, Gamma_#9 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#9); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#9); - ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; - NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; - assert Gamma_ZF; - goto l00000cee_goto_l00000d41, l00000cee_goto_l00000d0f; - l00000d0f: - assume {:captureState "l00000d0f"} true; - R30, Gamma_R30 := 1944bv64, true; - call r(); - goto l00000d1b; - l00000d1b: - assume {:captureState "l00000d1b"} true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%00000d21"} true; - goto l00000d23; - l00000d41: - assume {:captureState "l00000d41"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #10, Gamma_#10 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#10); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#10); - ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; - NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); - goto l00000d41_goto_l00000d69, l00000d41_goto_l00000c41; + l00000cee_goto_l00000d41: + assume {:captureState "l00000cee_goto_l00000d41"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000d41; l00000d69: assume {:captureState "l00000d69"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -335,113 +273,181 @@ procedure main() NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; assert Gamma_ZF; goto l00000d69_goto_l00000d8f, l00000d69_goto_l00000d23; + l00000c67: + assume {:captureState "l00000c67"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #6, Gamma_#6 := bvadd32(R0[32:0], 4294967290bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934587bv33))), (Gamma_R0 && Gamma_#6); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#6); + ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; + NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000c67_goto_l00000c41, l00000c67_goto_l00000c8f; l00000d23: assume {:captureState "l00000d23"} true; R0, Gamma_R0 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); assume {:captureState "%00000d2e"} true; goto l00000c50; - l00000d8f: - assume {:captureState "l00000d8f"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #12, Gamma_#12 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#12, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#12); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#12); - ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; - NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; - assert Gamma_ZF; - goto l00000d8f_goto_l00000d34, l00000d8f_goto_l00000db5; - l00000d34: - assume {:captureState "l00000d34"} true; - R0, Gamma_R0 := 2bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%00000d3f"} true; - goto l00000cb0; l00000cb0: assume {:captureState "l00000cb0"} true; R0, Gamma_R0 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); assume {:captureState "%00000cc0"} true; goto l00000c50; + l00000c8f_goto_l00000cc6: + assume {:captureState "l00000c8f_goto_l00000cc6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000cc6; + l00000d41_goto_l00000c41: + assume {:captureState "l00000d41_goto_l00000c41"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00000c41; l00000db5: assume {:captureState "l00000db5"} true; goto l00000c41; - l00000c41: - assume {:captureState "l00000c41"} true; - R0, Gamma_R0 := 5bv64, true; + l00000d1b: + assume {:captureState "l00000d1b"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); - assume {:captureState "%00000c4c"} true; - goto l00000c50; + assume {:captureState "%00000d21"} true; + goto l00000d23; + l00000d41_goto_l00000d69: + assume {:captureState "l00000d41_goto_l00000d69"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000d69; + l00000cc6_goto_l00000cee: + assume {:captureState "l00000cc6_goto_l00000cee"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000cee; + l00000cee: + assume {:captureState "l00000cee"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #9, Gamma_#9 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#9, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#9); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#9, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#9); + ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; + NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; + assert Gamma_ZF; + goto l00000cee_goto_l00000d41, l00000cee_goto_l00000d0f; + l00000d69_goto_l00000d8f: + assume {:captureState "l00000d69_goto_l00000d8f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000d8f; l00000c50: assume {:captureState "l00000c50"} true; R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; - return; - lmain_goto_l00000c2f: - assume {:captureState "lmain_goto_l00000c2f"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000c2f; - lmain_goto_l00000c67: - assume {:captureState "lmain_goto_l00000c67"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000c67; + goto main_return; l00000c67_goto_l00000c41: assume {:captureState "l00000c67_goto_l00000c41"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l00000c41; - l00000c67_goto_l00000c8f: - assume {:captureState "l00000c67_goto_l00000c8f"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000c8f; - l00000c8f_goto_l00000cb0: - assume {:captureState "l00000c8f_goto_l00000cb0"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000cb0; - l00000c8f_goto_l00000cc6: - assume {:captureState "l00000c8f_goto_l00000cc6"} true; + l00000d8f_goto_l00000db5: + assume {:captureState "l00000d8f_goto_l00000db5"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000cc6; + goto l00000db5; l00000cc6_goto_l00000c41: assume {:captureState "l00000cc6_goto_l00000c41"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); goto l00000c41; - l00000cc6_goto_l00000cee: - assume {:captureState "l00000cc6_goto_l00000cee"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000cee; - l00000cee_goto_l00000d0f: - assume {:captureState "l00000cee_goto_l00000d0f"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000d0f; - l00000cee_goto_l00000d41: - assume {:captureState "l00000cee_goto_l00000d41"} true; + lmain_goto_l00000c67: + assume {:captureState "lmain_goto_l00000c67"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000d41; - l00000d41_goto_l00000c41: - assume {:captureState "l00000d41_goto_l00000c41"} true; - assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); - goto l00000c41; - l00000d41_goto_l00000d69: - assume {:captureState "l00000d41_goto_l00000d69"} true; + goto l00000c67; + l00000d34: + assume {:captureState "l00000d34"} true; + R0, Gamma_R0 := 2bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%00000d3f"} true; + goto l00000cb0; + l00000d8f: + assume {:captureState "l00000d8f"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #12, Gamma_#12 := bvadd32(R0[32:0], 4294967293bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#12, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934590bv33))), (Gamma_R0 && Gamma_#12); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#12); + ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; + NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; + assert Gamma_ZF; + goto l00000d8f_goto_l00000d34, l00000d8f_goto_l00000db5; + l00000c8f: + assume {:captureState "l00000c8f"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #7, Gamma_#7 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#7, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#7); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#7, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#7); + ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; + NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; + assert Gamma_ZF; + goto l00000c8f_goto_l00000cb0, l00000c8f_goto_l00000cc6; + lmain_goto_l00000c2f: + assume {:captureState "lmain_goto_l00000c2f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000c2f; + l00000c67_goto_l00000c8f: + assume {:captureState "l00000c67_goto_l00000c8f"} true; assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); - goto l00000d69; + goto l00000c8f; + l00000d0f: + assume {:captureState "l00000d0f"} true; + R30, Gamma_R30 := 1944bv64, true; + call r(); + goto l00000d1b; + l00000cc6: + assume {:captureState "l00000cc6"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #8, Gamma_#8 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#8, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934588bv33))), (Gamma_R0 && Gamma_#8); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#8); + ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; + NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000cc6_goto_l00000cee, l00000cc6_goto_l00000c41; + l00000c2f: + assume {:captureState "l00000c2f"} true; + R0, Gamma_R0 := 4bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%00000c3f"} true; + goto l00000c41; l00000d69_goto_l00000d23: assume {:captureState "l00000d69_goto_l00000d23"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000d23; - l00000d69_goto_l00000d8f: - assume {:captureState "l00000d69_goto_l00000d8f"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000d8f; + l00000c8f_goto_l00000cb0: + assume {:captureState "l00000c8f_goto_l00000cb0"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000cb0; l00000d8f_goto_l00000d34: assume {:captureState "l00000d8f_goto_l00000d34"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000d34; - l00000d8f_goto_l00000db5: - assume {:captureState "l00000d8f_goto_l00000db5"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000db5; + l00000c41: + assume {:captureState "l00000c41"} true; + R0, Gamma_R0 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 44bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 44bv64), Gamma_R0); + assume {:captureState "%00000c4c"} true; + goto l00000c50; + l00000d41: + assume {:captureState "l00000d41"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #10, Gamma_#10 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#10, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#10); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#10); + ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; + NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000d41_goto_l00000d69, l00000d41_goto_l00000c41; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000cee_goto_l00000d0f: + assume {:captureState "l00000cee_goto_l00000d0f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000d0f; + main_return: + assume {:captureState "main_return"} true; + return; } procedure r() @@ -522,5 +528,11 @@ procedure r() lr: assume {:captureState "lr"} true; R0, Gamma_R0 := 1bv64, true; + goto r_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + r_return: + assume {:captureState "r_return"} true; return; } diff --git a/src/test/correct/syscall/clang/syscall.expected b/src/test/correct/syscall/clang/syscall.expected index 5c23cb30f..5c7254c56 100644 --- a/src/test/correct/syscall/clang/syscall.expected +++ b/src/test/correct/syscall/clang/syscall.expected @@ -312,5 +312,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/syscall/clang_no_plt_no_pic/syscall.expected b/src/test/correct/syscall/clang_no_plt_no_pic/syscall.expected index d0efb46c8..843793310 100644 --- a/src/test/correct/syscall/clang_no_plt_no_pic/syscall.expected +++ b/src/test/correct/syscall/clang_no_plt_no_pic/syscall.expected @@ -303,6 +303,9 @@ procedure main() R30, Gamma_R30 := 1904bv64, true; call fork(); goto l0000092f; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000092f: assume {:captureState "l0000092f"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); @@ -312,5 +315,8 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/syscall/clang_pic/syscall.expected b/src/test/correct/syscall/clang_pic/syscall.expected index d0efb46c8..843793310 100644 --- a/src/test/correct/syscall/clang_pic/syscall.expected +++ b/src/test/correct/syscall/clang_pic/syscall.expected @@ -303,6 +303,9 @@ procedure main() R30, Gamma_R30 := 1904bv64, true; call fork(); goto l0000092f; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000092f: assume {:captureState "l0000092f"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R0); @@ -312,5 +315,8 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, #5), gamma_load64(Gamma_stack, #5); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(#5, 8bv64)), gamma_load64(Gamma_stack, bvadd64(#5, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/syscall/gcc/syscall.expected b/src/test/correct/syscall/gcc/syscall.expected index d10405962..c1dec7db8 100644 --- a/src/test/correct/syscall/gcc/syscall.expected +++ b/src/test/correct/syscall/gcc/syscall.expected @@ -307,5 +307,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/syscall/gcc_O2/syscall.expected b/src/test/correct/syscall/gcc_O2/syscall.expected index 757903692..eadfc987d 100644 --- a/src/test/correct/syscall/gcc_O2/syscall.expected +++ b/src/test/correct/syscall/gcc_O2/syscall.expected @@ -1,8 +1,4 @@ -var {:extern} Gamma_R16: bool; -var {:extern} Gamma_R17: bool; var {:extern} Gamma_mem: [bv64]bool; -var {:extern} R16: bv64; -var {:extern} R17: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1960bv64); @@ -66,7 +62,6 @@ procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; procedure fork(); - modifies Gamma_R16, Gamma_R17, R16, R17; free requires (memory_load8_le(mem, 69632bv64) == 0bv8); free requires (memory_load8_le(mem, 69633bv64) == 0bv8); free requires (memory_load8_le(mem, 69634bv64) == 0bv8); diff --git a/src/test/correct/syscall/gcc_no_plt_no_pic/syscall.expected b/src/test/correct/syscall/gcc_no_plt_no_pic/syscall.expected index 712177c54..5673667e0 100644 --- a/src/test/correct/syscall/gcc_no_plt_no_pic/syscall.expected +++ b/src/test/correct/syscall/gcc_no_plt_no_pic/syscall.expected @@ -307,5 +307,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/syscall/gcc_pic/syscall.expected b/src/test/correct/syscall/gcc_pic/syscall.expected index 712177c54..5673667e0 100644 --- a/src/test/correct/syscall/gcc_pic/syscall.expected +++ b/src/test/correct/syscall/gcc_pic/syscall.expected @@ -307,5 +307,11 @@ procedure main() R29, Gamma_R29 := memory_load64_le(stack, R31), gamma_load64(Gamma_stack, R31); R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected index a89fe9994..c57b20c59 100644 --- a/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected @@ -226,51 +226,57 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000325, lmain_goto_l00000322; - l00000325: - assume {:captureState "l00000325"} true; + l00000330: + assume {:captureState "l00000330"} true; R8, Gamma_R8 := 1bv64, true; - goto l00000328; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); + assume {:captureState "%00000340"} true; + goto l00000343; + lmain_goto_l00000325: + assume {:captureState "lmain_goto_l00000325"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000325; l00000322: assume {:captureState "l00000322"} true; R8, Gamma_R8 := 0bv64, true; goto l00000328; + l00000343: + assume {:captureState "l00000343"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l00000328_goto_l00000358: + assume {:captureState "l00000328_goto_l00000358"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000358; l00000328: assume {:captureState "l00000328"} true; assert Gamma_R8; goto l00000328_goto_l00000330, l00000328_goto_l00000358; - l00000330: - assume {:captureState "l00000330"} true; - R8, Gamma_R8 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); - assume {:captureState "%00000340"} true; - goto l00000343; - l00000358: - assume {:captureState "l00000358"} true; - goto l00000359; + l00000328_goto_l00000330: + assume {:captureState "l00000328_goto_l00000330"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000330; + lmain_goto_l00000322: + assume {:captureState "lmain_goto_l00000322"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000322; l00000359: assume {:captureState "l00000359"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); assume {:captureState "%00000361"} true; goto l00000343; - l00000343: - assume {:captureState "l00000343"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + l00000325: + assume {:captureState "l00000325"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000328; + l00000358: + assume {:captureState "l00000358"} true; + goto l00000359; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l00000322: - assume {:captureState "lmain_goto_l00000322"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000322; - lmain_goto_l00000325: - assume {:captureState "lmain_goto_l00000325"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000325; - l00000328_goto_l00000330: - assume {:captureState "l00000328_goto_l00000330"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000330; - l00000328_goto_l00000358: - assume {:captureState "l00000328_goto_l00000358"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000358; } diff --git a/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected index 3b7e9dc9d..8debcd3da 100644 --- a/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected @@ -212,13 +212,6 @@ procedure main() assume {:captureState "l000002e8"} true; R0, Gamma_R0 := 1bv64, true; goto l000002eb; - l000002e5: - assume {:captureState "l000002e5"} true; - R0, Gamma_R0 := 0bv64, true; - goto l000002eb; - l000002eb: - assume {:captureState "l000002eb"} true; - return; lmain_goto_l000002e5: assume {:captureState "lmain_goto_l000002e5"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); @@ -227,4 +220,17 @@ procedure main() assume {:captureState "lmain_goto_l000002e8"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000002e8; + l000002e5: + assume {:captureState "l000002e5"} true; + R0, Gamma_R0 := 0bv64, true; + goto l000002eb; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l000002eb: + assume {:captureState "l000002eb"} true; + goto main_return; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected index 47e86bf5c..455b6e7bd 100644 --- a/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected @@ -226,51 +226,57 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l0000093d, lmain_goto_l00000940; - l00000940: - assume {:captureState "l00000940"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000943; l0000093d: assume {:captureState "l0000093d"} true; R8, Gamma_R8 := 0bv64, true; goto l00000943; - l00000943: - assume {:captureState "l00000943"} true; - assert Gamma_R8; - goto l00000943_goto_l00000973, l00000943_goto_l0000094b; + l0000095e: + assume {:captureState "l0000095e"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l0000094b: assume {:captureState "l0000094b"} true; R8, Gamma_R8 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); assume {:captureState "%0000095b"} true; goto l0000095e; - l00000973: - assume {:captureState "l00000973"} true; - goto l00000974; + l00000943_goto_l0000094b: + assume {:captureState "l00000943_goto_l0000094b"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000094b; + l00000943: + assume {:captureState "l00000943"} true; + assert Gamma_R8; + goto l00000943_goto_l00000973, l00000943_goto_l0000094b; + l00000943_goto_l00000973: + assume {:captureState "l00000943_goto_l00000973"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000973; l00000974: assume {:captureState "l00000974"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); assume {:captureState "%0000097c"} true; goto l0000095e; - l0000095e: - assume {:captureState "l0000095e"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l0000093d: - assume {:captureState "lmain_goto_l0000093d"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l0000093d; lmain_goto_l00000940: assume {:captureState "lmain_goto_l00000940"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000940; - l00000943_goto_l0000094b: - assume {:captureState "l00000943_goto_l0000094b"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l0000094b; - l00000943_goto_l00000973: - assume {:captureState "l00000943_goto_l00000973"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000973; + l00000940: + assume {:captureState "l00000940"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000943; + l00000973: + assume {:captureState "l00000973"} true; + goto l00000974; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + lmain_goto_l0000093d: + assume {:captureState "lmain_goto_l0000093d"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000093d; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected index 218a90bcb..c93833b2e 100644 --- a/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected @@ -260,51 +260,57 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000330, lmain_goto_l0000032d; - l00000330: - assume {:captureState "l00000330"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000333; l0000032d: assume {:captureState "l0000032d"} true; R8, Gamma_R8 := 0bv64, true; goto l00000333; - l00000333: - assume {:captureState "l00000333"} true; - assert Gamma_R8; - goto l00000333_goto_l0000033b, l00000333_goto_l00000363; - l0000033b: - assume {:captureState "l0000033b"} true; - R8, Gamma_R8 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); - assume {:captureState "%0000034b"} true; - goto l0000034e; - l00000363: - assume {:captureState "l00000363"} true; - goto l00000364; - l00000364: - assume {:captureState "l00000364"} true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); - assume {:captureState "%0000036c"} true; - goto l0000034e; l0000034e: assume {:captureState "l0000034e"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + goto main_return; lmain_goto_l0000032d: assume {:captureState "lmain_goto_l0000032d"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l0000032d; - lmain_goto_l00000330: - assume {:captureState "lmain_goto_l00000330"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000330; + l00000364: + assume {:captureState "l00000364"} true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); + assume {:captureState "%0000036c"} true; + goto l0000034e; + l00000363: + assume {:captureState "l00000363"} true; + goto l00000364; + l00000330: + assume {:captureState "l00000330"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000333; + l00000333: + assume {:captureState "l00000333"} true; + assert Gamma_R8; + goto l00000333_goto_l0000033b, l00000333_goto_l00000363; l00000333_goto_l0000033b: assume {:captureState "l00000333_goto_l0000033b"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l0000033b; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000330; + l0000033b: + assume {:captureState "l0000033b"} true; + R8, Gamma_R8 := 1bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), Gamma_R8); + assume {:captureState "%0000034b"} true; + goto l0000034e; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000333_goto_l00000363: assume {:captureState "l00000333_goto_l00000363"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000363; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected index a078d99f9..2d03a49a5 100644 --- a/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected @@ -207,6 +207,12 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000002fa, lmain_goto_l00000309; + l00000304: + assume {:captureState "l00000304"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l000002fa: assume {:captureState "l000002fa"} true; R0, Gamma_R0 := 1bv64, true; @@ -215,9 +221,6 @@ procedure main() assume {:captureState "l00000309"} true; R0, Gamma_R0 := 0bv64, true; goto l00000304; - l00000304: - assume {:captureState "l00000304"} true; - return; lmain_goto_l000002fa: assume {:captureState "lmain_goto_l000002fa"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); @@ -226,4 +229,7 @@ procedure main() assume {:captureState "lmain_goto_l00000309"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000309; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected index 11811a30a..8db5dee79 100644 --- a/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected @@ -206,23 +206,29 @@ procedure main() NF, Gamma_NF := bvadd32(#1, 1bv32)[32:31], Gamma_#1; assert Gamma_ZF; goto lmain_goto_l000001d2, lmain_goto_l000001cf; - l000001d2: - assume {:captureState "l000001d2"} true; - R0, Gamma_R0 := 1bv64, true; - goto l000001d5; + lmain_goto_l000001d2: + assume {:captureState "lmain_goto_l000001d2"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000001d2; l000001cf: assume {:captureState "l000001cf"} true; R0, Gamma_R0 := 0bv64, true; goto l000001d5; - l000001d5: - assume {:captureState "l000001d5"} true; - return; lmain_goto_l000001cf: assume {:captureState "lmain_goto_l000001cf"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l000001cf; - lmain_goto_l000001d2: - assume {:captureState "lmain_goto_l000001d2"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l000001d2; + l000001d5: + assume {:captureState "l000001d5"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l000001d2: + assume {:captureState "l000001d2"} true; + R0, Gamma_R0 := 1bv64, true; + goto l000001d5; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected index f2e4fa7f1..e567ce3b8 100644 --- a/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected @@ -207,6 +207,9 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000008c2, lmain_goto_l000008b3; + l000008bd: + assume {:captureState "l000008bd"} true; + goto main_return; l000008b3: assume {:captureState "l000008b3"} true; R0, Gamma_R0 := 1bv64, true; @@ -215,15 +218,18 @@ procedure main() assume {:captureState "l000008c2"} true; R0, Gamma_R0 := 0bv64, true; goto l000008bd; - l000008bd: - assume {:captureState "l000008bd"} true; - return; - lmain_goto_l000008b3: - assume {:captureState "lmain_goto_l000008b3"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000008b3; lmain_goto_l000008c2: assume {:captureState "lmain_goto_l000008c2"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000008c2; + lmain_goto_l000008b3: + assume {:captureState "lmain_goto_l000008b3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000008b3; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected index 661b64502..4a263681f 100644 --- a/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected @@ -240,23 +240,29 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000002fb, lmain_goto_l0000030a; - l000002fb: - assume {:captureState "l000002fb"} true; - R0, Gamma_R0 := 1bv64, true; - goto l00000305; - l0000030a: - assume {:captureState "l0000030a"} true; - R0, Gamma_R0 := 0bv64, true; - goto l00000305; l00000305: assume {:captureState "l00000305"} true; - return; + goto main_return; lmain_goto_l000002fb: assume {:captureState "lmain_goto_l000002fb"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000002fb; + l0000030a: + assume {:captureState "l0000030a"} true; + R0, Gamma_R0 := 0bv64, true; + goto l00000305; lmain_goto_l0000030a: assume {:captureState "lmain_goto_l0000030a"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l0000030a; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l000002fb: + assume {:captureState "l000002fb"} true; + R0, Gamma_R0 := 1bv64, true; + goto l00000305; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/correct/using_gamma_write_z/clang/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/clang/using_gamma_write_z.expected index 5ab807fea..88652861a 100644 --- a/src/test/correct/using_gamma_write_z/clang/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/clang/using_gamma_write_z.expected @@ -200,5 +200,11 @@ procedure main() assert (Gamma_x_old ==> gamma_load32(Gamma_mem, $x_addr)); assume {:captureState "%000002ce"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/using_gamma_write_z/clang_O2/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/clang_O2/using_gamma_write_z.expected index ba7a07752..d156c3a66 100644 --- a/src/test/correct/using_gamma_write_z/clang_O2/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/clang_O2/using_gamma_write_z.expected @@ -200,5 +200,11 @@ procedure main() assert ((bvadd64(R8, 52bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert (Gamma_x_old ==> gamma_load32(Gamma_mem, $x_addr)); assume {:captureState "%000002d3"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/using_gamma_write_z/clang_no_plt_no_pic/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/clang_no_plt_no_pic/using_gamma_write_z.expected index 121f49afb..4c5c1196b 100644 --- a/src/test/correct/using_gamma_write_z/clang_no_plt_no_pic/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/clang_no_plt_no_pic/using_gamma_write_z.expected @@ -200,5 +200,11 @@ procedure main() assert (Gamma_x_old ==> gamma_load32(Gamma_mem, $x_addr)); assume {:captureState "%00000845"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/using_gamma_write_z/clang_pic/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/clang_pic/using_gamma_write_z.expected index c05386840..829648397 100644 --- a/src/test/correct/using_gamma_write_z/clang_pic/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/clang_pic/using_gamma_write_z.expected @@ -234,5 +234,11 @@ procedure main() assert (Gamma_x_old ==> gamma_load32(Gamma_mem, $x_addr)); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/using_gamma_write_z/gcc/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/gcc/using_gamma_write_z.expected index 195161608..fa27d280b 100644 --- a/src/test/correct/using_gamma_write_z/gcc/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/gcc/using_gamma_write_z.expected @@ -199,5 +199,11 @@ procedure main() assert (Gamma_x_old ==> gamma_load32(Gamma_mem, $x_addr)); assume {:captureState "%000002d8"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/using_gamma_write_z/gcc_O2/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/gcc_O2/using_gamma_write_z.expected index 6e3d75bef..e3e250f8f 100644 --- a/src/test/correct/using_gamma_write_z/gcc_O2/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/gcc_O2/using_gamma_write_z.expected @@ -200,5 +200,11 @@ procedure main() assert ((bvadd64(R1, 20bv64) == $z_addr) ==> (L(mem, $x_addr) ==> Gamma_x_old)); assert (Gamma_x_old ==> gamma_load32(Gamma_mem, $x_addr)); assume {:captureState "%000001bd"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/using_gamma_write_z/gcc_no_plt_no_pic/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/gcc_no_plt_no_pic/using_gamma_write_z.expected index 8bf981db5..1940b85d5 100644 --- a/src/test/correct/using_gamma_write_z/gcc_no_plt_no_pic/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/gcc_no_plt_no_pic/using_gamma_write_z.expected @@ -199,5 +199,11 @@ procedure main() assert (Gamma_x_old ==> gamma_load32(Gamma_mem, $x_addr)); assume {:captureState "%0000085b"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/correct/using_gamma_write_z/gcc_pic/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/gcc_pic/using_gamma_write_z.expected index 3ffffbcfb..136df201e 100644 --- a/src/test/correct/using_gamma_write_z/gcc_pic/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/gcc_pic/using_gamma_write_z.expected @@ -232,5 +232,11 @@ procedure main() assert (Gamma_x_old ==> gamma_load32(Gamma_mem, $x_addr)); assume {:captureState "%000002d9"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign/clang/basicassign.expected b/src/test/incorrect/basicassign/clang/basicassign.expected index 122d69a08..5f1807521 100644 --- a/src/test/incorrect/basicassign/clang/basicassign.expected +++ b/src/test/incorrect/basicassign/clang/basicassign.expected @@ -224,5 +224,11 @@ procedure main() assert (L(mem, bvadd64(R9, 60bv64)) ==> Gamma_R8); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 60bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 60bv64), Gamma_R8); assume {:captureState "%00000337"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign/clang_O2/basicassign.expected b/src/test/incorrect/basicassign/clang_O2/basicassign.expected index e3a318276..2f483e645 100644 --- a/src/test/incorrect/basicassign/clang_O2/basicassign.expected +++ b/src/test/incorrect/basicassign/clang_O2/basicassign.expected @@ -204,5 +204,11 @@ procedure main() assert (L(mem, bvadd64(R10, 60bv64)) ==> Gamma_R8); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R10, 60bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R10, 60bv64), Gamma_R8); assume {:captureState "%000002f3"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign/clang_no_plt_no_pic/basicassign.expected b/src/test/incorrect/basicassign/clang_no_plt_no_pic/basicassign.expected index 3250d4cce..860dd8d67 100644 --- a/src/test/incorrect/basicassign/clang_no_plt_no_pic/basicassign.expected +++ b/src/test/incorrect/basicassign/clang_no_plt_no_pic/basicassign.expected @@ -224,5 +224,11 @@ procedure main() assert (L(mem, bvadd64(R9, 60bv64)) ==> Gamma_R8); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 60bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 60bv64), Gamma_R8); assume {:captureState "%00000924"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign/clang_pic/basicassign.expected b/src/test/incorrect/basicassign/clang_pic/basicassign.expected index ac86f966b..8152d95bf 100644 --- a/src/test/incorrect/basicassign/clang_pic/basicassign.expected +++ b/src/test/incorrect/basicassign/clang_pic/basicassign.expected @@ -310,5 +310,11 @@ procedure main() assert (L(mem, R9) ==> Gamma_R8); mem, Gamma_mem := memory_store32_le(mem, R9, R8[32:0]), gamma_store32(Gamma_mem, R9, Gamma_R8); assume {:captureState "%00000358"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign/gcc/basicassign.expected b/src/test/incorrect/basicassign/gcc/basicassign.expected index 121167794..b8b491d80 100644 --- a/src/test/incorrect/basicassign/gcc/basicassign.expected +++ b/src/test/incorrect/basicassign/gcc/basicassign.expected @@ -233,5 +233,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%000003c2"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign/gcc_O2/basicassign.expected b/src/test/incorrect/basicassign/gcc_O2/basicassign.expected index 42773c210..5febdf802 100644 --- a/src/test/incorrect/basicassign/gcc_O2/basicassign.expected +++ b/src/test/incorrect/basicassign/gcc_O2/basicassign.expected @@ -204,5 +204,11 @@ procedure main() assert (L(mem, bvadd64(#1, 4bv64)) ==> Gamma_R2); mem, Gamma_mem := memory_store32_le(mem, bvadd64(#1, 4bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(#1, 4bv64), Gamma_R2); assume {:captureState "%000001cf"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign/gcc_no_plt_no_pic/basicassign.expected b/src/test/incorrect/basicassign/gcc_no_plt_no_pic/basicassign.expected index 499b391fd..34be6147a 100644 --- a/src/test/incorrect/basicassign/gcc_no_plt_no_pic/basicassign.expected +++ b/src/test/incorrect/basicassign/gcc_no_plt_no_pic/basicassign.expected @@ -233,5 +233,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%00000a5d"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign/gcc_pic/basicassign.expected b/src/test/incorrect/basicassign/gcc_pic/basicassign.expected index e67a10bdf..01a961c7f 100644 --- a/src/test/incorrect/basicassign/gcc_pic/basicassign.expected +++ b/src/test/incorrect/basicassign/gcc_pic/basicassign.expected @@ -322,5 +322,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R0, R1[32:0]), gamma_store32(Gamma_mem, R0, Gamma_R1); assume {:captureState "%000003cb"} true; R0, Gamma_R0 := 0bv64, true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign1/clang/basicassign1.expected b/src/test/incorrect/basicassign1/clang/basicassign1.expected index bd0fa29fe..88f7d6bf6 100644 --- a/src/test/incorrect/basicassign1/clang/basicassign1.expected +++ b/src/test/incorrect/basicassign1/clang/basicassign1.expected @@ -215,5 +215,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assume {:captureState "%0000033c"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign1/clang_O2/basicassign1.expected b/src/test/incorrect/basicassign1/clang_O2/basicassign1.expected index 54cfefaed..4bdcc3a12 100644 --- a/src/test/incorrect/basicassign1/clang_O2/basicassign1.expected +++ b/src/test/incorrect/basicassign1/clang_O2/basicassign1.expected @@ -191,5 +191,11 @@ procedure main() assert (L(mem, bvadd64(R9, 56bv64)) ==> Gamma_R8); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assume {:captureState "%000002de"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign1/clang_no_plt_no_pic/basicassign1.expected b/src/test/incorrect/basicassign1/clang_no_plt_no_pic/basicassign1.expected index 05e7e5e2f..f77d5f080 100644 --- a/src/test/incorrect/basicassign1/clang_no_plt_no_pic/basicassign1.expected +++ b/src/test/incorrect/basicassign1/clang_no_plt_no_pic/basicassign1.expected @@ -215,5 +215,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, bvadd64(R9, 56bv64), R8[32:0]), gamma_store32(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assume {:captureState "%00000936"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign1/clang_pic/basicassign1.expected b/src/test/incorrect/basicassign1/clang_pic/basicassign1.expected index dc205cce6..e45f368b5 100644 --- a/src/test/incorrect/basicassign1/clang_pic/basicassign1.expected +++ b/src/test/incorrect/basicassign1/clang_pic/basicassign1.expected @@ -275,5 +275,11 @@ procedure main() mem, Gamma_mem := memory_store32_le(mem, R9, R8[32:0]), gamma_store32(Gamma_mem, R9, Gamma_R8); assume {:captureState "%00000352"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign1/gcc/basicassign1.expected b/src/test/incorrect/basicassign1/gcc/basicassign1.expected index ea9681d89..c9ddba09b 100644 --- a/src/test/incorrect/basicassign1/gcc/basicassign1.expected +++ b/src/test/incorrect/basicassign1/gcc/basicassign1.expected @@ -217,5 +217,11 @@ procedure main() assume {:captureState "%00000371"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign1/gcc_O2/basicassign1.expected b/src/test/incorrect/basicassign1/gcc_O2/basicassign1.expected index 0414017cb..4bd97c776 100644 --- a/src/test/incorrect/basicassign1/gcc_O2/basicassign1.expected +++ b/src/test/incorrect/basicassign1/gcc_O2/basicassign1.expected @@ -191,5 +191,11 @@ procedure main() assert (L(mem, bvadd64(R1, 20bv64)) ==> Gamma_R2); mem, Gamma_mem := memory_store32_le(mem, bvadd64(R1, 20bv64), R2[32:0]), gamma_store32(Gamma_mem, bvadd64(R1, 20bv64), Gamma_R2); assume {:captureState "%000001c5"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign1/gcc_no_plt_no_pic/basicassign1.expected b/src/test/incorrect/basicassign1/gcc_no_plt_no_pic/basicassign1.expected index fdcbd7147..e9feedbe3 100644 --- a/src/test/incorrect/basicassign1/gcc_no_plt_no_pic/basicassign1.expected +++ b/src/test/incorrect/basicassign1/gcc_no_plt_no_pic/basicassign1.expected @@ -217,5 +217,11 @@ procedure main() assume {:captureState "%000009b1"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign1/gcc_pic/basicassign1.expected b/src/test/incorrect/basicassign1/gcc_pic/basicassign1.expected index 91a64b3f4..fe90ab5aa 100644 --- a/src/test/incorrect/basicassign1/gcc_pic/basicassign1.expected +++ b/src/test/incorrect/basicassign1/gcc_pic/basicassign1.expected @@ -277,5 +277,11 @@ procedure main() assume {:captureState "%00000375"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign2/clang/basicassign2.expected b/src/test/incorrect/basicassign2/clang/basicassign2.expected index 471ecc76c..d6a39a59f 100644 --- a/src/test/incorrect/basicassign2/clang/basicassign2.expected +++ b/src/test/incorrect/basicassign2/clang/basicassign2.expected @@ -216,5 +216,11 @@ procedure main() assume {:captureState "%00000337"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign2/clang_O2/basicassign2.expected b/src/test/incorrect/basicassign2/clang_O2/basicassign2.expected index 1443e9789..00a003c3d 100644 --- a/src/test/incorrect/basicassign2/clang_O2/basicassign2.expected +++ b/src/test/incorrect/basicassign2/clang_O2/basicassign2.expected @@ -192,5 +192,11 @@ procedure main() assert (L(mem, bvadd64(R9, 64bv64)) ==> Gamma_R8); mem, Gamma_mem := memory_store64_le(mem, bvadd64(R9, 64bv64), R8), gamma_store64(Gamma_mem, bvadd64(R9, 64bv64), Gamma_R8); assume {:captureState "%000002de"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign2/clang_no_plt_no_pic/basicassign2.expected b/src/test/incorrect/basicassign2/clang_no_plt_no_pic/basicassign2.expected index 911ce67bd..10b2a8084 100644 --- a/src/test/incorrect/basicassign2/clang_no_plt_no_pic/basicassign2.expected +++ b/src/test/incorrect/basicassign2/clang_no_plt_no_pic/basicassign2.expected @@ -216,5 +216,11 @@ procedure main() assume {:captureState "%00000931"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign2/clang_pic/basicassign2.expected b/src/test/incorrect/basicassign2/clang_pic/basicassign2.expected index bb901dc08..7438d3a21 100644 --- a/src/test/incorrect/basicassign2/clang_pic/basicassign2.expected +++ b/src/test/incorrect/basicassign2/clang_pic/basicassign2.expected @@ -268,5 +268,11 @@ procedure main() assume {:captureState "%0000034d"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign2/gcc/basicassign2.expected b/src/test/incorrect/basicassign2/gcc/basicassign2.expected index 95f92fbdc..e3ef70fbe 100644 --- a/src/test/incorrect/basicassign2/gcc/basicassign2.expected +++ b/src/test/incorrect/basicassign2/gcc/basicassign2.expected @@ -218,5 +218,11 @@ procedure main() assume {:captureState "%00000371"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign2/gcc_O2/basicassign2.expected b/src/test/incorrect/basicassign2/gcc_O2/basicassign2.expected index 2116e0774..9f66eb0cd 100644 --- a/src/test/incorrect/basicassign2/gcc_O2/basicassign2.expected +++ b/src/test/incorrect/basicassign2/gcc_O2/basicassign2.expected @@ -192,5 +192,11 @@ procedure main() assert (L(mem, bvadd64(R1, 24bv64)) ==> Gamma_R2); mem, Gamma_mem := memory_store64_le(mem, bvadd64(R1, 24bv64), R2), gamma_store64(Gamma_mem, bvadd64(R1, 24bv64), Gamma_R2); assume {:captureState "%000001c5"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign2/gcc_no_plt_no_pic/basicassign2.expected b/src/test/incorrect/basicassign2/gcc_no_plt_no_pic/basicassign2.expected index 190af2f08..b7517c6e9 100644 --- a/src/test/incorrect/basicassign2/gcc_no_plt_no_pic/basicassign2.expected +++ b/src/test/incorrect/basicassign2/gcc_no_plt_no_pic/basicassign2.expected @@ -218,5 +218,11 @@ procedure main() assume {:captureState "%000009b1"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign2/gcc_pic/basicassign2.expected b/src/test/incorrect/basicassign2/gcc_pic/basicassign2.expected index 1c35793fc..2a1a923e1 100644 --- a/src/test/incorrect/basicassign2/gcc_pic/basicassign2.expected +++ b/src/test/incorrect/basicassign2/gcc_pic/basicassign2.expected @@ -270,5 +270,11 @@ procedure main() assume {:captureState "%00000375"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign3/clang/basicassign3.expected b/src/test/incorrect/basicassign3/clang/basicassign3.expected index 75800d54a..7e2f57eb9 100644 --- a/src/test/incorrect/basicassign3/clang/basicassign3.expected +++ b/src/test/incorrect/basicassign3/clang/basicassign3.expected @@ -213,5 +213,11 @@ procedure main() assume {:captureState "%00000337"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign3/clang_O2/basicassign3.expected b/src/test/incorrect/basicassign3/clang_O2/basicassign3.expected index 96cc417da..dadee6a6e 100644 --- a/src/test/incorrect/basicassign3/clang_O2/basicassign3.expected +++ b/src/test/incorrect/basicassign3/clang_O2/basicassign3.expected @@ -189,5 +189,11 @@ procedure main() assert (L(mem, bvadd64(R9, 56bv64)) ==> Gamma_R8); mem, Gamma_mem := memory_store8_le(mem, bvadd64(R9, 56bv64), R8[8:0]), gamma_store8(Gamma_mem, bvadd64(R9, 56bv64), Gamma_R8); assume {:captureState "%000002de"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign3/clang_no_plt_no_pic/basicassign3.expected b/src/test/incorrect/basicassign3/clang_no_plt_no_pic/basicassign3.expected index 75b959513..7cbd3ded5 100644 --- a/src/test/incorrect/basicassign3/clang_no_plt_no_pic/basicassign3.expected +++ b/src/test/incorrect/basicassign3/clang_no_plt_no_pic/basicassign3.expected @@ -213,5 +213,11 @@ procedure main() assume {:captureState "%00000931"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign3/clang_pic/basicassign3.expected b/src/test/incorrect/basicassign3/clang_pic/basicassign3.expected index 7a4df88f4..28dfa7f9d 100644 --- a/src/test/incorrect/basicassign3/clang_pic/basicassign3.expected +++ b/src/test/incorrect/basicassign3/clang_pic/basicassign3.expected @@ -273,5 +273,11 @@ procedure main() assume {:captureState "%0000034d"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign3/gcc/basicassign3.expected b/src/test/incorrect/basicassign3/gcc/basicassign3.expected index a3c547bb3..b65593154 100644 --- a/src/test/incorrect/basicassign3/gcc/basicassign3.expected +++ b/src/test/incorrect/basicassign3/gcc/basicassign3.expected @@ -215,5 +215,11 @@ procedure main() assume {:captureState "%00000371"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign3/gcc_O2/basicassign3.expected b/src/test/incorrect/basicassign3/gcc_O2/basicassign3.expected index 62c8377ad..538b12caa 100644 --- a/src/test/incorrect/basicassign3/gcc_O2/basicassign3.expected +++ b/src/test/incorrect/basicassign3/gcc_O2/basicassign3.expected @@ -189,5 +189,11 @@ procedure main() assert (L(mem, bvadd64(R1, 17bv64)) ==> Gamma_R2); mem, Gamma_mem := memory_store8_le(mem, bvadd64(R1, 17bv64), R2[8:0]), gamma_store8(Gamma_mem, bvadd64(R1, 17bv64), Gamma_R2); assume {:captureState "%000001c5"} true; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign3/gcc_no_plt_no_pic/basicassign3.expected b/src/test/incorrect/basicassign3/gcc_no_plt_no_pic/basicassign3.expected index ea6ea1a7b..0d68eef48 100644 --- a/src/test/incorrect/basicassign3/gcc_no_plt_no_pic/basicassign3.expected +++ b/src/test/incorrect/basicassign3/gcc_no_plt_no_pic/basicassign3.expected @@ -215,5 +215,11 @@ procedure main() assume {:captureState "%000009b1"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/basicassign3/gcc_pic/basicassign3.expected b/src/test/incorrect/basicassign3/gcc_pic/basicassign3.expected index 7e6204c20..6823e0cb6 100644 --- a/src/test/incorrect/basicassign3/gcc_pic/basicassign3.expected +++ b/src/test/incorrect/basicassign3/gcc_pic/basicassign3.expected @@ -275,5 +275,11 @@ procedure main() assume {:captureState "%00000375"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; return; } diff --git a/src/test/incorrect/iflocal/clang/iflocal.expected b/src/test/incorrect/iflocal/clang/iflocal.expected index 8ed1272aa..82f7ca651 100644 --- a/src/test/incorrect/iflocal/clang/iflocal.expected +++ b/src/test/incorrect/iflocal/clang/iflocal.expected @@ -215,46 +215,52 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000337, lmain_goto_l00000334; - l00000337: - assume {:captureState "l00000337"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000033a; l00000334: assume {:captureState "l00000334"} true; R8, Gamma_R8 := 0bv64, true; goto l0000033a; - l0000033a: - assume {:captureState "l0000033a"} true; - assert Gamma_R8; - goto l0000033a_goto_l00000359, l0000033a_goto_l00000342; l00000359: assume {:captureState "l00000359"} true; goto l0000035a; - l0000035a: - assume {:captureState "l0000035a"} true; + l00000337: + assume {:captureState "l00000337"} true; R8, Gamma_R8 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000368"} true; + goto l0000033a; + l0000033a_goto_l00000342: + assume {:captureState "l0000033a_goto_l00000342"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000342; - l00000342: - assume {:captureState "l00000342"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; lmain_goto_l00000334: assume {:captureState "lmain_goto_l00000334"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000334; + l00000342: + assume {:captureState "l00000342"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l0000033a: + assume {:captureState "l0000033a"} true; + assert Gamma_R8; + goto l0000033a_goto_l00000359, l0000033a_goto_l00000342; lmain_goto_l00000337: assume {:captureState "lmain_goto_l00000337"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000337; - l0000033a_goto_l00000342: - assume {:captureState "l0000033a_goto_l00000342"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000342; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l0000033a_goto_l00000359: assume {:captureState "l0000033a_goto_l00000359"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000359; + l0000035a: + assume {:captureState "l0000035a"} true; + R8, Gamma_R8 := 1bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000368"} true; + goto l00000342; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected b/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected index 72e0f9841..891f018eb 100644 --- a/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected @@ -215,14 +215,19 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000956, lmain_goto_l00000959; - l00000959: - assume {:captureState "l00000959"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000095c; l00000956: assume {:captureState "l00000956"} true; R8, Gamma_R8 := 0bv64, true; goto l0000095c; + l0000095c_goto_l00000964: + assume {:captureState "l0000095c_goto_l00000964"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000964; + l00000964: + assume {:captureState "l00000964"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l0000095c: assume {:captureState "l0000095c"} true; assert Gamma_R8; @@ -230,17 +235,19 @@ procedure main() l0000097b: assume {:captureState "l0000097b"} true; goto l0000097c; + l0000095c_goto_l0000097b: + assume {:captureState "l0000095c_goto_l0000097b"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000097b; l0000097c: assume {:captureState "l0000097c"} true; R8, Gamma_R8 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); assume {:captureState "%0000098a"} true; goto l00000964; - l00000964: - assume {:captureState "l00000964"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; lmain_goto_l00000956: assume {:captureState "lmain_goto_l00000956"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); @@ -249,12 +256,11 @@ procedure main() assume {:captureState "lmain_goto_l00000959"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000959; - l0000095c_goto_l00000964: - assume {:captureState "l0000095c_goto_l00000964"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000964; - l0000095c_goto_l0000097b: - assume {:captureState "l0000095c_goto_l0000097b"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l0000097b; + l00000959: + assume {:captureState "l00000959"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000095c; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/iflocal/clang_pic/iflocal.expected b/src/test/incorrect/iflocal/clang_pic/iflocal.expected index 72e0f9841..891f018eb 100644 --- a/src/test/incorrect/iflocal/clang_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/clang_pic/iflocal.expected @@ -215,14 +215,19 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000956, lmain_goto_l00000959; - l00000959: - assume {:captureState "l00000959"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000095c; l00000956: assume {:captureState "l00000956"} true; R8, Gamma_R8 := 0bv64, true; goto l0000095c; + l0000095c_goto_l00000964: + assume {:captureState "l0000095c_goto_l00000964"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000964; + l00000964: + assume {:captureState "l00000964"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; l0000095c: assume {:captureState "l0000095c"} true; assert Gamma_R8; @@ -230,17 +235,19 @@ procedure main() l0000097b: assume {:captureState "l0000097b"} true; goto l0000097c; + l0000095c_goto_l0000097b: + assume {:captureState "l0000095c_goto_l0000097b"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000097b; l0000097c: assume {:captureState "l0000097c"} true; R8, Gamma_R8 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); assume {:captureState "%0000098a"} true; goto l00000964; - l00000964: - assume {:captureState "l00000964"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; + terminate: + assume {:captureState "terminate"} true; + goto terminate; lmain_goto_l00000956: assume {:captureState "lmain_goto_l00000956"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); @@ -249,12 +256,11 @@ procedure main() assume {:captureState "lmain_goto_l00000959"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000959; - l0000095c_goto_l00000964: - assume {:captureState "l0000095c_goto_l00000964"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000964; - l0000095c_goto_l0000097b: - assume {:captureState "l0000095c_goto_l0000097b"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l0000097b; + l00000959: + assume {:captureState "l00000959"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000095c; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/iflocal/gcc/iflocal.expected b/src/test/incorrect/iflocal/gcc/iflocal.expected index 448aac10d..e5bc49a42 100644 --- a/src/test/incorrect/iflocal/gcc/iflocal.expected +++ b/src/test/incorrect/iflocal/gcc/iflocal.expected @@ -210,23 +210,29 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000318, lmain_goto_l0000032d; + l00000318: + assume {:captureState "l00000318"} true; + R0, Gamma_R0 := 0bv64, true; + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; l0000032d: assume {:captureState "l0000032d"} true; R0, Gamma_R0 := 1bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); assume {:captureState "%00000338"} true; goto l00000318; - l00000318: - assume {:captureState "l00000318"} true; - R0, Gamma_R0 := 0bv64, true; - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l00000318: - assume {:captureState "lmain_goto_l00000318"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000318; lmain_goto_l0000032d: assume {:captureState "lmain_goto_l0000032d"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000032d; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + lmain_goto_l00000318: + assume {:captureState "lmain_goto_l00000318"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000318; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected b/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected index 2eb140e57..fa6a398ec 100644 --- a/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected @@ -210,23 +210,29 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000008ff, lmain_goto_l00000914; - l00000914: - assume {:captureState "l00000914"} true; - R0, Gamma_R0 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%0000091f"} true; - goto l000008ff; l000008ff: assume {:captureState "l000008ff"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; + goto main_return; lmain_goto_l000008ff: assume {:captureState "lmain_goto_l000008ff"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l000008ff; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000914: + assume {:captureState "l00000914"} true; + R0, Gamma_R0 := 1bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); + assume {:captureState "%0000091f"} true; + goto l000008ff; lmain_goto_l00000914: assume {:captureState "lmain_goto_l00000914"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000914; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/iflocal/gcc_pic/iflocal.expected b/src/test/incorrect/iflocal/gcc_pic/iflocal.expected index 2eb140e57..fa6a398ec 100644 --- a/src/test/incorrect/iflocal/gcc_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/gcc_pic/iflocal.expected @@ -210,23 +210,29 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000008ff, lmain_goto_l00000914; - l00000914: - assume {:captureState "l00000914"} true; - R0, Gamma_R0 := 1bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%0000091f"} true; - goto l000008ff; l000008ff: assume {:captureState "l000008ff"} true; R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; + goto main_return; lmain_goto_l000008ff: assume {:captureState "lmain_goto_l000008ff"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l000008ff; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l00000914: + assume {:captureState "l00000914"} true; + R0, Gamma_R0 := 1bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); + assume {:captureState "%0000091f"} true; + goto l000008ff; lmain_goto_l00000914: assume {:captureState "lmain_goto_l00000914"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000914; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected index 4201a58a0..471a739ab 100644 --- a/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected @@ -231,80 +231,6 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000390, lmain_goto_l00000393; - l00000393: - assume {:captureState "l00000393"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000396; - l00000390: - assume {:captureState "l00000390"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000396; - l00000396: - assume {:captureState "l00000396"} true; - assert Gamma_R8; - goto l00000396_goto_l0000045d, l00000396_goto_l0000039e; - l0000045d: - assume {:captureState "l0000045d"} true; - goto l0000045e; - l0000045e: - assume {:captureState "l0000045e"} true; - R8, Gamma_R8 := 3bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%0000046c"} true; - goto l0000039e; - l0000039e: - assume {:captureState "l0000039e"} true; - R8, Gamma_R8 := 69632bv64, true; - call rely(); - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 52bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 52bv64)) || L(mem, bvadd64(R8, 52bv64))); - #5, Gamma_#5 := bvadd32(R8[32:0], 4294967294bv32), Gamma_R8; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934591bv33))), (Gamma_R8 && Gamma_#5); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967295bv33))), (Gamma_R8 && Gamma_#5); - ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; - NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; - R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; - assert Gamma_ZF; - goto l0000039e_goto_l000003d1, l0000039e_goto_l000003ce; - l000003d1: - assume {:captureState "l000003d1"} true; - R8, Gamma_R8 := 1bv64, true; - goto l000003d4; - l000003ce: - assume {:captureState "l000003ce"} true; - R8, Gamma_R8 := 0bv64, true; - goto l000003d4; - l000003d4: - assume {:captureState "l000003d4"} true; - assert Gamma_R8; - goto l000003d4_goto_l00000448, l000003d4_goto_l000003dc; - l00000448: - assume {:captureState "l00000448"} true; - goto l00000449; - l00000449: - assume {:captureState "l00000449"} true; - R8, Gamma_R8 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000457"} true; - goto l000003dc; - l000003dc: - assume {:captureState "l000003dc"} true; - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); - #6, Gamma_#6 := bvadd32(R8[32:0], 4294967292bv32), Gamma_R8; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934589bv33))), (Gamma_R8 && Gamma_#6); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967293bv33))), (Gamma_R8 && Gamma_#6); - ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; - NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; - assert Gamma_ZF; - goto l000003dc_goto_l0000040a, l000003dc_goto_l00000407; - l0000040a: - assume {:captureState "l0000040a"} true; - R8, Gamma_R8 := 1bv64, true; - goto l0000040d; - l00000407: - assume {:captureState "l00000407"} true; - R8, Gamma_R8 := 0bv64, true; - goto l0000040d; l0000040d: assume {:captureState "l0000040d"} true; assert Gamma_R8; @@ -312,6 +238,14 @@ procedure main() l0000042c: assume {:captureState "l0000042c"} true; goto l0000042d; + l0000040a: + assume {:captureState "l0000040a"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000040d; + l000003d4_goto_l000003dc: + assume {:captureState "l000003d4_goto_l000003dc"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000003dc; l0000042d: assume {:captureState "l0000042d"} true; R8, Gamma_R8 := 69632bv64, true; @@ -320,57 +254,129 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); assume {:captureState "%00000442"} true; goto l00000415; - l00000415: - assume {:captureState "l00000415"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000390: - assume {:captureState "lmain_goto_l00000390"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000390; - lmain_goto_l00000393: - assume {:captureState "lmain_goto_l00000393"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000393; - l00000396_goto_l0000039e: - assume {:captureState "l00000396_goto_l0000039e"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l0000039e; - l00000396_goto_l0000045d: - assume {:captureState "l00000396_goto_l0000045d"} true; + l000003dc: + assume {:captureState "l000003dc"} true; + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); + #6, Gamma_#6 := bvadd32(R8[32:0], 4294967292bv32), Gamma_R8; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934589bv33))), (Gamma_R8 && Gamma_#6); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967293bv33))), (Gamma_R8 && Gamma_#6); + ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; + NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; + R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; + assert Gamma_ZF; + goto l000003dc_goto_l0000040a, l000003dc_goto_l00000407; + l000003d4_goto_l00000448: + assume {:captureState "l000003d4_goto_l00000448"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l0000045d; + goto l00000448; + l0000040d_goto_l00000415: + assume {:captureState "l0000040d_goto_l00000415"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000415; l0000039e_goto_l000003ce: assume {:captureState "l0000039e_goto_l000003ce"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l000003ce; + l00000449: + assume {:captureState "l00000449"} true; + R8, Gamma_R8 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000457"} true; + goto l000003dc; + l00000448: + assume {:captureState "l00000448"} true; + goto l00000449; + l00000407: + assume {:captureState "l00000407"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000040d; l0000039e_goto_l000003d1: assume {:captureState "l0000039e_goto_l000003d1"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000003d1; - l000003d4_goto_l000003dc: - assume {:captureState "l000003d4_goto_l000003dc"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l000003dc; - l000003d4_goto_l00000448: - assume {:captureState "l000003d4_goto_l00000448"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000448; l000003dc_goto_l00000407: assume {:captureState "l000003dc_goto_l00000407"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000407; + l00000396_goto_l0000045d: + assume {:captureState "l00000396_goto_l0000045d"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000045d; + l000003d1: + assume {:captureState "l000003d1"} true; + R8, Gamma_R8 := 1bv64, true; + goto l000003d4; + l0000045d: + assume {:captureState "l0000045d"} true; + goto l0000045e; + l000003d4: + assume {:captureState "l000003d4"} true; + assert Gamma_R8; + goto l000003d4_goto_l00000448, l000003d4_goto_l000003dc; + l00000396_goto_l0000039e: + assume {:captureState "l00000396_goto_l0000039e"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000039e; + l0000039e: + assume {:captureState "l0000039e"} true; + R8, Gamma_R8 := 69632bv64, true; + call rely(); + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 52bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 52bv64)) || L(mem, bvadd64(R8, 52bv64))); + #5, Gamma_#5 := bvadd32(R8[32:0], 4294967294bv32), Gamma_R8; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#5, 1bv32)), bvadd33(sign_extend1_32(R8[32:0]), 8589934591bv33))), (Gamma_R8 && Gamma_#5); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#5, 1bv32)), bvadd33(zero_extend1_32(R8[32:0]), 4294967295bv33))), (Gamma_R8 && Gamma_#5); + ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; + NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; + R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; + assert Gamma_ZF; + goto l0000039e_goto_l000003d1, l0000039e_goto_l000003ce; + l00000390: + assume {:captureState "l00000390"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000396; + l0000045e: + assume {:captureState "l0000045e"} true; + R8, Gamma_R8 := 3bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%0000046c"} true; + goto l0000039e; + l00000396: + assume {:captureState "l00000396"} true; + assert Gamma_R8; + goto l00000396_goto_l0000045d, l00000396_goto_l0000039e; + l00000393: + assume {:captureState "l00000393"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000396; l000003dc_goto_l0000040a: assume {:captureState "l000003dc_goto_l0000040a"} true; assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l0000040a; - l0000040d_goto_l00000415: - assume {:captureState "l0000040d_goto_l00000415"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000415; + l00000415: + assume {:captureState "l00000415"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l000003ce: + assume {:captureState "l000003ce"} true; + R8, Gamma_R8 := 0bv64, true; + goto l000003d4; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + lmain_goto_l00000390: + assume {:captureState "lmain_goto_l00000390"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000390; l0000040d_goto_l0000042c: assume {:captureState "l0000040d_goto_l0000042c"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000042c; + lmain_goto_l00000393: + assume {:captureState "lmain_goto_l00000393"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000393; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected index e66bea4a0..2c5a3f4b2 100644 --- a/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected @@ -231,27 +231,51 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000ae3, lmain_goto_l00000ae0; - l00000ae3: - assume {:captureState "l00000ae3"} true; + l00000b24: + assume {:captureState "l00000b24"} true; + assert Gamma_R8; + goto l00000b24_goto_l00000b2c, l00000b24_goto_l00000b98; + l00000b2c_goto_l00000b5a: + assume {:captureState "l00000b2c_goto_l00000b5a"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000b5a; + l00000b5d: + assume {:captureState "l00000b5d"} true; + assert Gamma_R8; + goto l00000b5d_goto_l00000b65, l00000b5d_goto_l00000b7c; + l00000b5a: + assume {:captureState "l00000b5a"} true; R8, Gamma_R8 := 1bv64, true; - goto l00000ae6; - l00000ae0: - assume {:captureState "l00000ae0"} true; + goto l00000b5d; + l00000b7c: + assume {:captureState "l00000b7c"} true; + goto l00000b7d; + l00000b7d: + assume {:captureState "l00000b7d"} true; + R8, Gamma_R8 := 69632bv64, true; + call rely(); + R8, Gamma_R8 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 56bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 56bv64)) || L(mem, bvadd64(R8, 56bv64))); + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000b92"} true; + goto l00000b65; + l00000b24_goto_l00000b98: + assume {:captureState "l00000b24_goto_l00000b98"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b98; + l00000b1e: + assume {:captureState "l00000b1e"} true; R8, Gamma_R8 := 0bv64, true; - goto l00000ae6; - l00000ae6: - assume {:captureState "l00000ae6"} true; - assert Gamma_R8; - goto l00000ae6_goto_l00000aee, l00000ae6_goto_l00000bad; - l00000bad: - assume {:captureState "l00000bad"} true; - goto l00000bae; - l00000bae: - assume {:captureState "l00000bae"} true; - R8, Gamma_R8 := 3bv64, true; + goto l00000b24; + l00000b5d_goto_l00000b65: + assume {:captureState "l00000b5d_goto_l00000b65"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000b65; + l00000b99: + assume {:captureState "l00000b99"} true; + R8, Gamma_R8 := 5bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000bbc"} true; - goto l00000aee; + assume {:captureState "%00000ba7"} true; + goto l00000b2c; l00000aee: assume {:captureState "l00000aee"} true; R8, Gamma_R8 := 69632bv64, true; @@ -265,27 +289,42 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; goto l00000aee_goto_l00000b1e, l00000aee_goto_l00000b21; - l00000b21: - assume {:captureState "l00000b21"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000b24; - l00000b1e: - assume {:captureState "l00000b1e"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000b24; - l00000b24: - assume {:captureState "l00000b24"} true; - assert Gamma_R8; - goto l00000b24_goto_l00000b2c, l00000b24_goto_l00000b98; l00000b98: assume {:captureState "l00000b98"} true; goto l00000b99; - l00000b99: - assume {:captureState "l00000b99"} true; - R8, Gamma_R8 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000ba7"} true; + l00000b24_goto_l00000b2c: + assume {:captureState "l00000b24_goto_l00000b2c"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000b2c; + l00000b2c_goto_l00000b57: + assume {:captureState "l00000b2c_goto_l00000b57"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000b57; + l00000aee_goto_l00000b21: + assume {:captureState "l00000aee_goto_l00000b21"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000b21; + l00000bae: + assume {:captureState "l00000bae"} true; + R8, Gamma_R8 := 3bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); + assume {:captureState "%00000bbc"} true; + goto l00000aee; + l00000b57: + assume {:captureState "l00000b57"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000b5d; + l00000bad: + assume {:captureState "l00000bad"} true; + goto l00000bae; + l00000b5d_goto_l00000b7c: + assume {:captureState "l00000b5d_goto_l00000b7c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b7c; + l00000ae6: + assume {:captureState "l00000ae6"} true; + assert Gamma_R8; + goto l00000ae6_goto_l00000aee, l00000ae6_goto_l00000bad; l00000b2c: assume {:captureState "l00000b2c"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 4bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 4bv64)); @@ -297,80 +336,47 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; goto l00000b2c_goto_l00000b5a, l00000b2c_goto_l00000b57; - l00000b5a: - assume {:captureState "l00000b5a"} true; - R8, Gamma_R8 := 1bv64, true; - goto l00000b5d; - l00000b57: - assume {:captureState "l00000b57"} true; - R8, Gamma_R8 := 0bv64, true; - goto l00000b5d; - l00000b5d: - assume {:captureState "l00000b5d"} true; - assert Gamma_R8; - goto l00000b5d_goto_l00000b65, l00000b5d_goto_l00000b7c; - l00000b7c: - assume {:captureState "l00000b7c"} true; - goto l00000b7d; - l00000b7d: - assume {:captureState "l00000b7d"} true; - R8, Gamma_R8 := 69632bv64, true; - call rely(); - R8, Gamma_R8 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 56bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 56bv64)) || L(mem, bvadd64(R8, 56bv64))); - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 4bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 4bv64), Gamma_R8); - assume {:captureState "%00000b92"} true; - goto l00000b65; - l00000b65: - assume {:captureState "l00000b65"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); - R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; - return; - lmain_goto_l00000ae0: - assume {:captureState "lmain_goto_l00000ae0"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000ae0; - lmain_goto_l00000ae3: - assume {:captureState "lmain_goto_l00000ae3"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000ae3; l00000ae6_goto_l00000aee: assume {:captureState "l00000ae6_goto_l00000aee"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l00000aee; + l00000ae3: + assume {:captureState "l00000ae3"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000ae6; + l00000ae0: + assume {:captureState "l00000ae0"} true; + R8, Gamma_R8 := 0bv64, true; + goto l00000ae6; l00000ae6_goto_l00000bad: assume {:captureState "l00000ae6_goto_l00000bad"} true; assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000bad; + lmain_goto_l00000ae3: + assume {:captureState "lmain_goto_l00000ae3"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000ae3; l00000aee_goto_l00000b1e: assume {:captureState "l00000aee_goto_l00000b1e"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); goto l00000b1e; - l00000aee_goto_l00000b21: - assume {:captureState "l00000aee_goto_l00000b21"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000b21; - l00000b24_goto_l00000b2c: - assume {:captureState "l00000b24_goto_l00000b2c"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000b2c; - l00000b24_goto_l00000b98: - assume {:captureState "l00000b24_goto_l00000b98"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000b98; - l00000b2c_goto_l00000b57: - assume {:captureState "l00000b2c_goto_l00000b57"} true; + l00000b65: + assume {:captureState "l00000b65"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); + R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; + goto main_return; + l00000b21: + assume {:captureState "l00000b21"} true; + R8, Gamma_R8 := 1bv64, true; + goto l00000b24; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + lmain_goto_l00000ae0: + assume {:captureState "lmain_goto_l00000ae0"} true; assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000b57; - l00000b2c_goto_l00000b5a: - assume {:captureState "l00000b2c_goto_l00000b5a"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000b5a; - l00000b5d_goto_l00000b65: - assume {:captureState "l00000b5d_goto_l00000b65"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000b65; - l00000b5d_goto_l00000b7c: - assume {:captureState "l00000b5d_goto_l00000b7c"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000b7c; + goto l00000ae0; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected index b907550a3..40bee7d67 100644 --- a/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected @@ -299,27 +299,54 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; goto lmain_goto_l000003ae, lmain_goto_l000003ab; - l000003ae: - assume {:captureState "l000003ae"} true; - R8, Gamma_R8 := 1bv64, true; - goto l000003b1; - l000003ab: - assume {:captureState "l000003ab"} true; - R8, Gamma_R8 := 0bv64, true; - goto l000003b1; - l000003b1: - assume {:captureState "l000003b1"} true; - assert Gamma_R8; - goto l000003b1_goto_l000003b9, l000003b1_goto_l00000481; + l000003b1_goto_l000003b9: + assume {:captureState "l000003b1_goto_l000003b9"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000003b9; l00000481: assume {:captureState "l00000481"} true; goto l00000482; + l0000042a_goto_l00000432: + assume {:captureState "l0000042a_goto_l00000432"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000432; l00000482: assume {:captureState "l00000482"} true; R8, Gamma_R8 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 20bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 20bv64), Gamma_R8); assume {:captureState "%00000490"} true; goto l000003b9; + l000003b9_goto_l000003eb: + assume {:captureState "l000003b9_goto_l000003eb"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003eb; + l00000449: + assume {:captureState "l00000449"} true; + goto l0000044a; + l00000427: + assume {:captureState "l00000427"} true; + R8, Gamma_R8 := 1bv64, true; + goto l0000042a; + l000003f1_goto_l0000046c: + assume {:captureState "l000003f1_goto_l0000046c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000046c; + l000003b9_goto_l000003ee: + assume {:captureState "l000003b9_goto_l000003ee"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003ee; + l00000424: + assume {:captureState "l00000424"} true; + R8, Gamma_R8 := 0bv64, true; + goto l0000042a; + l000003b1: + assume {:captureState "l000003b1"} true; + assert Gamma_R8; + goto l000003b1_goto_l000003b9, l000003b1_goto_l00000481; + l000003f1: + assume {:captureState "l000003f1"} true; + assert Gamma_R8; + goto l000003f1_goto_l000003f9, l000003f1_goto_l0000046c; l000003b9: assume {:captureState "l000003b9"} true; R8, Gamma_R8 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); @@ -333,27 +360,14 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; goto l000003b9_goto_l000003eb, l000003b9_goto_l000003ee; - l000003ee: - assume {:captureState "l000003ee"} true; - R8, Gamma_R8 := 1bv64, true; - goto l000003f1; - l000003eb: - assume {:captureState "l000003eb"} true; - R8, Gamma_R8 := 0bv64, true; - goto l000003f1; - l000003f1: - assume {:captureState "l000003f1"} true; - assert Gamma_R8; - goto l000003f1_goto_l000003f9, l000003f1_goto_l0000046c; - l0000046c: - assume {:captureState "l0000046c"} true; - goto l0000046d; - l0000046d: - assume {:captureState "l0000046d"} true; - R8, Gamma_R8 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 20bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 20bv64), Gamma_R8); - assume {:captureState "%0000047b"} true; - goto l000003f9; + l000003b1_goto_l00000481: + assume {:captureState "l000003b1_goto_l00000481"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000481; + l0000042a_goto_l00000449: + assume {:captureState "l0000042a_goto_l00000449"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000449; l000003f9: assume {:captureState "l000003f9"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 20bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 20bv64)); @@ -365,21 +379,46 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; goto l000003f9_goto_l00000424, l000003f9_goto_l00000427; - l00000427: - assume {:captureState "l00000427"} true; + lmain_goto_l000003ae: + assume {:captureState "lmain_goto_l000003ae"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003ae; + l000003eb: + assume {:captureState "l000003eb"} true; + R8, Gamma_R8 := 0bv64, true; + goto l000003f1; + l000003ee: + assume {:captureState "l000003ee"} true; R8, Gamma_R8 := 1bv64, true; - goto l0000042a; - l00000424: - assume {:captureState "l00000424"} true; + goto l000003f1; + l00000432: + assume {:captureState "l00000432"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + l000003f9_goto_l00000424: + assume {:captureState "l000003f9_goto_l00000424"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000424; + l000003ab: + assume {:captureState "l000003ab"} true; R8, Gamma_R8 := 0bv64, true; - goto l0000042a; - l0000042a: - assume {:captureState "l0000042a"} true; - assert Gamma_R8; - goto l0000042a_goto_l00000449, l0000042a_goto_l00000432; - l00000449: - assume {:captureState "l00000449"} true; - goto l0000044a; + goto l000003b1; + l000003ae: + assume {:captureState "l000003ae"} true; + R8, Gamma_R8 := 1bv64, true; + goto l000003b1; + l000003f9_goto_l00000427: + assume {:captureState "l000003f9_goto_l00000427"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000427; + lmain_goto_l000003ab: + assume {:captureState "lmain_goto_l000003ab"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003ab; + l0000046c: + assume {:captureState "l0000046c"} true; + goto l0000046d; l0000044a: assume {:captureState "l0000044a"} true; R8, Gamma_R8 := 65536bv64, true; @@ -390,57 +429,24 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 20bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 20bv64), Gamma_R8); assume {:captureState "%00000466"} true; goto l00000432; - l00000432: - assume {:captureState "l00000432"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l000003ab: - assume {:captureState "lmain_goto_l000003ab"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000003ab; - lmain_goto_l000003ae: - assume {:captureState "lmain_goto_l000003ae"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000003ae; - l000003b1_goto_l000003b9: - assume {:captureState "l000003b1_goto_l000003b9"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l000003b9; - l000003b1_goto_l00000481: - assume {:captureState "l000003b1_goto_l00000481"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000481; - l000003b9_goto_l000003eb: - assume {:captureState "l000003b9_goto_l000003eb"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l000003eb; - l000003b9_goto_l000003ee: - assume {:captureState "l000003b9_goto_l000003ee"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l000003ee; l000003f1_goto_l000003f9: assume {:captureState "l000003f1_goto_l000003f9"} true; assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); goto l000003f9; - l000003f1_goto_l0000046c: - assume {:captureState "l000003f1_goto_l0000046c"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l0000046c; - l000003f9_goto_l00000424: - assume {:captureState "l000003f9_goto_l00000424"} true; - assume (bvcomp1(ZF, 1bv1) != 0bv1); - goto l00000424; - l000003f9_goto_l00000427: - assume {:captureState "l000003f9_goto_l00000427"} true; - assume (bvcomp1(ZF, 1bv1) == 0bv1); - goto l00000427; - l0000042a_goto_l00000432: - assume {:captureState "l0000042a_goto_l00000432"} true; - assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); - goto l00000432; - l0000042a_goto_l00000449: - assume {:captureState "l0000042a_goto_l00000449"} true; - assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); - goto l00000449; + l0000042a: + assume {:captureState "l0000042a"} true; + assert Gamma_R8; + goto l0000042a_goto_l00000449, l0000042a_goto_l00000432; + l0000046d: + assume {:captureState "l0000046d"} true; + R8, Gamma_R8 := 5bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 20bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 20bv64), Gamma_R8); + assume {:captureState "%0000047b"} true; + goto l000003f9; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected index b04c26305..f3485a5ed 100644 --- a/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected @@ -229,12 +229,24 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000414, lmain_goto_l00000381; - l00000414: - assume {:captureState "l00000414"} true; - R0, Gamma_R0 := 3bv64, true; + l000003d8: + assume {:captureState "l000003d8"} true; + R0, Gamma_R0 := 0bv64, true; + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + lmain_goto_l00000414: + assume {:captureState "lmain_goto_l00000414"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000414; + l000003ed: + assume {:captureState "l000003ed"} true; + R0, Gamma_R0 := 69632bv64, true; + R0, Gamma_R0 := bvadd64(R0, 24bv64), Gamma_R0; + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%0000041f"} true; - goto l00000381; + assume {:captureState "%00000405"} true; + goto l000003d8; l00000381: assume {:captureState "l00000381"} true; R0, Gamma_R0 := 69632bv64, true; @@ -248,12 +260,26 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto l00000381_goto_l000003b2, l00000381_goto_l00000407; + l000003b2_goto_l000003ed: + assume {:captureState "l000003b2_goto_l000003ed"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000003ed; l00000407: assume {:captureState "l00000407"} true; R0, Gamma_R0 := 5bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); assume {:captureState "%00000412"} true; goto l000003b2; + l00000414: + assume {:captureState "l00000414"} true; + R0, Gamma_R0 := 3bv64, true; + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); + assume {:captureState "%0000041f"} true; + goto l00000381; + l00000381_goto_l000003b2: + assume {:captureState "l00000381_goto_l000003b2"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000003b2; l000003b2: assume {:captureState "l000003b2"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -264,42 +290,22 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; goto l000003b2_goto_l000003d8, l000003b2_goto_l000003ed; - l000003ed: - assume {:captureState "l000003ed"} true; - R0, Gamma_R0 := 69632bv64, true; - R0, Gamma_R0 := bvadd64(R0, 24bv64), Gamma_R0; - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%00000405"} true; - goto l000003d8; - l000003d8: - assume {:captureState "l000003d8"} true; - R0, Gamma_R0 := 0bv64, true; - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l00000381: - assume {:captureState "lmain_goto_l00000381"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000381; - lmain_goto_l00000414: - assume {:captureState "lmain_goto_l00000414"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000414; - l00000381_goto_l000003b2: - assume {:captureState "l00000381_goto_l000003b2"} true; + l000003b2_goto_l000003d8: + assume {:captureState "l000003b2_goto_l000003d8"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l000003b2; + goto l000003d8; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000381_goto_l00000407: assume {:captureState "l00000381_goto_l00000407"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000407; - l000003b2_goto_l000003d8: - assume {:captureState "l000003b2_goto_l000003d8"} true; + lmain_goto_l00000381: + assume {:captureState "lmain_goto_l00000381"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l000003d8; - l000003b2_goto_l000003ed: - assume {:captureState "l000003b2_goto_l000003ed"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l000003ed; + goto l00000381; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected index 805a86bd5..57f035e0f 100644 --- a/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected @@ -229,6 +229,40 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000b0c, lmain_goto_l00000a79; + l00000aaa_goto_l00000ae5: + assume {:captureState "l00000aaa_goto_l00000ae5"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000ae5; + lmain_goto_l00000a79: + assume {:captureState "lmain_goto_l00000a79"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a79; + l00000a79_goto_l00000aaa: + assume {:captureState "l00000a79_goto_l00000aaa"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000aaa; + l00000a79_goto_l00000aff: + assume {:captureState "l00000a79_goto_l00000aff"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000aff; + l00000ae5: + assume {:captureState "l00000ae5"} true; + R0, Gamma_R0 := 69632bv64, true; + R0, Gamma_R0 := bvadd64(R0, 24bv64), Gamma_R0; + call rely(); + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); + assume {:captureState "%00000afd"} true; + goto l00000ad0; + l00000ad0: + assume {:captureState "l00000ad0"} true; + R0, Gamma_R0 := 0bv64, true; + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + lmain_goto_l00000b0c: + assume {:captureState "lmain_goto_l00000b0c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000b0c; l00000b0c: assume {:captureState "l00000b0c"} true; R0, Gamma_R0 := 3bv64, true; @@ -248,12 +282,6 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto l00000a79_goto_l00000aaa, l00000a79_goto_l00000aff; - l00000aff: - assume {:captureState "l00000aff"} true; - R0, Gamma_R0 := 5bv64, true; - stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%00000b0a"} true; - goto l00000aaa; l00000aaa: assume {:captureState "l00000aaa"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -264,42 +292,20 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; goto l00000aaa_goto_l00000ae5, l00000aaa_goto_l00000ad0; - l00000ae5: - assume {:captureState "l00000ae5"} true; - R0, Gamma_R0 := 69632bv64, true; - R0, Gamma_R0 := bvadd64(R0, 24bv64), Gamma_R0; - call rely(); - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); + l00000aff: + assume {:captureState "l00000aff"} true; + R0, Gamma_R0 := 5bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%00000afd"} true; - goto l00000ad0; - l00000ad0: - assume {:captureState "l00000ad0"} true; - R0, Gamma_R0 := 0bv64, true; - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; - return; - lmain_goto_l00000a79: - assume {:captureState "lmain_goto_l00000a79"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000a79; - lmain_goto_l00000b0c: - assume {:captureState "lmain_goto_l00000b0c"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000b0c; - l00000a79_goto_l00000aaa: - assume {:captureState "l00000a79_goto_l00000aaa"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + assume {:captureState "%00000b0a"} true; goto l00000aaa; - l00000a79_goto_l00000aff: - assume {:captureState "l00000a79_goto_l00000aff"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000aff; + terminate: + assume {:captureState "terminate"} true; + goto terminate; l00000aaa_goto_l00000ad0: assume {:captureState "l00000aaa_goto_l00000ad0"} true; assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); goto l00000ad0; - l00000aaa_goto_l00000ae5: - assume {:captureState "l00000aaa_goto_l00000ae5"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000ae5; + main_return: + assume {:captureState "main_return"} true; + return; } diff --git a/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected index df2ded000..16f293b4a 100644 --- a/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected @@ -287,12 +287,43 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; goto lmain_goto_l00000383, lmain_goto_l00000418; - l00000418: - assume {:captureState "l00000418"} true; - R0, Gamma_R0 := 3bv64, true; + l000003b5: + assume {:captureState "l000003b5"} true; + R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); + #6, Gamma_#6 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; + VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#6); + CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#6); + ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; + NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; + assert Gamma_ZF; + goto l000003b5_goto_l000003f0, l000003b5_goto_l000003db; + l0000040b: + assume {:captureState "l0000040b"} true; + R0, Gamma_R0 := 5bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%00000423"} true; - goto l00000383; + assume {:captureState "%00000416"} true; + goto l000003b5; + l000003b5_goto_l000003f0: + assume {:captureState "l000003b5_goto_l000003f0"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000003f0; + l000003db: + assume {:captureState "l000003db"} true; + R0, Gamma_R0 := 0bv64, true; + R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + goto main_return; + l00000383_goto_l0000040b: + assume {:captureState "l00000383_goto_l0000040b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000040b; + l00000383_goto_l000003b5: + assume {:captureState "l00000383_goto_l000003b5"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000003b5; + lmain_goto_l00000418: + assume {:captureState "lmain_goto_l00000418"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000418; l00000383: assume {:captureState "l00000383"} true; R0, Gamma_R0 := 65536bv64, true; @@ -307,22 +338,23 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; goto l00000383_goto_l0000040b, l00000383_goto_l000003b5; - l0000040b: - assume {:captureState "l0000040b"} true; - R0, Gamma_R0 := 5bv64, true; + lmain_goto_l00000383: + assume {:captureState "lmain_goto_l00000383"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000383; + l00000418: + assume {:captureState "l00000418"} true; + R0, Gamma_R0 := 3bv64, true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); - assume {:captureState "%00000416"} true; - goto l000003b5; - l000003b5: - assume {:captureState "l000003b5"} true; - R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); - #6, Gamma_#6 := bvadd32(R0[32:0], 4294967292bv32), Gamma_R0; - VF, Gamma_VF := bvnot1(bvcomp33(sign_extend1_32(bvadd32(#6, 1bv32)), bvadd33(sign_extend1_32(R0[32:0]), 8589934589bv33))), (Gamma_R0 && Gamma_#6); - CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#6); - ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; - NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert Gamma_ZF; - goto l000003b5_goto_l000003f0, l000003b5_goto_l000003db; + assume {:captureState "%00000423"} true; + goto l00000383; + terminate: + assume {:captureState "terminate"} true; + goto terminate; + l000003b5_goto_l000003db: + assume {:captureState "l000003b5_goto_l000003db"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000003db; l000003f0: assume {:captureState "l000003f0"} true; R0, Gamma_R0 := 65536bv64, true; @@ -333,33 +365,7 @@ procedure main() stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 28bv64), R0[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 28bv64), Gamma_R0); assume {:captureState "%00000409"} true; goto l000003db; - l000003db: - assume {:captureState "l000003db"} true; - R0, Gamma_R0 := 0bv64, true; - R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; + main_return: + assume {:captureState "main_return"} true; return; - lmain_goto_l00000383: - assume {:captureState "lmain_goto_l00000383"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l00000383; - lmain_goto_l00000418: - assume {:captureState "lmain_goto_l00000418"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l00000418; - l00000383_goto_l000003b5: - assume {:captureState "l00000383_goto_l000003b5"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l000003b5; - l00000383_goto_l0000040b: - assume {:captureState "l00000383_goto_l0000040b"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l0000040b; - l000003b5_goto_l000003db: - assume {:captureState "l000003b5_goto_l000003db"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); - goto l000003db; - l000003b5_goto_l000003f0: - assume {:captureState "l000003b5_goto_l000003f0"} true; - assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); - goto l000003f0; }