Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Merge from upstream spec #262

Merged
merged 32 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ef01de5
[interpreter] Refactor parser to handle select & call_indirect correc…
rossberg Dec 12, 2022
a54a1d8
[spec] Remove dead piece of grammar
rossberg Dec 15, 2022
1782235
[test] elem.wast: force to use exprs in a element (#1561)
yamt Dec 15, 2022
ca1d792
Fix typos in SIMD exec/instructions
ngzhian Jan 17, 2023
4c249c5
Update interpreter README (#1571)
tlively Jan 18, 2023
f54b5b8
[spec] Remove an obsolete exec step (#1580)
rossberg Jan 24, 2023
6798f05
[test] Optional tableidx for table.{get,set,size,grow,fill} (#1582)
keithw Jan 24, 2023
7d905df
[spec] Fix abstract grammar for const immediate (#1577)
rossberg Jan 26, 2023
0031ea4
[spec] Fix context composition in text format (#1578)
rossberg Jan 26, 2023
dcf4eaa
[spec] Fix label shadowing (#1579)
rossberg Jan 26, 2023
45f9845
[spec] Fix typos in instruction index (#1584)
candymate Jan 31, 2023
947badf
[spec] Fix typo (#1587)
bongjunj Feb 7, 2023
b1fbe1a
[spec] Remove inconsistent newline (#1589)
ShinWonho Feb 8, 2023
2b4222d
[interpreter] Remove legacy bigarray linking (#1593)
rossberg Feb 9, 2023
aa15776
[spec] Show scrolls for overflow math blocks (#1594)
suhdonghwi Feb 9, 2023
31cabf8
[interpreter] Run JS tests via node.js (#1595)
rossberg Feb 9, 2023
e7f6e1c
[spec] Remove stray `x` indices (#1598)
jimblandy Feb 11, 2023
f8ae6b2
[spec] Style tweak for cross-refs
rossberg Feb 13, 2023
0f06880
[spec] Style eps (#1601)
bongjunj Feb 13, 2023
328e425
[spec] Clarify that atoms can be symbolic (#1602)
rossberg Feb 16, 2023
deeb164
[test] Import v128 global (#1597)
rossberg Feb 16, 2023
19b1243
[js-api] Expose everywhere
Ms2ger Oct 12, 2022
4feb919
[js-api] Try to clarify NaN/infinity handling. (#1535)
Ms2ger Feb 16, 2023
51ff50a
[web-api] Correct MIME type check. (#1537)
Ms2ger Feb 17, 2023
e8a83b2
[ci] Pin nodejs version to avoid fetching failures (#1603)
aheejin Feb 21, 2023
3545ad0
[spec] Add missing value to table.grow reduction rule (#1607)
tomstuart Feb 21, 2023
585bfa7
[test] Move SIMD linking test to simd dir (#1610)
rossberg Feb 21, 2023
f9a7267
Editorial: Clarify the name of the instantiate algorithm.
littledan Mar 18, 2019
a114f7a
Add notes to discourage using synchronous APIs.
littledan Mar 18, 2019
25b3df3
[jsapi] Normative: Always queue a task during asynchronous instantiation
littledan Mar 18, 2019
036365a
[test] Exception -> Tag in wasm-module-builder.js
aheejin Feb 18, 2023
87c964f
Merge upstream.
Ms2ger Feb 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ jobs:
with:
ocaml-compiler: 4.12.x
- run: opam install --yes ocamlbuild.0.14.0
- run: cd interpreter && opam exec make all
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: cd interpreter && opam exec make JS=node all

ref-interpreter-js-library:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -60,6 +64,9 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- uses: actions/setup-node@v3
with:
node-version: 16
- run: pip install bikeshed && bikeshed update
- run: pip install six
- run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
Expand Down
8 changes: 4 additions & 4 deletions document/core/appendix/gen-index-instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,10 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat
Instruction(r'\V128.\LOAD\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{55}', r'[\I32~\V128] \to [\V128]', r'valid-load-lane', r'exec-load-lane'),
Instruction(r'\V128.\LOAD\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{56}', r'[\I32~\V128] \to [\V128]', r'valid-load-lane', r'exec-load-lane'),
Instruction(r'\V128.\LOAD\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{57}', r'[\I32~\V128] \to [\V128]', r'valid-load-lane', r'exec-load-lane'),
Instruction(r'\V128.\STORE\K{8\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{58}', r'[\I32~\V128] \to [\V128]', r'valid-store-lane', r'exec-store-lane'),
Instruction(r'\V128.\STORE\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{59}', r'[\I32~\V128] \to [\V128]', r'valid-store-lane', r'exec-store-lane'),
Instruction(r'\V128.\STORE\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5A}', r'[\I32~\V128] \to [\V128]', r'valid-store-lane', r'exec-store-lane'),
Instruction(r'\V128.\STORE\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5B}', r'[\I32~\V128] \to [\V128]', r'valid-store-lane', r'exec-store-lane'),
Instruction(r'\V128.\STORE\K{8\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{58}', r'[\I32~\V128] \to []', r'valid-store-lane', r'exec-store-lane'),
Instruction(r'\V128.\STORE\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{59}', r'[\I32~\V128] \to []', r'valid-store-lane', r'exec-store-lane'),
Instruction(r'\V128.\STORE\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5A}', r'[\I32~\V128] \to []', r'valid-store-lane', r'exec-store-lane'),
Instruction(r'\V128.\STORE\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5B}', r'[\I32~\V128] \to []', r'valid-store-lane', r'exec-store-lane'),
Instruction(r'\V128.\LOAD\K{32\_zero}~\memarg~\laneidx', r'\hex{FD}~~\hex{5C}', r'[\I32] \to [\V128]', r'valid-load-zero', r'exec-load-zero'),
Instruction(r'\V128.\LOAD\K{64\_zero}~\memarg~\laneidx', r'\hex{FD}~~\hex{5D}', r'[\I32] \to [\V128]', r'valid-load-zero', r'exec-load-zero'),
Instruction(r'\F32X4.\VDEMOTE\K{\_f64x2\_zero}', r'\hex{FD}~~\hex{5E}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-demote'),
Expand Down
8 changes: 4 additions & 4 deletions document/core/appendix/index-instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@ Instruction Binary Opcode
:math:`\V128.\LOAD\K{16\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{55}` :math:`[\I32~\V128] \to [\V128]` :ref:`validation <valid-load-lane>` :ref:`execution <exec-load-lane>`
:math:`\V128.\LOAD\K{32\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{56}` :math:`[\I32~\V128] \to [\V128]` :ref:`validation <valid-load-lane>` :ref:`execution <exec-load-lane>`
:math:`\V128.\LOAD\K{64\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{57}` :math:`[\I32~\V128] \to [\V128]` :ref:`validation <valid-load-lane>` :ref:`execution <exec-load-lane>`
:math:`\V128.\STORE\K{8\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{58}` :math:`[\I32~\V128] \to [\V128]` :ref:`validation <valid-store-lane>` :ref:`execution <exec-store-lane>`
:math:`\V128.\STORE\K{16\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{59}` :math:`[\I32~\V128] \to [\V128]` :ref:`validation <valid-store-lane>` :ref:`execution <exec-store-lane>`
:math:`\V128.\STORE\K{32\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{5A}` :math:`[\I32~\V128] \to [\V128]` :ref:`validation <valid-store-lane>` :ref:`execution <exec-store-lane>`
:math:`\V128.\STORE\K{64\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{5B}` :math:`[\I32~\V128] \to [\V128]` :ref:`validation <valid-store-lane>` :ref:`execution <exec-store-lane>`
:math:`\V128.\STORE\K{8\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{58}` :math:`[\I32~\V128] \to []` :ref:`validation <valid-store-lane>` :ref:`execution <exec-store-lane>`
:math:`\V128.\STORE\K{16\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{59}` :math:`[\I32~\V128] \to []` :ref:`validation <valid-store-lane>` :ref:`execution <exec-store-lane>`
:math:`\V128.\STORE\K{32\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{5A}` :math:`[\I32~\V128] \to []` :ref:`validation <valid-store-lane>` :ref:`execution <exec-store-lane>`
:math:`\V128.\STORE\K{64\_lane}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{5B}` :math:`[\I32~\V128] \to []` :ref:`validation <valid-store-lane>` :ref:`execution <exec-store-lane>`
:math:`\V128.\LOAD\K{32\_zero}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{5C}` :math:`[\I32] \to [\V128]` :ref:`validation <valid-load-zero>` :ref:`execution <exec-load-zero>`
:math:`\V128.\LOAD\K{64\_zero}~\memarg~\laneidx` :math:`\hex{FD}~~\hex{5D}` :math:`[\I32] \to [\V128]` :ref:`validation <valid-load-zero>` :ref:`execution <exec-load-zero>`
:math:`\F32X4.\VDEMOTE\K{\_f64x2\_zero}` :math:`\hex{FD}~~\hex{5E}` :math:`[\V128] \to [\V128]` :ref:`validation <valid-vcvtop>` :ref:`execution <exec-vcvtop>`, :ref:`operator <op-demote>`
Expand Down
3 changes: 2 additions & 1 deletion document/core/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@
'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
'preamble': '',
# Don't type-set cross references with emphasis.
'preamble': '\\renewcommand\\sphinxcrossref[1]{#1}\n',

# Latex figure (float) alignment
'figure_align': 'htbp',
Expand Down
20 changes: 9 additions & 11 deletions document/core/exec/instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ Most vector instructions are defined in terms of generic numeric operators appli
.. math::
\begin{array}{l}
\begin{array}{lcl@{\qquad}l}
(\V128\K{.}\VCONST~c_1)~(\V128\K{.}\VCONST~c_2)~\V128\K{.}\SWIZZLE &\stepto& (\V128\K{.}\VCONST~c')
(\V128\K{.}\VCONST~c_1)~(\V128\K{.}\VCONST~c_2)~\I8X16\K{.}\SWIZZLE &\stepto& (\V128\K{.}\VCONST~c')
\end{array}
\\ \qquad
\begin{array}[t]{@{}r@{~}l@{}}
Expand Down Expand Up @@ -431,7 +431,7 @@ Most vector instructions are defined in terms of generic numeric operators appli
.. math::
\begin{array}{l}
\begin{array}{lcl@{\qquad}l}
(\V128\K{.}\VCONST~c_1)~(\V128\K{.}\VCONST~c_2)~\V128\K{.}\SHUFFLE~x^\ast &\stepto& (\V128\K{.}\VCONST~c)
(\V128\K{.}\VCONST~c_1)~(\V128\K{.}\VCONST~c_2)~\I8X16\K{.}\SHUFFLE~x^\ast &\stepto& (\V128\K{.}\VCONST~c)
\end{array}
\\ \qquad
\begin{array}[t]{@{}r@{~}l@{}}
Expand Down Expand Up @@ -1312,7 +1312,7 @@ Table Instructions
\end{array}
\\[1ex]
\begin{array}{lcl@{\qquad}l}
S; F; (\I32.\CONST~n)~(\TABLEGROW~x) &\stepto& S; F; (\I32.\CONST~\signed_{32}^{-1}(-1))
S; F; \val~(\I32.\CONST~n)~(\TABLEGROW~x) &\stepto& S; F; (\I32.\CONST~\signed_{32}^{-1}(-1))
\end{array}
\end{array}

Expand Down Expand Up @@ -2244,7 +2244,7 @@ Memory Instructions
S; F; (\I32.\CONST~d)~\val~(\I32.\CONST~n)~\MEMORYFILL
\quad\stepto\quad S; F; \TRAP
\\ \qquad
(\iff d + n > |S.\SMEMS[F.\AMODULE.\MIMEMS[x]].\MIDATA|)
(\iff d + n > |S.\SMEMS[F.\AMODULE.\MIMEMS[0]].\MIDATA|)
\\[1ex]
S; F; (\I32.\CONST~d)~\val~(\I32.\CONST~0)~\MEMORYFILL
\quad\stepto\quad S; F; \epsilon
Expand Down Expand Up @@ -2451,7 +2451,7 @@ Memory Instructions
\\ \qquad
\begin{array}[t]{@{}r@{~}l@{}}
(\iff & s + n > |S.\SDATAS[F.\AMODULE.\MIDATAS[x]].\DIDATA| \\
\vee & d + n > |S.\SMEMS[F.\AMODULE.\MIMEMS[x]].\MIDATA|) \\[1ex]
\vee & d + n > |S.\SMEMS[F.\AMODULE.\MIMEMS[0]].\MIDATA|) \\[1ex]
\end{array}
\\[1ex]
S; F; (\I32.\CONST~d)~(\I32.\CONST~s)~(\I32.\CONST~0)~(\MEMORYINIT~x)
Expand Down Expand Up @@ -3143,15 +3143,13 @@ Invocation of :ref:`function address <syntax-funcaddr>` :math:`a`

7. Pop the values :math:`\val^n` from the stack.

8. Let :math:`\val_0^\ast` be the list of zero values of types :math:`t^\ast`.

9. Let :math:`F` be the :ref:`frame <syntax-frame>` :math:`\{ \AMODULE~f.\FIMODULE, \ALOCALS~\val^n~(\default_t)^\ast \}`.
8. Let :math:`F` be the :ref:`frame <syntax-frame>` :math:`\{ \AMODULE~f.\FIMODULE, \ALOCALS~\val^n~(\default_t)^\ast \}`.

10. Push the activation of :math:`F` with arity :math:`m` to the stack.
9. Push the activation of :math:`F` with arity :math:`m` to the stack.

11. Let :math:`L` be the :ref:`label <syntax-label>` whose arity is :math:`m` and whose continuation is the end of the function.
10. Let :math:`L` be the :ref:`label <syntax-label>` whose arity is :math:`m` and whose continuation is the end of the function.

12. :ref:`Enter <exec-instr-seq-enter>` the instruction sequence :math:`\instr^\ast` with label :math:`L`.
11. :ref:`Enter <exec-instr-seq-enter>` the instruction sequence :math:`\instr^\ast` with label :math:`L`.

.. math::
~\\[-1ex]
Expand Down
3 changes: 1 addition & 2 deletions document/core/exec/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,7 @@ and list of :ref:`reference <syntax-ref>` vectors for the module's :ref:`element

a. Let :math:`\limits_i~t_i` be the :ref:`table type <syntax-tabletype>` :math:`\table_i.\TTYPE`.

b. Let :math:`\tableaddr_i` be the :ref:`table address <syntax-tableaddr>` resulting from :ref:`allocating <alloc-table>` :math:`\table_i.\TTYPE`
with initialization value :math:`\REFNULL~t_i`.
b. Let :math:`\tableaddr_i` be the :ref:`table address <syntax-tableaddr>` resulting from :ref:`allocating <alloc-table>` :math:`\table_i.\TTYPE` with initialization value :math:`\REFNULL~t_i`.

4. For each :ref:`memory <syntax-mem>` :math:`\mem_i` in :math:`\module.\MMEMS`, do:

Expand Down
6 changes: 2 additions & 4 deletions document/core/exec/runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -510,17 +510,15 @@ Intuitively, :math:`\instr^\ast` is the *continuation* to execute when the branc

When branching, the empty continuation ends the targeted block, such that execution can proceed with consecutive instructions.

Activations and Frames
......................
Activation Frames
.................

Activation frames carry the return arity :math:`n` of the respective function,
hold the values of its :ref:`locals <syntax-local>` (including arguments) in the order corresponding to their static :ref:`local indices <syntax-localidx>`,
and a reference to the function's own :ref:`module instance <syntax-moduleinst>`:

.. math::
\begin{array}{llll}
\production{activation} & \X{activation} &::=&
\FRAME_n\{\frame\} \\
\production{frame} & \frame &::=&
\{ \ALOCALS~\val^\ast, \AMODULE~\moduleinst \} \\
\end{array}
Expand Down
2 changes: 2 additions & 0 deletions document/core/static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ div.admonition p.admonition-title {
div.math {
background-color: #F0F0F0;
padding: 3px 0 3px 0;
overflow-x: auto;
overflow-y: hidden;
}

div.relations {
Expand Down
2 changes: 1 addition & 1 deletion document/core/syntax/conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Grammar Notation

The following conventions are adopted in defining grammar rules for abstract syntax.

* Terminal symbols (atoms) are written in sans-serif font: :math:`\K{i32}, \K{end}`.
* Terminal symbols (atoms) are written in sans-serif font or in symbolic form: :math:`\K{i32}, \K{end}, {\to}, [, ]`.

* Nonterminal symbols are written in italic font: :math:`\X{valtype}, \X{instr}`.

Expand Down
2 changes: 1 addition & 1 deletion document/core/syntax/instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ These operations closely match respective operations available in hardware.
\production{signedness} & \sx &::=&
\K{u} ~|~ \K{s} \\
\production{instruction} & \instr &::=&
\K{i}\X{nn}\K{.}\CONST~\xref{syntax/values}{syntax-int}{\iX{\X{nn}}} ~|~
\K{i}\X{nn}\K{.}\CONST~\xref{syntax/values}{syntax-int}{\uX{\X{nn}}} ~|~
\K{f}\X{nn}\K{.}\CONST~\xref{syntax/values}{syntax-float}{\fX{\X{nn}}} \\&&|&
\K{i}\X{nn}\K{.}\iunop ~|~
\K{f}\X{nn}\K{.}\funop \\&&|&
Expand Down
9 changes: 7 additions & 2 deletions document/core/text/instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ The following grammar handles the corresponding update to the :ref:`identifier c
\production{label} & \Tlabel_I &::=&
v{:}\Tid &\Rightarrow& \{\ILABELS~v\} \compose I
& (\iff v \notin I.\ILABELS) \\ &&|&
v{:}\Tid &\Rightarrow& \{\ILABELS~v\} \compose (I \with \ILABELS[i] = \epsilon)
& (\iff I.\ILABELS[i] = v) \\ &&|&
\epsilon &\Rightarrow& \{\ILABELS~(\epsilon)\} \compose I \\
\end{array}

Expand All @@ -42,6 +44,9 @@ The following grammar handles the corresponding update to the :ref:`identifier c
This effectively shifts all existing labels up by one,
mirroring the fact that control instructions are indexed relatively not absolutely.

If a label with the same name already exists,
then it is shadowed and the earlier label becomes inaccessible.


.. index:: control instructions, structured control, label, block, branch, result type, label index, function index, type index, vector, polymorphism, tag index, exception instructions
pair: text format; instruction
Expand Down Expand Up @@ -175,7 +180,7 @@ Reference Instructions
\production{instruction} & \Tplaininstr_I &::=& \dots \\ &&|&
\text{ref.null}~~t{:}\Theaptype &\Rightarrow& \REFNULL~t \\ &&|&
\text{ref.is\_null} &\Rightarrow& \REFISNULL \\ &&|&
\text{ref.func}~~x{:}\Tfuncidx &\Rightarrow& \REFFUNC~x \\ &&|&
\text{ref.func}~~x{:}\Tfuncidx &\Rightarrow& \REFFUNC~x \\
\end{array}


Expand Down Expand Up @@ -901,7 +906,7 @@ Vector constant instructions have a mandatory :ref:`shape <syntax-vec-shape>` de
\text{f64x2.convert\_low\_i32x4\_s} &\Rightarrow& \F64X2.\VCONVERT\K{\_low\_i32x4\_s}\\ &&|&
\text{f64x2.convert\_low\_i32x4\_u} &\Rightarrow& \F64X2.\VCONVERT\K{\_low\_i32x4\_u}\\ &&|&
\text{f32x4.demote\_f64x2\_zero} &\Rightarrow& \F32X4.\VDEMOTE\K{\_f64x2\_zero}\\ &&|&
\text{f64x2.promote\_low\_f32x4} &\Rightarrow& \F64X2.\VPROMOTE\K{\_low\_f32x4}\\ &&|&
\text{f64x2.promote\_low\_f32x4} &\Rightarrow& \F64X2.\VPROMOTE\K{\_low\_f32x4}\\
\end{array}


Expand Down
2 changes: 1 addition & 1 deletion document/core/text/lexical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The character stream in the source text is divided, from left to right, into a s
\text{(} ~|~ \text{)} ~|~ \Treserved \\
\production{keyword} & \Tkeyword &::=&
(\text{a} ~|~ \dots ~|~ \text{z})~\Tidchar^\ast
\qquad (\mbox{if occurring as a literal terminal in the grammar}) \\
\qquad (\iff~\mbox{occurring as a literal terminal in the grammar}) \\
\production{reserved} & \Treserved &::=&
(\Tidchar ~|~ \Tstring)^+ \\
\end{array}
Expand Down
4 changes: 2 additions & 2 deletions document/core/text/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ If inline declarations are given, then their types must match the referenced :re
\end{array} \\
\end{array}

The synthesized attribute of a |Ttypeuse| is a pair consisting of both the used :ref:`type index <syntax-typeidx>` and the updated :ref:`identifier context <text-context>` including possible parameter identifiers.
The synthesized attribute of a |Ttypeuse| is a pair consisting of both the used :ref:`type index <syntax-typeidx>` and the local :ref:`identifier context <text-context>` containing possible parameter identifiers.
The following auxiliary function extracts optional identifiers from parameters:

.. math::
Expand Down Expand Up @@ -206,7 +206,7 @@ Function definitions can bind a symbolic :ref:`function identifier <text-id>`, a
\text{(}~\text{func}~~\Tid^?~~x,I'{:}\Ttypeuse_I~~
(t{:}\Tlocal)^\ast~~(\X{in}{:}\Tinstr_{I''})^\ast~\text{)} \\ &&& \qquad
\Rightarrow\quad \{ \FTYPE~x, \FLOCALS~t^\ast, \FBODY~\X{in}^\ast~\END \} \\ &&& \qquad\qquad\qquad
(\iff I'' = I' \compose \{\ILOCALS~\F{id}(\Tlocal)^\ast\} \idcwellformed) \\[1ex]
(\iff I'' = I \compose I' \compose \{\ILOCALS~\F{id}(\Tlocal)^\ast\} \idcwellformed) \\[1ex]
\production{local} & \Tlocal &::=&
\text{(}~\text{local}~~\Tid^?~~t{:}\Tvaltype~\text{)}
\quad\Rightarrow\quad t \\
Expand Down
Loading