Reading an Assignment as a State Transition
A simple assignment evaluates its right-hand expression using the prior state, then updates the destination indicated by the assignment.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace one coordinate
With x=2 and y=5, assigning x to x+y gives new x=7 and retains y=5. The occurrence of x in the expression reads the prior two. See name binding.
Check dependent updates
An assignment to y afterward can read the new x. Formal reasoning needs to preserve that order. Execution order and updates provide a concrete trace of both versions.[1]