Skip to content
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

Limiting the branching factor and the depth of branching #674

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

msooseth
Copy link
Collaborator

@msooseth msooseth commented Mar 4, 2025

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 our k 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. #673

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

@msooseth msooseth force-pushed the limit-num-branches branch 3 times, most recently from fe9b8bd to d0f096b Compare March 5, 2025 16:46
Better explanation

Add changelog, fix command line option

Adding test cases for depth of exploration tree

Fix warning
@msooseth msooseth force-pushed the limit-num-branches branch from d0f096b to 8167644 Compare March 5, 2025 16:47
@msooseth msooseth changed the title [DRAFT] Limiting the number of branches [DRAFT] Limiting the branching factor and the depth of branching Mar 5, 2025
@msooseth msooseth marked this pull request as ready for review March 11, 2025 12:52
@msooseth msooseth changed the title [DRAFT] Limiting the branching factor and the depth of branching Limiting the branching factor and the depth of branching Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant