mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
fixed loop lower bound bug in loop info and default nullable value in invalid_info
This commit is contained in:
parent
6b11af7ec6
commit
7b478c8406
|
@ -1867,7 +1867,7 @@ seq_util::rex::info seq_util::rex::info::loop(unsigned lower) const {
|
||||||
if (is_known()) {
|
if (is_known()) {
|
||||||
//r{l,m} is not normalized if r is nullable but l > 0
|
//r{l,m} is not normalized if r is nullable but l > 0
|
||||||
unsigned m = min_length * lower;
|
unsigned m = min_length * lower;
|
||||||
if (m < min_length || m < lower)
|
if (m > 0 && (m < min_length || m < lower))
|
||||||
m = UINT_MAX;
|
m = UINT_MAX;
|
||||||
bool loop_normalized = (nullable == l_false && lower > 0 ? false : normalized);
|
bool loop_normalized = (nullable == l_false && lower > 0 ? false : normalized);
|
||||||
lbool loop_nullable = (nullable == l_true || lower == 0 ? l_true : nullable);
|
lbool loop_nullable = (nullable == l_true || lower == 0 ? l_true : nullable);
|
||||||
|
|
|
@ -429,7 +429,7 @@ public:
|
||||||
/* Positive Boolean combination of ranges or predicates or singleton sequences. */
|
/* Positive Boolean combination of ranges or predicates or singleton sequences. */
|
||||||
bool singleton{ false };
|
bool singleton{ false };
|
||||||
/* If l_true then empty word is accepted, if l_false then empty word is not accepted. */
|
/* If l_true then empty word is accepted, if l_false then empty word is not accepted. */
|
||||||
lbool nullable{ l_false };
|
lbool nullable{ l_undef };
|
||||||
/* Lower bound on the length of all accepted words. */
|
/* Lower bound on the length of all accepted words. */
|
||||||
unsigned min_length{ 0 };
|
unsigned min_length{ 0 };
|
||||||
/* Maximum nesting depth of Kleene stars. */
|
/* Maximum nesting depth of Kleene stars. */
|
||||||
|
|
Loading…
Reference in a new issue