Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
sav08:unique_references [2008/05/21 10:43] vkuncak created |
sav08:unique_references [2008/05/21 10:45] vkuncak |
||
---|---|---|---|
Line 25: | Line 25: | ||
Binary search tree traversal: | Binary search tree traversal: | ||
- | <code java> | + | <code> |
while (n != null && n.data != x) { | while (n != null && n.data != x) { | ||
if (x < n.data) { | if (x < n.data) { | ||
Line 34: | Line 34: | ||
} | } | ||
</code> | </code> | ||
+ | |||
using unique pointers? | using unique pointers? | ||
- | <code java> | + | |
+ | <code> | ||
while (n != null && n.data != x) { | while (n != null && n.data != x) { | ||
if (x < n.data) { | if (x < n.data) { | ||
Line 57: | Line 59: | ||
where | where | ||
\begin{equation*} | \begin{equation*} | ||
- | \mbox{pointsTo}(x,f,y) = (x.f=y\ \lor\ (x=\mbox{stackFrames} \land f \in \mbox{localVars})\ \lor\ x=\mbox{GLOBAL} \land f \in \mbox{globalVars})) | + | \mbox{pointsTo}(x,f,y) = (x.f=y\ \lor\ (x \in \mbox{stackFrames} \land f \in \mbox{localVars} \land \ldots)\ \lor\ x \in \mbox{GLOBAL} \land f \in \mbox{globalVars} \land \ldots)) |
\end{equation*} | \end{equation*} | ||