3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-07 19:51:22 +00:00

fix indentation

This commit is contained in:
Murphy Berzish 2017-08-09 15:38:56 -04:00
parent fce35fdb61
commit 84abdae5f7

View file

@ -6190,32 +6190,32 @@ namespace smt {
zstring str; zstring str;
if (u.str.is_string(arg_str, str)) { if (u.str.is_string(arg_str, str)) {
if (str.length() == 0) { if (str.length() == 0) {
// transitioning on the empty string is handled specially // transitioning on the empty string is handled specially
TRACE("str", tout << "empty string epsilon-move " << start << " --> " << end << std::endl;); TRACE("str", tout << "empty string epsilon-move " << start << " --> " << end << std::endl;);
make_epsilon_move(start, end); make_epsilon_move(start, end);
} else { } else {
TRACE("str", tout << "build NFA for '" << str << "'" << "\n";); TRACE("str", tout << "build NFA for '" << str << "'" << "\n";);
/* /*
* For an n-character string, we make (n-1) intermediate states, * For an n-character string, we make (n-1) intermediate states,
* labelled i_(0) through i_(n-2). * labelled i_(0) through i_(n-2).
* Then we construct the following transitions: * Then we construct the following transitions:
* start --str[0]--> i_(0) --str[1]--> i_(1) --...--> i_(n-2) --str[n-1]--> final * start --str[0]--> i_(0) --str[1]--> i_(1) --...--> i_(n-2) --str[n-1]--> final
*/ */
unsigned last = start; unsigned last = start;
for (int i = 0; i <= ((int)str.length()) - 2; ++i) { for (int i = 0; i <= ((int)str.length()) - 2; ++i) {
unsigned i_state = next_id(); unsigned i_state = next_id();
make_transition(last, str[i], i_state); make_transition(last, str[i], i_state);
TRACE("str", tout << "string transition " << last << "--" << str[i] << "--> " << i_state << "\n";); TRACE("str", tout << "string transition " << last << "--" << str[i] << "--> " << i_state << "\n";);
last = i_state; last = i_state;
} }
make_transition(last, str[(str.length() - 1)], end); make_transition(last, str[(str.length() - 1)], end);
TRACE("str", tout << "string transition " << last << "--" << str[(str.length() - 1)] << "--> " << end << "\n";); TRACE("str", tout << "string transition " << last << "--" << str[(str.length() - 1)] << "--> " << end << "\n";);
} }
} else { // ! u.str.is_string(arg_str, str) } else { // ! u.str.is_string(arg_str, str)
TRACE("str", tout << "invalid string constant in Str2Reg" << std::endl;); TRACE("str", tout << "invalid string constant in Str2Reg" << std::endl;);
m_valid = false; m_valid = false;
return; return;
} }
} else if (u.re.is_concat(e)){ } else if (u.re.is_concat(e)){
app * a = to_app(e); app * a = to_app(e);
expr * re1 = a->get_arg(0); expr * re1 = a->get_arg(0);