|
| void | goto_loop_invariant () |
| void | convert_loop_with_invariant (loopst &loop) |
| std::vector< expr2tc > | extract_loop_invariants (const loopst &loop) |
| std::vector< expr2tc > | extract_loop_assigns (const loopst &loop) |
| void | extract_and_remove_side_effects (goto_programt::targett loop_head, const loopst &loop, const std::vector< expr2tc > &invariants, goto_programt &side_effects_out) |
| | Collect DECL/FUNCTION_CALL instructions immediately before LOOP_INVARIANT that define temporaries used in the invariant.
|
| void | insert_assert_before_loop (goto_programt::targett &loop_head, const std::vector< expr2tc > &invariants, const goto_programt &side_effects) |
| bool | pointees_havocable (const loopst &loop) const |
| | False when a pointee the loop writes is out of the havoc's reach, which leaves the loop to the unwinder.
|
| void | havoc_pointees (const loopst &loop, const locationt &loc, goto_programt &dest) const |
| | Havoc the objects the loop writes through a pointer.
|
| void | insert_havoc_and_assume_before_condition (goto_programt::targett loop_head, const loopst &loop, const std::vector< expr2tc > &invariants, const std::vector< expr2tc > &loop_assigns, goto_programt &side_effects) |
| void | insert_inductive_step_and_termination (const loopst &loop, const std::vector< expr2tc > &invariants, const goto_programt &side_effects) |
| void | create_function_loop (goto_programt::instructionst::iterator loop_head, goto_programt::instructionst::iterator loop_exit) |
| void | get_modified_variables (goto_programt::instructionst::iterator instruction, function_loopst::iterator loop, std::vector< irep_idt > &function_name) |
| bool | compute_function_summary (const irep_idt &fname, std::vector< irep_idt > &in_progress, function_summaryt &out) |
| | Compute (or fetch the cached) summary of fname.
|
| bool | summarise_call (const code_function_call2t &call, std::vector< irep_idt > &in_progress, function_summaryt &local, std::vector< expr2tc > &written_ptrs) |
| | Fold a call inside a callee into that callee's summary.
|
| void | collect_address_taken (const expr2tc &expr, function_summaryt &out) const |
| | A variable whose address the callee takes can be reassigned through that address, which collect_lhs_symbols does not see.
|
| void | collect_loop_symbols (const expr2tc &expr, loopst::loop_varst &out) const |
| | Collect the leaf symbols of expr into out, applying check_var_name.
|
| void | collect_lhs_symbols (const expr2tc &expr, function_summaryt &out) const |
| | Walk an assignment LHS, classifying each leaf symbol: storage that is actually written goes to modified, sub-expressions used to locate that storage (pointer in *p, index in arr[i]) go to unmodified.
|
| void | add_modified_var (loopst &loop, const expr2tc &expr) |
| void | add_unmodified_var (loopst &loop, const expr2tc &expr) |
| void | add_loop_var (loopst &loop, const expr2tc &expr, bool is_modified) |
|
| static void | collect_symbols (const expr2tc &expr, std::set< irep_idt > &symbols) |
| | Collect all symbol names reachable from an expression tree.
|
| static type2tc | havoc_pointee_type (const expr2tc &ptr, const namespacet &ns) |
| | The type of *ptr when the havoc can cover it, nil otherwise: a pointee with no static width (a VLA, an infinite array, an unresolved type) has no nondet value to build, and a large aggregate costs more to encode than the loop it replaces – the 1024-element poly of quantified_array_invariant goes from under a second to minutes (issue #7502).
|
| static void | merge_summary (const function_summaryt &from, function_summaryt &out) |
| static void | note_pointer_write (const expr2tc &target, function_summaryt &local, std::vector< expr2tc > &written_ptrs) |
| static void | apply_callee_summary (loopst &loop, const function_summaryt &summary, const code_function_call2t &call) |
| size_t goto_loop_invariantt::kMaxInvariantSearchBack = 10 |
|
staticconstexpr |
Maximum number of instructions to search backwards from the loop head when locating the LOOP_INVARIANT instruction.
A typical for-loop init (DECL + ASSIGN for the counter) contributes 2 steps, leaving ample room for up to ~4 extra declarations before the invariant. This is the only definition: goto_loop_invariant.cpp's free functions name it qualified, so extract_invariants_near, extract_loop_assigns and extract_and_remove_side_effects search the same window, and so does goto_synthesise_loop_invariants when deciding whether a loop already carries a user-written invariant.