forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request diffblue#2089 from tautschnig/remove-skip-cleanup
Run remove_skip and goto_program.update() in passes that may introduce skips
- Loading branch information
Showing
35 changed files
with
201 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,8 @@ Author: Daniel Kroening, [email protected] | |
#include <langapi/language.h> | ||
#include <langapi/mode.h> | ||
|
||
#include <goto-programs/remove_skip.h> | ||
|
||
#include "local_bitvector_analysis.h" | ||
|
||
class goto_checkt | ||
|
@@ -1501,6 +1503,8 @@ void goto_checkt::goto_check( | |
assertions.clear(); | ||
mode = _mode; | ||
|
||
bool did_something = false; | ||
|
||
local_bitvector_analysist local_bitvector_analysis_obj(goto_function); | ||
local_bitvector_analysis=&local_bitvector_analysis_obj; | ||
|
||
|
@@ -1649,12 +1653,18 @@ void goto_checkt::goto_check( | |
if((is_user_provided && !enable_assertions && | ||
i.source_location.get_property_class()!="error label") || | ||
(!is_user_provided && !enable_built_in_assertions)) | ||
i.type=SKIP; | ||
{ | ||
i.make_skip(); | ||
did_something = true; | ||
} | ||
} | ||
else if(i.is_assume()) | ||
{ | ||
if(!enable_assumptions) | ||
i.type=SKIP; | ||
{ | ||
i.make_skip(); | ||
did_something = true; | ||
} | ||
} | ||
else if(i.is_dead()) | ||
{ | ||
|
@@ -1741,6 +1751,7 @@ void goto_checkt::goto_check( | |
} | ||
|
||
// insert new instructions -- make sure targets are not moved | ||
did_something |= !new_code.instructions.empty(); | ||
|
||
while(!new_code.instructions.empty()) | ||
{ | ||
|
@@ -1749,6 +1760,9 @@ void goto_checkt::goto_check( | |
it++; | ||
} | ||
} | ||
|
||
if(did_something) | ||
remove_skip(goto_program); | ||
} | ||
|
||
void goto_check( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,6 @@ Author: Daniel Kroening, [email protected] | |
#include <util/std_code.h> | ||
#include <util/std_expr.h> | ||
|
||
#include "remove_skip.h" | ||
#include "goto_inline_class.h" | ||
|
||
void goto_inline( | ||
|
Oops, something went wrong.