Skip to content

Commit

Permalink
Clarify usage of history variables in error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
qinheping committed Sep 13, 2024
1 parent 2212cd6 commit 14a76a0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/solvers/smt2/smt2_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2476,6 +2476,18 @@ void smt2_convt::convert_expr(const exprt &expr)
out << ')';
}
}
else if(expr.id() == ID_old)

Check warning on line 2479 in src/solvers/smt2/smt2_conv.cpp

View check run for this annotation

Codecov / codecov/patch

src/solvers/smt2/smt2_conv.cpp#L2479

Added line #L2479 was not covered by tests
{
UNEXPECTEDCASE(

Check warning on line 2481 in src/solvers/smt2/smt2_conv.cpp

View check run for this annotation

Codecov / codecov/patch

src/solvers/smt2/smt2_conv.cpp#L2481

Added line #L2481 was not covered by tests
"Invalid usage of old expressions detected. old expressions must be "
"used in function contracts.");

Check warning on line 2483 in src/solvers/smt2/smt2_conv.cpp

View check run for this annotation

Codecov / codecov/patch

src/solvers/smt2/smt2_conv.cpp#L2483

Added line #L2483 was not covered by tests
}
else if(expr.id() == ID_loop_entry)

Check warning on line 2485 in src/solvers/smt2/smt2_conv.cpp

View check run for this annotation

Codecov / codecov/patch

src/solvers/smt2/smt2_conv.cpp#L2485

Added line #L2485 was not covered by tests
{
UNEXPECTEDCASE(
"Invalid usage of loop_entry expressions detected. loop_entry "
"expressions must be used in function contracts.");

Check warning on line 2489 in src/solvers/smt2/smt2_conv.cpp

View check run for this annotation

Codecov / codecov/patch

src/solvers/smt2/smt2_conv.cpp#L2487-L2489

Added lines #L2487 - L2489 were not covered by tests
}
else
INVARIANT_WITH_DIAGNOSTICS(
false,
Expand Down

0 comments on commit 14a76a0

Please sign in to comment.