Limiting the branching factor and the depth of branching #674
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.
Description
This allows the user or library to limit the exploration branching factor and branching depth. So a limit of 4 will allow us to go into 4 if-then-elses. A limit of 4 will also limit us from going into more than 4 different places when e.g. a
JUMP (symbolic expression).
is performed. If the symbolic expression has more than 4 solutions, we abandon exploration.The system therefore limits the maximum number of branches explored to
k^{k}
. Note that this does not limit the number of opcodes symbolically executed. If it's a straight-line program of 10000 operations, and ourk
is 5, it will still work. But if there are more than 5 nested if-then-else-es, then it will stop exploring beyond a certain point.I created a new
Partial
node to account for these partial executions:TooManyBraches
. This gets generated when a we have to stop exploring. Default is unlimited branches, of course, so everything works as before if this exploration limit is not set.On op of
more-symbolic
, i.e. #673Checklist