forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add global name map to goto_symex_state
This global name map will be used to check what generation is currently available for each level1 name, and shared across all states. This will only be used when a particular state tries to find out what the next free generation is. The main draw of this is that all branches will now assign unique generations that won't clash with assignments done across other branches. One minor downside is that in VCC's the generation number might jump sporadically (say from diffblue#4 to diffblue#40).
- Loading branch information
1 parent
e1a7eb3
commit 743bcd3
Showing
10 changed files
with
91 additions
and
33 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
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 |
---|---|---|
|
@@ -41,7 +41,10 @@ Author: Daniel Kroening, [email protected] | |
class goto_symex_statet final : public goto_statet | ||
{ | ||
public: | ||
goto_symex_statet(const symex_targett::sourcet &, guard_managert &manager); | ||
goto_symex_statet( | ||
const symex_targett::sourcet &, | ||
guard_managert &manager, | ||
std::function<std::size_t(const irep_idt &)> fresh_l2_name_provider); | ||
~goto_symex_statet(); | ||
|
||
/// \brief Fake "copy constructor" that initializes the `symex_target` member | ||
|
@@ -190,7 +193,17 @@ class goto_symex_statet final : public goto_statet | |
/// \brief Should the additional validation checks be run? | ||
bool run_validation_checks; | ||
|
||
/// Allocates a fresh L2 name for the given L1 identifier, and makes it the | ||
// latest generation on this path. | ||
void increase_generation(const irep_idt l1_identifier, const ssa_exprt &lhs); | ||
|
||
/// Increases the generation of the L1 identifier. Does nothing if there | ||
/// isn't an expression keyed by it. | ||
void increase_generation_if_exists(const irep_idt identifier); | ||
|
||
private: | ||
std::function<std::size_t(const irep_idt &)> fresh_l2_name_provider; | ||
|
||
/// \brief Dangerous, do not use | ||
/// | ||
/// Copying a state S1 to S2 risks S2 pointing to a deallocated | ||
|
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