-
Notifications
You must be signed in to change notification settings - Fork 64
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
Introduce incompleteGlobal
analysis round, other changes
#120
Merged
Conversation
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
…l component more clear.
… completeness and consistency
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The main change of this PR is the introduction of an
incompleteGlobal
analysis round, before the instantiation of the typical mainglobal
analysis. This allows us to verify which of the variables that are pushed to the stack and have the values of validJUMPDESTs
are actually used as jump targets, overriding theBlockPushesLabel()
facts used byPrivateFunctionCall()
which is essential our context sensitivity algorithms. The result of this is a reduction of the number of contexts of ourglobal
CFG analysis, lightening the load of the function inference logic as well.Other changes:
PublicFunction
,PublicFunctionJump
relations consistent in bothpreTrans
andpostTrans
local analysis instantiations.PublicFunction
context element on public function "call-site" instead of starting block, giving us a minor precision improvement.HeuristicBlockCloner
's global analysis to filterPublicFunction
instances found bypreTrans
, by ensuring the function selector is used in the comparisons. Allows us to support selectors of 1 and 2 bytes without imprecision. Closes Improve public function inference when the function selector is smaller than 3 bytes #91.receive()
support, use special selector value of0xeeeeeeee
Will run some final benchmarks and post the results before merging.
RESULTS
All runs have a timeout of 200s and are performed using
--disable_scalable_fallback
Transactional-Shrinking
viaIR contracts see the biggest benefit with a reduction in timeouts and no increase in execution time. In the other two datasets we notice an increase in the average execution time but no new timeouts.
results over 3k ir contracts (
via-ir-dec23
):2k solc0.8 contracts over 10kb (
solc08-over10k
):2k contracts with metadata (
metadata-dataset1
):Plain Transactional
Again, a minor reduction in the number of contexts and increase in the average execution time. Doesn't really give great benefit anywhere.
via-ir-dec23
:metadata-dataset1
: