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

Decrement leaf count in simple SMT when inserting empty value #303

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

bobbinth
Copy link
Contributor

@bobbinth bobbinth commented Apr 2, 2024

I realized the Simple SMT does not remove empty values from its leaves vector upon insert. This would have led to an incorrect leaf count after an EMPTY_VALUE is inserted into the tree. This PR fixes this.

Also, I renamed leaf_count() to num_leaves() as it is more consistent with our naming methodology and added a simple test to ensure that leaf count behaves as expected.

@bobbinth bobbinth requested review from hackaugusto and polydez April 2, 2024 19:37
Copy link

sonarqubecloud bot commented Apr 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@hackaugusto hackaugusto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bobbinth bobbinth merged commit 4bf087d into main Apr 2, 2024
11 checks passed
@bobbinth bobbinth deleted the bobbin-leaf-count-fix branch April 2, 2024 20:01
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.

2 participants