Skip to content

Force the guard to false_exprt() whenever false is added to the conjunction #3

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

Merged
merged 1 commit into from
Mar 11, 2016
Merged
Show file tree
Hide file tree
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
22 changes: 22 additions & 0 deletions regression/cbmc/guard1/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
int main()
{
int i;
int j;
while(i) j = j + 1;
}

/*
#include <assert.h>

int main (void) {
int i;

while (1) {
i++;
}

assert(0);

return;
}
*/
7 changes: 7 additions & 0 deletions regression/cbmc/guard1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CORE
main.c
--depth 19
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
2 changes: 1 addition & 1 deletion src/util/guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void guardt::add(const exprt &expr)

if(is_false() || expr.is_true())
return;
else if(is_true())
else if(is_true() || expr.is_false())
{
*this=expr;

Expand Down