Skip to content

HOTFIX re-introduce indeterminate result for checkPredicates instead of exceptions #3908

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

Merged
merged 1 commit into from
May 30, 2024

Conversation

jberthold
Copy link
Member

  • Re-introduces the 'indeterminate' result for checkPredicates, and returns that on inconsistent ground truth.
  • In the rewrite, aborts on SMTSolverUnknown when checking requires clauses, but throws actual exceptions (terminating the request) on other SMT errors (translation error, general error).

Follow-up to #3907

@@ -263,9 +263,9 @@ checkPredicates ::
Set Predicate ->
Map Variable Term ->
Set Predicate ->
io (Either SMTError Bool)
io (Either SMTError (Maybe Bool))
Copy link
Member Author

Choose a reason for hiding this comment

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

Since the SMTSolverUnknown is not a "real error", we could also use a 4-fold dedicated result type here

data CheckPredicatesResult
    = PredicatesTrue
    | PredicatesFalse
    | PredicatesIndeterminate
    | UnknownResult

That means we can throw exceptions directly from here as we did before.
The current version puts the burden on the caller but leaves more flexibility.

@jberthold jberthold marked this pull request as ready for review May 30, 2024 02:48
@jberthold jberthold merged commit b6ab7a9 into master May 30, 2024
6 checks passed
@jberthold jberthold deleted the HOTFIX-follow-up-to-3907 branch May 30, 2024 05:49
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