Skip to content

Commit 3f6675c

Browse files
authored
Merge pull request #3527 from smowton/smowton/feature/symex-propagation-output
Symex propagation: add output function
2 parents ffb594e + f85c8b1 commit 3f6675c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/goto-symex/goto_symex_state.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Author: Daniel Kroening, [email protected]
1717
#include <util/base_exceptions.h>
1818
#include <util/exception_utils.h>
1919
#include <util/expr_util.h>
20+
#include <util/format.h>
21+
#include <util/format_expr.h>
2022
#include <util/invariant.h>
2123
#include <util/prefix.h>
2224
#include <util/std_expr.h>
@@ -786,3 +788,14 @@ void goto_symex_statet::print_backtrace(std::ostream &out) const
786788
}
787789
}
788790
}
791+
792+
/// Print the constant propagation map in a human-friendly format.
793+
/// This is primarily for use from the debugger; please don't delete me just
794+
/// because there aren't any current callers.
795+
void goto_symex_statet::output_propagation_map(std::ostream &out)
796+
{
797+
for(const auto &name_value : propagation)
798+
{
799+
out << name_value.first << " <- " << format(name_value.second) << "\n";
800+
}
801+
}

src/goto-symex/goto_symex_state.h

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class goto_symex_statet final
6767

6868
// Map L1 names to (L2) constants
6969
std::map<irep_idt, exprt> propagation;
70+
void output_propagation_map(std::ostream &);
7071

7172
enum levelt { L0=0, L1=1, L2=2 };
7273

0 commit comments

Comments
 (0)