@@ -150,21 +150,21 @@ void code_contractst::check_apply_loop_contracts(
150
150
loop_end = t;
151
151
152
152
// check for assigns, invariant, and decreases clauses
153
- auto assigns = static_cast <const exprt &>(
153
+ auto assigns_clause = static_cast <const exprt &>(
154
154
loop_end->get_condition ().find (ID_C_spec_assigns));
155
155
auto invariant = static_cast <const exprt &>(
156
156
loop_end->get_condition ().find (ID_C_spec_loop_invariant));
157
157
auto decreases_clause = static_cast <const exprt &>(
158
158
loop_end->get_condition ().find (ID_C_spec_decreases));
159
159
160
160
assigns_clauset loop_assigns (
161
- assigns .operands (), log , ns, function_name, symbol_table);
161
+ assigns_clause .operands (), log , ns, function_name, symbol_table);
162
162
163
163
loop_assigns.add_static_locals_to_write_set (goto_functions, function_name);
164
164
165
165
if (invariant.is_nil ())
166
166
{
167
- if (decreases_clause.is_nil () && assigns .is_nil ())
167
+ if (decreases_clause.is_nil () && assigns_clause .is_nil ())
168
168
return ;
169
169
else
170
170
{
@@ -254,7 +254,7 @@ void code_contractst::check_apply_loop_contracts(
254
254
255
255
// havoc the variables that may be modified
256
256
modifiest modifies;
257
- if (assigns .is_nil ())
257
+ if (assigns_clause .is_nil ())
258
258
{
259
259
try
260
260
{
@@ -271,7 +271,8 @@ void code_contractst::check_apply_loop_contracts(
271
271
}
272
272
else
273
273
{
274
- modifies.insert (assigns.operands ().cbegin (), assigns.operands ().cend ());
274
+ modifies.insert (
275
+ assigns_clause.operands ().cbegin (), assigns_clause.operands ().cend ());
275
276
276
277
// Create snapshots of write set CARs.
277
278
// This must be done before havocing the write set.
@@ -293,7 +294,7 @@ void code_contractst::check_apply_loop_contracts(
293
294
294
295
// Add the havocing code, but only check against the enclosing scope's
295
296
// write set if it was manually specified.
296
- if (assigns .is_nil ())
297
+ if (assigns_clause .is_nil ())
297
298
insert_before_swap_and_advance (
298
299
goto_function.body ,
299
300
loop_head,
@@ -624,7 +625,7 @@ bool code_contractst::apply_function_contract(
624
625
const auto &type = to_code_with_contract_type (function_symbol.type );
625
626
626
627
// Isolate each component of the contract.
627
- auto assigns = type.assigns ();
628
+ auto assigns_clause = type.assigns ();
628
629
auto requires = conjunction (type.requires ());
629
630
auto ensures = conjunction (type.ensures ());
630
631
@@ -740,15 +741,15 @@ bool code_contractst::apply_function_contract(
740
741
// ASSIGNS clause should not refer to any quantified variables,
741
742
// and only refer to the common symbols to be replaced.
742
743
exprt targets;
743
- for (auto &target : assigns )
744
+ for (auto &target : assigns_clause )
744
745
targets.add_to_operands (std::move (target));
745
746
common_replace (targets);
746
747
747
748
// Create a sequence of non-deterministic assignments...
748
749
goto_programt havoc_instructions;
749
750
750
751
// ...for assigns clause targets
751
- if (!assigns .empty ())
752
+ if (!assigns_clause .empty ())
752
753
{
753
754
assigns_clauset assigns_clause (
754
755
targets.operands (), log , ns, target_function, symbol_table);
0 commit comments