Skip to content

Commit d023498

Browse files
author
Daniel Kroening
authored
Merge pull request #886 from owen-jones-diffblue/doc/symbol_name_separators
Document $, !, @ and # in symbol names
2 parents 38c7fc0 + 0edafab commit d023498

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/util/fresh_symbol.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ symbolt &get_fresh_aux_symbol(
3333

3434
do
3535
{
36+
// Distinguish local variables with the same name
3637
new_symbol.base_name=
3738
basename_prefix+
3839
"$"+

src/util/ssa_expr.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,23 @@ static void build_ssa_identifier_rec(
4949

5050
if(!l0.empty())
5151
{
52+
// Distinguish different threads of execution
5253
os << '!' << l0;
5354
l1_object_os << '!' << l0;
5455
}
5556

5657
if(!l1.empty())
5758
{
59+
// Distinguish different calls to the same function (~stack frame)
5860
os << '@' << l1;
5961
l1_object_os << '@' << l1;
6062
}
6163

6264
if(!l2.empty())
65+
{
66+
// Distinguish SSA steps for the same variable
6367
os << '#' << l2;
68+
}
6469
}
6570
else
6671
assert(false);

0 commit comments

Comments
 (0)