@@ -17,6 +17,7 @@ Author: Daniel Kroening
17
17
#include < ostream>
18
18
19
19
#include < util/arith_tools.h>
20
+ #include < util/format_expr.h>
20
21
#include < util/symbol.h>
21
22
22
23
#include < ansi-c/printf_formatter.h>
@@ -67,55 +68,37 @@ void goto_trace_stept::output(
67
68
if (hidden)
68
69
out << " hidden" ;
69
70
70
- out << " \n " ;
71
+ out << ' \n ' ;
72
+
73
+ if (type==typet::ASSIGNMENT)
74
+ {
75
+ out << " " << format (full_lhs)
76
+ << " = " << format (full_lhs_value)
77
+ << ' \n ' ;
78
+ }
71
79
72
80
if (!pc->source_location .is_nil ())
73
- out << pc->source_location << " \n " ;
74
-
75
- if (pc->is_goto ())
76
- out << " GOTO " ;
77
- else if (pc->is_assume ())
78
- out << " ASSUME " ;
79
- else if (pc->is_assert ())
80
- out << " ASSERT " ;
81
- else if (pc->is_dead ())
82
- out << " DEAD " ;
83
- else if (pc->is_other ())
84
- out << " OTHER " ;
85
- else if (pc->is_assign ())
86
- out << " ASSIGN " ;
87
- else if (pc->is_decl ())
88
- out << " DECL " ;
89
- else if (pc->is_function_call ())
90
- out << " CALL " ;
91
- else
92
- out << " (?) " ;
81
+ out << pc->source_location << ' \n ' ;
93
82
94
- out << " \n " ;
83
+ out << pc-> type << ' \n ' ;
95
84
96
- if ((pc->is_other () && lhs_object.is_not_nil ()) || pc->is_assign ())
97
- {
98
- irep_idt identifier=lhs_object.get_object_name ();
99
- out << " " << from_expr (ns, identifier, lhs_object.get_original_expr ())
100
- << " = " << from_expr (ns, identifier, lhs_object_value)
101
- << " \n " ;
102
- }
103
- else if (pc->is_assert ())
85
+ if (pc->is_assert ())
104
86
{
105
87
if (!cond_value)
106
88
{
107
- out << " Violated property:" << " \n " ;
89
+ out << " Violated property:" << ' \n ' ;
108
90
if (pc->source_location .is_nil ())
109
- out << " " << pc->source_location << " \n " ;
91
+ out << " " << pc->source_location << ' \n ' ;
110
92
111
- if (comment!=" " )
112
- out << " " << comment << " \n " ;
113
- out << " " << from_expr (ns, pc->function , pc->guard ) << " \n " ;
114
- out << " \n " ;
93
+ if (!comment.empty ())
94
+ out << " " << comment << ' \n ' ;
95
+
96
+ out << " " << format (pc->guard ) << ' \n ' ;
97
+ out << ' \n ' ;
115
98
}
116
99
}
117
100
118
- out << " \n " ;
101
+ out << ' \n ' ;
119
102
}
120
103
121
104
std::string trace_value_binary (
0 commit comments