-
Notifications
You must be signed in to change notification settings - Fork 273
Check all properties with property option #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
peterschrammel
wants to merge
5
commits into
diffblue:master
from
peterschrammel:do-all-properties-with-property-option
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1636f42
line terminators
601db02
merge line terminators
5172a7e
Merge branch 'master' of github.com:diffblue/cbmc into master
peterschrammel cb6c188
check all properties if multiple --property p options present on comm…
peterschrammel cdd7ac6
allow comma-separated list of properties with --property option
peterschrammel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
int main () { | ||
int x, y; | ||
__CPROVER_assume(x>=100 && y<=1000 & x>y+2); | ||
x--; | ||
assert(x>y); | ||
x--; | ||
assert(x>y); | ||
x--; | ||
assert(x>y); | ||
y=0; | ||
assert(x>y); | ||
|
||
return 0; | ||
} |
This file contains hidden or 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,10 @@ | ||
CORE | ||
main.c | ||
--property main.assertion.1 --property main.assertion.3 | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILED | ||
^.*main.assertion.1.*SUCCESS | ||
^.*main.assertion.3.*FAILURE | ||
-- | ||
^warning: ignoring |
This file contains hidden or 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 @@ | ||
int main () { | ||
int x, y; | ||
__CPROVER_assume(x>=100 && y<=1000 & x>y+2); | ||
x--; | ||
assert(x>y); | ||
x--; | ||
assert(x>y); | ||
x--; | ||
assert(x>y); | ||
y=0; | ||
assert(x>y); | ||
|
||
return 0; | ||
} |
This file contains hidden or 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 @@ | ||
CORE | ||
main.c | ||
--property main.assertion.1,main.assertion.3,main.assertion.4 | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILED | ||
^.*main.assertion.1.*SUCCESS | ||
^.*main.assertion.3.*FAILURE | ||
^.*main.assertion.4.*SUCCESS | ||
-- | ||
^warning: ignoring |
This file contains hidden or 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 @@ | ||
int main () { | ||
int x, y; | ||
__CPROVER_assume(x>=100 && y<=1000 & x>y+2); | ||
x--; | ||
assert(x>y); | ||
x--; | ||
assert(x>y); | ||
x--; | ||
assert(x>y); | ||
y=0; | ||
assert(x>y); | ||
|
||
return 0; | ||
} |
This file contains hidden or 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 @@ | ||
CORE | ||
main.c | ||
--property main.assertion.3 | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILED | ||
^.*main.assertion.3.*FAILURE | ||
-- | ||
^warning: ignoring |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -220,6 +220,38 @@ const std::list<std::string>& cmdlinet::get_values(const std::string &option) co | |
|
||
/*******************************************************************\ | ||
|
||
Function: cmdlinet::get_comma_separated_values | ||
|
||
Inputs: | ||
|
||
Outputs: | ||
|
||
Purpose: | ||
|
||
\*******************************************************************/ | ||
|
||
const std::list<std::string> cmdlinet::get_comma_separated_values( | ||
const std::string &option) const | ||
{ | ||
int i=getoptnr(option); | ||
assert(i>=0); | ||
std::list<std::string> values; | ||
for(const auto &value : options[i].values) | ||
{ | ||
std::string::size_type length=value.length(); | ||
for(std::string::size_type idx=0; idx<length; idx++) | ||
{ | ||
std::string::size_type next=value.find(",", idx); | ||
values.push_back(value.substr(idx, next-idx)); | ||
if(next==std::string::npos) break; | ||
idx=next; | ||
} | ||
} | ||
return values; | ||
} | ||
|
||
/*******************************************************************\ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We meanwhile have |
||
Function: cmdlinet::getoptnr | ||
|
||
Inputs: | ||
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update code formatting.