Skip to content

Fixed weakest precondition for code_assertt #5847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/goto-programs/wp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ exprt wp_assign(
return pre;
}

exprt wp_assert(
const code_assertt &code,
const exprt &post,
const namespacet &)
{
return and_exprt(code.assertion(), post);
}

exprt wp_assume(
const code_assumet &code,
const exprt &post,
Expand Down Expand Up @@ -250,7 +258,7 @@ exprt wp(
else if(statement==ID_decl)
return wp_decl(to_code_decl(code), post, ns);
else if(statement==ID_assert)
return post;
return wp_assert(to_code_assert(code), post, ns);
else if(statement==ID_expression)
return post;
else if(statement==ID_printf)
Expand Down