-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into function-summaries
# Conflicts: # src/test/scala/SystemTests.scala
- Loading branch information
Showing
424 changed files
with
100,584 additions
and
14,312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
src/test/correct/arrays_simple/clang/arrays_simple_gtirb.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
var {:extern} Gamma_R0: bool; | ||
var {:extern} Gamma_R31: bool; | ||
var {:extern} Gamma_R8: bool; | ||
var {:extern} Gamma_mem: [bv64]bool; | ||
var {:extern} Gamma_stack: [bv64]bool; | ||
var {:extern} R0: bv64; | ||
var {:extern} R31: bv64; | ||
var {:extern} R8: bv64; | ||
var {:extern} mem: [bv64]bv8; | ||
var {:extern} stack: [bv64]bv8; | ||
const {:extern} $_IO_stdin_used_addr: bv64; | ||
axiom ($_IO_stdin_used_addr == 1872bv64); | ||
function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); | ||
function {:extern} gamma_load32(gammaMap: [bv64]bool, index: bv64) returns (bool) { | ||
(gammaMap[bvadd64(index, 3bv64)] && (gammaMap[bvadd64(index, 2bv64)] && (gammaMap[bvadd64(index, 1bv64)] && gammaMap[index]))) | ||
} | ||
|
||
function {:extern} gamma_store32(gammaMap: [bv64]bool, index: bv64, value: bool) returns ([bv64]bool) { | ||
gammaMap[index := value][bvadd64(index, 1bv64) := value][bvadd64(index, 2bv64) := value][bvadd64(index, 3bv64) := value] | ||
} | ||
|
||
function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv32) { | ||
(memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) | ||
} | ||
|
||
function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { | ||
(memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) | ||
} | ||
|
||
function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { | ||
memory[index] | ||
} | ||
|
||
function {:extern} memory_store32_le(memory: [bv64]bv8, index: bv64, value: bv32) returns ([bv64]bv8) { | ||
memory[index := value[8:0]][bvadd64(index, 1bv64) := value[16:8]][bvadd64(index, 2bv64) := value[24:16]][bvadd64(index, 3bv64) := value[32:24]] | ||
} | ||
|
||
function {:extern} {:bvbuiltin "zero_extend 32"} zero_extend32_32(bv32) returns (bv64); | ||
procedure {:extern} rely(); | ||
modifies Gamma_mem, mem; | ||
ensures (mem == old(mem)); | ||
ensures (Gamma_mem == old(Gamma_mem)); | ||
free ensures (memory_load8_le(mem, 1872bv64) == 1bv8); | ||
free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); | ||
free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); | ||
free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); | ||
free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); | ||
free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); | ||
free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); | ||
free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); | ||
|
||
procedure {:extern} rely_transitive(); | ||
modifies Gamma_mem, mem; | ||
ensures (mem == old(mem)); | ||
ensures (Gamma_mem == old(Gamma_mem)); | ||
|
||
implementation {:extern} rely_transitive() | ||
{ | ||
call rely(); | ||
call rely(); | ||
} | ||
|
||
procedure {:extern} rely_reflexive(); | ||
|
||
procedure {:extern} guarantee_reflexive(); | ||
modifies Gamma_mem, mem; | ||
|
||
procedure main(); | ||
modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; | ||
free requires (memory_load64_le(mem, 69664bv64) == 0bv64); | ||
free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); | ||
free requires (memory_load8_le(mem, 1872bv64) == 1bv8); | ||
free requires (memory_load8_le(mem, 1873bv64) == 0bv8); | ||
free requires (memory_load8_le(mem, 1874bv64) == 2bv8); | ||
free requires (memory_load8_le(mem, 1875bv64) == 0bv8); | ||
free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); | ||
free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); | ||
free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); | ||
free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); | ||
free ensures (Gamma_R31 == old(Gamma_R31)); | ||
free ensures (R31 == old(R31)); | ||
free ensures (memory_load8_le(mem, 1872bv64) == 1bv8); | ||
free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); | ||
free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); | ||
free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); | ||
free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); | ||
free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); | ||
free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); | ||
free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); | ||
|
||
implementation main() | ||
{ | ||
$main$__0__$hLpmd_ERQq2v3Sj7g4WZPA: | ||
assume {:captureState "$main$__0__$hLpmd_ERQq2v3Sj7g4WZPA"} true; | ||
R31, Gamma_R31 := bvadd64(R31, 18446744073709551584bv64), Gamma_R31; | ||
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 "1820$0"} true; | ||
R8, Gamma_R8 := 7bv64, 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 "1828$0"} true; | ||
R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 20bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 20bv64)); | ||
stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 8bv64), R8[32:0]), gamma_store32(Gamma_stack, bvadd64(R31, 8bv64), Gamma_R8); | ||
assume {:captureState "1836$0"} true; | ||
R0, Gamma_R0 := 0bv64, true; | ||
R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; | ||
goto main_basil_return; | ||
main_basil_return: | ||
assume {:captureState "main_basil_return"} true; | ||
return; | ||
} | ||
|
Oops, something went wrong.