-
Notifications
You must be signed in to change notification settings - Fork 274
SMT2 parser: add 'as const' #5976
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
Conversation
Thanks adding this! This might resolve the CI issue in #5974. |
Codecov Report
@@ Coverage Diff @@
## develop #5976 +/- ##
===========================================
- Coverage 75.02% 75.02% -0.01%
===========================================
Files 1431 1431
Lines 155576 155595 +19
===========================================
+ Hits 116721 116734 +13
- Misses 38855 38861 +6
Continue to review full report at Codecov.
|
src/solvers/smt2/smt2_parser.cpp
Outdated
if(sort.id() != ID_array) | ||
throw error() | ||
<< "unexpected 'as const' expression expects array type"; |
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.
Nit pick: braces around multi-line body.
src/solvers/smt2/smt2_parser.cpp
Outdated
if(smt2_tokenizer.next_token() != smt2_tokenizert::CLOSE) | ||
throw error() << "expecting ')' at the end of 'as const'"; | ||
|
||
return array_of_exprt(value, to_array_type(sort)); |
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.
Use array_sort
instead of (repeated) to_array_type(sort)
This is an extension understood by Z3 and CVC4, which is the equivalent of array_of_exprt.
This is an extension understood by Z3 and CVC4, which is the equivalent of
array_of_exprt.