-
Notifications
You must be signed in to change notification settings - Fork 273
Symex propagation: add output function #3527
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,8 @@ Author: Daniel Kroening, [email protected] | |
#include <util/base_exceptions.h> | ||
#include <util/exception_utils.h> | ||
#include <util/expr_util.h> | ||
#include <util/format.h> | ||
#include <util/format_expr.h> | ||
#include <util/invariant.h> | ||
#include <util/prefix.h> | ||
#include <util/std_expr.h> | ||
|
@@ -780,3 +782,14 @@ void goto_symex_statet::print_backtrace(std::ostream &out) const | |
} | ||
} | ||
} | ||
|
||
/// Print the constant propagation map in a human-friendly format. | ||
/// This is primarily for use from the debugger; please don't delete me just | ||
/// because there aren't any current callers. | ||
void goto_symex_statet::output_propagation_map(std::ostream &out) | ||
{ | ||
for(const auto &name_value : propagation) | ||
{ | ||
out << name_value.first << " <- " << format(name_value.second) << "\n"; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,7 @@ class goto_symex_statet final | |
|
||
// Map L1 names to (L2) constants | ||
std::map<irep_idt, exprt> propagation; | ||
void output_propagation_map(std::ostream &); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't access any private field so it should be a static function (ideally taking a map as input). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The field really ought to be private though (it's only used by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add documentation saying this is used for debugging There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
|
||
enum levelt { L0=0, L1=1, L2=2 }; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation appreciated, otherwise there's a risk that this will be removed as unused in the next clean up.