diff --git a/.gitignore b/.gitignore index df4e3266d..8e5bd7294 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ crashes/ *.pyo # Ignore callgrind files callgrind.out.* +gmon.out # .hpp files are automatically generated *.hpp .env diff --git a/gmon.out b/gmon.out deleted file mode 100644 index cba10a19b..000000000 Binary files a/gmon.out and /dev/null differ diff --git a/src/ast/rewriter/seq_subset.cpp b/src/ast/rewriter/seq_subset.cpp index 2fc4d1f71..f12bc32b1 100644 --- a/src/ast/rewriter/seq_subset.cpp +++ b/src/ast/rewriter/seq_subset.cpp @@ -19,7 +19,7 @@ Author: bool seq_subset::is_subset_rec(expr* a, expr* b, unsigned depth) const { while (true) { - + if (a == b) return true; if (m_re.is_empty(a)) @@ -30,7 +30,7 @@ bool seq_subset::is_subset_rec(expr* a, expr* b, unsigned depth) const { return true; if (depth >= m_max_depth) - return false; + return false; expr* a1 = nullptr, * a2 = nullptr, * b1 = nullptr, * b2 = nullptr; unsigned la, ua, lb, ub; @@ -39,16 +39,12 @@ bool seq_subset::is_subset_rec(expr* a, expr* b, unsigned depth) const { if (m_re.is_dot_plus(b) && m_re.get_info(a).nullable == l_false) return true; - // a ⊆ a* - if (m_re.is_star(b, b1) && is_subset_rec(a, b1, depth)) - return true; - // e ⊆ a* if (m_re.is_epsilon(a) && m_re.is_star(b, b1)) return true; - // R ⊆ R* - if (m_re.is_star(b, b1) && is_subset_rec(a, b1, depth + 1)) + // a ⊆ a*: if b = b1* and a ⊆ b1, then a ⊆ b1* + if (m_re.is_star(b, b1) && is_subset_rec(a, b1, depth)) return true; // R1* ⊆ R2* if R1 ⊆ R2