Skip to content

Commit 8468683

Browse files
authored
Merge pull request #7682 from tautschnig/cleanup/remove-dfcc-has_no_loops
Remove dfcc_utilst::has_no_loops
2 parents b1abd41 + 601118e commit 8468683

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

src/goto-instrument/contracts/dynamic-frames/dfcc_contract_clauses_codegen.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void dfcc_contract_clauses_codegent::gen_spec_assigns_instructions(
6464
// inline resulting program and check for loops
6565
inline_and_check_warnings(dest);
6666
PRECONDITION_WITH_DIAGNOSTICS(
67-
utils.has_no_loops(dest),
67+
is_loop_free(dest, ns, log),
6868
"loops in assigns clause specification functions must be unwound before "
6969
"contracts instrumentation");
7070
}
@@ -91,7 +91,7 @@ void dfcc_contract_clauses_codegent::gen_spec_frees_instructions(
9191
// inline resulting program and check for loops
9292
inline_and_check_warnings(dest);
9393
PRECONDITION_WITH_DIAGNOSTICS(
94-
utils.has_no_loops(dest),
94+
is_loop_free(dest, ns, log),
9595
"loops in assigns clause specification functions must be unwound before "
9696
"contracts instrumentation");
9797
}

src/goto-instrument/contracts/dynamic-frames/dfcc_utils.cpp

-11
Original file line numberDiff line numberDiff line change
@@ -553,17 +553,6 @@ void dfcc_utilst::inline_program(
553553
goto_model.goto_functions.update();
554554
}
555555

556-
bool dfcc_utilst::has_no_loops(const goto_programt &goto_program)
557-
{
558-
return is_loop_free(goto_program, ns, log);
559-
}
560-
561-
bool dfcc_utilst::has_no_loops(const irep_idt &function_id)
562-
{
563-
return has_no_loops(
564-
goto_model.goto_functions.function_map.at(function_id).body);
565-
}
566-
567556
void dfcc_utilst::inhibit_unused_functions(const irep_idt &start)
568557
{
569558
PRECONDITION_WITH_DIAGNOSTICS(false, "not yet implemented");

src/goto-instrument/contracts/dynamic-frames/dfcc_utils.h

-6
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ class dfcc_utilst
211211
std::set<irep_idt> &missing_function,
212212
std::set<irep_idt> &not_enough_arguments);
213213

214-
/// \returns True iff \p function_id is loop free.
215-
bool has_no_loops(const irep_idt &function_id);
216-
217214
/// \brief Inlines the given program, aborts on recursive calls during
218215
/// inlining.
219216
void inline_program(goto_programt &program);
@@ -227,9 +224,6 @@ class dfcc_utilst
227224
std::set<irep_idt> &missing_function,
228225
std::set<irep_idt> &not_enough_arguments);
229226

230-
/// \returns True iff \p goto_program is loop free.
231-
bool has_no_loops(const goto_programt &goto_program);
232-
233227
/// \brief Traverses the call tree from the given entry point to identify
234228
/// functions symbols that are effectively called in the model,
235229
/// Then goes over all functions of the model and turns the bodies of all

0 commit comments

Comments
 (0)