You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flag up the connection with the relaxedmemory model
90
+
.. note::
91
+
In the |SHARED| case, the associated :ref:`action <syntax-act>` is performed as part of :ref:`instantiation <exec-instantiation>`, in order to record in the :ref:`Relaxed Memory Model <relaxed>` that a sequentially consistent bounds check on the shared memory has occurred.
92
92
93
93
94
94
.. index:: global type, global address, value type, mutability
Copy file name to clipboardExpand all lines: document/core/exec/runtime.rst
+6-16Lines changed: 6 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -324,8 +324,6 @@ It also is an invariant that the length of the element vector never exceeds the
324
324
Memory Instances
325
325
~~~~~~~~~~~~~~~~
326
326
327
-
.. todo:: We used to update the memory type when a memory is grown. This does not work for shared memories. In fact, the "current" type of a shared memory is nondeterministic. We need to model that during instantiation somehow.
328
-
329
327
A *memory instance* is the runtime representation of a linear :ref:`memory <syntax-mem>`.
330
328
It records its original :ref:`memory type <syntax-memtype>`
331
329
and takes one of two different shapes depending on whether that type is :ref:`shared <syntax-shared>` or not.
@@ -581,7 +579,7 @@ In order to express the reduction of :ref:`traps <trap>`, :ref:`calls <syntax-ca
581
579
\INVOKE~\funcaddr \\ &&|&
582
580
\LABEL_n\{\instr^\ast\}~\instr^\ast~\END \\ &&|&
583
581
\FRAME_n\{\frame\}~\instr^\ast~\END \\ &&|&
584
-
\WAITX~\loc~n \\ &&|&
582
+
\WAITX~\loc~\s64 \\ &&|&
585
583
\PERFORM~\act^\ast \\ &&|&
586
584
\HOSTE~\resulttype \\
587
585
\end{array}
@@ -598,9 +596,11 @@ The |LABEL| and |FRAME| instructions model :ref:`labels <syntax-label>` and :ref
598
596
Moreover, the administrative syntax maintains the nesting structure of the original :ref:`structured control instruction <syntax-instr-control>` or :ref:`function body <syntax-func>` and their :ref:`instruction sequences <syntax-instr-seq>` with an |END| marker.
599
597
That way, the end of the inner instruction sequence is known when part of an outer sequence.
600
598
601
-
.. todo:: describe |WAITX| and |PERFORM| and |HOSTE|
599
+
The |WAITX| instruction models a thread suspending further execution as the result of executing a |\MEMORYATOMICWAIT| instruction. If its :math:`\s64` argument is non-negative, execution may resume after at least :math:`\s64` nanoseconds. Otherwise, execution will only resume after :math:`\loc` is the target of a corresponding |\MEMORYATOMICNOTIFY| instruction.
600
+
601
+
The |PERFORM| instruction is used to perform an :ref:`action <syntax-act>` at a precise point in execution. These actions are used by the :ref:`Relaxed Memory Model <relaxed>` to determine the behaviours that are observable in a concurrent execution.
602
602
603
-
.. todo:: add allocation instructions
603
+
The |HOSTE| instruction models the execution of the host environment.
604
604
605
605
.. note::
606
606
For example, the :ref:`reduction rule <exec-block>` for |BLOCK| is:
@@ -709,9 +709,6 @@ Each event is annotated with two :ref:`time stamps <syntax-time>`: the first rec
709
709
\byte^\ast \\
710
710
\end{array}
711
711
712
-
.. todo:: ensure identity of wait + wake operations is preserved
713
-
.. todo:: remove spawn from events in a typed way?
714
-
715
712
The access of *mutable* shared state is performed through the |ARD|, |AWR|, and |ARMW| actions.
716
713
Each action accesses an abstract *location*, which consists of an :ref:`address <syntax-addr>` of a :ref:`shared <syntax-shared>` :ref:`memory <syntax-meminst>` instance, a symbolic *field* name in the respective object (either |LLEN| for the size or |LDATA| for the vector of bytes), and an offset index into the field.
717
714
@@ -740,7 +737,7 @@ Conventions
740
737
741
738
* A location may syntactically elide its :math:`[\u32]` offset in the case that it is 0.
742
739
743
-
The following auxiliary definition is used to classify whether an access will *tear*.
740
+
The following auxiliary definition is used to classify whether an access will *tear* - that is, whether it will observably decompose into bytewise accesses when it participates in a data race.
744
741
745
742
.. math::
746
743
\begin{array}{lcl@{\qquad}l}
@@ -749,9 +746,6 @@ The following auxiliary definition is used to classify whether an access will *t
749
746
\tearing(\fN', N, \u32) &=& \epsilon \\
750
747
\end{array}
751
748
752
-
753
-
.. todo:: better description of tearing
754
-
755
749
Relations between time stamps are lifted to relations between events.
756
750
757
751
.. math::
@@ -760,8 +754,6 @@ Relations between time stamps are lifted to relations between events.
@@ -855,8 +847,6 @@ The following rule for global reduction describes the creation of a new thread b
855
847
This time stamp is chosen non-deterministically in the rule.
856
848
However, the second side condition ensures that the time :math:`h` of the last activity of the thread *happened before* :math:`h'`, thereby imposing *program order* for any events originating from the same thread.
0 commit comments