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 6353af4
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 __CPROVER_old detected. __CPROVER_old must be used in "
"function contracts.");
}
else if(expr.id() == ID_loop_entry)
{
UNEXPECTEDCASE(
"Invalid usage of __CPROVER_loop_entry detected. __CPROVER_loop_entry "
"must be used in function contracts.");
}
else
INVARIANT_WITH_DIAGNOSTICS(
false,
Expand Down

0 comments on commit 6353af4

Please sign in to comment.