Skip to content

Commit 554f796

Browse files
smowtonpeterschrammel
authored andcommitted
Static analysis: print instructions in dumps
This matches the current behaviour of ai.h.
1 parent 37aa2de commit 554f796

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

src/analyses/static_analysis.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void static_analysis_baset::output(
172172

173173
get_state(i_it).output(ns, out);
174174
out << "\n";
175-
#if 0
175+
#if 1
176176
goto_program.output_instruction(ns, identifier, out, i_it);
177177
out << "\n";
178178
#endif
@@ -425,8 +425,9 @@ void static_analysis_baset::do_function_call(
425425

426426
if((!goto_function.body_available()) || !should_enter_function(f_it->first))
427427
{
428-
// Per default do nothing, but a subclass might transform across the stubbed callsite.
429-
transform_function_stub(f_it->first,new_state,l_call,l_return);
428+
// Per default do nothing,
429+
// but a subclass might transform across the stubbed callsite.
430+
transform_function_stub(f_it->first, new_state, l_call, l_return);
430431
return;
431432
}
432433

@@ -515,7 +516,13 @@ void static_analysis_baset::do_function_call_rec(
515516
{
516517
auto fid=function.get(ID_identifier);
517518
if(!should_enter_function(fid))
518-
transform_function_stub(function.get(ID_identifier),new_state,l_call,l_return);
519+
{
520+
transform_function_stub(
521+
function.get(ID_identifier),
522+
new_state,
523+
l_call,
524+
l_return);
525+
}
519526
}
520527
return;
521528
}

src/analyses/static_analysis.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,13 @@ class static_analysis_baset
248248
const exprt::operandst &arguments,
249249
statet &new_state);
250250

251-
virtual bool should_enter_function(const irep_idt&) { return true; }
252-
virtual void transform_function_stub(const irep_idt&, statet& state, locationt l_call, locationt l_return) {}
251+
virtual bool should_enter_function(const irep_idt &) { return true; }
252+
virtual void transform_function_stub(
253+
const irep_idt &,
254+
statet &state,
255+
locationt l_call,
256+
locationt l_return)
257+
{}
253258

254259
// abstract methods
255260

@@ -267,7 +272,6 @@ class static_analysis_baset
267272

268273
bool ignore_recursion;
269274
virtual bool get_ignore_recursion() { return true; }
270-
271275
};
272276

273277
// T is expected to be derived from domain_baset

0 commit comments

Comments
 (0)