-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
70 changed files
with
3,067 additions
and
1,204 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
Z3_VERSION=4.8.8 | ||
CVC4_VERSION=1.8 | ||
YICES2_VERSION=2.6.2 | ||
BOOGIE_VERSION=2.7.15 | ||
CORRAL_VERSION=1.0.12 | ||
SYMBOOGLIX_COMMIT=ccb2e7f2b3 | ||
LOCKPWN_COMMIT=12ba58f1ec | ||
LLVM_SHORT_VERSION=10 | ||
LLVM_FULL_VERSION=10.0.1 | ||
RUST_VERSION=2020-08-23 | ||
Z3_VERSION="4.8.9" | ||
CVC4_VERSION="1.8" | ||
YICES2_VERSION="2.6.2" | ||
BOOGIE_VERSION="2.7.30" | ||
CORRAL_VERSION="1.0.14" | ||
SYMBOOGLIX_COMMIT="ccb2e7f2b3" | ||
LOCKPWN_COMMIT="12ba58f1ec" | ||
LLVM_SHORT_VERSION="10" | ||
LLVM_FULL_VERSION="10.0.1" | ||
RUST_VERSION="nightly-2020-08-23" |
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 @@ | ||
[build] | ||
rustflags = ["-A", "unused-imports", "-C", "opt-level=0", "-g", "--cfg", "verifier=\"smack\"", "--emit=llvm-ir"] |
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,3 @@ | ||
/target | ||
**/*.rs.bk | ||
Cargo.lock |
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,14 @@ | ||
[package] | ||
name = "rust-cargo" | ||
version = "0.1.0" | ||
authors = ["Shaobo He <[email protected]>"] | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
smack = { path = "/usr/local/share/smack/lib" } | ||
|
||
[profile.dev] | ||
incremental=false | ||
|
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,11 @@ | ||
#[macro_use] | ||
extern crate smack; | ||
use smack::*; | ||
|
||
// @expect error | ||
|
||
fn main() { | ||
let a: u32 = 2.verifier_nondet(); | ||
let b: u32 = 3.verifier_nondet(); | ||
smack::assert!(a + b != 5); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// This file is distributed under the MIT License. See LICENSE for details. | ||
// | ||
#ifndef REWRITEBITWISEOPS_H | ||
#define REWRITEBITWISEOPS_H | ||
|
||
#include "llvm/IR/Module.h" | ||
#include "llvm/Pass.h" | ||
|
||
namespace smack { | ||
|
||
class RewriteBitwiseOps : public llvm::ModulePass { | ||
public: | ||
static char ID; // Pass identification, replacement for typeid | ||
RewriteBitwiseOps() : llvm::ModulePass(ID) {} | ||
virtual llvm::StringRef getPassName() const; | ||
virtual bool runOnModule(llvm::Module &m); | ||
}; | ||
} // namespace smack | ||
|
||
#endif // REWRITEBITWISEOPS_H |
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 @@ | ||
// | ||
// This file is distributed under the MIT License. See LICENSE for details. | ||
// | ||
|
||
#ifndef RUSTFIXES_H | ||
#define RUSTFIXES_H | ||
|
||
#include "llvm/IR/Instructions.h" | ||
#include "llvm/IR/Module.h" | ||
#include "llvm/Pass.h" | ||
|
||
namespace smack { | ||
|
||
class RustFixes : public llvm::ModulePass { | ||
public: | ||
static char ID; // Pass identification, replacement for typeid | ||
RustFixes() : llvm::ModulePass(ID) {} | ||
virtual llvm::StringRef getPassName() const; | ||
virtual bool runOnModule(llvm::Module &m); | ||
}; | ||
} // namespace smack | ||
|
||
#endif // RUSTFIXES_H |
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.