-
Notifications
You must be signed in to change notification settings - Fork 71
SMT: Do not return unnecessary information from checkSatWithProps #864
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
Conversation
msooseth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, wasn't that return value used somewhere? How do we know if something is Partial? I think we used to return some Partial when the SMT couldn't be emitted?
src/EVM/Solvers.hs
Outdated
| let smt2 = assertProps conf psSimp | ||
| if isLeft smt2 then | ||
| let err = getError smt2 in pure (Error err, Left err) | ||
| let err = getError smt2 in pure $ Error err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be cleaner, also maybe can be on a single line with the if?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
src/EVM/Solvers.hs
Outdated
| else do | ||
| res <- liftIO $ checkSat sg (Just props) smt2 | ||
| pure (res, Right (getNonError smt2)) | ||
| liftIO $ checkSat sg (Just props) smt2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe on a single line with the else? Also we can then remove the do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
It turns out no one was actually using this information anyway and there is no reason to keep the SMT-LIB script around.
6f3a9fd to
711d885
Compare
msooseth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It turns out no one was actually using this information anyway and there is no reason to keep the SMT-LIB script around.
Checklist