Skip to content

Commit 61b5a6b

Browse files
author
Natasha Yogananda Jeppu
committed
Add comment explaining the use if default messaget instance in goto_program_dereferencet
1 parent 6f4d496 commit 61b5a6b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/pointer-analysis/goto_program_dereference.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,24 @@ class goto_program_dereferencet:protected dereference_callbackt
2828
// for the final argument to value_set_dereferencet.
2929
// This means that language-inappropriate values such as
3030
// (struct A*)some_integer_value in Java, may be returned.
31+
// Note: value_set_dereferencet requires a messaget instance
32+
// as on of its arguments to display the points-to set
33+
// during symex. Display is not done during goto-program
34+
// conversion. To ensure this the display_points_to_sets
35+
// parameter in value_set_dereferencet::dereference()
36+
// is set to false by default and is not changed by the
37+
// goto program conversion modules. Similarly, here we set
38+
// _log to be a default messaget instance.
3139
goto_program_dereferencet(
3240
const namespacet &_ns,
3341
symbol_tablet &_new_symbol_table,
3442
const optionst &_options,
35-
value_setst &_value_sets)
43+
value_setst &_value_sets,
44+
const messaget &_log = messaget())
3645
: options(_options),
3746
ns(_ns),
3847
value_sets(_value_sets),
39-
dereference(_ns, _new_symbol_table, *this, ID_nil, false, messaget())
48+
dereference(_ns, _new_symbol_table, *this, ID_nil, false, _log)
4049
{
4150
}
4251

0 commit comments

Comments
 (0)