-
Notifications
You must be signed in to change notification settings - Fork 84
Linear Two Variable Equality Domain Refining Value Domain #1635
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
Draft
DrMichaelPetter
wants to merge
13
commits into
master
Choose a base branch
from
affineeq-refine
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c078c2a
rough outline of refinement
DrMichaelPetter b5414a5
Merge branch 'master' into affineeq-refine
DrMichaelPetter f949136
cleanup tracing
DrMichaelPetter 54595bd
new ways to spot unreachable code
DrMichaelPetter 6bd7861
emit only non-negative refinementconstraints
DrMichaelPetter 18effef
Merge branch 'master' into affineeq-refine
DrMichaelPetter ba198c9
wrong test condition
DrMichaelPetter beece1d
Merge branch 'master' into affineeq-refine
DrMichaelPetter b2b3519
of course add lin2vareq here
DrMichaelPetter f7666fd
ctx -> man
DrMichaelPetter cb92439
Merge branch 'master' into affineeq-refine
DrMichaelPetter 0a9f46d
more regression
DrMichaelPetter e9100c6
duplicate regression test
DrMichaelPetter 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
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 |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| //SKIP PARAM: --enable ana.int.interval --set ana.activated[+] lin2vareq --set sem.int.signed_overflow assume_none | ||
| // initial test for interval-refinement by lin2vareq | ||
|
|
||
| #include <goblint.h> | ||
|
|
||
| void main() { | ||
| int a; | ||
| int b = -7*a+3; | ||
| int c = -5*a+5; | ||
| int d = 13*a+11; | ||
| int e = a; | ||
|
|
||
| if (b < 5){ // a < 1 | ||
|
|
||
| __goblint_check(1 == 1); //SUCCESS | ||
| __goblint_check(a > -1); //SUCCESS | ||
| __goblint_check(c < 7); //SUCCESS | ||
| __goblint_check(d > 8); //SUCCESS | ||
| __goblint_check(e > -1); //SUCCESS | ||
|
|
||
| if (a < 1){ | ||
|
|
||
| __goblint_check(1 == 1); //SUCCESS | ||
|
|
||
| // for invariants that solely depend on the reference variable without a factor, we get: | ||
| // short node: 2linvar does not know this, we get this from the interval domain | ||
| __goblint_check(a == 0); //SUCCESS | ||
| __goblint_check(e == 0); //SUCCESS | ||
|
|
||
| // TODO: a==0 is not fed back to 2linvar, | ||
| // thus 2linvar can not infer abcde being constant | ||
|
|
||
| // for all the others, we can not infer their constant value | ||
| __goblint_check(b > -4); //SUCCESS | ||
| __goblint_check(c > 0); //SUCCESS | ||
| __goblint_check(d < 24); //SUCCESS | ||
|
|
||
| // in theory, if we knew about a being constant, we could infer the following: | ||
| __goblint_check(b == 3); //UNKNOWN | ||
| __goblint_check(c == 5); //UNKNOWN | ||
| __goblint_check(d ==11); //UNKNOWN | ||
|
|
||
| b=42; | ||
| } | ||
|
|
||
| a=69; | ||
| } | ||
| else { | ||
|
|
||
| __goblint_check(1 == 1); //SUCCESS | ||
| __goblint_check(a <=-1); //SUCCESS | ||
| __goblint_check(a <=-1); //SUCCESS | ||
| __goblint_check(c >= 7); //SUCCESS | ||
| __goblint_check(d <= 8); //SUCCESS | ||
| __goblint_check(e <=-1); //SUCCESS | ||
|
|
||
| a = 6; | ||
| } | ||
| // | ||
| //if (a<1) { | ||
| //// __goblint_assert(b<5); //SUCCESS | ||
| //} | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.