Skip to content

Commit 353c359

Browse files
committed
todo sweep
1 parent bb1dd58 commit 353c359

7 files changed

Lines changed: 28 additions & 37 deletions

File tree

document/core/appendix/properties.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,6 @@ To that end, all previous typing judgements :math:`C \vdash \X{prop}` are genera
630630
S; C \vdashadmininstr \PERFORM~\act^\ast : [] \to []
631631
}
632632
633-
.. todo::
634-
add wf action condition if defined
635-
636633
637634
.. index:: ! store extension, store
638635
.. _extend:
@@ -760,8 +757,11 @@ a store state :math:`S'` extends state :math:`S`, written :math:`S \extendsto S'
760757
\vdashmeminstextends \{\MITYPE~\X{mt}, \MIDATA~b_1^{n_1}\} \extendsto \{\MITYPE~\X{mt}, \MIDATA~b_2^{n_2}\}
761758
}
762759
763-
.. todo::
764-
fixme: memory type can change since min limit is updated with growth; add shared case
760+
.. math::
761+
\frac{
762+
}{
763+
\vdashmeminstextends \{\MITYPE~\X{mt}\} \extendsto \{\MITYPE~\X{mt}\}
764+
}
765765
766766
767767
.. index:: global instance, value, mutability

document/core/exec/instructions.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3351,8 +3351,6 @@ The rules are identical to :ref:`non-atomic stores <exec-store>`, except that :m
33513351
:math:`\MEMORYATOMICNOTIFY~\memarg`
33523352
....................................
33533353

3354-
.. todo:: bounds edge-case, memory length?
3355-
33563354
9. Let :math:`N` be 32.
33573355

33583356
1. Assert: due to :ref:`validation <valid-atomic.rmwn>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.
@@ -4149,8 +4147,6 @@ During its execution, a host function call may do any of the following.
41494147
- Terminate with a list of values that respects the host function's type annotation.
41504148
- Terminate with a trap.
41514149

4152-
.. todo:: better prose, evaluate alternative approach where host may directly emit shared memory events
4153-
41544150
.. math::
41554151
~\\[-1ex]
41564152
\begin{array}{l}

document/core/exec/modules.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ The following auxiliary typing rules specify this typing relation relative to a
8787
S; (\ARD_{\SEQCST}~a.\LLEN~l) \vdashexternval \EVMEM~a : \ETMEM~(\{ \LMIN~l, \LMAX~y^? \}~\SHARED)
8888
}
8989
90-
.. todo::
91-
flag up the connection with the relaxed memory 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.
9292

9393

9494
.. index:: global type, global address, value type, mutability

document/core/exec/relaxed.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Preliminary Definitions
2626
\locact(\ARD_{\ord}~\loc~\byte^\ast~\NOTEARS^?) & = & \loc \\
2727
\locact(\AWR_{\ord}~\loc~\byte^\ast~\NOTEARS^?) & = & \loc \\
2828
\locact(\ARMW~\loc~{\byte_1}^\ast~{\byte_2}^\ast) & = & \loc \\
29+
\locact(\AWAIT~\loc~\s64) & = & \loc \\
30+
\locact(\AWOKEN~\loc) & = & \loc \\
31+
\locact(\ATIMEOUT~\loc) & = & \loc \\
32+
\locact(\ANOTIFY~\loc~\u32~\u32) & = & \loc \\
2933
&&\\
3034
\ordact(\ARD_{\ord}~\loc~\byte^\ast~\NOTEARS^?) & = & \ord \\
3135
\ordact(\AWR_{\ord}~\loc~\byte^\ast~\NOTEARS^?) & = & \ord \\
@@ -64,13 +68,7 @@ Preliminary Definitions
6468
&& (\iff~\locact(\act) = \locact(\act') = \reg[\u32]) \\
6569
\end{array}
6670
67-
.. todo:: add loc for wait/woken/timeout/notify
68-
69-
.. todo:: Double check notears
70-
71-
.. todo:: Tidy up range
72-
73-
.. todo:: add prose intuition?
71+
.. todo:: nicer formatting, add prose intuition?
7472

7573

7674
.. _relaxed-trace:

document/core/exec/runtime.rst

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,6 @@ It also is an invariant that the length of the element vector never exceeds the
324324
Memory Instances
325325
~~~~~~~~~~~~~~~~
326326

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-
329327
A *memory instance* is the runtime representation of a linear :ref:`memory <syntax-mem>`.
330328
It records its original :ref:`memory type <syntax-memtype>`
331329
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
581579
\INVOKE~\funcaddr \\ &&|&
582580
\LABEL_n\{\instr^\ast\}~\instr^\ast~\END \\ &&|&
583581
\FRAME_n\{\frame\}~\instr^\ast~\END \\ &&|&
584-
\WAITX~\loc~n \\ &&|&
582+
\WAITX~\loc~\s64 \\ &&|&
585583
\PERFORM~\act^\ast \\ &&|&
586584
\HOSTE~\resulttype \\
587585
\end{array}
@@ -598,9 +596,11 @@ The |LABEL| and |FRAME| instructions model :ref:`labels <syntax-label>` and :ref
598596
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.
599597
That way, the end of the inner instruction sequence is known when part of an outer sequence.
600598

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.
602602

603-
.. todo:: add allocation instructions
603+
The |HOSTE| instruction models the execution of the host environment.
604604

605605
.. note::
606606
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
709709
\byte^\ast \\
710710
\end{array}
711711
712-
.. todo:: ensure identity of wait + wake operations is preserved
713-
.. todo:: remove spawn from events in a typed way?
714-
715712
The access of *mutable* shared state is performed through the |ARD|, |AWR|, and |ARMW| actions.
716713
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.
717714

@@ -740,7 +737,7 @@ Conventions
740737

741738
* A location may syntactically elide its :math:`[\u32]` offset in the case that it is 0.
742739

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.
744741

745742
.. math::
746743
\begin{array}{lcl@{\qquad}l}
@@ -749,9 +746,6 @@ The following auxiliary definition is used to classify whether an access will *t
749746
\tearing(\fN', N, \u32) &=& \epsilon \\
750747
\end{array}
751748
752-
753-
.. todo:: better description of tearing
754-
755749
Relations between time stamps are lifted to relations between events.
756750

757751
.. math::
@@ -760,8 +754,6 @@ Relations between time stamps are lifted to relations between events.
760754
\act_1^\ast~\AT~\time_p~\time_1 & \prechb & \act_2^\ast~\AT~\time'_p~\time_2 &=& \time_1 & \prechb & \time_2 \\
761755
\end{array}
762756
763-
.. todo:: define notational shorthands over actions and events (or better put that in relaxed.rst?)
764-
765757
766758
.. index:: ! configuration, ! thread, store, frame, instruction, module instruction
767759
.. _syntax-thread:
@@ -855,8 +847,6 @@ The following rule for global reduction describes the creation of a new thread b
855847
This time stamp is chosen non-deterministically in the rule.
856848
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.
857849

858-
.. todo:: check init ordering
859-
860850

861851
Local Reduction
862852
...............

document/core/util/macros.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,9 +1186,9 @@
11861186
.. |REFEXTERNADDR| mathdef:: \xref{exec/runtime}{syntax-ref.extern}{\K{ref{.}extern}}
11871187
.. |TRAP| mathdef:: \xref{exec/runtime}{syntax-trap}{\K{trap}}
11881188
.. |INVOKE| mathdef:: \xref{exec/runtime}{syntax-invoke}{\K{invoke}}
1189-
.. |WAITX| mathdef:: \xref{exec/runtime}{syntax-waitx}{\K{wait'}}
1190-
.. |PERFORM| mathdef:: \xref{exec/runtime}{syntax-perform}{\K{perform}}
1191-
.. |HOSTE| mathdef:: \xref{exec/runtime}{syntax-hoste}{\K{host}}
1189+
.. |WAITX| mathdef:: \xref{exec/runtime}{syntax-instr-admin}{\K{wait'}}
1190+
.. |PERFORM| mathdef:: \xref{exec/runtime}{syntax-instr-admin}{\K{perform}}
1191+
.. |HOSTE| mathdef:: \xref{exec/runtime}{syntax-instr-admin}{\K{host}}
11921192

11931193

11941194
.. Values & Results, non-terminals

document/threads-luxury-todos.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
exec/instructions
2+
- host functions: better prose, evaluate alternative approach where host may directly emit shared memory events
3+
4+
appendix/properties
5+
- perform validity: add wf action condition if defined
6+
7+
Investigate switching init write to happen up to max length at initialisation

0 commit comments

Comments
 (0)