Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sav08:semantics_of_field_reads_and_writes [2008/04/08 23:42] vkuncak |
sav08:semantics_of_field_reads_and_writes [2015/04/21 17:30] (current) |
||
---|---|---|---|
Line 6: | Line 6: | ||
++++| | ++++| | ||
Use function update construct: | Use function update construct: | ||
- | \[ | + | \begin{equation*} |
f = f(x:=y) | f = f(x:=y) | ||
- | \] | + | \end{equation*} |
State variable $f$, which denotes a function, is assigned an updated version of this function. | State variable $f$, which denotes a function, is assigned an updated version of this function. | ||
++++ | ++++ | ||
- | |||
- | What about null pointer checks? | ||
- | |||
- | Examples: | ||
- | y = x.next.next | ||
- | x.next.next.prev = y | ||
- | (x = null | x.next == y) | ||
- | |||
- | Statement simplification. | ||
- | |||
- | Short-circuit evaluation. | ||
- | |||
- | Type and definition sketch of a (Scala) function that simplifies expressions and statements. | ||