-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1545 from GaloisInc/heapster/sawLet
[Heapster] Don't use Coq let-bindings in Heapster specs
- Loading branch information
Showing
19 changed files
with
277 additions
and
183 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
Binary file not shown.
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,23 @@ | ||
#include <stdlib.h> | ||
#include <stdint.h> | ||
|
||
#define op(x,y) x ^ (y << 1) | ||
|
||
int64_t exp_explosion(int64_t x0) { | ||
int64_t x1 = op(x0, x0); | ||
int64_t x2 = op(x1, x1); | ||
int64_t x3 = op(x2, x2); | ||
int64_t x4 = op(x3, x3); | ||
int64_t x5 = op(x4, x4); | ||
int64_t x6 = op(x5, x5); | ||
int64_t x7 = op(x6, x6); | ||
int64_t x8 = op(x7, x7); | ||
int64_t x9 = op(x8, x8); | ||
int64_t x10 = op(x9, x9); | ||
int64_t x11 = op(x10, x10); | ||
int64_t x12 = op(x11, x11); | ||
int64_t x13 = op(x12, x12); | ||
int64_t x14 = op(x13, x13); | ||
int64_t x15 = op(x14, x14); | ||
return x15; | ||
} |
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,9 @@ | ||
enable_experimental; | ||
env <- heapster_init_env "exp_explosion" "exp_explosion.bc"; | ||
|
||
heapster_define_perm env "int64" " " "llvmptr 64" "exists x:bv 64.eq(llvmword(x))"; | ||
|
||
heapster_typecheck_fun env "exp_explosion" | ||
"(). arg0:int64<> -o arg0:int64<>, ret:int64<>"; | ||
|
||
heapster_export_coq env "exp_explosion_gen.v"; |
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,20 @@ | ||
From Coq Require Import Lists.List. | ||
From Coq Require Import String. | ||
From Coq Require Import Vectors.Vector. | ||
From CryptolToCoq Require Import SAWCoreScaffolding. | ||
From CryptolToCoq Require Import SAWCoreVectorsAsCoqVectors. | ||
From CryptolToCoq Require Import SAWCoreBitvectors. | ||
|
||
From CryptolToCoq Require Import SAWCorePrelude. | ||
From CryptolToCoq Require Import CompMExtra. | ||
|
||
Require Import Examples.exp_explosion_gen. | ||
Import exp_explosion. | ||
|
||
Import SAWCorePrelude. | ||
|
||
Lemma no_errors_explosion : refinesFun exp_explosion (fun _ => noErrorsSpec). | ||
Proof. | ||
unfold exp_explosion, exp_explosion__tuple_fun, noErrorsSpec. | ||
time "no_errors_exp_explosion" prove_refinement. | ||
Qed. |
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
Binary file not shown.
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
Oops, something went wrong.