File tree Expand file tree Collapse file tree 3 files changed +15
-21
lines changed
src/goto-instrument/contracts/dynamic-frames Expand file tree Collapse file tree 3 files changed +15
-21
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,21 @@ void dfcct::transform_goto_model()
513513 instrument_other_functions ();
514514 library.inhibit_front_end_builtins ();
515515
516- // TODO implement and use utils.inhibit_unreachable_functions(harness);
516+ // TODO implement a means to inhibit unreachable functions (possibly via the
517+ // code that implements drop-unused-functions followed by
518+ // generate-function-bodies):
519+ // Traverse the call tree from the given entry point to identify
520+ // functions symbols that are effectively called in the model,
521+ // Then goes over all functions of the model and turns the bodies of all
522+ // functions that are not in the used function set into:
523+ // ```c
524+ // assert(false, "function identified as unreachable");
525+ // assume(false);
526+ // ```
527+ // That way, if the analysis mistakenly pruned some functions, assertions
528+ // will be violated and the analysis will fail.
529+ // TODO: add a command line flag to tell the instrumentation to not prune
530+ // a function.
517531 goto_model.goto_functions .update ();
518532
519533 remove_skip (goto_model);
Original file line number Diff line number Diff line change @@ -552,8 +552,3 @@ void dfcc_utilst::inline_program(
552552 decorated.get_not_enough_arguments_set ().end ());
553553 goto_model.goto_functions .update ();
554554}
555-
556- void dfcc_utilst::inhibit_unused_functions (const irep_idt &start)
557- {
558- PRECONDITION_WITH_DIAGNOSTICS (false , " not yet implemented" );
559- }
Original file line number Diff line number Diff line change @@ -223,21 +223,6 @@ class dfcc_utilst
223223 std::set<irep_idt> &recursive_call,
224224 std::set<irep_idt> &missing_function,
225225 std::set<irep_idt> ¬_enough_arguments);
226-
227- // / \brief Traverses the call tree from the given entry point to identify
228- // / functions symbols that are effectively called in the model,
229- // / Then goes over all functions of the model and turns the bodies of all
230- // / functions that are not in the used function set into:
231- // / ```c
232- // / assert(false, "function identified as unreachable");
233- // / assume(false);
234- // / ```
235- // / That way, if the analysis mistakenly pruned some functions, assertions
236- // / will be violated and the analysis will fail.
237- // / TODO: add a command line flag to tell the instrumentation to not prune
238- // / a function.
239- // / \param start name of the entry point
240- void inhibit_unused_functions (const irep_idt &start);
241226};
242227
243228#endif
You can’t perform that action at this time.
0 commit comments