-
Notifications
You must be signed in to change notification settings - Fork 274
Add incremental SMT2 sort checked construction of bit vector predicate application and application of core theory functions #6256
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
Add incremental SMT2 sort checked construction of bit vector predicate application and application of core theory functions #6256
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #6256 +/- ##
===========================================
+ Coverage 76.18% 76.21% +0.02%
===========================================
Files 1484 1490 +6
Lines 162092 162500 +408
===========================================
+ Hits 123495 123844 +349
- Misses 38597 38656 +59
Continue to review full report at Codecov.
|
This PR relates to #6134 |
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.
There are a lot of tests for different operators, but they all use the same factory code. Is there significant value in having them all?
3f670cc
to
d9fd299
Compare
For checking parameterised sorts.
c878207
to
652ca69
Compare
2061d96
to
d46aaab
Compare
{ | ||
INVARIANT( | ||
parameter_sorts.size() == arguments.size(), | ||
"Number of parameters and number of arguments must the the same."); |
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.
"must the the same" => "must be the same"
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.
Done.
@@ -94,3 +95,15 @@ TEST_CASE("smt_set_option_commandt getter", "[core][smt2_incremental]") | |||
CHECK(smt_set_option_commandt{models_on}.option() == models_on); | |||
CHECK(smt_set_option_commandt{models_off}.option() == models_off); | |||
} | |||
|
|||
TEST_CASE("SMT2 function application factory tests", "[core][smt2_incremental]") |
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.
No CHECK
s in this test? Whats its purpose?
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.
The checks were missing because I got distracted adding other functionality to this PR, before I finished writing this test. Thanks for spotting this oversight. I have now added some checks.
So that function specific INVARIANTS can be checked.
For consistency with how the functions for the bit vector theory are defined. Note that the factory is called `make_not` rather than `not`, because not is a keyword in C++ which is equivalent to the `!` operator.
To prevent construction of function application without checking that the given arguments are valid for the given function.
d46aaab
to
686ba37
Compare
Add incremental SMT2 sort checked construction of bit vector predicate application and application of core theory functions.