|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
#include <goto-programs/goto_termination.h>#include <goto-programs/goto_k_induction.h>#include <goto-programs/goto_loops.h>#include <irep2/irep2_expr.h>#include <util/lang/c_types.h>#include <util/expr/expr_util.h>#include <util/irep/std_expr.h>#include <algorithm>#include <functional>#include <map>#include <unordered_set>#include <vector>Functions | |
| void | goto_termination (goto_functionst &goto_functions, optionst &options, const namespacet &ns) |
| Reduce non-termination to a reachability safety property. | |
| void goto_termination | ( | goto_functionst & | goto_functions, |
| optionst & | options, | ||
| const namespacet & | ns ) |
Reduce non-termination to a reachability safety property.
Two transformations:
Reduction: the program does NOT terminate iff every marker is unreachable in the inductive step. UNSAT at the marker proves non-termination; SAT in the base case refutes it.
Soundness gate: if any loop's modified-var set is empty, k-induction's make_nondet_assign inserts no havoc for it (e.g. loops that only write through dereferenced pointers, *p = ...). In that case IS would run the loop concretely and a "marker unreachable within k unwindings" UNSAT is no longer a real non-termination witness. The pass sets options' "disable-inductive-step" so the BMC driver treats IS as inconclusive for the program.