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

Handle inconsistent ground truth and SMT unknowns when checking ensures #4063

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

geo2a
Copy link
Collaborator

@geo2a geo2a commented Oct 17, 2024

When checking ensures conditions of rewrite rules with the SMT solver, we must mark rewrite as trivial if the ground truth is inconsistent. If the SMT solver returns unknown, we must abort rewriting.

Previously, we were swallowing both of there cases and finalizing the rewrite step successfully. This behavior of Booster went undetected for a long time since we would usually abort rewriting or detect a vacuous state at the next step, resulting in wasted work but no unsoundness.

We also tweak the return type of checkPredicates to convey addition information why the result is unknown. This will be useful when we start tolerating SMT unknowns and branching on that.

@geo2a geo2a force-pushed the ensures-unsat-ground-truth-check branch from 2ee1aba to c34a3a7 Compare October 17, 2024 09:38
@geo2a geo2a marked this pull request as ready for review October 17, 2024 09:38
@geo2a geo2a requested a review from jberthold October 17, 2024 09:38
We abort when checking ensured conditions of rewrite rules
if the ground truth is UNSAT or the SMT solver returned Unkwnon
@geo2a geo2a force-pushed the ensures-unsat-ground-truth-check branch from c34a3a7 to 8e9c7c2 Compare October 17, 2024 09:42
Copy link
Member

@jberthold jberthold left a comment

Choose a reason for hiding this comment

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

Pending spelling mistakes...

@@ -188,12 +198,28 @@ finaliseSolver ctxt = do
Log.logMessage ("Closing SMT solver" :: Text)
destroyContext ctxt

pattern IsUnknown :: unknown -> Either unknown b
data UnkwnonReason
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
data UnkwnonReason
data UnknownReason

@geo2a geo2a merged commit ad8a7ff into master Oct 17, 2024
6 checks passed
@geo2a geo2a deleted the ensures-unsat-ground-truth-check branch October 17, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants