-
Notifications
You must be signed in to change notification settings - Fork 84
Handle sqrt & Some Bodged Solution for computing through abs
#1254
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9420a08
add sqrt handling in float domain
stilscher 0740491
implement abs function for integers
stilscher b9ede51
implement special case for most-negative value
stilscher 5663482
improve values of parameters in abs call
stilscher 688cff1
trying to fix that value is not improved for parameter of abs call
stilscher 88957a8
Add test which can be run in isolation
michael-schwarz 66ebc90
Merge branch 'no-overflow-sqrt' of https://github.com/goblint/analyze…
michael-schwarz 2ea8db4
Wir sind alle Pfuscher vor dem HERRN
michael-schwarz 3797338
Reset baseInvariant to master
michael-schwarz 6895ac0
Make bodge a bit nicer
michael-schwarz ba6726a
Handle <= as well
michael-schwarz 8ea9ffa
39/07: Add NOWARN annotation
michael-schwarz 9d77dec
Move abs refine to BaseInvariant
sim642 0cb1b7e
Fix BaseInvariant abs indentation
sim642 19190ca
remove special cases handled by general case
stilscher c9be89e
add support for labs and llabs
stilscher 75b3b83
add autotuner for math functions (activates tmpSpecial and float domain)
stilscher f6c9a52
Add tmpSpecialAnalysis to ana.autotune.activated in svcomp.json.
jerhard 25bba6a
Resolve merge conflicts, rename test to deduplicate ids.
jerhard 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
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
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,22 @@ | ||
| //PARAM: --enable ana.int.interval --set ana.activated[+] tmpSpecial | ||
jerhard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #include<math.h> | ||
| int main() { | ||
| int data; | ||
| if (data > (-0x7fffffff - 1)) | ||
| { | ||
| if (abs(data) < 100) | ||
| { | ||
| __goblint_check(data < 100); | ||
| __goblint_check(-100 < data); | ||
| int result = data * data; //NOWARN | ||
| } | ||
|
|
||
| if(abs(data) <= 100) | ||
| { | ||
| __goblint_check(data <= 100); | ||
| __goblint_check(-100 <= data); | ||
| int result = data * data; //NOWARN | ||
| } | ||
| } | ||
| return 8; | ||
| } | ||
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 @@ | ||
| //PARAM: --enable ana.int.interval --enable ana.float.interval --set ana.activated[+] tmpSpecial | ||
| #include<math.h> | ||
| int main() { | ||
| int data; | ||
| if (data > (-0x7fffffff - 1) && abs(data) < (long)sqrt((double)0x7fffffff)) | ||
| { | ||
| int result = data * data; //NOWARN | ||
| } | ||
| return 8; | ||
| } |
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.