ESBMC Proof Strategies Simulator

Download ESBMC

Explore the different ways ESBMC proves software. Each step highlights the source line that generated the next trace item and prints the run output up to that point. Pick a strategy and the timeline becomes that strategy's rounds:

main.c: current event's line highlighted


Run output (states and verdicts, printed as you step)

Timeline

Parameters

Strategy

General: plain & default strategy
back-edge cap; 0 = none (unlimited symex)
cut becomes an assumption
truncated path flows on unguarded

No strategy flag: one plain BMC run, max_unwind = 0, no k loop. These knobs shape where that single run cuts loops.

Iterative strategies: shared knobs (--incremental-bmc / --falsification)
first k (0 rejected)
increment per round
cap (default 50)
no cap; runs to --timeout/--memlimit

Round k re-runs symex with --unwind k. --incremental-bmc solves B(k) then F(k) each round; --falsification only B(k).

k-Induction properties
cap on I(k) only; -1 = none (default)
print the inductive step's counterexample
mine the spurious cex for assignable invariants

I(k) havocs every loop-modified variable and assumes the entry condition; it is skipped at k = 1 and above the cap. B and F are untouched by these.

demo cap on timeline length

Command line

What you are looking at

ESBMC compiles the program into an SMT formula and asks a solver a yes or no question. Unrolling loops to a bound k produces a path constraint c; the solver checks whether c ∧ ¬p is satisfiable, where p is the property that must hold. SAT means some execution reaches a state where the property fails, hence a bug. UNSAT means no run up to k violates p. The strategies below keep the program unchanged; they change how that formula is built at each round.

Which strategy to pick

Strategy Strengths Weaknesses Use it Avoid it
Default (no flags, --unwind K) Fast, single solver call, predictable; easiest to read the trace Must hand-pick K; only bounded (needs the unwinding assertion to be sound); does not iterate Smoke tests, tiny or known loops, debugging one property Loops with unknown or large bounds, proving unbounded safety
--falsification Cheapest bug-hunting; auto-iterates K over bounds; only cares about refutation Never proves anything; hits VERIFICATION UNKNOWN at the cap; swaps unwinding assertions for assumptions; can miss deep bugs Finding a counterexample fast, when you only need to refute Any correctness argument
--incremental-bmc Adds the forward condition, so it proves correctness once all loops fully unroll; sound when it closes; no hand-picked K No inductive step, so the loop must unroll to a fixed point; large or unbounded loops run out the cap to UNKNOWN Loops with reasonable bounds; when you want an automated proof Deep loops, properties that need induction
--k-induction Adds the inductive step, so it proves unbounded safety without fully unrolling; most powerful Slowest; the havoc step yields spurious counterexamples that do not close; harder to follow Proving loops whose full unroll is infeasible Bounded loops, pure bug-finding
--k-induction-parallel Same proof power as k-induction; uses separate processes for better time on multicore Same weaknesses as k-induction; adds process-spawn overhead Large k-induction jobs with idle cores Small problems

Default and falsification answer fast but never prove; incremental-bmc gives an automated bounded proof; k-induction (parallel) gives an unbounded proof.

Sources

  1. ESBMC docs, Verification Algorithms: esbmc.github.io/docs/theory/verification-algorithms
  2. ESBMC docs, Usage, Unwinding Assertions & Verification Strategies: esbmc.github.io/docs/usage
  3. src/goto-symex/symex_goto.cpp: get_unwind, loop_bound_exceeded (master)
  4. src/esbmc/parseoptions/bmc_strategy.cpp: the B/F/I strategy loop and give-up verdict (master)
  5. src/esbmc/parseoptions/k_induction.cpp: phase runners, --max-inductive-step gate (master)
  6. src/esbmc/parseoptions/command_line_options.cpp: CLI validation of the shared knobs (master)

Made with Entoli