|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
#include <goto-programs/goto_functions.h>#include <goto-programs/goto_loop_simplify.h>#include <goto-programs/loopst.h>#include <irep2/irep2_utils.h>#include <util/arith/arith_tools.h>#include <unordered_set>Functions | |
| void | goto_loop_simplify (goto_functionst &goto_functions, const optionst &options) |
| Detect and remove no-op loops at goto-program level, before symex. | |
| void goto_loop_simplify | ( | goto_functionst & | goto_functions, |
| const optionst & | options ) |
Detect and remove no-op loops at goto-program level, before symex.
A loop is removable when:
When all conditions hold the entire loop (head IF, body, back-edge) is rewritten to SKIP. A subsequent remove_no_op call cleans the SKIPs.
Iterates to a fixed point so nested no-op loops collapse outward.
Enabled by default. Skipped only where a loop rewrite is unsound or destroys a needed signal: