Skip to content

Handle overflow in proof size#210

Merged
mwillsey merged 3 commits intoegraphs-good:mainfrom
oflatt:oflatt/float-proof-estimates
Oct 25, 2022
Merged

Handle overflow in proof size#210
mwillsey merged 3 commits intoegraphs-good:mainfrom
oflatt:oflatt/float-proof-estimates

Conversation

@oflatt
Copy link
Copy Markdown
Member

@oflatt oflatt commented Oct 23, 2022

This PR handles the overflow in proof size estimates by capping them at usize::MAX.

I considered using floating-point, but it's harder to reason about floating-point numbers and they also do not implement Ord which is a problem for the heap implementation.

Another thing to consider would be using a bignum, but I'm not sure if it matters.

@mwillsey
Copy link
Copy Markdown
Member

This looks good! It seems like this may be a case where you should prefer saturating_add over checked_add.

@oflatt
Copy link
Copy Markdown
Member Author

oflatt commented Oct 25, 2022

Fixed! Ready to merge

@mwillsey mwillsey merged commit f6e837a into egraphs-good:main Oct 25, 2022
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