@@ -24,12 +24,32 @@ Date: July 2005
24
24
25
25
#include < goto-programs/goto_program.h>
26
26
27
- /* ! \brief TO_BE_DOCUMENTED
28
- * \ingroup gr_goto_symex
29
- */
27
+ // / Step of the trace of a GOTO program
28
+ // /
29
+ // / A step is either:
30
+ // / - an assignment
31
+ // / - an assume statement
32
+ // / - an assertion
33
+ // / - a goto instruction
34
+ // / - a constraint (unused)
35
+ // / - a function call
36
+ // / - a function return
37
+ // / - a location (unused)
38
+ // / - an output
39
+ // / - an input
40
+ // / - a declaration
41
+ // / - a dead statement
42
+ // / - a shared read (unused)
43
+ // / - a shared write (unused)
44
+ // / - a spawn satemement
45
+ // / - a memory barrier
46
+ // / - an atomic begin (unused)
47
+ // / - an atomic end (unused)
48
+ // / \ingroup gr_goto_symex
30
49
class goto_trace_stept
31
50
{
32
51
public:
52
+ // / Number of the step in the trace
33
53
std::size_t step_nr;
34
54
35
55
bool is_assignment () const { return type==typet::ASSIGNMENT; }
@@ -145,9 +165,9 @@ class goto_trace_stept
145
165
}
146
166
};
147
167
148
- /* ! \brief TO_BE_DOCUMENTED
149
- * \ingroup gr_goto_symex
150
- */
168
+ // / Trace of a GOTO program.
169
+ // / This is a wrapper for a list of steps.
170
+ // / \ingroup gr_goto_symex
151
171
class goto_tracet
152
172
{
153
173
public:
@@ -170,6 +190,7 @@ class goto_tracet
170
190
other.steps .swap (steps);
171
191
}
172
192
193
+ // / Add a step at the end of the trace
173
194
void add_step (const goto_trace_stept &step)
174
195
{
175
196
steps.push_back (step);
@@ -186,14 +207,23 @@ class goto_tracet
186
207
std::vector<irep_idt> get_all_property_ids () const ;
187
208
};
188
209
210
+ // / Options for printing the trace using show_goto_trace
189
211
struct trace_optionst
190
212
{
213
+ // / Add rawLhs property to trace
191
214
bool json_full_lhs;
215
+ // / Represent plain trace values in hex
192
216
bool hex_representation;
217
+ // / Use prefix (`0b` or `0x`) for distinguishing the base of the
218
+ // / representation.
193
219
bool base_prefix;
220
+ // / Show function calls in plain text trace
194
221
bool show_function_calls;
222
+ // / Show original code in plain text trace
195
223
bool show_code;
224
+ // / Give a compact trace
196
225
bool compact_trace;
226
+ // / Give a stack trace only
197
227
bool stack_trace;
198
228
199
229
static const trace_optionst default_options;
@@ -222,6 +252,7 @@ struct trace_optionst
222
252
};
223
253
};
224
254
255
+ // / Output the trace on the given stream \p out
225
256
void show_goto_trace (
226
257
messaget::mstreamt &out,
227
258
const namespacet &ns,
0 commit comments