K
Kaz Kylheku
Oh? Then what exactly did you mean by "In this case, the abstract
semantics says that, literally, the value is stored into p->next, and
then the assignment expression's value is derived by accessing the
value of p->next."?
I'm aware of that problem.
But suppose that an assignment can go to some temporary location which is then
later synchronized with the real one (without requiring any further evaluation
of any part of the original expression).
E.g. the machine determines where the assignment is suposed to go, and what the
value is, but instead of updating the location immediately, it issues
a store event. In this event, the value and location are identified
concretely; nothing needs to be evaluated any longer. The store events are
performed in some arbitrary order before the next sequence point.
In effect, part of the assignment has already taken place: the event
has been issued, and the assigned value temporarily lives inside that
event, which awaits completion.
So ``after the assignment'' doesn't have to mean ``after the actual target
location is updated'', because we allow the abstract machine to have
freedom in doing the updates anywhere within the evaluation phase.
Updates can always be delayed and reordered by performing the updates to
temporary locations. So arbitrary order of side effects in the abstract
semantics is logically compatible with various evaluation ordering constraints
within the evaluation phase like requiring that the value of
an assignment expression be that of the target after the assignment.