Some atomic commands require semantic constraints to be meaningful, which must be enforced after parsing.
The semantic constraints require that:
Memory Read commands do not read from the same variable they assign to. Example x = [x] is an illegal read.
Memory Write command do not compute values from the same variable they assign to. Example [x] = x + 1 is an illegal write.
Note that the semantic constraints are only needed for the analisys. The illegal operations can be simulated by expanding these commands in a suitable way. Example [x] = x + 1 becomes y = x + 1; [x] = y.
Some atomic commands require semantic constraints to be meaningful, which must be enforced after parsing. The semantic constraints require that:
x = [x]
is an illegal read.[x] = x + 1
is an illegal write.Note that the semantic constraints are only needed for the analisys. The illegal operations can be simulated by expanding these commands in a suitable way. Example
[x] = x + 1
becomesy = x + 1; [x] = y
.