Next: Equivalence of the two
Up: Semantical Aspects of an
Previous: Semantics for the model
Semantics for the model with distributed local dataspaces
Here we present the semantics of an implementation-biased model
with distributed local dataspaces,
henceforth called the local semantics.
To formalize that in this model, read statements of different components might
observe the write events in different order,
we introduce a set
of process identifiers
and extend the semantic primitives of the previous section.
In addition to the three fields
,
and
,
we add a fourth
field, which is a function that
assigns a process identifier to each event in
.
This leads to so-called local semantic primitives (denoted
).
For simplicity, we restrict ourselves to so-called non-nested
Splice programs, denoted by
, where parallel composition
does not occur inside sequential composition.
In this way, we avoid a complex definition of
assigning pids to processes.
Consider, e.g., a program of the form
. Here it is
unclear whether the pid of program
should be equal to the pid
of
,
or none of them.
The semantics of a non-nested Splice program
,
given an initial state
,
to a set of local semantic primitives, denoted
,
is obtained by adapting the semantics of the previous section as follows.
- The local semantics of the three atomic statements
,
and
is basically equal to the global
semantics extended with a
field.
The value of this field is not restricted and may take any possible value,
e.g.:
.
- For sequential composition we require, in addition to the global semantics,
that the events of both components be assigned the same pid.
- The semantics of parallel composition extends the global semantics
by requiring that the events of both components are assigned different
pids.
- The new semantics of
becomes more complex,
as explained below.
Observe that the events of
are assigned the same pid as in
(line 5) and that the main
difference with the semantics of the previous section concerns the
order on the events.
The requirement of a single, total order on all events
is replaced by two conditions:
- There should be a global total order
on the read events
which extends
but does not order write events before others
(lines 6 to 9).
- For each process identifier
there exists a local total order
which extends
(lines 10 and 11) and is such that each read
event with process
identifier
has a preceding (w.r.t.
) write event with the
same value (lines 12 to 15). This local order allows write actions to be
ordered differently for each process, modelling the non-atomicity of
write actions.
To understand the reason for the complexity of this definition,
it might be instructive to mention that in an early attempt
we did not include the first condition and
used only the second condition, with
extending
.
Then the proof of equivalence in PVS failed and we found that the
definition was wrong.
Consider, for instance,
As we have shown in PVS, the global semantics of this program
leads to the empty set.
This conforms
to the intuition that for both processes the read statement blocks,
i.e. the complete program leads to deadlock.
Our erroneous local semantics however did not yield the empty set
because for each process we could order the two read events differently.
Next: Equivalence of the two
Up: Semantical Aspects of an
Previous: Semantics for the model
Roel Bloo
1999-11-26