mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 19:27:06 +00:00
add documentation to string rewriting
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a39b0b201a
commit
07bc19b489
|
@ -1083,6 +1083,16 @@ br_status seq_rewriter::mk_str_itos(expr* a, expr_ref& result) {
|
|||
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) {
|
||||
zstring str;
|
||||
if (m_util.str.is_string(a, str)) {
|
||||
|
|
Loading…
Reference in a new issue