Skip to content

Refactor booster smt #4017

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 13 commits into from
Aug 7, 2024
Merged

Refactor booster smt #4017

merged 13 commits into from
Aug 7, 2024

Conversation

goodlyrottenapple
Copy link
Contributor

The following changes were made:

  • SMT response in the hihg-level interface always returns a Text reason in the Unknown constructor
  • All the main functions, i.e. isSat, checkPredicates and getModelFor throw errors as Exceptions and return an IsSatResult, as the only error we are catching is the one thrown when the SMT result is unknown

Copy link
Contributor

@geo2a geo2a left a comment

Choose a reason for hiding this comment

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

I like this refactoring! I'm happy to approve once we have a more clear result type for checkPredicates.

@goodlyrottenapple goodlyrottenapple marked this pull request as ready for review August 7, 2024 10:47
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.

LGTM, two small suggestions.

Comment on lines +160 to +161
-- set large default timeout value for checking the prelude
setTimeout defaultSMTOptions.timeout
Copy link
Member

Choose a reason for hiding this comment

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

Is the default "large"?
I vaguely remember us discussing whether or not to use the user-provided modified timeout value for the prelude... not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default is 125. Maybe it isn't that large actually. Either way, I was puzzled by this behaviour because the current code always overrides the user supplied value with 125, which is what I have done here as well. Perhaps we should just use the user defined value? @geo2a what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, let's use the user defined value here.

@goodlyrottenapple
Copy link
Contributor Author

I will merge this and we can address the prelude timeout in a separate PR if need be.

@goodlyrottenapple goodlyrottenapple merged commit b6f8807 into master Aug 7, 2024
6 checks passed
@goodlyrottenapple goodlyrottenapple deleted the georgy/refactor-booster-smt branch August 7, 2024 13:42
rv-jenkins pushed a commit that referenced this pull request Aug 12, 2024
Followup to #4017 addressing a potential issue I noticed whilst
refactoring the SMT interface in booster. Namely, we set the hard-coded
timeout value when checking the consistency of the prelude, before
setting the user supplied value for general queries. This PR instead
just sets the user supplied timeout value before checking the prelude.
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.

3 participants