Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cortex-m-rtfm-klee
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Samuel Karlsson
cortex-m-rtfm-klee
Commits
27797ebf
Commit
27797ebf
authored
7 years ago
by
Per
Browse files
Options
Downloads
Patches
Plain Diff
simply chaos
parent
28b88b09
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
klee/src/lib.rs
+11
-28
11 additions, 28 deletions
klee/src/lib.rs
with
11 additions
and
28 deletions
klee/src/lib.rs
+
11
−
28
View file @
27797ebf
...
@@ -7,7 +7,7 @@ extern crate cstr_core;
...
@@ -7,7 +7,7 @@ extern crate cstr_core;
extern
crate
cty
;
extern
crate
cty
;
// mod lang_items;
// mod lang_items;
pub
mod
ll
;
mod
ll
;
use
core
::
mem
;
use
core
::
mem
;
...
@@ -42,7 +42,7 @@ pub fn k_mk_symbol<T>(t: &mut T, name: &CStr) {
...
@@ -42,7 +42,7 @@ pub fn k_mk_symbol<T>(t: &mut T, name: &CStr) {
}
}
}
}
#[inline(
always
)]
#[inline(
never
)]
pub
fn
k_abort
()
->
!
{
pub
fn
k_abort
()
->
!
{
unsafe
{
unsafe
{
ll
::
abort
();
ll
::
abort
();
...
@@ -50,7 +50,7 @@ pub fn k_abort() -> ! {
...
@@ -50,7 +50,7 @@ pub fn k_abort() -> ! {
}
}
/// assume a condition involving symbolic variables
/// assume a condition involving symbolic variables
#[inline(
always
)]
#[inline(
never
)]
pub
fn
k_assume
(
cond
:
bool
)
{
pub
fn
k_assume
(
cond
:
bool
)
{
unsafe
{
unsafe
{
ll
::
klee_assume
(
cond
);
ll
::
klee_assume
(
cond
);
...
@@ -58,12 +58,10 @@ pub fn k_assume(cond: bool) {
...
@@ -58,12 +58,10 @@ pub fn k_assume(cond: bool) {
}
}
/// assert a condition involving symbolic variables
/// assert a condition involving symbolic variables
#[inline(
always
)]
#[inline(
never
)]
pub
fn
k_assert
(
e
:
bool
)
{
pub
fn
k_assert
(
e
:
bool
)
{
if
!
e
{
if
!
e
{
unsafe
{
k_abort
();
ll
::
abort
();
}
}
}
}
}
...
@@ -82,21 +80,6 @@ macro_rules! k_symbol {
...
@@ -82,21 +80,6 @@ macro_rules! k_symbol {
}
}
}
}
/// assertion
#[macro_export]
macro_rules!
k_assert
{
(
$e
:
expr
)
=>
{
{
use
klee
::
ll
;
if
!
$e
{
unsafe
{
ll
::
abort
();
}
}
}
}
}
#[macro_export]
#[macro_export]
macro_rules!
k_visit
{
macro_rules!
k_visit
{
()
=>
{
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment