3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-19 07:06:28 +00:00

simplify: remove dead code in seq_subset and delete gmon.out

- seq_subset.cpp: Remove redundant 'e ⊆ a*' check (lines 46-48).
  When a=epsilon and b=b1*, get_info(b1*).nullable is always l_true,
  so the earlier epsilon+nullable check already handles this case.

- seq_subset.cpp: Remove redundant 'R ⊆ R*' check (lines 50-52).
  The preceding 'a ⊆ a*' check uses the same is_star condition but
  calls is_subset_rec with the same depth (more budget), making the
  depth+1 variant unreachable in any useful scenario.

- seq_subset.cpp: Remove trailing whitespace (lines 22, 33).

- Remove accidentally committed gmon.out profiling output file.

- .gitignore: Add gmon.out to prevent future accidental commits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2026-06-10 06:15:28 +00:00 committed by GitHub
parent e093be8b60
commit f37b56439a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 11 deletions

2
.gitignore vendored
View file

@ -124,3 +124,5 @@ bazel-*
.deeptest/
tptp_test/
tptp_benchmarks/
# Profiling output files
gmon.out

BIN
gmon.out

Binary file not shown.

View file

@ -19,7 +19,6 @@ 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 +29,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,18 +38,10 @@ 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*
// 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;
// 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))
return true;
// R1* ⊆ R2* if R1 ⊆ R2
if (m_re.is_star(a, a1) && m_re.is_star(b, b1) && is_subset_rec(a1, b1, depth + 1))
return true;