-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat: get-assignment statement #848
Merged
+308
−3
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ec769f9
Produce assignments option
Stevendeo a6221a4
Placeholder for get_assignments
Stevendeo b465653
Gathering the named formulae
Stevendeo c9317ef
Pulling threads up to the SAT solver
Stevendeo fe5c2cb
Update tests
Stevendeo 9b461ef
Proprification
Stevendeo 0cfbec6
Adding basic get_value
Stevendeo f5cc809
Update tests
Stevendeo 5c6f05f
Poetry
Stevendeo 083693f
Removing useless check
Stevendeo 541b4d6
Removing spurious term selection in binder
Stevendeo 86f8f33
Poetry
Stevendeo 9cbf833
Adding tests
Stevendeo 15f0560
Adding tests & handling case where model gen is disabled
Stevendeo 9c79109
Update test
Stevendeo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
(error "No model produced, cannot execute get-assignment.") | ||
(error "(get-assignment) requires model generation, but it is disabled (try --produce-models)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
unknown | ||
(error "(get-assignment) requires model generation, but it is disabled (try --produce-models)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(set-logic ALL) | ||
(set-option :produce-assignments true) | ||
(declare-const x Int) | ||
(assert (! (= x 0) :named foo)) | ||
(check-sat) | ||
(get-assignment) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I thought we determined earlier that
produce-assignments
should work withoutproduce-models
, why are we disabling it instead?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.
I'm not sure why you requested an extra test for get-assignment if not for testing this specific case. Did you mean you wanted a non-error test with no models calculated but a get-assignment response anyway? Because there already was a test without
(set-option :produce-models true)
.The standard states that, when in
sat
mode, "the solver will have identified a model A of the current logic". I think that's what confused me (the said model can be abstract, which is specified later on the standard).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.
Yes, I wanted a successful test :) Indeed the
sat
does not require to have built the model explicitly.Sorry, I must have missed it, but I still don't see it — can you point me to that test? The tests I see are
bool1
,bool2
,bool3
that have bothproduce-models
andproduce-assignments
;get-assignment1
that has neither,get-assignment2
that hasproduce-models
but notproduce-assignments
and only the newget-assignment3
that hasproduce-assignment
but notproduce-models
.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.
tests/smtlib2/testfile-get-assignment1.err.dolmen.smt2
indeed has neitherThere 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.
Ah! Sorry I was not clear, I meant without
produce-models
but withproduce-assignments
as clarified in my later message :)