mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
Revert "fix indentation and add support for re.allchar"
This reverts commit cadde94017
.
This commit is contained in:
parent
cadde94017
commit
fce35fdb61
1 changed files with 26 additions and 44 deletions
|
@ -1685,8 +1685,6 @@ namespace smt {
|
|||
u.str.is_string(range1, range1val);
|
||||
u.str.is_string(range2, range2val);
|
||||
return zstring("[") + range1val + zstring("-") + range2val + zstring("]");
|
||||
} else if (u.re.is_full(a_regex)) {
|
||||
return zstring(".");
|
||||
} else {
|
||||
TRACE("str", tout << "BUG: unrecognized regex term " << mk_pp(regex, get_manager()) << std::endl;);
|
||||
UNREACHABLE(); return zstring("");
|
||||
|
@ -1796,13 +1794,6 @@ namespace smt {
|
|||
expr_ref finalAxiom(m.mk_iff(ex, rhs), m);
|
||||
SASSERT(finalAxiom);
|
||||
assert_axiom(finalAxiom);
|
||||
} else if (u.re.is_full(regex)) {
|
||||
// equivalent to regex "." operator, match any one character.
|
||||
// we rewrite to expr IFF len(str) == 1
|
||||
expr_ref rhs(ctx.mk_eq_atom(mk_strlen(str), m_autil.mk_numeral(rational::one(), true)), m);
|
||||
expr_ref finalAxiom(m.mk_iff(ex, rhs), m);
|
||||
SASSERT(finalAxiom);
|
||||
assert_axiom(finalAxiom);
|
||||
} else {
|
||||
TRACE("str", tout << "ERROR: unknown regex expression " << mk_pp(regex, m) << "!" << std::endl;);
|
||||
NOT_IMPLEMENTED_YET();
|
||||
|
@ -6293,15 +6284,6 @@ namespace smt {
|
|||
}
|
||||
|
||||
TRACE("str", tout << "range NFA: start = " << start << ", end = " << end << std::endl;);
|
||||
} else if (u.re.is_full(e)) {
|
||||
// equivalent to "transition on each character in the alphabet"
|
||||
|
||||
// TODO this hard-codes something about theory_str's char set here
|
||||
|
||||
for (unsigned i = 1; i <= 255; ++i) {
|
||||
char ch = (char)i;
|
||||
make_transition(start, ch, end);
|
||||
}
|
||||
} else {
|
||||
TRACE("str", tout << "invalid regular expression" << std::endl;);
|
||||
m_valid = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue