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

smt2parser: realign pop_app_frame non-expr_head else block indentation (#9646)

This updates a formatting regression introduced in the `pop_app_frame`
non-`expr_head` path, where block indentation made control flow harder
to read. The patch is whitespace-only and keeps parser behavior
unchanged.

- **What changed**
- Reindented the `else` body in
`src/parsers/smt2/smt2parser.cpp::pop_app_frame` so nested `if/else`
structure is visually unambiguous.
- Removed trailing spaces on the `m_ctx.mk_app(symbol("select"), ...)`
lines in the same block.

- **Scope**
  - No control-flow, data-flow, or API changes.
  - No changes outside `pop_app_frame`.

```cpp
// Before
else {
local l;
if (m_env.find(fr->m_f, l)) {
    ...
}
else {
    ...
}
}

// After
else {
    local l;
    if (m_env.find(fr->m_f, l)) {
        ...
    }
    else {
        ...
    }
}
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot 2026-05-27 09:35:54 -07:00 committed by GitHub
parent b3fff5b399
commit 1564e00215
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2008,32 +2008,32 @@ namespace smt2 {
}
}
else {
local l;
if (m_env.find(fr->m_f, l)) {
push_local(l);
t_ref = expr_stack().back();
for (unsigned i = 0; i < num_args; ++i) {
expr* arg = expr_stack().get(fr->m_expr_spos + i);
expr* args[2] = { t_ref.get(), arg };
m_ctx.mk_app(symbol("select"),
2,
args,
0,
nullptr,
nullptr,
local l;
if (m_env.find(fr->m_f, l)) {
push_local(l);
t_ref = expr_stack().back();
for (unsigned i = 0; i < num_args; ++i) {
expr* arg = expr_stack().get(fr->m_expr_spos + i);
expr* args[2] = { t_ref.get(), arg };
m_ctx.mk_app(symbol("select"),
2,
args,
0,
nullptr,
nullptr,
t_ref);
}
}
else {
m_ctx.mk_app(fr->m_f,
num_args,
expr_stack().data() + fr->m_expr_spos,
num_indices,
m_param_stack.data() + fr->m_param_spos,
fr->m_as_sort ? sort_stack().back() : nullptr,
t_ref);
}
}
else {
m_ctx.mk_app(fr->m_f,
num_args,
expr_stack().data() + fr->m_expr_spos,
num_indices,
m_param_stack.data() + fr->m_param_spos,
fr->m_as_sort ? sort_stack().back() : nullptr,
t_ref);
}
}
expr_stack().shrink(fr->m_expr_spos);
m_param_stack.shrink(fr->m_param_spos);
if (fr->m_as_sort)