mirror of
https://github.com/Z3Prover/z3
synced 2025-05-05 23:05:46 +00:00
completing user print experience with seq/re #2200
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
fca8ffd948
commit
dc0e9c1919
9 changed files with 115 additions and 11 deletions
|
@ -95,6 +95,32 @@ extern "C" {
|
|||
Z3_CATCH_RETURN(false);
|
||||
}
|
||||
|
||||
Z3_sort Z3_API Z3_get_seq_sort_basis(Z3_context c, Z3_sort s) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_get_seq_sort_basis(c, s);
|
||||
RESET_ERROR_CODE();
|
||||
sort* r = nullptr;
|
||||
if (!mk_c(c)->sutil().is_seq(to_sort(s), r)) {
|
||||
SET_ERROR_CODE(Z3_INVALID_ARG, "expected sequence sort");
|
||||
RETURN_Z3(nullptr);
|
||||
}
|
||||
RETURN_Z3(of_sort(r));
|
||||
Z3_CATCH_RETURN(nullptr);
|
||||
}
|
||||
|
||||
Z3_sort Z3_API Z3_get_re_sort_basis(Z3_context c, Z3_sort s) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_get_re_sort_basis(c, s);
|
||||
RESET_ERROR_CODE();
|
||||
sort* r = nullptr;
|
||||
if (!mk_c(c)->sutil().is_re(to_sort(s), r)) {
|
||||
SET_ERROR_CODE(Z3_INVALID_ARG, "expected regex sort");
|
||||
RETURN_Z3(nullptr);
|
||||
}
|
||||
RETURN_Z3(of_sort(r));
|
||||
Z3_CATCH_RETURN(nullptr);
|
||||
}
|
||||
|
||||
bool Z3_API Z3_is_string_sort(Z3_context c, Z3_sort s) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_is_string_sort(c, s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue