-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a test for concolic global sharing, written by @filipeom
- Loading branch information
1 parent
8327c97
commit b06034e
Showing
3 changed files
with
29 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
(cram | ||
(deps %{bin:owi} immediately_fail.wat)) | ||
(deps %{bin:owi} global_sharing.wat immediately_fail.wat)) |
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,2 @@ | ||
$ owi conc global_sharing.wat | ||
OK |
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,26 @@ | ||
;; Loads symbolic memory in various iterations | ||
(module | ||
(import "symbolic" "i32_symbol" (func $i32 (result i32))) | ||
(import "symbolic" "assert" (func $assert (param i32))) | ||
|
||
(func $test_globals (param i32) | ||
(global.get 0) | ||
(i32.const 2) | ||
(i32.sub) | ||
(global.set 0) | ||
(global.get 0) | ||
(local.get 0) | ||
(i32.eq) | ||
(call $assert)) | ||
|
||
(func $main | ||
(i32.const 40) | ||
(call $test_globals) | ||
(if (i32.eq (call $i32) (i32.const 0)) | ||
(then | ||
(i32.const 38) | ||
(call $test_globals)))) | ||
(memory $0 1) | ||
(global $0 (mut i32) (i32.const 42)) | ||
(export "main" (func $main)) | ||
(start $main)) |