Skip to content

Commit ad4d9db

Browse files
author
Remi Delmas
committed
change a variable name and capitalize fist word on a couple a comments
1 parent d8f5d77 commit ad4d9db

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/goto-instrument/contracts/contracts.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,9 +1128,9 @@ bool code_contractst::check_frame_conditions_function(const irep_idt &function)
11281128
return true;
11291129
}
11301130

1131-
auto &goto_program = function_obj->second.body;
1131+
auto &function_body = function_obj->second.body;
11321132

1133-
if(check_for_looped_mallocs(goto_program))
1133+
if(check_for_looped_mallocs(function_body))
11341134
{
11351135
return true;
11361136
}
@@ -1144,22 +1144,22 @@ bool code_contractst::check_frame_conditions_function(const irep_idt &function)
11441144
function,
11451145
symbol_table);
11461146

1147-
// detect and add static local variables
1147+
// Detect and add static local variables
11481148
assigns.add_static_locals_to_write_set(goto_functions, function);
11491149

11501150
// Add formal parameters to write set
11511151
for(const auto &param : to_code_type(target.type).parameters())
11521152
assigns.add_to_write_set(ns.lookup(param.get_identifier()).symbol_expr());
11531153

1154-
auto instruction_it = goto_program.instructions.begin();
1154+
auto instruction_it = function_body.instructions.begin();
11551155
for(const auto &car : assigns.get_write_set())
11561156
{
11571157
auto snapshot_instructions = car.generate_snapshot_instructions();
11581158
insert_before_swap_and_advance(
1159-
goto_program, instruction_it, snapshot_instructions);
1159+
function_body, instruction_it, snapshot_instructions);
11601160
};
11611161

1162-
// restore internal coherence in the programs
1162+
// Restore internal coherence in the programs
11631163
goto_functions.update();
11641164

11651165
// Full inlining of the function body
@@ -1173,23 +1173,23 @@ bool code_contractst::check_frame_conditions_function(const irep_idt &function)
11731173
decorated.get_recursive_function_warnings_count() == 0,
11741174
"Recursive functions found during inlining");
11751175

1176-
// clean up possible fake loops that are due to `IF 0!=0 GOTO i` instructions
1177-
simplify_gotos(goto_program, ns);
1176+
// Clean up possible fake loops that are due to `IF 0!=0 GOTO i` instructions
1177+
simplify_gotos(function_body, ns);
11781178

1179-
// restore internal coherence in the programs
1179+
// Restore internal coherence in the programs
11801180
goto_functions.update();
11811181

11821182
INVARIANT(
1183-
is_loop_free(goto_program, ns, log),
1183+
is_loop_free(function_body, ns, log),
11841184
"Loops remain in function '" + id2string(function) +
11851185
"', assigns clause checking instrumentation cannot be applied.");
11861186

11871187
// Insert write set inclusion checks.
11881188
check_frame_conditions(
1189-
function_obj->first,
1190-
function_obj->second.body,
1189+
function,
1190+
function_body,
11911191
instruction_it,
1192-
function_obj->second.body.instructions.end(),
1192+
function_body.instructions.end(),
11931193
assigns,
11941194
// skip checks on function parameter assignments
11951195
true);

0 commit comments

Comments
 (0)