Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sav08:collecting_semantics [2008/05/07 08:10] vkuncak |
sav08:collecting_semantics [2015/04/21 17:30] (current) |
||
---|---|---|---|
Line 9: | Line 9: | ||
Program points are CFG nodes. Statements are labels on CFG edges. | Program points are CFG nodes. Statements are labels on CFG edges. | ||
- | We look at a particular way of representing and computing sets of reachable, splitting states by program counter (control-flow graph node): **collecting semantics**. | + | We look at a particular way of representing and computing sets of reachable states, splitting states by program counter (control-flow graph node): **collecting semantics**. |
$PS$ - states describing values of program variables (not including program counter). | $PS$ - states describing values of program variables (not including program counter). | ||
Line 20: | Line 20: | ||
The set of reachable states is defined as the least solution of constraints: | The set of reachable states is defined as the least solution of constraints: | ||
- | \[ | + | \begin{equation*} |
I \subseteq C(p_0) | I \subseteq C(p_0) | ||
- | \] | + | \end{equation*} |
- | \[ | + | \begin{equation*} |
\bigwedge_{(p_1,p_2) \in E} sp(C(p_1),r(p_1,p_2))) \subseteq C(p_2) | \bigwedge_{(p_1,p_2) \in E} sp(C(p_1),r(p_1,p_2))) \subseteq C(p_2) | ||
- | \] | + | \end{equation*} |
over variables $C(p)$ for all of finitely many program points $p$. | over variables $C(p)$ for all of finitely many program points $p$. | ||
+ | |||
+ | The last condition is equivalent to | ||
+ | \begin{equation*} | ||
+ | \bigwedge_{p_2 \in V}\ \left( C(p_2) = C(p_2) \cup \bigcup_{(p_1,p_2) \in E} sp(C(p_1),r(p_1,p_2))) \right) | ||
+ | \end{equation*} | ||
Here $r(p_1,p_2)$ is the relation giving semantics for the command associated with edge $(p_1,p_2)$. | Here $r(p_1,p_2)$ is the relation giving semantics for the command associated with edge $(p_1,p_2)$. | ||
Line 53: | Line 58: | ||
} | } | ||
</code> | </code> | ||
+ | After the assignment of $x$ to 2, the set of reachable states $C$ is $C = \{ (x,2), (i,20), (y,t) \}$ | ||