mirror of
https://github.com/Z3Prover/z3
synced 2025-06-19 12:23:38 +00:00
add documentation to string rewriting
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a39b0b201a
commit
07bc19b489
1 changed files with 10 additions and 0 deletions
|
@ -1083,6 +1083,16 @@ br_status seq_rewriter::mk_str_itos(expr* a, expr_ref& result) {
|
||||||
return BR_FAILED;
|
return BR_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief rewrite str.to.int according to the rules:
|
||||||
|
- if the expression is a string which is a non-empty
|
||||||
|
sequence of digits 0-9 extract the corresponding numeral.
|
||||||
|
- if the expression is a string that contains any other character
|
||||||
|
or is empty, produce -1
|
||||||
|
- if the expression is int.to.str(x) produce
|
||||||
|
ite(x >= 0, x, -1)
|
||||||
|
|
||||||
|
*/
|
||||||
br_status seq_rewriter::mk_str_stoi(expr* a, expr_ref& result) {
|
br_status seq_rewriter::mk_str_stoi(expr* a, expr_ref& result) {
|
||||||
zstring str;
|
zstring str;
|
||||||
if (m_util.str.is_string(a, str)) {
|
if (m_util.str.is_string(a, str)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue