Skip to content

Commit 7a0596d

Browse files
Petr BauchPetr Bauch
authored andcommitted
Rename variables
To remove redundancy and improve readability.
1 parent 532f245 commit 7a0596d

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

src/goto-symex/memory_model.cpp

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,40 +51,38 @@ void memory_model_baset::read_from(symex_target_equationt &equation)
5151

5252
for(const auto &address : address_map)
5353
{
54-
const a_rect &a_rec=address.second;
55-
56-
for(const auto &read_event : a_rec.reads)
54+
for(const auto &read_event : address.second.reads)
5755
{
58-
const event_it r=read_event;
59-
60-
exprt::operandst rf_some_operands;
61-
rf_some_operands.reserve(a_rec.writes.size());
56+
exprt::operandst rf_choice_symbols;
57+
rf_choice_symbols.reserve(address.second.writes.size());
6258

6359
// this is quadratic in #events per address
64-
for(const auto &write_event : a_rec.writes)
60+
for(const auto &write_event : address.second.writes)
6561
{
66-
const event_it w=write_event;
67-
6862
// rf cannot contradict program order
69-
if(po(r, w))
63+
if(po(read_event, write_event))
7064
continue; // contradicts po
7165

72-
rf_some_operands.push_back(
73-
register_read_from_choice_symbol(r, w, equation));
66+
rf_choice_symbols.push_back(
67+
register_read_from_choice_symbol(read_event, write_event, equation));
7468
}
7569

7670
// value equals the one of some write
77-
exprt rf_some = disjunction(rf_some_operands);
71+
72+
exprt rf_some = disjunction(rf_choice_symbols);
7873

7974
// uninitialised global symbol like symex_dynamic::dynamic_object*
8075
// or *$object
81-
if(rf_some_operands.empty())
76+
if(rf_choice_symbols.empty())
8277
continue;
8378

8479
// Add the read's guard, each of the writes' guards is implied
8580
// by each entry in rf_some
86-
add_constraint(equation,
87-
implies_exprt(r->guard, rf_some), "rf-some", r->source);
81+
add_constraint(
82+
equation,
83+
implies_exprt(read_event->guard, rf_some),
84+
"rf-some",
85+
read_event->source);
8886
}
8987
}
9088
}

0 commit comments

Comments
 (0)