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 18, 2024
1 parent 2212cd6 commit 83f5c48
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)
{
UNEXPECTEDCASE(
"Invalid usage of old expressions detected. old expressions must be "
"used in function contracts.");
}
else if(expr.id() == ID_loop_entry)
{
UNEXPECTEDCASE(
"Invalid usage of loop_entry expressions detected. loop_entry "
"expressions must be used in loop invariants.");
}
else
INVARIANT_WITH_DIAGNOSTICS(
false,
Expand Down

0 comments on commit 83f5c48

Please sign in to comment.