visit_Stmt()
.$$ \cfrac{\cfrac{}{\cfrac{\langle 0, [] \rangle \Downarrow 0}{\langle p := 0, [] \rangle \Downarrow [p := 0]}} \quad \cfrac{}{\cfrac{\langle 1, [p := 0] \rangle \Downarrow 1}{\langle x := 1, [p := 0] \rangle \Downarrow [p := 0, x := 1]}}}{\cfrac{\langle p := 0 \text{ ; } x := 1, [] \rangle \Downarrow [p := 0, x:= 1] \quad \langle n := 2, [p := 0, x := 1] \rangle \Downarrow [p := 0, x := 1, n := 2]}{\langle p := 0 \text{ ; } x := 1 \text{ ; } n := 2, [] \rangle \Downarrow [p := 0, x := 1, n := 2]}} $$Show that $\langle p := 0 \text{ ; } x := 1 \text{ ; } n := 2, [] \rangle \Downarrow [p := 0, x := 1, n := 2]$.
assert e
- Aborts an execution when $e$ is false, no-op otherwise.void assert(bool b) {
if (!b)
error();
}
havoc x
- Assign a variable $x$ a non-deterministic value.void havoc(int &x) {
int y;
x = y;
}
assume e
- Block execution if $e$ is false, no-op otherwise.void assume(bool e) {
while (!e);
}
Basic Coverage $\implies$ Advanced Coverage
See Slides 6 to 21 in Dynamic Symbolic Execution.
See Slides 22 to 64 in Dynamic Symbolic Execution.
$\mathcal{A}(F)$ | $\mathcal{A}({\lnot}G)$ |
---|---|
$0$ | $1$ |
$1$ | $0$ |
$\mathcal{A}(F)$ | $\mathcal{A}(G)$ | $\mathcal{A}((F \land G))$ |
---|---|---|
$0$ | $0$ | $0$ |
$0$ | $1$ | $0$ |
$1$ | $0$ | $0$ |
$1$ | $1$ | $1$ |
$\mathcal{A}(F)$ | $\mathcal{A}(G)$ | $\mathcal{A}((F \lor G))$ |
---|---|---|
$0$ | $0$ | $0$ |
$0$ | $1$ | $1$ |
$1$ | $0$ | $1$ |
$1$ | $1$ | $1$ |
$\mathcal{A}(F)$ | $\mathcal{A}(G)$ | $\mathcal{A}((F \to G))$ |
---|---|---|
$0$ | $0$ | $1$ |
$0$ | $1$ | $1$ |
$1$ | $0$ | $0$ |
$1$ | $1$ | $1$ |
$\mathcal{A}(F)$ | $\mathcal{A}(G)$ | $\mathcal{A}((F \leftrightarrow G))$ |
---|---|---|
$0$ | $0$ | $1$ |
$0$ | $1$ | $0$ |
$1$ | $0$ | $0$ |
$1$ | $1$ | $1$ |
Prove a statement $S$ for every formula $F$.
For all formulas $F$, $G$, and $H$, the following equivalences hold.
Propositional Resolution System = Sound Proof System
Propositional Resolution = Sound + Complete
See Semantic Arguments for Propositional Logic.