-
Notifications
You must be signed in to change notification settings - Fork 313
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
[SMTToLLVM] Add support for most expressions #6905
Conversation
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.
Very nice stuff. LGTM 😎
/// Lower `smt.int.constant` operations to one of the following two Z3 API | ||
/// function calls depending on whether the storage APInt has a bit-width that | ||
/// fits in a `uint64_t`. | ||
/// ``` | ||
/// Z3_sort Z3_API Z3_mk_int_sort(Z3_context c); | ||
/// | ||
/// Z3_ast Z3_API Z3_mk_int64(Z3_context c, int64_t v, Z3_sort ty); | ||
/// | ||
/// Z3_ast Z3_API Z3_mk_numeral(Z3_context c, Z3_string numeral, Z3_sort ty); | ||
/// Z3_ast Z3_API Z3_mk_unary_minus(Z3_context c, Z3_ast arg); | ||
/// ``` |
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.
Nice!
|
||
#define ADD_ONE_TO_ONE_PATTERN(OP, APINAME, NUM_ARGS) \ | ||
patterns.add<OneToOneSMTPattern<OP>>(/*NOLINT(bugprone-macro-parentheses)*/ \ | ||
converter, patterns.getContext(), \ | ||
globals, options, APINAME, NUM_ARGS); | ||
|
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.
Same comment as in #6902 about potentially making these templated lambdas to avoid a macro.
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.
AFAIK templated lambdas are a C++20 feature. If there is something similar we can use in C++17, let me know!
be24767
to
15c4a3e
Compare
a895710
to
7c8c488
Compare
Only the quantifier operations are still missing.