From d98963d3537fce6088b8ab19b4067a64773d338d Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Tue, 28 May 2024 12:56:30 +0200 Subject: [PATCH] Math for matching --- document/core/util/macros.def | 7 +- document/core/valid/matching.rst | 377 +---- document/core/valid/modules.rst | 1 + spectec/spec/wasm-3.0/1-syntax.watsup | 3 + spectec/spec/wasm-3.0/6-typing.watsup | 64 +- spectec/src/backend-latex/render.ml | 7 +- spectec/test-frontend/TEST.md | 388 ++--- spectec/test-latex/TEST.md | 67 +- spectec/test-middlend/TEST.md | 1954 +++++++++++++------------ spectec/test-prose/TEST.md | 38 +- spectec/test-splice/TEST.md | 40 +- 11 files changed, 1378 insertions(+), 1568 deletions(-) diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 39106636d6..b8ce398dbd 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -290,6 +290,7 @@ .. |tabletype| mathdef:: \xref{syntax/types}{syntax-tabletype}{\X{tabletype}} .. |memtype| mathdef:: \xref{syntax/types}{syntax-memtype}{\X{memtype}} .. |datatype| mathdef:: \xref{valid/modules}{syntax-datatype}{\X{datatype}} +.. |externtype| mathdef:: \xref{syntax/types}{syntax-externtype}{\X{externtype}} .. |limits| mathdef:: \xref{syntax/types}{syntax-limits}{\X{limits}} .. |mut| mathdef:: \xref{syntax/types}{syntax-mut}{\X{mut}} @@ -297,8 +298,7 @@ .. |instrtype| mathdef:: \xref{valid/conventions}{syntax-instrtype}{\X{instrtype}} .. |localtype| mathdef:: \xref{valid/conventions}{syntax-localtype}{\X{localtype}} -.. |externtype| mathdef:: \xref{syntax/types}{syntax-externtype}{\X{externtype}} -.. |moduletype| mathdef:: \xref{syntax/types}{syntax-moduletype}{\X{moduletype}} +.. |moduletype| mathdef:: \xref{valid/modules}{syntax-moduletype}{\X{moduletype}} .. Types, meta functions @@ -1217,7 +1217,7 @@ .. |CONSTexprconst| mathdef:: \xref{valid/instructions}{valid-const}{\K{const}} .. |CONSTexprokconst| mathdef:: \xref{valid/instructions}{valid-const}{\K{const}} -.. |vdashexternidx| mathdef:: \xref{valid/modules}{valid-exxternidx}{\vdash} +.. |vdashexternidx| mathdef:: \xref{valid/modules}{valid-externidx}{\vdash} .. |vdashtype| mathdef:: \xref{valid/modules}{valid-type}{\vdash} .. |vdashtypes| mathdef:: \xref{valid/modules}{valid-types}{\vdash} @@ -1233,6 +1233,7 @@ .. |vdashdatamode| mathdef:: \xref{valid/modules}{valid-datamode}{\vdash} .. |vdashstart| mathdef:: \xref{valid/modules}{valid-start}{\vdash} .. |vdashexport| mathdef:: \xref{valid/modules}{valid-export}{\vdash} +.. |vdashexternidx| mathdef:: \xref{valid/modules}{valid-externidx}{\vdash} .. |vdashexportdesc| mathdef:: \xref{valid/modules}{valid-exportdesc}{\vdash} .. |vdashimport| mathdef:: \xref{valid/modules}{valid-import}{\vdash} .. |vdashimportdesc| mathdef:: \xref{valid/modules}{valid-importdesc}{\vdash} diff --git a/document/core/valid/matching.rst b/document/core/valid/matching.rst index 449ec7fb6f..09a7572543 100644 --- a/document/core/valid/matching.rst +++ b/document/core/valid/matching.rst @@ -14,16 +14,11 @@ On most types, a notion of *subtyping* is defined that is applicable in :ref:`va Number Types ~~~~~~~~~~~~ -A :ref:`number type ` :math:`\numtype_1` matches a :ref:`number type ` :math:`\numtype_2` if and only if: +A :ref:`number type ` ${:numtype_1} matches a :ref:`number type ` ${:numtype_2} if and only if: * Both :math:`\numtype_1` and :math:`\numtype_2` are the same. -.. math:: - ~\\[-1ex] - \frac{ - }{ - C \vdashnumtypematch \numtype \subnumtypematch \numtype - } +$${rule: Numtype_sub} .. index:: vector type @@ -32,16 +27,11 @@ A :ref:`number type ` :math:`\numtype_1` matches a :ref:`number Vector Types ~~~~~~~~~~~~ -A :ref:`vector type ` :math:`\vectype_1` matches a :ref:`vector type ` :math:`\vectype_2` if and only if: +A :ref:`vector type ` ${:vectype_1} matches a :ref:`vector type ` ${:vectype_2} if and only if: * Both :math:`\vectype_1` and :math:`\vectype_2` are the same. -.. math:: - ~\\[-1ex] - \frac{ - }{ - C \vdashvectypematch \vectype \subvectypematch \vectype - } +$${rule: Vectype_sub} .. index:: heap type, defined type, structure type, array type, function type, unboxed scalar type @@ -50,7 +40,7 @@ A :ref:`vector type ` :math:`\vectype_1` matches a :ref:`vector Heap Types ~~~~~~~~~~ -A :ref:`heap type ` :math:`\heaptype_1` matches a :ref:`heap type ` :math:`\heaptype_2` if and only if: +A :ref:`heap type ` ${:heaptype_1} matches a :ref:`heap type ` ${:heaptype_2} if and only if: * Either both :math:`\heaptype_1` and :math:`\heaptype_2` are the same. @@ -80,106 +70,16 @@ A :ref:`heap type ` :math:`\heaptype_1` matches a :ref:`heap ty * Or :math:`\heaptype_1` is :math:`\BOTH`. -.. math:: - ~\\[-1ex] - \frac{ - }{ - C \vdashheaptypematch \heaptype \subheaptypematch \heaptype - } - \qquad - \frac{ - C \vdashheaptype \heaptype' : \OKheaptype - \qquad - C \vdashheaptypematch \heaptype_1 \subheaptypematch \heaptype' - \qquad - C \vdashheaptypematch \heaptype' \subheaptypematch \heaptype_2 - }{ - C \vdashheaptypematch \heaptype_1 \subheaptypematch \heaptype_2 - } - -.. math:: - ~\\[-1ex] - \frac{ - }{ - C \vdashheaptypematch \EQT \subheaptypematch \ANY - } - \qquad - \frac{ - }{ - C \vdashheaptypematch \I31 \subheaptypematch \EQT - } - \qquad - \frac{ - }{ - C \vdashheaptypematch \STRUCT \subheaptypematch \EQT - } - \qquad - \frac{ - }{ - C \vdashheaptypematch \ARRAY \subheaptypematch \EQT - } - -.. math:: - ~\\[-1ex] - \frac{ - \expanddt(\deftype) = \TSTRUCT~\X{st} - }{ - C \vdashheaptypematch \deftype \subheaptypematch \STRUCT - } - \qquad - \frac{ - \expanddt(\deftype) = \TARRAY~\X{at} - }{ - C \vdashheaptypematch \deftype \subheaptypematch \ARRAY - } - \qquad - \frac{ - \expanddt(\deftype) = \TFUNC~\X{ft} - }{ - C \vdashheaptypematch \deftype \subheaptypematch \FUNC - } - -.. math:: - ~\\[-1ex] - \frac{ - C \vdashheaptypematch C.\CTYPES[\typeidx_1] \subheaptypematch \heaptype_2 - }{ - C \vdashheaptypematch \typeidx_1 \subheaptypematch \heaptype_2 - } - \qquad - \frac{ - C \vdashheaptypematch \heaptype_1 \subheaptypematch C.\CTYPES[\typeidx_2] - }{ - C \vdashheaptypematch \heaptype_1 \subheaptypematch \typeidx_2 - } - -.. math:: - ~\\[-1ex] - \frac{ - C \vdashheaptypematch \X{ht} \subheaptypematch \ANY - }{ - C \vdashheaptypematch \NONE \subheaptypematch \X{ht} - } - \qquad - \frac{ - C \vdashheaptypematch \X{ht} \subheaptypematch \FUNC - }{ - C \vdashheaptypematch \NOFUNC \subheaptypematch \X{ht} - } - \qquad - \frac{ - C \vdashheaptypematch \X{ht} \subheaptypematch \EXTERN - }{ - C \vdashheaptypematch \NOEXTERN \subheaptypematch \X{ht} - } - -.. math:: - ~\\[-1ex] - \frac{ - }{ - C \vdashheaptypematch \BOTH \subheaptypematch \heaptype - } - +$${rule: + {Heaptype_sub/refl Heaptype_sub/trans} + {Heaptype_sub/eq-any Heaptype_sub/i31-eq Heaptype_sub/struct-eq Heaptype_sub/array-eq} + {Heaptype_sub/struct Heaptype_sub/array Heaptype_sub/func} + {Heaptype_sub/typeidx-l Heaptype_sub/typeidx-r} + {Heaptype_sub/rec} + {Heaptype_sub/none Heaptype_sub/nofunc Heaptype_sub/noextern} + {Heaptype_sub/bot} +} +$${rule-ignore: Heaptype_sub/def} .. index:: reference type @@ -188,25 +88,13 @@ A :ref:`heap type ` :math:`\heaptype_1` matches a :ref:`heap ty Reference Types ~~~~~~~~~~~~~~~ -A :ref:`reference type ` :math:`\REF~\NULL_1^?~heaptype_1` matches a :ref:`reference type ` :math:`\REF~\NULL_2^?~heaptype_2` if and only if: +A :ref:`reference type ` ${reftype: REF nul1 heaptype_1} matches a :ref:`reference type ` ${reftype: REF nul2 heaptype_2} if and only if: * The :ref:`heap type ` :math:`\heaptype_1` :ref:`matches ` :math:`\heaptype_2`. * :math:`\NULL_1` is absent or :math:`\NULL_2` is present. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashheaptypematch \heaptype_1 \subheaptypematch \heaptype_2 - }{ - C \vdashreftypematch \REF~\heaptype_1 \subreftypematch \REF~\heaptype_2 - } - \qquad - \frac{ - C \vdashheaptypematch \heaptype_1 \subheaptypematch \heaptype_2 - }{ - C \vdashreftypematch \REF~\NULL^?~\heaptype_1 \subreftypematch \REF~\NULL~\heaptype_2 - } +$${rule: Reftype_sub/*} .. index:: value type, number type, reference type @@ -215,7 +103,7 @@ A :ref:`reference type ` :math:`\REF~\NULL_1^?~heaptype_1` match Value Types ~~~~~~~~~~~ -A :ref:`value type ` :math:`\valtype_1` matches a :ref:`value type ` :math:`\valtype_2` if and only if: +A :ref:`value type ` ${:valtype_1} matches a :ref:`value type ` ${:valtype_2} if and only if: * Either both :math:`\valtype_1` and :math:`\valtype_2` are :ref:`number types ` and :math:`\valtype_1` :ref:`matches ` :math:`\valtype_2`. @@ -223,12 +111,8 @@ A :ref:`value type ` :math:`\valtype_1` matches a :ref:`value ty * Or :math:`\valtype_1` is :math:`\BOT`. -.. math:: - ~\\[-1ex] - \frac{ - }{ - C \vdashvaltypematch \BOT \subvaltypematch \valtype - } +$${rule: Valtype_sub/bot} +$${rule-ignore: Valtype_sub/num Valtype_sub/vec Valtype_sub/ref} .. index:: result type, value type @@ -238,17 +122,11 @@ Result Types ~~~~~~~~~~~~ Subtyping is lifted to :ref:`result types ` in a pointwise manner. -That is, a :ref:`result type ` :math:`[t_1^\ast]` matches a :ref:`result type ` :math:`[t_2^\ast]` if and only if: +That is, a :ref:`result type ` ${:t_1*} matches a :ref:`result type ` ${:t_2*} if and only if: * Every :ref:`value type ` :math:`t_1` in :math:`[t_1^\ast]` :ref:`matches ` the corresponding :ref:`value type ` :math:`t_2` in :math:`[t_2^\ast]`. -.. math:: - ~\\[-1ex] - \frac{ - (C \vdashvaltypematch t_1 \subvaltypematch t_2)^\ast - }{ - C \vdashresulttypematch [t_1^\ast] \subresulttypematch [t_2^\ast] - } +$${rule: Resulttype_sub} .. index:: instruction type, result type @@ -258,7 +136,7 @@ Instruction Types ~~~~~~~~~~~~~~~~~ Subtyping is further lifted to :ref:`instruction types `. -An :ref:`instruction type ` :math:`[t_{11}^\ast] \to_{x_1^\ast} [t_{12}^\ast]` matches a type :math:`[t_{21}^ast] \to_{x_2^\ast} [t_{22}^\ast]` if and only if: +An :ref:`instruction type ` ${instrtype: t_11* ->_(x_1*) t_12*} matches a type ${instrtype: t_21* ->_(x_2*) t_22*} if and only if: * There is a common sequence of :ref:`value types ` :math:`t^\ast` such that :math:`t_{21}^\ast` equals :math:`t^\ast~{t'_{21}}^\ast` and :math:`t_{22}^\ast` equals :math:`t^\ast~{t'_{22}}^\ast`. @@ -268,27 +146,13 @@ An :ref:`instruction type ` :math:`[t_{11}^\ast] \to_{x_1^\ast * For every :ref:`local index ` :math:`x` that is in :math:`x_2^\ast` but not in :math:`x_1^\ast`, the :ref:`local type ` :math:`C.\CLOCALS[x]` is :math:`\SET~t_x` for some :ref:`value type ` :math:`t_x`. -.. math:: - ~\\[-1ex] - \frac{ - \begin{array}{@{}c@{\qquad}l@{}} - C \vdashresulttypematch [t_{21}^\ast] \subresulttypematch [t_{11}^\ast] - & - \{ x^\ast \} = \{ x_2^\ast \} \setminus \{ x_1^\ast \} - \\ - C \vdashresulttypematch [t_{12}^\ast] \subresulttypematch [t_{22}^\ast] - & - (C.\CLOCALS[x] = \SET~t_x)^\ast - \end{array} - }{ - C \vdashinstrtypematch [t_{11}^\ast] \to_{x_1^\ast} [t_{12}^\ast] \subinstrtypematch [t^\ast~t_{21}^\ast] \to_{x_2^\ast} [t^\ast~t_{22}^\ast] - } +$${rule: Instrtype_sub} .. note:: Instruction types are contravariant in their input and covariant in their output. Subtyping also incorporates a sort of "frame" condition, which allows adding arbitrary invariant stack elements on both sides in the super type. - Finally, the supertype may ignore variables from the init set :math:`x_1^\ast`. + Finally, the supertype may ignore variables from the init set ${:x_1*}. It may also *add* variables to the init set, provided these are already set in the context, i.e., are vacuously initialized. @@ -298,21 +162,13 @@ An :ref:`instruction type ` :math:`[t_{11}^\ast] \to_{x_1^\ast Function Types ~~~~~~~~~~~~~~ -A :ref:`function type ` :math:`[t_{11}^\ast] \toF [t_{12}^\ast]` matches a type :math:`[t_{21}^ast] \toF [t_{22}^\ast]` if and only if: +A :ref:`function type ` ${functype: t_11* -> t_12*} matches a type ${functype: t_21* -> t_22*} if and only if: * The :ref:`result type ` :math:`[t_{21}^\ast]` :ref:`matches ` :math:`[t_{11}^\ast]`. * The :ref:`result type ` :math:`[t_{12}^\ast]` :ref:`matches ` :math:`[t_{22}^\ast]`. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashresulttypematch [t_{21}^\ast] \subresulttypematch [t_{11}^\ast] - \qquad - C \vdashresulttypematch [t_{12}^\ast] \subresulttypematch [t_{22}^\ast] - }{ - C \vdashfunctypematch [t_{11}^\ast] \toF [t_{12}^\ast] \subfunctypematch [t_{21}^\ast] \toF [t_{22}^\ast] - } +$${rule: Functype_sub} .. index:: composite types, aggregate type, structure type, array type, field type @@ -323,7 +179,7 @@ A :ref:`function type ` :math:`[t_{11}^\ast] \toF [t_{12}^\ast] Composite Types ~~~~~~~~~~~~~~~ -A :ref:`composite type ` :math:`\comptype_1` matches a type :math:`\comptype_2` if and only if: +A :ref:`composite type ` ${:comptype_1} matches a type ${:comptype_2} if and only if: * Either the composite type :math:`\comptype_1` is :math:`\TFUNC~\functype_1` and :math:`\comptype_2` is :math:`\TFUNC~\functype_2` and: @@ -341,29 +197,7 @@ A :ref:`composite type ` :math:`\comptype_1` matches a type :ma * The :ref:`field type ` :math:`\fieldtype_1` :ref:`matches ` :math:`\fieldtype_2`. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashfunctypematch \functype_1 \subfunctypematch \functype_2 - }{ - C \vdashcomptypematch \TFUNC~\functype_1 \subcomptypematch \TFUNC~\functype_2 - } - -.. math:: - ~\\[-1ex] - \frac{ - (C \vdashfieldtypematch \fieldtype_1 \subfieldtypematch \fieldtype_2)^\ast - }{ - C \vdashcomptypematch \TSTRUCT~\fieldtype_1^\ast~{\fieldtype'}_1^\ast \subcomptypematch \TSTRUCT~\fieldtype_2^\ast - } - -.. math:: - ~\\[-1ex] - \frac{ - C \vdashfieldtypematch \fieldtype_1 \subfieldtypematch \fieldtype_2 - }{ - C \vdashcomptypematch \TARRAY~\fieldtype_1 \subcomptypematch \TARRAY~\fieldtype_2 - } +$${rule: Comptype_sub/*} .. index:: field type, storage type, value type, packed type, mutability @@ -374,7 +208,7 @@ A :ref:`composite type ` :math:`\comptype_1` matches a type :ma Field Types ~~~~~~~~~~~ -A :ref:`field type ` :math:`\mut_1~\storagetype_1` matches a type :math:`\mut_2~\storagetype_2` if and only if: +A :ref:`field type ` ${fieldtype: (mut1 storagetype_1)} matches a type ${fieldtype: (mut2 storagetype_2)} if and only if: * :ref:`Storage type ` :math:`\storagetype_1` :ref:`matches ` :math:`\storagetype_2`. @@ -382,23 +216,7 @@ A :ref:`field type ` :math:`\mut_1~\storagetype_1` matches a t * Or both :math:`\mut_1` and :math:`\mut_2` are :math:`\MVAR` and :math:`\storagetype_2` :ref:`matches ` :math:`\storagetype_1` as well. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashstoragetypematch \storagetype_1 \substoragetypematch \storagetype_2 - }{ - C \vdashfieldtypematch \MCONST~\storagetype_1 \subcomptypematch \MCONST~\storagetype_2 - } - \qquad - \frac{ - \begin{array}[b]{@{}c@{}} - C \vdashstoragetypematch \storagetype_1 \substoragetypematch \storagetype_2 - \\ - C \vdashstoragetypematch \storagetype_2 \substoragetypematch \storagetype_1 - \end{array} - }{ - C \vdashfieldtypematch \MVAR~\storagetype_1 \subcomptypematch \MVAR~\storagetype_2 - } +$${rule: Fieldtype_sub/*} A :ref:`storage type ` :math:`\storagetype_1` matches a type :math:`\storagetype_2` if and only if: @@ -406,16 +224,12 @@ A :ref:`storage type ` :math:`\storagetype_1` matches a type * Or :math:`\storagetype_1` is a :ref:`packed type ` :math:`\packtype_1` and :math:`\storagetype_2` is a :ref:`packed type ` :math:`\packtype_2` and :math:`\packtype_1` :ref:`matches ` :math:`\packtype_2`. -A :ref:`packed type ` :math:`\packtype_1` matches a type :math:`\packtype_2` if and only if: + +A :ref:`packed type ` ${:packtype_1} matches a type ${:packtype_2} if and only if: * The :ref:`packed type ` :math:`\packtype_1` is the same as :math:`\packtype_2`. -.. math:: - ~\\[-1ex] - \frac{ - }{ - C \vdashpacktypematch \packtype \subpacktypematch \packtype - } +$${rule: Packtype_sub} .. index:: defined type, recursive type, unroll, type equivalence @@ -425,7 +239,7 @@ A :ref:`packed type ` :math:`\packtype_1` matches a type :math: Defined Types ~~~~~~~~~~~~~ -A :ref:`defined type ` :math:`\deftype_1` matches a type :math:`\deftype_2` if and only if: +A :ref:`defined type ` ${:deftype_1} matches a type ${:deftype_2} if and only if: * Either :math:`\deftype_1` and :math:`\deftype_2` are equal when :ref:`closed ` under context :math:`C`. @@ -435,26 +249,10 @@ A :ref:`defined type ` :math:`\deftype_1` matches a type :math:` * Then there must exist a :ref:`heap type ` :math:`\heaptype_i` in :math:`\heaptype^\ast` that :ref:`matches ` :math:`\deftype_2`. -.. math:: - ~\\[-1ex] - \frac{ - \clostype_C(\deftype_1) = \clostype_C(\deftype_2) - }{ - C \vdashdeftypematch \deftype_1 \subdeftypematch \deftype_2 - } - -.. math:: - ~\\[-1ex] - \frac{ - \unrolldt(\deftype_1) = \TSUB~\TFINAL^?~\heaptype^\ast~\comptype - \qquad - C \vdashheaptypematch \heaptype^\ast[i] \subheaptypematch \deftype_2 - }{ - C \vdashdeftypematch \deftype_1 \subdeftypematch \deftype_2 - } +$${rule: Deftype_sub/refl Deftype_sub/super} .. note:: - Note that there is no explicit definition of type _equivalence_, + Note that there is no explicit definition of type *equivalence*, since it coincides with syntactic equality, as used in the premise of the fomer rule above. @@ -465,7 +263,7 @@ A :ref:`defined type ` :math:`\deftype_1` matches a type :math:` Limits ~~~~~~ -:ref:`Limits ` :math:`\{ \LMIN~n_1, \LMAX~m_1^? \}` match limits :math:`\{ \LMIN~n_2, \LMAX~m_2^? \}` if and only if: +:ref:`Limits ` ${limits: `[n_1 .. m_1]} match limits ${limits: `[n_2 .. m_2]} if and only if: * :math:`n_1` is larger than or equal to :math:`n_2`. @@ -479,21 +277,7 @@ Limits * :math:`m_1` is smaller than or equal to :math:`m_2`. -.. math:: - ~\\[-1ex] - \frac{ - n_1 \geq n_2 - }{ - C \vdashlimitsmatch \{ \LMIN~n_1, \LMAX~m_1^? \} \sublimitsmatch \{ \LMIN~n_2, \LMAX~\epsilon \} - } - \quad - \frac{ - n_1 \geq n_2 - \qquad - m_1 \leq m_2 - }{ - C \vdashlimitsmatch \{ \LMIN~n_1, \LMAX~m_1 \} \sublimitsmatch \{ \LMIN~n_2, \LMAX~m_2 \} - } +$${rule: Limits_sub} .. index:: table type, limits, element type @@ -502,23 +286,13 @@ Limits Table Types ~~~~~~~~~~~ -A :ref:`table type ` :math:`(\limits_1~\reftype_1)` matches :math:`(\limits_2~\reftype_2)` if and only if: +A :ref:`table type ` ${tabletype: (limits_1 reftype_1)} matches ${tabletype: (limits_1 reftype_1)} if and only if: * Limits :math:`\limits_1` :ref:`match ` :math:`\limits_2`. * The :ref:`reference type ` :math:`\reftype_1` :ref:`matches ` :math:`\reftype_2`, and vice versa. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashlimitsmatch \limits_1 \sublimitsmatch \limits_2 - \qquad - C \vdashreftypematch \reftype_1 \subreftypematch \reftype_2 - \qquad - C \vdashreftypematch \reftype_2 \subreftypematch \reftype_1 - }{ - C \vdashtabletypematch \limits_1~\reftype_1 \subtabletypematch \limits_2~\reftype_2 - } +$${rule: Tabletype_sub} .. index:: memory type, limits @@ -527,18 +301,11 @@ A :ref:`table type ` :math:`(\limits_1~\reftype_1)` matches :m Memory Types ~~~~~~~~~~~~ -A :ref:`memory type ` :math:`\limits_1` matches :math:`\limits_2` if and only if: +A :ref:`memory type ` ${memtype: (limits_1 PAGE)} matches ${memtype: (limits_2 PAGE)} if and only if: * Limits :math:`\limits_1` :ref:`match ` :math:`\limits_2`. - -.. math:: - ~\\[-1ex] - \frac{ - C \vdashlimitsmatch \limits_1 \sublimitsmatch \limits_2 - }{ - C \vdashmemtypematch \limits_1 \submemtypematch \limits_2 - } +$${rule: Memtype_sub} .. index:: global type, value type, mutability @@ -547,27 +314,13 @@ A :ref:`memory type ` :math:`\limits_1` matches :math:`\limits_2 Global Types ~~~~~~~~~~~~ -A :ref:`global type ` :math:`(\mut_1~t_1)` matches :math:`(\mut_2~t_2)` if and only if: +A :ref:`global type ` ${globaltype: (mut1 valtype_1)} matches ${globaltype: (mut2 valtype_2)} if and only if: * Either both :math:`\mut_1` and :math:`\mut_2` are |MVAR| and :math:`t_1` :ref:`matches ` :math:`t_2` and vice versa. * Or both :math:`\mut_1` and :math:`\mut_2` are |MCONST| and :math:`t_1` :ref:`matches ` :math:`t_2`. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashvaltypematch t_1 \subvaltypematch t_2 - \qquad - C \vdashvaltypematch t_2 \subvaltypematch t_1 - }{ - C \vdashglobaltypematch \MVAR~t_1 \subglobaltypematch \MVAR~t_2 - } - \qquad - \frac{ - C \vdashvaltypematch t_1 \subvaltypematch t_2 - }{ - C \vdashglobaltypematch \MCONST~t_1 \subglobaltypematch \MCONST~t_2 - } +$${rule: Globaltype_sub/*} .. index:: external type, function type, table type, memory type, global type @@ -579,62 +332,38 @@ External Types Functions ......... -An :ref:`external type ` :math:`\ETFUNC~\deftype_1` matches :math:`\ETFUNC~\deftype_2` if and only if: +An :ref:`external type ` ${externtype: FUNC deftype_1} matches ${externtype: FUNC deftype_2} if and only if: * The :ref:`defined type ` :math:`\deftype_1` :ref:`matches ` :math:`\deftype_2`. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashdeftypematch \deftype_1 \subfunctypematch \deftype_2 - }{ - C \vdashexterntypematch \ETFUNC~\deftype_1 \subexterntypematch \ETFUNC~\deftype_2 - } +$${rule: Externtype_sub/func} Tables ...... -An :ref:`external type ` :math:`\ETTABLE~\tabletype_1` matches :math:`\ETTABLE~\tabletype_2` if and only if: +An :ref:`external type ` ${externtype: TABLE tabletype_1} matches ${externtype: TABLE tabletype_2} if and only if: * Table type :math:`\tabletype_1` :ref:`matches ` :math:`\tabletype_2`. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashtabletypematch \tabletype_1 \subtabletypematch \tabletype_2 - }{ - C \vdashexterntypematch \ETTABLE~\tabletype_1 \subexterntypematch \ETTABLE~\tabletype_2 - } +$${rule: Externtype_sub/table} Memories ........ -An :ref:`external type ` :math:`\ETMEM~\memtype_1` matches :math:`\ETMEM~\memtype_2` if and only if: +An :ref:`external type ` ${externtype: MEM memtype_1} matches ${externtype: MEM memtype_2} if and only if: * Memory type :math:`\memtype_1` :ref:`matches ` :math:`\memtype_2`. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashmemtypematch \memtype_1 \submemtypematch \memtype_2 - }{ - C \vdashexterntypematch \ETMEM~\memtype_1 \subexterntypematch \ETMEM~\memtype_2 - } +$${rule: Externtype_sub/mem} Globals ....... -An :ref:`external type ` :math:`\ETGLOBAL~\globaltype_1` matches :math:`\ETGLOBAL~\globaltype_2` if and only if: +An :ref:`external type ` ${externtype: GLOBAL globaltype_1} matches ${externtype: GLOBAL globaltype_2} if and only if: * Global type :math:`\globaltype_1` :ref:`matches ` :math:`\globaltype_2`. -.. math:: - ~\\[-1ex] - \frac{ - C \vdashglobaltypematch \globaltype_1 \subglobaltypematch \globaltype_2 - }{ - C \vdashexterntypematch \ETGLOBAL~\globaltype_1 \subexterntypematch \ETGLOBAL~\globaltype_2 - } +$${rule: Externtype_sub/global} diff --git a/document/core/valid/modules.rst b/document/core/valid/modules.rst index ae1a0f7335..ffb81cee71 100644 --- a/document/core/valid/modules.rst +++ b/document/core/valid/modules.rst @@ -438,6 +438,7 @@ $${rule: Import_ok} pair: validation; module single: abstract syntax; module .. _valid-module: +.. _syntax-moduletype: Modules ~~~~~~~ diff --git a/spectec/spec/wasm-3.0/1-syntax.watsup b/spectec/spec/wasm-3.0/1-syntax.watsup index fcc4bb875d..cc2cce1ea1 100644 --- a/spectec/spec/wasm-3.0/1-syntax.watsup +++ b/spectec/spec/wasm-3.0/1-syntax.watsup @@ -210,6 +210,9 @@ syntax Lnn hint(show I#N) hint(macro none) = Inn | Fnn | Pnn ;; TODO: inline syntax mut hint(show MUT?) hint(macro "T%" "T%") = MUT? +;; HACK +syntax mut1 hint(show MUT#$_(1)?) hint(macro "T%" "T%") = MUT? +syntax mut2 hint(show MUT#$_(2)?) hint(macro "T%" "T%") = MUT? syntax fin hint(show FINAL?) hint(macro "T%" "T%") = FINAL? syntax fieldtype hint(desc "field type") = mut storagetype diff --git a/spectec/spec/wasm-3.0/6-typing.watsup b/spectec/spec/wasm-3.0/6-typing.watsup index 1978e25a95..fdf5bc8a85 100644 --- a/spectec/spec/wasm-3.0/6-typing.watsup +++ b/spectec/spec/wasm-3.0/6-typing.watsup @@ -314,15 +314,15 @@ rule Heaptype_sub/array-eq: rule Heaptype_sub/struct: C |- deftype <: STRUCT - -- Expand: deftype ~~ STRUCT yt* + -- Expand: deftype ~~ STRUCT fieldtype* rule Heaptype_sub/array: C |- deftype <: ARRAY - -- Expand: deftype ~~ ARRAY yt + -- Expand: deftype ~~ ARRAY fieldtype rule Heaptype_sub/func: C |- deftype <: FUNC - -- Expand: deftype ~~ FUNC ft + -- Expand: deftype ~~ FUNC functype rule Heaptype_sub/def: C |- deftype_1 <: deftype_2 @@ -337,8 +337,8 @@ rule Heaptype_sub/typeidx-r: -- Heaptype_sub: C |- heaptype <: C.TYPES[typeidx] rule Heaptype_sub/rec: - C |- REC i <: yy - -- if C.RECS[i] = SUB fin (yy_1* yy yy_2*) ct + C |- REC i <: typeuse*[j] + -- if C.RECS[i] = SUB fin typeuse* ct rule Heaptype_sub/none: C |- NONE <: heaptype @@ -395,7 +395,7 @@ rule Instrtype_sub: -- Resulttype_sub: C |- t_21* <: t_11* -- Resulttype_sub: C |- t_12* <: t_22* -- if x* = $setminus(x_2*, x_1*) - -- if (C.LOCALS[x] = SET t)* + -- (if C.LOCALS[x] = SET t)* ;; Type definitions @@ -449,8 +449,8 @@ rule Deftype_sub/refl: rule Deftype_sub/super: C |- deftype_1 <: deftype_2 - -- if $unrolldt(deftype_1) = SUB fin (yy_1* yy yy_2*) ct - -- Heaptype_sub: C |- yy <: deftype_2 + -- if $unrolldt(deftype_1) = SUB fin typeuse* ct + -- Heaptype_sub: C |- typeuse*[i] <: deftype_2 ;; External types @@ -463,48 +463,50 @@ relation Externtype_sub: context |- externtype <: externtype hint(show "S-extern rule Limits_sub: - C |- `[n_11 .. n_12] <: `[n_21 .. n_22] - -- if n_11 >= n_21 - -- if n_12 <= n_22 + C |- `[n_1 .. m_1] <: `[n_2 .. m_2] + -- if n_1 >= n_2 + -- if m_1 <= m_2 rule Functype_sub: - C |- ft <: ft + C |- t_11* -> t_12* <: t_21* -> t_22* + -- Resulttype_sub: C |- t_21* <: t_11* + -- Resulttype_sub: C |- t_12* <: t_22* rule Globaltype_sub/const: - C |- t_1 <: t_2 - -- Valtype_sub: C |- t_1 <: t_2 + C |- valtype_1 <: valtype_2 + -- Valtype_sub: C |- valtype_1 <: valtype_2 rule Globaltype_sub/var: - C |- MUT t_1 <: MUT t_2 - -- Valtype_sub: C |- t_1 <: t_2 - -- Valtype_sub: C |- t_2 <: t_1 + C |- MUT valtype_1 <: MUT valtype_2 + -- Valtype_sub: C |- valtype_1 <: valtype_2 + -- Valtype_sub: C |- valtype_2 <: valtype_1 rule Tabletype_sub: - C |- lim_1 rt_1 <: lim_2 rt_2 - -- Limits_sub: C |- lim_1 <: lim_2 - -- Reftype_sub: C |- rt_1 <: rt_2 - -- Reftype_sub: C |- rt_2 <: rt_1 + C |- limits_1 reftype_1 <: limits_2 reftype_2 + -- Limits_sub: C |- limits_1 <: limits_2 + -- Reftype_sub: C |- reftype_1 <: reftype_2 + -- Reftype_sub: C |- reftype_2 <: reftype_1 rule Memtype_sub: - C |- lim_1 PAGE <: lim_2 PAGE - -- Limits_sub: C |- lim_1 <: lim_2 + C |- limits_1 PAGE <: limits_2 PAGE + -- Limits_sub: C |- limits_1 <: limits_2 rule Externtype_sub/func: - C |- FUNC dt_1 <: FUNC dt_2 - -- Deftype_sub: C |- dt_1 <: dt_2 + C |- FUNC deftype_1 <: FUNC deftype_2 + -- Deftype_sub: C |- deftype_1 <: deftype_2 rule Externtype_sub/global: - C |- GLOBAL gt_1 <: GLOBAL gt_2 - -- Globaltype_sub: C |- gt_1 <: gt_2 + C |- GLOBAL globaltype_1 <: GLOBAL globaltype_2 + -- Globaltype_sub: C |- globaltype_1 <: globaltype_2 rule Externtype_sub/table: - C |- TABLE tt_1 <: TABLE tt_2 - -- Tabletype_sub: C |- tt_1 <: tt_2 + C |- TABLE tabletype_1 <: TABLE tabletype_2 + -- Tabletype_sub: C |- tabletype_1 <: tabletype_2 rule Externtype_sub/mem: - C |- MEM mt_1 <: MEM mt_2 - -- Memtype_sub: C |- mt_1 <: mt_2 + C |- MEM memtype_1 <: MEM memtype_2 + -- Memtype_sub: C |- memtype_1 <: memtype_2 diff --git a/spectec/src/backend-latex/render.ml b/spectec/src/backend-latex/render.ml index 2f8dad7603..daa3c0112d 100644 --- a/spectec/src/backend-latex/render.ml +++ b/spectec/src/backend-latex/render.ml @@ -102,6 +102,7 @@ let split_ticks id = let chop_ticks id = fst (split_ticks id) let ends_sub id = id <> "" && id.[String.length id - 1] = '_' +let all_sub id = String.for_all ((=) '_') id let split_sub id = if ends_sub id then String.sub id 0 (String.length id - 1), "_" else id, "" let chop_sub id = fst (split_sub id) @@ -446,7 +447,7 @@ id.it (Source.string_of_region id.at) *) (* If expanding with macro template, then pre-macrofy id name, * since we will have lost the template context later on. *) - if templ = None then id else + if templ = None || all_sub id.it then id else let id' = {id with it = expand_name templ id.it} in (* Record result as identity expansion, HACK: unless it exists already *) if not (Map.mem id'.it !map) then env_macro map id'; @@ -660,7 +661,9 @@ let render_id' env style id templ = (fun s -> s) ) @@ fun _ -> assert (templ = None || env.config.macros_for_ids); - if templ <> None then "\\" ^ macrofy_id (expand_name templ id) else + if templ <> None && not (all_sub id) then + "\\" ^ macrofy_id (expand_name templ id) + else (* if env.config.macros_for_ids && String.length id > 2 && (style = `Var || style = `Func) then Printf.eprintf "[id w/o macro] %s%s\n%!" (if style = `Func then "$" else "") id; diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index e2c1be0fc9..fedfb7dccf 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -350,31 +350,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:215.1-215.60 +;; 1-syntax.watsup:218.1-218.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:217.1-217.90 +;; 1-syntax.watsup:220.1-220.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:218.1-218.64 +;; 1-syntax.watsup:221.1-221.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:219.1-219.54 +;; 1-syntax.watsup:222.1-222.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:221.1-224.18 +;; 1-syntax.watsup:224.1-227.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:226.1-227.30 +;; 1-syntax.watsup:229.1-230.30 syntax subtype = | SUB{fin : fin, typeuse* : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse : typeuse} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:229.1-230.22 +;; 1-syntax.watsup:232.1-233.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -494,6 +494,14 @@ syntax Lnn = | I8 | I16 +;; 1-syntax.watsup +syntax mut1 = + | `MUT%?`(()?) + +;; 1-syntax.watsup +syntax mut2 = + | `MUT%?`(()?) + ;; 1-syntax.watsup syntax limits = | `[%..%]`{u32 : u32}(u32 : u32, u32) @@ -962,7 +970,7 @@ syntax blocktype = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:642.1-643.22 +;; 1-syntax.watsup:645.1-646.22 syntax instr = | NOP | UNREACHABLE @@ -3124,11 +3132,11 @@ relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) `%|-%<:%`(C, deftype_1, deftype_2) -- if ($clostype(C, deftype_1) = $clostype(C, deftype_2)) - ;; 6-typing.watsup:450.1-453.40 - rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, yy_1* : typeuse*, yy : typeuse, yy_2* : typeuse*, ct : comptype}: + ;; 6-typing.watsup:450.1-453.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, typeuse* : typeuse*, ct : comptype, i : nat}: `%|-%<:%`(C, deftype_1, deftype_2) - -- if ($unrolldt(deftype_1) = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) - -- Heaptype_sub: `%|-%<:%`(C, (yy : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- if ($unrolldt(deftype_1) = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse : typeuse}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) ;; 6-typing.watsup:283.1-283.104 relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) @@ -3159,20 +3167,20 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) rule array-eq{C : context}: `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) - ;; 6-typing.watsup:315.1-317.35 - rule struct{C : context, deftype : deftype, yt* : fieldtype*}: + ;; 6-typing.watsup:315.1-317.42 + rule struct{C : context, deftype : deftype, fieldtype* : fieldtype*}: `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) - -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(fieldtype*{fieldtype : fieldtype}))) - ;; 6-typing.watsup:319.1-321.33 - rule array{C : context, deftype : deftype, yt : fieldtype}: + ;; 6-typing.watsup:319.1-321.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) - -- Expand: `%~~%`(deftype, ARRAY_comptype(yt)) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) - ;; 6-typing.watsup:323.1-325.32 - rule func{C : context, deftype : deftype, ft : functype}: + ;; 6-typing.watsup:323.1-325.38 + rule func{C : context, deftype : deftype, functype : functype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) - -- Expand: `%~~%`(deftype, FUNC_comptype(ft)) + -- Expand: `%~~%`(deftype, FUNC_comptype(functype)) ;; 6-typing.watsup:327.1-329.46 rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: @@ -3189,10 +3197,10 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) - ;; 6-typing.watsup:339.1-341.48 - rule rec{C : context, i : nat, yy : typeuse, fin : fin, yy_1* : typeuse*, yy_2* : typeuse*, ct : comptype}: - `%|-%<:%`(C, REC_heaptype(i), (yy : typeuse <: heaptype)) - -- if (C.RECS_context[i] = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) + ;; 6-typing.watsup:339.1-341.40 + rule rec{C : context, i : nat, typeuse* : typeuse*, j : nat, fin : fin, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse : typeuse}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) ;; 6-typing.watsup:343.1-345.40 rule none{C : context, heaptype : heaptype}: @@ -3278,11 +3286,20 @@ relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +;; 6-typing.watsup +relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) + ;; 6-typing.watsup + rule _{C : context, t_1* : valtype*, t_2* : valtype*}: + `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} + ;; 6-typing.watsup relation Functype_sub: `%|-%<:%`(context, functype, functype) ;; 6-typing.watsup - rule _{C : context, ft : functype}: - `%|-%<:%`(C, ft, ft) + rule _{C : context, t_11* : valtype*, t_12* : valtype*, t_21* : valtype*, t_22* : valtype*}: + `%|-%<:%`(C, `%->%`_functype(`%`_resulttype(t_11*{t_11 : valtype}), `%`_resulttype(t_12*{t_12 : valtype})), `%->%`_functype(`%`_resulttype(t_21*{t_21 : valtype}), `%`_resulttype(t_22*{t_22 : valtype}))) + -- Resulttype_sub: `%|-%<:%`(C, t_21*{t_21 : valtype}, t_11*{t_11 : valtype}) + -- Resulttype_sub: `%|-%<:%`(C, t_12*{t_12 : valtype}, t_22*{t_22 : valtype}) ;; 6-typing.watsup relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) @@ -3439,13 +3456,6 @@ relation Externtype_ok: `%|-%:OK`(context, externtype) `%|-%:OK`(C, MEM_externtype(memtype)) -- Memtype_ok: `%|-%:OK`(C, memtype) -;; 6-typing.watsup -relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) - ;; 6-typing.watsup - rule _{C : context, t_1* : valtype*, t_2* : valtype*}: - `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) - -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} - ;; 6-typing.watsup relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup @@ -3459,61 +3469,61 @@ relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup relation Limits_sub: `%|-%<:%`(context, limits, limits) ;; 6-typing.watsup - rule _{C : context, n_11 : n, n_12 : n, n_21 : n, n_22 : n}: - `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_11), `%`_u32(n_12)), `[%..%]`_limits(`%`_u32(n_21), `%`_u32(n_22))) - -- if (n_11 >= n_21) - -- if (n_12 <= n_22) + rule _{C : context, n_1 : n, m_1 : m, n_2 : n, m_2 : m}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_1), `%`_u32(m_1)), `[%..%]`_limits(`%`_u32(n_2), `%`_u32(m_2))) + -- if (n_1 >= n_2) + -- if (m_1 <= m_2) ;; 6-typing.watsup relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) ;; 6-typing.watsup - rule const{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), t_1), `%%`_globaltype(`MUT%?`_mut(?()), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), valtype_1), `%%`_globaltype(`MUT%?`_mut(?()), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) ;; 6-typing.watsup - rule var{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), t_1), `%%`_globaltype(`MUT%?`_mut(?(())), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) - -- Valtype_sub: `%|-%<:%`(C, t_2, t_1) + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), valtype_1), `%%`_globaltype(`MUT%?`_mut(?(())), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) ;; 6-typing.watsup relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: - `%|-%<:%`(C, `%%`_tabletype(lim_1, rt_1), `%%`_tabletype(lim_2, rt_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) - -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_2) - -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + rule _{C : context, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%`_tabletype(limits_1, reftype_1), `%%`_tabletype(limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) ;; 6-typing.watsup relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, lim_2 : limits}: - `%|-%<:%`(C, `%PAGE`_memtype(lim_1), `%PAGE`_memtype(lim_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) + rule _{C : context, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%PAGE`_memtype(limits_1), `%PAGE`_memtype(limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) ;; 6-typing.watsup relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) ;; 6-typing.watsup - rule func{C : context, dt_1 : deftype, dt_2 : deftype}: - `%|-%<:%`(C, FUNC_externtype((dt_1 : deftype <: typeuse)), FUNC_externtype((dt_2 : deftype <: typeuse))) - -- Deftype_sub: `%|-%<:%`(C, dt_1, dt_2) + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype((deftype_1 : deftype <: typeuse)), FUNC_externtype((deftype_2 : deftype <: typeuse))) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) ;; 6-typing.watsup - rule global{C : context, gt_1 : globaltype, gt_2 : globaltype}: - `%|-%<:%`(C, GLOBAL_externtype(gt_1), GLOBAL_externtype(gt_2)) - -- Globaltype_sub: `%|-%<:%`(C, gt_1, gt_2) + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) ;; 6-typing.watsup - rule table{C : context, tt_1 : tabletype, tt_2 : tabletype}: - `%|-%<:%`(C, TABLE_externtype(tt_1), TABLE_externtype(tt_2)) - -- Tabletype_sub: `%|-%<:%`(C, tt_1, tt_2) + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) ;; 6-typing.watsup - rule mem{C : context, mt_1 : memtype, mt_2 : memtype}: - `%|-%<:%`(C, MEM_externtype(mt_1), MEM_externtype(mt_2)) - -- Memtype_sub: `%|-%<:%`(C, mt_1, mt_2) + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) ;; 6-typing.watsup relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) @@ -3530,83 +3540,83 @@ relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:515.1-515.95 +;; 6-typing.watsup:517.1-517.95 relation Instr_ok: `%|-%:%`(context, instr, instrtype) - ;; 6-typing.watsup:554.1-555.24 + ;; 6-typing.watsup:556.1-557.24 rule nop{C : context}: `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:557.1-559.42 + ;; 6-typing.watsup:559.1-561.42 rule unreachable{C : context, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:561.1-563.29 + ;; 6-typing.watsup:563.1-565.29 rule drop{C : context, t : valtype}: `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:566.1-568.29 + ;; 6-typing.watsup:568.1-570.29 rule select-expl{C : context, t : valtype}: `%|-%:%`(C, `SELECT()%?`_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:570.1-574.37 + ;; 6-typing.watsup:572.1-576.37 rule select-impl{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, `SELECT()%?`_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) -- Valtype_sub: `%|-%<:%`(C, t, t') -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) - ;; 6-typing.watsup:590.1-593.63 + ;; 6-typing.watsup:592.1-595.63 rule block{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, BLOCK_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:595.1-598.63 + ;; 6-typing.watsup:597.1-600.63 rule loop{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, LOOP_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:600.1-604.67 + ;; 6-typing.watsup:602.1-606.67 rule if{C : context, bt : blocktype, instr_1* : instr*, instr_2* : instr*, t_1* : valtype*, t_2* : valtype*, x_1* : idx*, x_2* : idx*}: `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 : instr}, instr_2*{instr_2 : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_1*{instr_1 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:609.1-612.42 + ;; 6-typing.watsup:611.1-614.42 rule br{C : context, l : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:614.1-616.25 + ;; 6-typing.watsup:616.1-618.25 rule br_if{C : context, l : labelidx, t* : valtype*}: `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [I32_valtype]), [], `%`_resulttype(t*{t : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) - ;; 6-typing.watsup:618.1-622.42 + ;; 6-typing.watsup:620.1-624.42 rule br_table{C : context, l* : labelidx*, l' : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_TABLE_instr(l*{l : labelidx}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- (Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0))*{l : labelidx} -- Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:624.1-627.31 + ;; 6-typing.watsup:626.1-629.31 rule br_on_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:629.1-631.34 + ;; 6-typing.watsup:631.1-633.34 rule br_on_non_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)])) - ;; 6-typing.watsup:633.1-639.34 + ;; 6-typing.watsup:635.1-641.34 rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [($diffrt(rt_1, rt_2) : reftype <: valtype)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)])) @@ -3615,7 +3625,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) - ;; 6-typing.watsup:641.1-647.49 + ;; 6-typing.watsup:643.1-649.49 rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [(rt_2 : reftype <: valtype)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)])) @@ -3624,30 +3634,30 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) - ;; 6-typing.watsup:652.1-654.47 + ;; 6-typing.watsup:654.1-656.47 rule call{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:656.1-658.47 + ;; 6-typing.watsup:658.1-660.47 rule call_ref{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:660.1-664.47 + ;; 6-typing.watsup:662.1-666.47 rule call_indirect{C : context, x : idx, y : idx, t_1* : valtype*, t_2* : valtype*, lim : limits, rt : reftype}: `%|-%:%`(C, CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype)) -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:666.1-669.42 + ;; 6-typing.watsup:668.1-671.42 rule return{C : context, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.RETURN_context = ?(`%`_list(t*{t : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:672.1-677.42 + ;; 6-typing.watsup:674.1-679.42 rule return_call{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) @@ -3655,7 +3665,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:680.1-685.42 + ;; 6-typing.watsup:682.1-687.42 rule return_call_ref{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) @@ -3663,7 +3673,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:688.1-696.42 + ;; 6-typing.watsup:690.1-698.42 rule return_call_indirect{C : context, x : idx, y : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, lim : limits, rt : reftype, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) @@ -3673,458 +3683,458 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:701.1-702.33 + ;; 6-typing.watsup:703.1-704.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:704.1-705.34 + ;; 6-typing.watsup:706.1-707.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:707.1-708.39 + ;; 6-typing.watsup:709.1-710.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:710.1-711.39 + ;; 6-typing.watsup:712.1-713.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:713.1-714.40 + ;; 6-typing.watsup:715.1-716.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:718.1-720.34 + ;; 6-typing.watsup:720.1-722.34 rule cvtop-reinterpret{C : context, nt_1 : numtype, nt_2 : numtype}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, REINTERPRET_cvtop, ?()), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ($size(nt_1) = $size(nt_2)) - ;; 6-typing.watsup:722.1-724.112 + ;; 6-typing.watsup:724.1-726.112 rule cvtop-convert{C : context, nt_1 : numtype, nt_2 : numtype, sx? : sx?, Inn_1 : Inn, Inn_2 : Inn, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, CONVERT_cvtop, sx?{sx : sx}), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ((sx?{sx : sx} = ?()) <=> ((((nt_1 = (Inn_1 : Inn <: numtype)) /\ (nt_2 = (Inn_2 : Inn <: numtype))) /\ ($size(nt_1) > $size(nt_2))) \/ ((nt_1 = (Fnn_1 : Fnn <: numtype)) /\ (nt_2 = (Fnn_2 : Fnn <: numtype))))) - ;; 6-typing.watsup:729.1-731.31 + ;; 6-typing.watsup:731.1-733.31 rule ref.null{C : context, ht : heaptype}: `%|-%:%`(C, REF.NULL_instr(ht), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:734.1-736.24 + ;; 6-typing.watsup:736.1-738.24 rule ref.func{C : context, x : idx, dt : deftype}: `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), (dt : deftype <: heaptype))]))) -- if (C.FUNCS_context[x!`%`_idx.0] = dt) - ;; 6-typing.watsup:738.1-739.34 + ;; 6-typing.watsup:740.1-741.34 rule ref.i31{C : context}: `%|-%:%`(C, REF.I31_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), I31_heaptype)]))) - ;; 6-typing.watsup:741.1-743.31 + ;; 6-typing.watsup:743.1-745.31 rule ref.is_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.IS_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([I32_valtype]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:745.1-747.31 + ;; 6-typing.watsup:747.1-749.31 rule ref.as_non_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.AS_NON_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:749.1-750.51 + ;; 6-typing.watsup:751.1-752.51 rule ref.eq{C : context}: `%|-%:%`(C, REF.EQ_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype) REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:752.1-756.33 + ;; 6-typing.watsup:754.1-758.33 rule ref.test{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.TEST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:758.1-762.33 + ;; 6-typing.watsup:760.1-764.33 rule ref.cast{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.CAST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:767.1-768.42 + ;; 6-typing.watsup:769.1-770.42 rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:773.1-775.44 + ;; 6-typing.watsup:775.1-777.44 rule struct.new{C : context, x : idx, zt* : storagetype*, mut* : mut*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt : storagetype}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) - ;; 6-typing.watsup:777.1-780.40 + ;; 6-typing.watsup:779.1-782.40 rule struct.new_default{C : context, x : idx, mut* : mut*, zt* : storagetype*, val* : val*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) -- (if ($default_($unpack(zt)) = ?(val)))*{val : val, zt : storagetype} - ;; 6-typing.watsup:782.1-786.39 + ;; 6-typing.watsup:784.1-788.39 rule struct.get{C : context, sx? : sx?, x : idx, i : nat, zt : storagetype, yt* : fieldtype*, mut : mut}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx : sx}, x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(mut, zt)) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:788.1-791.24 + ;; 6-typing.watsup:790.1-793.24 rule struct.set{C : context, x : idx, i : nat, zt : storagetype, yt* : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(`MUT%?`_mut(?(())), zt)) - ;; 6-typing.watsup:796.1-798.42 + ;; 6-typing.watsup:798.1-800.42 rule array.new{C : context, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:800.1-803.37 + ;; 6-typing.watsup:802.1-805.37 rule array.new_default{C : context, x : idx, mut : mut, zt : storagetype, val : val}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ($default_($unpack(zt)) = ?(val)) - ;; 6-typing.watsup:805.1-807.42 + ;; 6-typing.watsup:807.1-809.42 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:809.1-812.40 + ;; 6-typing.watsup:811.1-814.40 rule array.new_elem{C : context, x : idx, y : idx, mut : mut, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; 6-typing.watsup:814.1-818.24 + ;; 6-typing.watsup:816.1-820.24 rule array.new_data{C : context, x : idx, y : idx, mut : mut, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:820.1-823.39 + ;; 6-typing.watsup:822.1-825.39 rule array.get{C : context, sx? : sx?, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx : sx}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:825.1-827.42 + ;; 6-typing.watsup:827.1-829.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:829.1-831.42 + ;; 6-typing.watsup:831.1-833.42 rule array.len{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:833.1-835.42 + ;; 6-typing.watsup:835.1-837.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:837.1-841.40 + ;; 6-typing.watsup:839.1-843.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, mut : mut, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x_1) : typevar <: heaptype)) I32_valtype REF_valtype(`NULL%?`_nul(?(())), ($idx(x_2) : typevar <: heaptype)) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; 6-typing.watsup:843.1-846.44 + ;; 6-typing.watsup:845.1-848.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; 6-typing.watsup:848.1-852.24 + ;; 6-typing.watsup:850.1-854.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:857.1-858.62 + ;; 6-typing.watsup:859.1-860.62 rule extern.convert_any{C : context, nul : nul}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]))) - ;; 6-typing.watsup:860.1-861.62 + ;; 6-typing.watsup:862.1-863.62 rule any.convert_extern{C : context, nul : nul}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(nul, ANY_heaptype)]))) - ;; 6-typing.watsup:866.1-867.35 + ;; 6-typing.watsup:868.1-869.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:869.1-870.41 + ;; 6-typing.watsup:871.1-872.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:872.1-873.48 + ;; 6-typing.watsup:874.1-875.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:875.1-876.55 + ;; 6-typing.watsup:877.1-878.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:878.1-879.44 + ;; 6-typing.watsup:880.1-881.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:881.1-882.37 + ;; 6-typing.watsup:883.1-884.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:884.1-885.44 + ;; 6-typing.watsup:886.1-887.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:887.1-888.40 + ;; 6-typing.watsup:889.1-890.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:890.1-891.44 + ;; 6-typing.watsup:892.1-893.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:893.1-894.47 + ;; 6-typing.watsup:895.1-896.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:896.1-897.33 + ;; 6-typing.watsup:898.1-899.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:899.1-900.39 + ;; 6-typing.watsup:901.1-902.39 rule vswizzle{C : context, sh : ishape}: `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:902.1-904.29 + ;; 6-typing.watsup:904.1-906.29 rule vshuffle{C : context, sh : ishape, i* : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i : nat}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i : nat} - ;; 6-typing.watsup:906.1-907.44 + ;; 6-typing.watsup:908.1-909.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:910.1-912.21 + ;; 6-typing.watsup:912.1-914.21 rule vextract_lane{C : context, sh : shape, sx? : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx : sx}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:914.1-916.21 + ;; 6-typing.watsup:916.1-918.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:918.1-919.53 + ;; 6-typing.watsup:920.1-921.53 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:921.1-922.60 + ;; 6-typing.watsup:923.1-924.60 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:924.1-925.48 + ;; 6-typing.watsup:926.1-927.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:928.1-930.160 + ;; 6-typing.watsup:930.1-932.160 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop_(sh_2, sh_1), hf? : half_(sh_2, sh_1)?, sx? : sx?, zero? : zero_(sh_2, sh_1)?, imm_1 : lanetype, imm_2 : lanetype, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, hf?{hf : half_(sh_2, sh_1)}, sx?{sx : sx}, zero?{zero : zero_(sh_2, sh_1)}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if ((sx?{sx : sx} = ?()) <=> (((($lanetype(sh_1) = imm_1) /\ ($lanetype(sh_2) = imm_2)) /\ ($lsize(imm_1) > $lsize(imm_2))) \/ (($lanetype(sh_1) = (Fnn_1 : Fnn <: lanetype)) /\ ($lanetype(sh_2) = (Fnn_2 : Fnn <: lanetype))))) - ;; 6-typing.watsup:935.1-937.28 + ;; 6-typing.watsup:937.1-939.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:939.1-941.29 + ;; 6-typing.watsup:941.1-943.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:943.1-945.29 + ;; 6-typing.watsup:945.1-947.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:950.1-952.29 + ;; 6-typing.watsup:952.1-954.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:954.1-956.29 + ;; 6-typing.watsup:956.1-958.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:961.1-963.29 + ;; 6-typing.watsup:963.1-965.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:965.1-967.29 + ;; 6-typing.watsup:967.1-969.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:969.1-971.29 + ;; 6-typing.watsup:971.1-973.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:973.1-975.29 + ;; 6-typing.watsup:975.1-977.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:977.1-979.29 + ;; 6-typing.watsup:979.1-981.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:981.1-985.36 + ;; 6-typing.watsup:983.1-987.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%`_tabletype(lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:987.1-991.36 + ;; 6-typing.watsup:989.1-993.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:993.1-995.24 + ;; 6-typing.watsup:995.1-997.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1000.1-1002.23 + ;; 6-typing.watsup:1002.1-1004.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1004.1-1006.23 + ;; 6-typing.watsup:1006.1-1008.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1008.1-1010.23 + ;; 6-typing.watsup:1010.1-1012.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1012.1-1015.27 + ;; 6-typing.watsup:1014.1-1017.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1017.1-1020.24 + ;; 6-typing.watsup:1019.1-1022.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1022.1-1024.24 + ;; 6-typing.watsup:1024.1-1026.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1035.1-1038.43 + ;; 6-typing.watsup:1037.1-1040.43 rule load-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1040.1-1043.35 + ;; 6-typing.watsup:1042.1-1045.35 rule load-pack{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr((Inn : Inn <: numtype), ?((`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1054.1-1057.43 + ;; 6-typing.watsup:1056.1-1059.43 rule store-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1059.1-1062.35 + ;; 6-typing.watsup:1061.1-1064.35 rule store-pack{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1064.1-1067.46 + ;; 6-typing.watsup:1066.1-1069.46 rule vload-val{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1069.1-1072.39 + ;; 6-typing.watsup:1071.1-1074.39 rule vload-pack{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1074.1-1077.35 + ;; 6-typing.watsup:1076.1-1079.35 rule vload-splat{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1079.1-1082.34 + ;; 6-typing.watsup:1081.1-1084.34 rule vload-zero{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) - ;; 6-typing.watsup:1084.1-1088.21 + ;; 6-typing.watsup:1086.1-1090.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1090.1-1093.46 + ;; 6-typing.watsup:1092.1-1095.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1095.1-1099.21 + ;; 6-typing.watsup:1097.1-1101.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) -;; 6-typing.watsup:516.1-516.96 +;; 6-typing.watsup:518.1-518.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; 6-typing.watsup:529.1-530.24 + ;; 6-typing.watsup:531.1-532.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:533.1-537.82 + ;; 6-typing.watsup:535.1-539.82 rule seq{C : context, instr_1 : instr, instr_2* : instr*, t_1* : valtype*, x_1* : idx*, x_2* : idx*, t_3* : valtype*, t_2* : valtype*, init* : init*, t* : valtype*}: `%|-%:%`(C, [instr_1] :: instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx} :: x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) -- Instr_ok: `%|-%:%`(C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init : init, t : valtype, x_1 : idx} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 : localidx}, `%%`_localtype(SET_init, t)*{t : valtype}), instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) - ;; 6-typing.watsup:539.1-543.33 + ;; 6-typing.watsup:541.1-545.33 rule sub{C : context, instr* : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr : instr}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; 6-typing.watsup:546.1-549.33 + ;; 6-typing.watsup:548.1-551.33 rule frame{C : context, instr* : instr*, t* : valtype*, t_1* : valtype*, x* : idx*, t_2* : valtype*}: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t*{t : valtype} :: t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) @@ -4141,22 +4151,22 @@ relation Expr_ok: `%|-%:%`(context, expr, resulttype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1155.1-1155.86 +;; 6-typing.watsup:1157.1-1157.86 def $in_binop(numtype : numtype, binop_ : binop_(numtype), binop_(numtype)*) : bool - ;; 6-typing.watsup:1156.1-1156.42 + ;; 6-typing.watsup:1158.1-1158.42 def $in_binop{nt : numtype, binop : binop_(nt), epsilon : binop_(nt)*}(nt, binop, epsilon) = false - ;; 6-typing.watsup:1157.1-1157.99 + ;; 6-typing.watsup:1159.1-1159.99 def $in_binop{nt : numtype, binop : binop_(nt), ibinop_1 : binop_(nt), ibinop'* : binop_(nt)*}(nt, binop, [ibinop_1] :: ibinop'*{ibinop' : binop_(nt)}) = ((binop = ibinop_1) \/ $in_binop(nt, binop, ibinop'*{ibinop' : binop_(nt)})) } ;; 6-typing.watsup rec { -;; 6-typing.watsup:1151.1-1151.63 +;; 6-typing.watsup:1153.1-1153.63 def $in_numtype(numtype : numtype, numtype*) : bool - ;; 6-typing.watsup:1152.1-1152.37 + ;; 6-typing.watsup:1154.1-1154.37 def $in_numtype{nt : numtype, epsilon : numtype*}(nt, epsilon) = false - ;; 6-typing.watsup:1153.1-1153.68 + ;; 6-typing.watsup:1155.1-1155.68 def $in_numtype{nt : numtype, nt_1 : numtype, nt'* : numtype*}(nt, [nt_1] :: nt'*{nt' : numtype}) = ((nt = nt_1) \/ $in_numtype(nt, nt'*{nt' : numtype})) } @@ -4386,13 +4396,13 @@ syntax moduletype = ;; 6-typing.watsup rec { -;; 6-typing.watsup:1302.1-1302.100 +;; 6-typing.watsup:1304.1-1304.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1339.1-1340.17 + ;; 6-typing.watsup:1341.1-1342.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1342.1-1345.55 + ;; 6-typing.watsup:1344.1-1347.55 rule cons{C : context, global_1 : global, global : global, gt_1 : globaltype, gt* : globaltype*}: `%|-%:%`(C, [global_1] :: global*{}, [gt_1] :: gt*{gt : globaltype}) -- Global_ok: `%|-%:%`(C, global, gt_1) @@ -4402,13 +4412,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1301.1-1301.98 +;; 6-typing.watsup:1303.1-1303.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1331.1-1332.17 + ;; 6-typing.watsup:1333.1-1334.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1334.1-1337.50 + ;; 6-typing.watsup:1336.1-1339.50 rule cons{C : context, type_1 : type, type* : type*, dt_1* : deftype*, dt* : deftype*}: `%|-%:%`(C, [type_1] :: type*{type : type}, dt_1*{dt_1 : deftype} :: dt*{dt : deftype}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 : deftype}) diff --git a/spectec/test-latex/TEST.md b/spectec/test-latex/TEST.md index f8c19b8afd..296c0f0957 100644 --- a/spectec/test-latex/TEST.md +++ b/spectec/test-latex/TEST.md @@ -1556,6 +1556,8 @@ $$ $$ \begin{array}{@{}lrrl@{}l@{}} & {\mathsf{mut}^?} &::=& {\mathsf{mut}^?} \\ +& {\mathsf{mut}}{{{}_{1}^?}} &::=& {\mathsf{mut}^?} \\ +& {\mathsf{mut}}{{{}_{2}^?}} &::=& {\mathsf{mut}^?} \\ & {\mathsf{final}^?} &::=& {\mathsf{final}^?} \\ \mbox{(field type)} & {\mathit{fieldtype}} &::=& {\mathsf{mut}^?}~{\mathit{storagetype}} \\ \mbox{(function type)} & {\mathit{functype}} &::=& {\mathit{resulttype}} \rightarrow {\mathit{resulttype}} \\ @@ -4053,7 +4055,7 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -{\mathit{deftype}} \approx \mathsf{struct}~{{\mathit{yt}}^\ast} +{\mathit{deftype}} \approx \mathsf{struct}~{{\mathit{fieldtype}}^\ast} }{ C \vdash {\mathit{deftype}} \leq \mathsf{struct} } \, {[\textsc{\scriptsize S{-}heap{-}struct}]} @@ -4064,7 +4066,7 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -{\mathit{deftype}} \approx \mathsf{array}~{\mathit{yt}} +{\mathit{deftype}} \approx \mathsf{array}~{\mathit{fieldtype}} }{ C \vdash {\mathit{deftype}} \leq \mathsf{array} } \, {[\textsc{\scriptsize S{-}heap{-}array}]} @@ -4075,7 +4077,7 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -{\mathit{deftype}} \approx \mathsf{func}~{\mathit{ft}} +{\mathit{deftype}} \approx \mathsf{func}~{\mathit{functype}} }{ C \vdash {\mathit{deftype}} \leq \mathsf{func} } \, {[\textsc{\scriptsize S{-}heap{-}func}]} @@ -4119,9 +4121,9 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -C{.}\mathsf{recs}{}[i] = \mathsf{sub}~{\mathsf{final}^?}~({y_1^\ast}~y~{y_2^\ast})~{\mathit{ct}} +C{.}\mathsf{recs}{}[i] = \mathsf{sub}~{\mathsf{final}^?}~{{\mathit{typeuse}}^\ast}~{\mathit{ct}} }{ -C \vdash \mathsf{rec}~i \leq y +C \vdash \mathsf{rec}~i \leq {{\mathit{typeuse}}^\ast}{}[j] } \, {[\textsc{\scriptsize S{-}heap{-}rec}]} \qquad \end{array} @@ -4265,7 +4267,7 @@ C \vdash {t_{12}^\ast} \leq {t_{22}^\ast} \qquad {x^\ast} = {x_2^\ast} \setminus {x_1^\ast} \qquad -((C{.}\mathsf{locals}{}[x] = \mathsf{set}~t))^\ast +(C{.}\mathsf{locals}{}[x] = \mathsf{set}~t)^\ast }{ C \vdash {t_{11}^\ast}~{\rightarrow}_{{x_1^\ast}}\,{t_{12}^\ast} \leq {t_{21}^\ast}~{\rightarrow}_{{x_2^\ast}}\,{t_{22}^\ast} } \, {[\textsc{\scriptsize S{-}instr}]} @@ -4394,9 +4396,9 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -{\mathrm{unroll}}({\mathit{deftype}}_1) = \mathsf{sub}~{\mathsf{final}^?}~({y_1^\ast}~y~{y_2^\ast})~{\mathit{ct}} +{\mathrm{unroll}}({\mathit{deftype}}_1) = \mathsf{sub}~{\mathsf{final}^?}~{{\mathit{typeuse}}^\ast}~{\mathit{ct}} \qquad -C \vdash y \leq {\mathit{deftype}}_2 +C \vdash {{\mathit{typeuse}}^\ast}{}[i] \leq {\mathit{deftype}}_2 }{ C \vdash {\mathit{deftype}}_1 \leq {\mathit{deftype}}_2 } \, {[\textsc{\scriptsize S{-}def{-}super}]} @@ -4421,11 +4423,11 @@ $\boxed{{\mathit{context}} \vdash {\mathit{externtype}} \leq {\mathit{externtype $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -n_{11} \geq n_{21} +n_1 \geq n_2 \qquad -n_{12} \leq n_{22} +m_1 \leq m_2 }{ -C \vdash {}[ n_{11} .. n_{12} ] \leq {}[ n_{21} .. n_{22} ] +C \vdash {}[ n_1 .. m_1 ] \leq {}[ n_2 .. m_2 ] } \, {[\textsc{\scriptsize S{-}limits}]} \qquad \end{array} @@ -4434,8 +4436,11 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ +C \vdash {t_{21}^\ast} \leq {t_{11}^\ast} + \qquad +C \vdash {t_{12}^\ast} \leq {t_{22}^\ast} }{ -C \vdash {\mathit{ft}} \leq {\mathit{ft}} +C \vdash {t_{11}^\ast} \rightarrow {t_{12}^\ast} \leq {t_{21}^\ast} \rightarrow {t_{22}^\ast} } \, {[\textsc{\scriptsize S{-}func}]} \qquad \end{array} @@ -4444,9 +4449,9 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -C \vdash t_1 \leq t_2 +C \vdash {\mathit{valtype}}_1 \leq {\mathit{valtype}}_2 }{ -C \vdash t_1 \leq t_2 +C \vdash {\mathit{valtype}}_1 \leq {\mathit{valtype}}_2 } \, {[\textsc{\scriptsize S{-}global{-}const}]} \qquad \end{array} @@ -4455,11 +4460,11 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -C \vdash t_1 \leq t_2 +C \vdash {\mathit{valtype}}_1 \leq {\mathit{valtype}}_2 \qquad -C \vdash t_2 \leq t_1 +C \vdash {\mathit{valtype}}_2 \leq {\mathit{valtype}}_1 }{ -C \vdash \mathsf{mut}~t_1 \leq \mathsf{mut}~t_2 +C \vdash \mathsf{mut}~{\mathit{valtype}}_1 \leq \mathsf{mut}~{\mathit{valtype}}_2 } \, {[\textsc{\scriptsize S{-}global{-}var}]} \qquad \end{array} @@ -4468,13 +4473,13 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -C \vdash {\mathit{lim}}_1 \leq {\mathit{lim}}_2 +C \vdash {\mathit{limits}}_1 \leq {\mathit{limits}}_2 \qquad -C \vdash {\mathit{rt}}_1 \leq {\mathit{rt}}_2 +C \vdash {\mathit{reftype}}_1 \leq {\mathit{reftype}}_2 \qquad -C \vdash {\mathit{rt}}_2 \leq {\mathit{rt}}_1 +C \vdash {\mathit{reftype}}_2 \leq {\mathit{reftype}}_1 }{ -C \vdash {\mathit{lim}}_1~{\mathit{rt}}_1 \leq {\mathit{lim}}_2~{\mathit{rt}}_2 +C \vdash {\mathit{limits}}_1~{\mathit{reftype}}_1 \leq {\mathit{limits}}_2~{\mathit{reftype}}_2 } \, {[\textsc{\scriptsize S{-}table}]} \qquad \end{array} @@ -4483,9 +4488,9 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -C \vdash {\mathit{lim}}_1 \leq {\mathit{lim}}_2 +C \vdash {\mathit{limits}}_1 \leq {\mathit{limits}}_2 }{ -C \vdash {\mathit{lim}}_1~\mathsf{page} \leq {\mathit{lim}}_2~\mathsf{page} +C \vdash {\mathit{limits}}_1~\mathsf{page} \leq {\mathit{limits}}_2~\mathsf{page} } \, {[\textsc{\scriptsize S{-}mem}]} \qquad \end{array} @@ -4496,9 +4501,9 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -C \vdash {\mathit{dt}}_1 \leq {\mathit{dt}}_2 +C \vdash {\mathit{deftype}}_1 \leq {\mathit{deftype}}_2 }{ -C \vdash \mathsf{func}~{\mathit{dt}}_1 \leq \mathsf{func}~{\mathit{dt}}_2 +C \vdash \mathsf{func}~{\mathit{deftype}}_1 \leq \mathsf{func}~{\mathit{deftype}}_2 } \, {[\textsc{\scriptsize S{-}extern{-}func}]} \qquad \end{array} @@ -4507,9 +4512,9 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -C \vdash {\mathit{gt}}_1 \leq {\mathit{gt}}_2 +C \vdash {\mathit{globaltype}}_1 \leq {\mathit{globaltype}}_2 }{ -C \vdash \mathsf{global}~{\mathit{gt}}_1 \leq \mathsf{global}~{\mathit{gt}}_2 +C \vdash \mathsf{global}~{\mathit{globaltype}}_1 \leq \mathsf{global}~{\mathit{globaltype}}_2 } \, {[\textsc{\scriptsize S{-}extern{-}global}]} \qquad \end{array} @@ -4518,9 +4523,9 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -C \vdash {\mathit{tt}}_1 \leq {\mathit{tt}}_2 +C \vdash {\mathit{tabletype}}_1 \leq {\mathit{tabletype}}_2 }{ -C \vdash \mathsf{table}~{\mathit{tt}}_1 \leq \mathsf{table}~{\mathit{tt}}_2 +C \vdash \mathsf{table}~{\mathit{tabletype}}_1 \leq \mathsf{table}~{\mathit{tabletype}}_2 } \, {[\textsc{\scriptsize S{-}extern{-}table}]} \qquad \end{array} @@ -4529,9 +4534,9 @@ $$ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ -C \vdash {\mathit{mt}}_1 \leq {\mathit{mt}}_2 +C \vdash {\mathit{memtype}}_1 \leq {\mathit{memtype}}_2 }{ -C \vdash \mathsf{mem}~{\mathit{mt}}_1 \leq \mathsf{mem}~{\mathit{mt}}_2 +C \vdash \mathsf{mem}~{\mathit{memtype}}_1 \leq \mathsf{mem}~{\mathit{memtype}}_2 } \, {[\textsc{\scriptsize S{-}extern{-}mem}]} \qquad \end{array} diff --git a/spectec/test-middlend/TEST.md b/spectec/test-middlend/TEST.md index 83afc6cd1c..44c0678919 100644 --- a/spectec/test-middlend/TEST.md +++ b/spectec/test-middlend/TEST.md @@ -340,31 +340,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:215.1-215.60 +;; 1-syntax.watsup:218.1-218.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:217.1-217.90 +;; 1-syntax.watsup:220.1-220.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:218.1-218.64 +;; 1-syntax.watsup:221.1-221.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:219.1-219.54 +;; 1-syntax.watsup:222.1-222.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:221.1-224.18 +;; 1-syntax.watsup:224.1-227.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:226.1-227.30 +;; 1-syntax.watsup:229.1-230.30 syntax subtype = | SUB{fin : fin, typeuse* : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse : typeuse} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:229.1-230.22 +;; 1-syntax.watsup:232.1-233.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -484,6 +484,14 @@ syntax Lnn = | I8 | I16 +;; 1-syntax.watsup +syntax mut1 = + | `MUT%?`(()?) + +;; 1-syntax.watsup +syntax mut2 = + | `MUT%?`(()?) + ;; 1-syntax.watsup syntax limits = | `[%..%]`{u32 : u32}(u32 : u32, u32) @@ -952,7 +960,7 @@ syntax blocktype = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:642.1-643.22 +;; 1-syntax.watsup:645.1-646.22 syntax instr = | NOP | UNREACHABLE @@ -3114,11 +3122,11 @@ relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) `%|-%<:%`(C, deftype_1, deftype_2) -- if ($clostype(C, deftype_1) = $clostype(C, deftype_2)) - ;; 6-typing.watsup:450.1-453.40 - rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, yy_1* : typeuse*, yy : typeuse, yy_2* : typeuse*, ct : comptype}: + ;; 6-typing.watsup:450.1-453.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, typeuse* : typeuse*, ct : comptype, i : nat}: `%|-%<:%`(C, deftype_1, deftype_2) - -- if ($unrolldt(deftype_1) = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) - -- Heaptype_sub: `%|-%<:%`(C, (yy : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- if ($unrolldt(deftype_1) = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse : typeuse}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) ;; 6-typing.watsup:283.1-283.104 relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) @@ -3149,20 +3157,20 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) rule array-eq{C : context}: `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) - ;; 6-typing.watsup:315.1-317.35 - rule struct{C : context, deftype : deftype, yt* : fieldtype*}: + ;; 6-typing.watsup:315.1-317.42 + rule struct{C : context, deftype : deftype, fieldtype* : fieldtype*}: `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) - -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(fieldtype*{fieldtype : fieldtype}))) - ;; 6-typing.watsup:319.1-321.33 - rule array{C : context, deftype : deftype, yt : fieldtype}: + ;; 6-typing.watsup:319.1-321.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) - -- Expand: `%~~%`(deftype, ARRAY_comptype(yt)) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) - ;; 6-typing.watsup:323.1-325.32 - rule func{C : context, deftype : deftype, ft : functype}: + ;; 6-typing.watsup:323.1-325.38 + rule func{C : context, deftype : deftype, functype : functype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) - -- Expand: `%~~%`(deftype, FUNC_comptype(ft)) + -- Expand: `%~~%`(deftype, FUNC_comptype(functype)) ;; 6-typing.watsup:327.1-329.46 rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: @@ -3179,10 +3187,10 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) - ;; 6-typing.watsup:339.1-341.48 - rule rec{C : context, i : nat, yy : typeuse, fin : fin, yy_1* : typeuse*, yy_2* : typeuse*, ct : comptype}: - `%|-%<:%`(C, REC_heaptype(i), (yy : typeuse <: heaptype)) - -- if (C.RECS_context[i] = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) + ;; 6-typing.watsup:339.1-341.40 + rule rec{C : context, i : nat, typeuse* : typeuse*, j : nat, fin : fin, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse : typeuse}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) ;; 6-typing.watsup:343.1-345.40 rule none{C : context, heaptype : heaptype}: @@ -3268,11 +3276,20 @@ relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +;; 6-typing.watsup +relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) + ;; 6-typing.watsup + rule _{C : context, t_1* : valtype*, t_2* : valtype*}: + `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} + ;; 6-typing.watsup relation Functype_sub: `%|-%<:%`(context, functype, functype) ;; 6-typing.watsup - rule _{C : context, ft : functype}: - `%|-%<:%`(C, ft, ft) + rule _{C : context, t_11* : valtype*, t_12* : valtype*, t_21* : valtype*, t_22* : valtype*}: + `%|-%<:%`(C, `%->%`_functype(`%`_resulttype(t_11*{t_11 : valtype}), `%`_resulttype(t_12*{t_12 : valtype})), `%->%`_functype(`%`_resulttype(t_21*{t_21 : valtype}), `%`_resulttype(t_22*{t_22 : valtype}))) + -- Resulttype_sub: `%|-%<:%`(C, t_21*{t_21 : valtype}, t_11*{t_11 : valtype}) + -- Resulttype_sub: `%|-%<:%`(C, t_12*{t_12 : valtype}, t_22*{t_22 : valtype}) ;; 6-typing.watsup relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) @@ -3429,13 +3446,6 @@ relation Externtype_ok: `%|-%:OK`(context, externtype) `%|-%:OK`(C, MEM_externtype(memtype)) -- Memtype_ok: `%|-%:OK`(C, memtype) -;; 6-typing.watsup -relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) - ;; 6-typing.watsup - rule _{C : context, t_1* : valtype*, t_2* : valtype*}: - `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) - -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} - ;; 6-typing.watsup relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup @@ -3449,61 +3459,61 @@ relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup relation Limits_sub: `%|-%<:%`(context, limits, limits) ;; 6-typing.watsup - rule _{C : context, n_11 : n, n_12 : n, n_21 : n, n_22 : n}: - `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_11), `%`_u32(n_12)), `[%..%]`_limits(`%`_u32(n_21), `%`_u32(n_22))) - -- if (n_11 >= n_21) - -- if (n_12 <= n_22) + rule _{C : context, n_1 : n, m_1 : m, n_2 : n, m_2 : m}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_1), `%`_u32(m_1)), `[%..%]`_limits(`%`_u32(n_2), `%`_u32(m_2))) + -- if (n_1 >= n_2) + -- if (m_1 <= m_2) ;; 6-typing.watsup relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) ;; 6-typing.watsup - rule const{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), t_1), `%%`_globaltype(`MUT%?`_mut(?()), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), valtype_1), `%%`_globaltype(`MUT%?`_mut(?()), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) ;; 6-typing.watsup - rule var{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), t_1), `%%`_globaltype(`MUT%?`_mut(?(())), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) - -- Valtype_sub: `%|-%<:%`(C, t_2, t_1) + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), valtype_1), `%%`_globaltype(`MUT%?`_mut(?(())), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) ;; 6-typing.watsup relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: - `%|-%<:%`(C, `%%`_tabletype(lim_1, rt_1), `%%`_tabletype(lim_2, rt_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) - -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_2) - -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + rule _{C : context, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%`_tabletype(limits_1, reftype_1), `%%`_tabletype(limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) ;; 6-typing.watsup relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, lim_2 : limits}: - `%|-%<:%`(C, `%PAGE`_memtype(lim_1), `%PAGE`_memtype(lim_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) + rule _{C : context, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%PAGE`_memtype(limits_1), `%PAGE`_memtype(limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) ;; 6-typing.watsup relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) ;; 6-typing.watsup - rule func{C : context, dt_1 : deftype, dt_2 : deftype}: - `%|-%<:%`(C, FUNC_externtype((dt_1 : deftype <: typeuse)), FUNC_externtype((dt_2 : deftype <: typeuse))) - -- Deftype_sub: `%|-%<:%`(C, dt_1, dt_2) + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype((deftype_1 : deftype <: typeuse)), FUNC_externtype((deftype_2 : deftype <: typeuse))) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) ;; 6-typing.watsup - rule global{C : context, gt_1 : globaltype, gt_2 : globaltype}: - `%|-%<:%`(C, GLOBAL_externtype(gt_1), GLOBAL_externtype(gt_2)) - -- Globaltype_sub: `%|-%<:%`(C, gt_1, gt_2) + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) ;; 6-typing.watsup - rule table{C : context, tt_1 : tabletype, tt_2 : tabletype}: - `%|-%<:%`(C, TABLE_externtype(tt_1), TABLE_externtype(tt_2)) - -- Tabletype_sub: `%|-%<:%`(C, tt_1, tt_2) + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) ;; 6-typing.watsup - rule mem{C : context, mt_1 : memtype, mt_2 : memtype}: - `%|-%<:%`(C, MEM_externtype(mt_1), MEM_externtype(mt_2)) - -- Memtype_sub: `%|-%<:%`(C, mt_1, mt_2) + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) ;; 6-typing.watsup relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) @@ -3520,83 +3530,83 @@ relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:515.1-515.95 +;; 6-typing.watsup:517.1-517.95 relation Instr_ok: `%|-%:%`(context, instr, instrtype) - ;; 6-typing.watsup:554.1-555.24 + ;; 6-typing.watsup:556.1-557.24 rule nop{C : context}: `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:557.1-559.42 + ;; 6-typing.watsup:559.1-561.42 rule unreachable{C : context, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:561.1-563.29 + ;; 6-typing.watsup:563.1-565.29 rule drop{C : context, t : valtype}: `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:566.1-568.29 + ;; 6-typing.watsup:568.1-570.29 rule select-expl{C : context, t : valtype}: `%|-%:%`(C, `SELECT()%?`_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:570.1-574.37 + ;; 6-typing.watsup:572.1-576.37 rule select-impl{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, `SELECT()%?`_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) -- Valtype_sub: `%|-%<:%`(C, t, t') -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) - ;; 6-typing.watsup:590.1-593.63 + ;; 6-typing.watsup:592.1-595.63 rule block{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, BLOCK_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:595.1-598.63 + ;; 6-typing.watsup:597.1-600.63 rule loop{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, LOOP_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:600.1-604.67 + ;; 6-typing.watsup:602.1-606.67 rule if{C : context, bt : blocktype, instr_1* : instr*, instr_2* : instr*, t_1* : valtype*, t_2* : valtype*, x_1* : idx*, x_2* : idx*}: `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 : instr}, instr_2*{instr_2 : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_1*{instr_1 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:609.1-612.42 + ;; 6-typing.watsup:611.1-614.42 rule br{C : context, l : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:614.1-616.25 + ;; 6-typing.watsup:616.1-618.25 rule br_if{C : context, l : labelidx, t* : valtype*}: `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [I32_valtype]), [], `%`_resulttype(t*{t : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) - ;; 6-typing.watsup:618.1-622.42 + ;; 6-typing.watsup:620.1-624.42 rule br_table{C : context, l* : labelidx*, l' : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_TABLE_instr(l*{l : labelidx}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- (Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0))*{l : labelidx} -- Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:624.1-627.31 + ;; 6-typing.watsup:626.1-629.31 rule br_on_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:629.1-631.34 + ;; 6-typing.watsup:631.1-633.34 rule br_on_non_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)])) - ;; 6-typing.watsup:633.1-639.34 + ;; 6-typing.watsup:635.1-641.34 rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [($diffrt(rt_1, rt_2) : reftype <: valtype)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)])) @@ -3605,7 +3615,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) - ;; 6-typing.watsup:641.1-647.49 + ;; 6-typing.watsup:643.1-649.49 rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [(rt_2 : reftype <: valtype)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)])) @@ -3614,30 +3624,30 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) - ;; 6-typing.watsup:652.1-654.47 + ;; 6-typing.watsup:654.1-656.47 rule call{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:656.1-658.47 + ;; 6-typing.watsup:658.1-660.47 rule call_ref{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:660.1-664.47 + ;; 6-typing.watsup:662.1-666.47 rule call_indirect{C : context, x : idx, y : idx, t_1* : valtype*, t_2* : valtype*, lim : limits, rt : reftype}: `%|-%:%`(C, CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype)) -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:666.1-669.42 + ;; 6-typing.watsup:668.1-671.42 rule return{C : context, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.RETURN_context = ?(`%`_list(t*{t : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:672.1-677.42 + ;; 6-typing.watsup:674.1-679.42 rule return_call{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) @@ -3645,7 +3655,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:680.1-685.42 + ;; 6-typing.watsup:682.1-687.42 rule return_call_ref{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) @@ -3653,7 +3663,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:688.1-696.42 + ;; 6-typing.watsup:690.1-698.42 rule return_call_indirect{C : context, x : idx, y : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, lim : limits, rt : reftype, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) @@ -3663,458 +3673,458 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:701.1-702.33 + ;; 6-typing.watsup:703.1-704.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:704.1-705.34 + ;; 6-typing.watsup:706.1-707.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:707.1-708.39 + ;; 6-typing.watsup:709.1-710.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:710.1-711.39 + ;; 6-typing.watsup:712.1-713.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:713.1-714.40 + ;; 6-typing.watsup:715.1-716.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:718.1-720.34 + ;; 6-typing.watsup:720.1-722.34 rule cvtop-reinterpret{C : context, nt_1 : numtype, nt_2 : numtype}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, REINTERPRET_cvtop, ?()), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ($size(nt_1) = $size(nt_2)) - ;; 6-typing.watsup:722.1-724.112 + ;; 6-typing.watsup:724.1-726.112 rule cvtop-convert{C : context, nt_1 : numtype, nt_2 : numtype, sx? : sx?, Inn_1 : Inn, Inn_2 : Inn, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, CONVERT_cvtop, sx?{sx : sx}), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ((sx?{sx : sx} = ?()) <=> ((((nt_1 = (Inn_1 : Inn <: numtype)) /\ (nt_2 = (Inn_2 : Inn <: numtype))) /\ ($size(nt_1) > $size(nt_2))) \/ ((nt_1 = (Fnn_1 : Fnn <: numtype)) /\ (nt_2 = (Fnn_2 : Fnn <: numtype))))) - ;; 6-typing.watsup:729.1-731.31 + ;; 6-typing.watsup:731.1-733.31 rule ref.null{C : context, ht : heaptype}: `%|-%:%`(C, REF.NULL_instr(ht), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:734.1-736.24 + ;; 6-typing.watsup:736.1-738.24 rule ref.func{C : context, x : idx, dt : deftype}: `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), (dt : deftype <: heaptype))]))) -- if (C.FUNCS_context[x!`%`_idx.0] = dt) - ;; 6-typing.watsup:738.1-739.34 + ;; 6-typing.watsup:740.1-741.34 rule ref.i31{C : context}: `%|-%:%`(C, REF.I31_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), I31_heaptype)]))) - ;; 6-typing.watsup:741.1-743.31 + ;; 6-typing.watsup:743.1-745.31 rule ref.is_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.IS_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([I32_valtype]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:745.1-747.31 + ;; 6-typing.watsup:747.1-749.31 rule ref.as_non_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.AS_NON_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:749.1-750.51 + ;; 6-typing.watsup:751.1-752.51 rule ref.eq{C : context}: `%|-%:%`(C, REF.EQ_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype) REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:752.1-756.33 + ;; 6-typing.watsup:754.1-758.33 rule ref.test{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.TEST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:758.1-762.33 + ;; 6-typing.watsup:760.1-764.33 rule ref.cast{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.CAST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:767.1-768.42 + ;; 6-typing.watsup:769.1-770.42 rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:773.1-775.44 + ;; 6-typing.watsup:775.1-777.44 rule struct.new{C : context, x : idx, zt* : storagetype*, mut* : mut*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt : storagetype}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) - ;; 6-typing.watsup:777.1-780.40 + ;; 6-typing.watsup:779.1-782.40 rule struct.new_default{C : context, x : idx, mut* : mut*, zt* : storagetype*, val* : val*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) -- (if ($default_($unpack(zt)) = ?(val)))*{val : val, zt : storagetype} - ;; 6-typing.watsup:782.1-786.39 + ;; 6-typing.watsup:784.1-788.39 rule struct.get{C : context, sx? : sx?, x : idx, i : nat, zt : storagetype, yt* : fieldtype*, mut : mut}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx : sx}, x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(mut, zt)) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:788.1-791.24 + ;; 6-typing.watsup:790.1-793.24 rule struct.set{C : context, x : idx, i : nat, zt : storagetype, yt* : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(`MUT%?`_mut(?(())), zt)) - ;; 6-typing.watsup:796.1-798.42 + ;; 6-typing.watsup:798.1-800.42 rule array.new{C : context, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:800.1-803.37 + ;; 6-typing.watsup:802.1-805.37 rule array.new_default{C : context, x : idx, mut : mut, zt : storagetype, val : val}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ($default_($unpack(zt)) = ?(val)) - ;; 6-typing.watsup:805.1-807.42 + ;; 6-typing.watsup:807.1-809.42 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:809.1-812.40 + ;; 6-typing.watsup:811.1-814.40 rule array.new_elem{C : context, x : idx, y : idx, mut : mut, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; 6-typing.watsup:814.1-818.24 + ;; 6-typing.watsup:816.1-820.24 rule array.new_data{C : context, x : idx, y : idx, mut : mut, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:820.1-823.39 + ;; 6-typing.watsup:822.1-825.39 rule array.get{C : context, sx? : sx?, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx : sx}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:825.1-827.42 + ;; 6-typing.watsup:827.1-829.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:829.1-831.42 + ;; 6-typing.watsup:831.1-833.42 rule array.len{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:833.1-835.42 + ;; 6-typing.watsup:835.1-837.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:837.1-841.40 + ;; 6-typing.watsup:839.1-843.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, mut : mut, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x_1) : typevar <: heaptype)) I32_valtype REF_valtype(`NULL%?`_nul(?(())), ($idx(x_2) : typevar <: heaptype)) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; 6-typing.watsup:843.1-846.44 + ;; 6-typing.watsup:845.1-848.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; 6-typing.watsup:848.1-852.24 + ;; 6-typing.watsup:850.1-854.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:857.1-858.62 + ;; 6-typing.watsup:859.1-860.62 rule extern.convert_any{C : context, nul : nul}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]))) - ;; 6-typing.watsup:860.1-861.62 + ;; 6-typing.watsup:862.1-863.62 rule any.convert_extern{C : context, nul : nul}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(nul, ANY_heaptype)]))) - ;; 6-typing.watsup:866.1-867.35 + ;; 6-typing.watsup:868.1-869.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:869.1-870.41 + ;; 6-typing.watsup:871.1-872.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:872.1-873.48 + ;; 6-typing.watsup:874.1-875.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:875.1-876.55 + ;; 6-typing.watsup:877.1-878.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:878.1-879.44 + ;; 6-typing.watsup:880.1-881.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:881.1-882.37 + ;; 6-typing.watsup:883.1-884.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:884.1-885.44 + ;; 6-typing.watsup:886.1-887.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:887.1-888.40 + ;; 6-typing.watsup:889.1-890.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:890.1-891.44 + ;; 6-typing.watsup:892.1-893.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:893.1-894.47 + ;; 6-typing.watsup:895.1-896.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:896.1-897.33 + ;; 6-typing.watsup:898.1-899.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:899.1-900.39 + ;; 6-typing.watsup:901.1-902.39 rule vswizzle{C : context, sh : ishape}: `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:902.1-904.29 + ;; 6-typing.watsup:904.1-906.29 rule vshuffle{C : context, sh : ishape, i* : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i : nat}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i : nat} - ;; 6-typing.watsup:906.1-907.44 + ;; 6-typing.watsup:908.1-909.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:910.1-912.21 + ;; 6-typing.watsup:912.1-914.21 rule vextract_lane{C : context, sh : shape, sx? : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx : sx}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:914.1-916.21 + ;; 6-typing.watsup:916.1-918.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:918.1-919.53 + ;; 6-typing.watsup:920.1-921.53 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:921.1-922.60 + ;; 6-typing.watsup:923.1-924.60 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:924.1-925.48 + ;; 6-typing.watsup:926.1-927.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:928.1-930.160 + ;; 6-typing.watsup:930.1-932.160 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop_(sh_2, sh_1), hf? : half_(sh_2, sh_1)?, sx? : sx?, zero? : zero_(sh_2, sh_1)?, imm_1 : lanetype, imm_2 : lanetype, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, hf?{hf : half_(sh_2, sh_1)}, sx?{sx : sx}, zero?{zero : zero_(sh_2, sh_1)}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if ((sx?{sx : sx} = ?()) <=> (((($lanetype(sh_1) = imm_1) /\ ($lanetype(sh_2) = imm_2)) /\ ($lsize(imm_1) > $lsize(imm_2))) \/ (($lanetype(sh_1) = (Fnn_1 : Fnn <: lanetype)) /\ ($lanetype(sh_2) = (Fnn_2 : Fnn <: lanetype))))) - ;; 6-typing.watsup:935.1-937.28 + ;; 6-typing.watsup:937.1-939.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:939.1-941.29 + ;; 6-typing.watsup:941.1-943.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:943.1-945.29 + ;; 6-typing.watsup:945.1-947.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:950.1-952.29 + ;; 6-typing.watsup:952.1-954.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:954.1-956.29 + ;; 6-typing.watsup:956.1-958.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:961.1-963.29 + ;; 6-typing.watsup:963.1-965.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:965.1-967.29 + ;; 6-typing.watsup:967.1-969.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:969.1-971.29 + ;; 6-typing.watsup:971.1-973.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:973.1-975.29 + ;; 6-typing.watsup:975.1-977.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:977.1-979.29 + ;; 6-typing.watsup:979.1-981.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:981.1-985.36 + ;; 6-typing.watsup:983.1-987.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%`_tabletype(lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:987.1-991.36 + ;; 6-typing.watsup:989.1-993.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:993.1-995.24 + ;; 6-typing.watsup:995.1-997.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1000.1-1002.23 + ;; 6-typing.watsup:1002.1-1004.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1004.1-1006.23 + ;; 6-typing.watsup:1006.1-1008.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1008.1-1010.23 + ;; 6-typing.watsup:1010.1-1012.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1012.1-1015.27 + ;; 6-typing.watsup:1014.1-1017.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1017.1-1020.24 + ;; 6-typing.watsup:1019.1-1022.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1022.1-1024.24 + ;; 6-typing.watsup:1024.1-1026.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1035.1-1038.43 + ;; 6-typing.watsup:1037.1-1040.43 rule load-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1040.1-1043.35 + ;; 6-typing.watsup:1042.1-1045.35 rule load-pack{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr((Inn : Inn <: numtype), ?((`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1054.1-1057.43 + ;; 6-typing.watsup:1056.1-1059.43 rule store-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1059.1-1062.35 + ;; 6-typing.watsup:1061.1-1064.35 rule store-pack{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1064.1-1067.46 + ;; 6-typing.watsup:1066.1-1069.46 rule vload-val{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1069.1-1072.39 + ;; 6-typing.watsup:1071.1-1074.39 rule vload-pack{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1074.1-1077.35 + ;; 6-typing.watsup:1076.1-1079.35 rule vload-splat{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1079.1-1082.34 + ;; 6-typing.watsup:1081.1-1084.34 rule vload-zero{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) - ;; 6-typing.watsup:1084.1-1088.21 + ;; 6-typing.watsup:1086.1-1090.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1090.1-1093.46 + ;; 6-typing.watsup:1092.1-1095.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1095.1-1099.21 + ;; 6-typing.watsup:1097.1-1101.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) -;; 6-typing.watsup:516.1-516.96 +;; 6-typing.watsup:518.1-518.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; 6-typing.watsup:529.1-530.24 + ;; 6-typing.watsup:531.1-532.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:533.1-537.82 + ;; 6-typing.watsup:535.1-539.82 rule seq{C : context, instr_1 : instr, instr_2* : instr*, t_1* : valtype*, x_1* : idx*, x_2* : idx*, t_3* : valtype*, t_2* : valtype*, init* : init*, t* : valtype*}: `%|-%:%`(C, [instr_1] :: instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx} :: x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) -- Instr_ok: `%|-%:%`(C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init : init, t : valtype, x_1 : idx} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 : localidx}, `%%`_localtype(SET_init, t)*{t : valtype}), instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) - ;; 6-typing.watsup:539.1-543.33 + ;; 6-typing.watsup:541.1-545.33 rule sub{C : context, instr* : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr : instr}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; 6-typing.watsup:546.1-549.33 + ;; 6-typing.watsup:548.1-551.33 rule frame{C : context, instr* : instr*, t* : valtype*, t_1* : valtype*, x* : idx*, t_2* : valtype*}: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t*{t : valtype} :: t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) @@ -4131,22 +4141,22 @@ relation Expr_ok: `%|-%:%`(context, expr, resulttype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1155.1-1155.86 +;; 6-typing.watsup:1157.1-1157.86 def $in_binop(numtype : numtype, binop_ : binop_(numtype), binop_(numtype)*) : bool - ;; 6-typing.watsup:1156.1-1156.42 + ;; 6-typing.watsup:1158.1-1158.42 def $in_binop{nt : numtype, binop : binop_(nt), epsilon : binop_(nt)*}(nt, binop, epsilon) = false - ;; 6-typing.watsup:1157.1-1157.99 + ;; 6-typing.watsup:1159.1-1159.99 def $in_binop{nt : numtype, binop : binop_(nt), ibinop_1 : binop_(nt), ibinop'* : binop_(nt)*}(nt, binop, [ibinop_1] :: ibinop'*{ibinop' : binop_(nt)}) = ((binop = ibinop_1) \/ $in_binop(nt, binop, ibinop'*{ibinop' : binop_(nt)})) } ;; 6-typing.watsup rec { -;; 6-typing.watsup:1151.1-1151.63 +;; 6-typing.watsup:1153.1-1153.63 def $in_numtype(numtype : numtype, numtype*) : bool - ;; 6-typing.watsup:1152.1-1152.37 + ;; 6-typing.watsup:1154.1-1154.37 def $in_numtype{nt : numtype, epsilon : numtype*}(nt, epsilon) = false - ;; 6-typing.watsup:1153.1-1153.68 + ;; 6-typing.watsup:1155.1-1155.68 def $in_numtype{nt : numtype, nt_1 : numtype, nt'* : numtype*}(nt, [nt_1] :: nt'*{nt' : numtype}) = ((nt = nt_1) \/ $in_numtype(nt, nt'*{nt' : numtype})) } @@ -4376,13 +4386,13 @@ syntax moduletype = ;; 6-typing.watsup rec { -;; 6-typing.watsup:1302.1-1302.100 +;; 6-typing.watsup:1304.1-1304.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1339.1-1340.17 + ;; 6-typing.watsup:1341.1-1342.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1342.1-1345.55 + ;; 6-typing.watsup:1344.1-1347.55 rule cons{C : context, global_1 : global, global : global, gt_1 : globaltype, gt* : globaltype*}: `%|-%:%`(C, [global_1] :: global*{}, [gt_1] :: gt*{gt : globaltype}) -- Global_ok: `%|-%:%`(C, global, gt_1) @@ -4392,13 +4402,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1301.1-1301.98 +;; 6-typing.watsup:1303.1-1303.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1331.1-1332.17 + ;; 6-typing.watsup:1333.1-1334.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1334.1-1337.50 + ;; 6-typing.watsup:1336.1-1339.50 rule cons{C : context, type_1 : type, type* : type*, dt_1* : deftype*, dt* : deftype*}: `%|-%:%`(C, [type_1] :: type*{type : type}, dt_1*{dt_1 : deftype} :: dt*{dt : deftype}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 : deftype}) @@ -6132,31 +6142,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:215.1-215.60 +;; 1-syntax.watsup:218.1-218.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:217.1-217.90 +;; 1-syntax.watsup:220.1-220.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:218.1-218.64 +;; 1-syntax.watsup:221.1-221.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:219.1-219.54 +;; 1-syntax.watsup:222.1-222.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:221.1-224.18 +;; 1-syntax.watsup:224.1-227.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:226.1-227.30 +;; 1-syntax.watsup:229.1-230.30 syntax subtype = | SUB{fin : fin, typeuse* : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse : typeuse} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:229.1-230.22 +;; 1-syntax.watsup:232.1-233.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -6276,6 +6286,14 @@ syntax Lnn = | I8 | I16 +;; 1-syntax.watsup +syntax mut1 = + | `MUT%?`(()?) + +;; 1-syntax.watsup +syntax mut2 = + | `MUT%?`(()?) + ;; 1-syntax.watsup syntax limits = | `[%..%]`{u32 : u32}(u32 : u32, u32) @@ -6744,7 +6762,7 @@ syntax blocktype = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:642.1-643.22 +;; 1-syntax.watsup:645.1-646.22 syntax instr = | NOP | UNREACHABLE @@ -8911,11 +8929,11 @@ relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) `%|-%<:%`(C, deftype_1, deftype_2) -- if ($clostype(C, deftype_1) = $clostype(C, deftype_2)) - ;; 6-typing.watsup:450.1-453.40 - rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, yy_1* : typeuse*, yy : typeuse, yy_2* : typeuse*, ct : comptype}: + ;; 6-typing.watsup:450.1-453.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, typeuse* : typeuse*, ct : comptype, i : nat}: `%|-%<:%`(C, deftype_1, deftype_2) - -- if ($unrolldt(deftype_1) = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) - -- Heaptype_sub: `%|-%<:%`(C, (yy : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- if ($unrolldt(deftype_1) = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse : typeuse}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) ;; 6-typing.watsup:283.1-283.104 relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) @@ -8946,20 +8964,20 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) rule array-eq{C : context}: `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) - ;; 6-typing.watsup:315.1-317.35 - rule struct{C : context, deftype : deftype, yt* : fieldtype*}: + ;; 6-typing.watsup:315.1-317.42 + rule struct{C : context, deftype : deftype, fieldtype* : fieldtype*}: `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) - -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(fieldtype*{fieldtype : fieldtype}))) - ;; 6-typing.watsup:319.1-321.33 - rule array{C : context, deftype : deftype, yt : fieldtype}: + ;; 6-typing.watsup:319.1-321.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) - -- Expand: `%~~%`(deftype, ARRAY_comptype(yt)) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) - ;; 6-typing.watsup:323.1-325.32 - rule func{C : context, deftype : deftype, ft : functype}: + ;; 6-typing.watsup:323.1-325.38 + rule func{C : context, deftype : deftype, functype : functype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) - -- Expand: `%~~%`(deftype, FUNC_comptype(ft)) + -- Expand: `%~~%`(deftype, FUNC_comptype(functype)) ;; 6-typing.watsup:327.1-329.46 rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: @@ -8976,10 +8994,10 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) - ;; 6-typing.watsup:339.1-341.48 - rule rec{C : context, i : nat, yy : typeuse, fin : fin, yy_1* : typeuse*, yy_2* : typeuse*, ct : comptype}: - `%|-%<:%`(C, REC_heaptype(i), (yy : typeuse <: heaptype)) - -- if (C.RECS_context[i] = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) + ;; 6-typing.watsup:339.1-341.40 + rule rec{C : context, i : nat, typeuse* : typeuse*, j : nat, fin : fin, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse : typeuse}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) ;; 6-typing.watsup:343.1-345.40 rule none{C : context, heaptype : heaptype}: @@ -9065,11 +9083,20 @@ relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +;; 6-typing.watsup +relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) + ;; 6-typing.watsup + rule _{C : context, t_1* : valtype*, t_2* : valtype*}: + `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} + ;; 6-typing.watsup relation Functype_sub: `%|-%<:%`(context, functype, functype) ;; 6-typing.watsup - rule _{C : context, ft : functype}: - `%|-%<:%`(C, ft, ft) + rule _{C : context, t_11* : valtype*, t_12* : valtype*, t_21* : valtype*, t_22* : valtype*}: + `%|-%<:%`(C, `%->%`_functype(`%`_resulttype(t_11*{t_11 : valtype}), `%`_resulttype(t_12*{t_12 : valtype})), `%->%`_functype(`%`_resulttype(t_21*{t_21 : valtype}), `%`_resulttype(t_22*{t_22 : valtype}))) + -- Resulttype_sub: `%|-%<:%`(C, t_21*{t_21 : valtype}, t_11*{t_11 : valtype}) + -- Resulttype_sub: `%|-%<:%`(C, t_12*{t_12 : valtype}, t_22*{t_22 : valtype}) ;; 6-typing.watsup relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) @@ -9226,13 +9253,6 @@ relation Externtype_ok: `%|-%:OK`(context, externtype) `%|-%:OK`(C, MEM_externtype(memtype)) -- Memtype_ok: `%|-%:OK`(C, memtype) -;; 6-typing.watsup -relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) - ;; 6-typing.watsup - rule _{C : context, t_1* : valtype*, t_2* : valtype*}: - `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) - -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} - ;; 6-typing.watsup relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup @@ -9246,61 +9266,61 @@ relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup relation Limits_sub: `%|-%<:%`(context, limits, limits) ;; 6-typing.watsup - rule _{C : context, n_11 : n, n_12 : n, n_21 : n, n_22 : n}: - `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_11), `%`_u32(n_12)), `[%..%]`_limits(`%`_u32(n_21), `%`_u32(n_22))) - -- if (n_11 >= n_21) - -- if (n_12 <= n_22) + rule _{C : context, n_1 : n, m_1 : m, n_2 : n, m_2 : m}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_1), `%`_u32(m_1)), `[%..%]`_limits(`%`_u32(n_2), `%`_u32(m_2))) + -- if (n_1 >= n_2) + -- if (m_1 <= m_2) ;; 6-typing.watsup relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) ;; 6-typing.watsup - rule const{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), t_1), `%%`_globaltype(`MUT%?`_mut(?()), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), valtype_1), `%%`_globaltype(`MUT%?`_mut(?()), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) ;; 6-typing.watsup - rule var{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), t_1), `%%`_globaltype(`MUT%?`_mut(?(())), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) - -- Valtype_sub: `%|-%<:%`(C, t_2, t_1) + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), valtype_1), `%%`_globaltype(`MUT%?`_mut(?(())), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) ;; 6-typing.watsup relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: - `%|-%<:%`(C, `%%`_tabletype(lim_1, rt_1), `%%`_tabletype(lim_2, rt_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) - -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_2) - -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + rule _{C : context, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%`_tabletype(limits_1, reftype_1), `%%`_tabletype(limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) ;; 6-typing.watsup relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, lim_2 : limits}: - `%|-%<:%`(C, `%PAGE`_memtype(lim_1), `%PAGE`_memtype(lim_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) + rule _{C : context, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%PAGE`_memtype(limits_1), `%PAGE`_memtype(limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) ;; 6-typing.watsup relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) ;; 6-typing.watsup - rule func{C : context, dt_1 : deftype, dt_2 : deftype}: - `%|-%<:%`(C, FUNC_externtype((dt_1 : deftype <: typeuse)), FUNC_externtype((dt_2 : deftype <: typeuse))) - -- Deftype_sub: `%|-%<:%`(C, dt_1, dt_2) + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype((deftype_1 : deftype <: typeuse)), FUNC_externtype((deftype_2 : deftype <: typeuse))) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) ;; 6-typing.watsup - rule global{C : context, gt_1 : globaltype, gt_2 : globaltype}: - `%|-%<:%`(C, GLOBAL_externtype(gt_1), GLOBAL_externtype(gt_2)) - -- Globaltype_sub: `%|-%<:%`(C, gt_1, gt_2) + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) ;; 6-typing.watsup - rule table{C : context, tt_1 : tabletype, tt_2 : tabletype}: - `%|-%<:%`(C, TABLE_externtype(tt_1), TABLE_externtype(tt_2)) - -- Tabletype_sub: `%|-%<:%`(C, tt_1, tt_2) + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) ;; 6-typing.watsup - rule mem{C : context, mt_1 : memtype, mt_2 : memtype}: - `%|-%<:%`(C, MEM_externtype(mt_1), MEM_externtype(mt_2)) - -- Memtype_sub: `%|-%<:%`(C, mt_1, mt_2) + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) ;; 6-typing.watsup relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) @@ -9317,83 +9337,83 @@ relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:515.1-515.95 +;; 6-typing.watsup:517.1-517.95 relation Instr_ok: `%|-%:%`(context, instr, instrtype) - ;; 6-typing.watsup:554.1-555.24 + ;; 6-typing.watsup:556.1-557.24 rule nop{C : context}: `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:557.1-559.42 + ;; 6-typing.watsup:559.1-561.42 rule unreachable{C : context, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:561.1-563.29 + ;; 6-typing.watsup:563.1-565.29 rule drop{C : context, t : valtype}: `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:566.1-568.29 + ;; 6-typing.watsup:568.1-570.29 rule select-expl{C : context, t : valtype}: `%|-%:%`(C, `SELECT()%?`_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:570.1-574.37 + ;; 6-typing.watsup:572.1-576.37 rule select-impl{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, `SELECT()%?`_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) -- Valtype_sub: `%|-%<:%`(C, t, t') -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) - ;; 6-typing.watsup:590.1-593.63 + ;; 6-typing.watsup:592.1-595.63 rule block{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, BLOCK_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:595.1-598.63 + ;; 6-typing.watsup:597.1-600.63 rule loop{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, LOOP_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:600.1-604.67 + ;; 6-typing.watsup:602.1-606.67 rule if{C : context, bt : blocktype, instr_1* : instr*, instr_2* : instr*, t_1* : valtype*, t_2* : valtype*, x_1* : idx*, x_2* : idx*}: `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 : instr}, instr_2*{instr_2 : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_1*{instr_1 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:609.1-612.42 + ;; 6-typing.watsup:611.1-614.42 rule br{C : context, l : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:614.1-616.25 + ;; 6-typing.watsup:616.1-618.25 rule br_if{C : context, l : labelidx, t* : valtype*}: `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [I32_valtype]), [], `%`_resulttype(t*{t : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) - ;; 6-typing.watsup:618.1-622.42 + ;; 6-typing.watsup:620.1-624.42 rule br_table{C : context, l* : labelidx*, l' : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_TABLE_instr(l*{l : labelidx}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- (Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0))*{l : labelidx} -- Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:624.1-627.31 + ;; 6-typing.watsup:626.1-629.31 rule br_on_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:629.1-631.34 + ;; 6-typing.watsup:631.1-633.34 rule br_on_non_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)])) - ;; 6-typing.watsup:633.1-639.34 + ;; 6-typing.watsup:635.1-641.34 rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [($diffrt(rt_1, rt_2) : reftype <: valtype)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)])) @@ -9402,7 +9422,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) - ;; 6-typing.watsup:641.1-647.49 + ;; 6-typing.watsup:643.1-649.49 rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [(rt_2 : reftype <: valtype)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)])) @@ -9411,30 +9431,30 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) - ;; 6-typing.watsup:652.1-654.47 + ;; 6-typing.watsup:654.1-656.47 rule call{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:656.1-658.47 + ;; 6-typing.watsup:658.1-660.47 rule call_ref{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:660.1-664.47 + ;; 6-typing.watsup:662.1-666.47 rule call_indirect{C : context, x : idx, y : idx, t_1* : valtype*, t_2* : valtype*, lim : limits, rt : reftype}: `%|-%:%`(C, CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype)) -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:666.1-669.42 + ;; 6-typing.watsup:668.1-671.42 rule return{C : context, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.RETURN_context = ?(`%`_list(t*{t : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:672.1-677.42 + ;; 6-typing.watsup:674.1-679.42 rule return_call{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) @@ -9442,7 +9462,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:680.1-685.42 + ;; 6-typing.watsup:682.1-687.42 rule return_call_ref{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) @@ -9450,7 +9470,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:688.1-696.42 + ;; 6-typing.watsup:690.1-698.42 rule return_call_indirect{C : context, x : idx, y : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, lim : limits, rt : reftype, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) @@ -9460,458 +9480,458 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:701.1-702.33 + ;; 6-typing.watsup:703.1-704.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:704.1-705.34 + ;; 6-typing.watsup:706.1-707.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:707.1-708.39 + ;; 6-typing.watsup:709.1-710.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:710.1-711.39 + ;; 6-typing.watsup:712.1-713.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:713.1-714.40 + ;; 6-typing.watsup:715.1-716.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:718.1-720.34 + ;; 6-typing.watsup:720.1-722.34 rule cvtop-reinterpret{C : context, nt_1 : numtype, nt_2 : numtype}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, REINTERPRET_cvtop, ?()), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ($size(nt_1) = $size(nt_2)) - ;; 6-typing.watsup:722.1-724.112 + ;; 6-typing.watsup:724.1-726.112 rule cvtop-convert{C : context, nt_1 : numtype, nt_2 : numtype, sx? : sx?, Inn_1 : Inn, Inn_2 : Inn, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, CONVERT_cvtop, sx?{sx : sx}), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ((sx?{sx : sx} = ?()) <=> ((((nt_1 = (Inn_1 : Inn <: numtype)) /\ (nt_2 = (Inn_2 : Inn <: numtype))) /\ ($size(nt_1) > $size(nt_2))) \/ ((nt_1 = (Fnn_1 : Fnn <: numtype)) /\ (nt_2 = (Fnn_2 : Fnn <: numtype))))) - ;; 6-typing.watsup:729.1-731.31 + ;; 6-typing.watsup:731.1-733.31 rule ref.null{C : context, ht : heaptype}: `%|-%:%`(C, REF.NULL_instr(ht), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:734.1-736.24 + ;; 6-typing.watsup:736.1-738.24 rule ref.func{C : context, x : idx, dt : deftype}: `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), (dt : deftype <: heaptype))]))) -- if (C.FUNCS_context[x!`%`_idx.0] = dt) - ;; 6-typing.watsup:738.1-739.34 + ;; 6-typing.watsup:740.1-741.34 rule ref.i31{C : context}: `%|-%:%`(C, REF.I31_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), I31_heaptype)]))) - ;; 6-typing.watsup:741.1-743.31 + ;; 6-typing.watsup:743.1-745.31 rule ref.is_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.IS_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([I32_valtype]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:745.1-747.31 + ;; 6-typing.watsup:747.1-749.31 rule ref.as_non_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.AS_NON_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:749.1-750.51 + ;; 6-typing.watsup:751.1-752.51 rule ref.eq{C : context}: `%|-%:%`(C, REF.EQ_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype) REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:752.1-756.33 + ;; 6-typing.watsup:754.1-758.33 rule ref.test{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.TEST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:758.1-762.33 + ;; 6-typing.watsup:760.1-764.33 rule ref.cast{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.CAST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:767.1-768.42 + ;; 6-typing.watsup:769.1-770.42 rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:773.1-775.44 + ;; 6-typing.watsup:775.1-777.44 rule struct.new{C : context, x : idx, zt* : storagetype*, mut* : mut*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt : storagetype}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) - ;; 6-typing.watsup:777.1-780.40 + ;; 6-typing.watsup:779.1-782.40 rule struct.new_default{C : context, x : idx, mut* : mut*, zt* : storagetype*, val* : val*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) -- (if ($default_($unpack(zt)) = ?(val)))*{val : val, zt : storagetype} - ;; 6-typing.watsup:782.1-786.39 + ;; 6-typing.watsup:784.1-788.39 rule struct.get{C : context, sx? : sx?, x : idx, i : nat, zt : storagetype, yt* : fieldtype*, mut : mut}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx : sx}, x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(mut, zt)) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:788.1-791.24 + ;; 6-typing.watsup:790.1-793.24 rule struct.set{C : context, x : idx, i : nat, zt : storagetype, yt* : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(`MUT%?`_mut(?(())), zt)) - ;; 6-typing.watsup:796.1-798.42 + ;; 6-typing.watsup:798.1-800.42 rule array.new{C : context, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:800.1-803.37 + ;; 6-typing.watsup:802.1-805.37 rule array.new_default{C : context, x : idx, mut : mut, zt : storagetype, val : val}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ($default_($unpack(zt)) = ?(val)) - ;; 6-typing.watsup:805.1-807.42 + ;; 6-typing.watsup:807.1-809.42 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:809.1-812.40 + ;; 6-typing.watsup:811.1-814.40 rule array.new_elem{C : context, x : idx, y : idx, mut : mut, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; 6-typing.watsup:814.1-818.24 + ;; 6-typing.watsup:816.1-820.24 rule array.new_data{C : context, x : idx, y : idx, mut : mut, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:820.1-823.39 + ;; 6-typing.watsup:822.1-825.39 rule array.get{C : context, sx? : sx?, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx : sx}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:825.1-827.42 + ;; 6-typing.watsup:827.1-829.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:829.1-831.42 + ;; 6-typing.watsup:831.1-833.42 rule array.len{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:833.1-835.42 + ;; 6-typing.watsup:835.1-837.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:837.1-841.40 + ;; 6-typing.watsup:839.1-843.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, mut : mut, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x_1) : typevar <: heaptype)) I32_valtype REF_valtype(`NULL%?`_nul(?(())), ($idx(x_2) : typevar <: heaptype)) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; 6-typing.watsup:843.1-846.44 + ;; 6-typing.watsup:845.1-848.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; 6-typing.watsup:848.1-852.24 + ;; 6-typing.watsup:850.1-854.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:857.1-858.62 + ;; 6-typing.watsup:859.1-860.62 rule extern.convert_any{C : context, nul : nul}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]))) - ;; 6-typing.watsup:860.1-861.62 + ;; 6-typing.watsup:862.1-863.62 rule any.convert_extern{C : context, nul : nul}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(nul, ANY_heaptype)]))) - ;; 6-typing.watsup:866.1-867.35 + ;; 6-typing.watsup:868.1-869.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:869.1-870.41 + ;; 6-typing.watsup:871.1-872.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:872.1-873.48 + ;; 6-typing.watsup:874.1-875.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:875.1-876.55 + ;; 6-typing.watsup:877.1-878.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:878.1-879.44 + ;; 6-typing.watsup:880.1-881.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:881.1-882.37 + ;; 6-typing.watsup:883.1-884.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:884.1-885.44 + ;; 6-typing.watsup:886.1-887.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:887.1-888.40 + ;; 6-typing.watsup:889.1-890.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:890.1-891.44 + ;; 6-typing.watsup:892.1-893.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:893.1-894.47 + ;; 6-typing.watsup:895.1-896.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:896.1-897.33 + ;; 6-typing.watsup:898.1-899.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:899.1-900.39 + ;; 6-typing.watsup:901.1-902.39 rule vswizzle{C : context, sh : ishape}: `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:902.1-904.29 + ;; 6-typing.watsup:904.1-906.29 rule vshuffle{C : context, sh : ishape, i* : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i : nat}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i : nat} - ;; 6-typing.watsup:906.1-907.44 + ;; 6-typing.watsup:908.1-909.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:910.1-912.21 + ;; 6-typing.watsup:912.1-914.21 rule vextract_lane{C : context, sh : shape, sx? : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx : sx}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:914.1-916.21 + ;; 6-typing.watsup:916.1-918.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:918.1-919.53 + ;; 6-typing.watsup:920.1-921.53 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:921.1-922.60 + ;; 6-typing.watsup:923.1-924.60 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:924.1-925.48 + ;; 6-typing.watsup:926.1-927.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:928.1-930.160 + ;; 6-typing.watsup:930.1-932.160 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop_(sh_2, sh_1), hf? : half_(sh_2, sh_1)?, sx? : sx?, zero? : zero_(sh_2, sh_1)?, imm_1 : lanetype, imm_2 : lanetype, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, hf?{hf : half_(sh_2, sh_1)}, sx?{sx : sx}, zero?{zero : zero_(sh_2, sh_1)}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if ((sx?{sx : sx} = ?()) <=> (((($lanetype(sh_1) = imm_1) /\ ($lanetype(sh_2) = imm_2)) /\ ($lsize(imm_1) > $lsize(imm_2))) \/ (($lanetype(sh_1) = (Fnn_1 : Fnn <: lanetype)) /\ ($lanetype(sh_2) = (Fnn_2 : Fnn <: lanetype))))) - ;; 6-typing.watsup:935.1-937.28 + ;; 6-typing.watsup:937.1-939.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:939.1-941.29 + ;; 6-typing.watsup:941.1-943.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:943.1-945.29 + ;; 6-typing.watsup:945.1-947.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:950.1-952.29 + ;; 6-typing.watsup:952.1-954.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:954.1-956.29 + ;; 6-typing.watsup:956.1-958.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:961.1-963.29 + ;; 6-typing.watsup:963.1-965.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:965.1-967.29 + ;; 6-typing.watsup:967.1-969.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:969.1-971.29 + ;; 6-typing.watsup:971.1-973.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:973.1-975.29 + ;; 6-typing.watsup:975.1-977.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:977.1-979.29 + ;; 6-typing.watsup:979.1-981.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:981.1-985.36 + ;; 6-typing.watsup:983.1-987.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%`_tabletype(lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:987.1-991.36 + ;; 6-typing.watsup:989.1-993.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:993.1-995.24 + ;; 6-typing.watsup:995.1-997.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1000.1-1002.23 + ;; 6-typing.watsup:1002.1-1004.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1004.1-1006.23 + ;; 6-typing.watsup:1006.1-1008.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1008.1-1010.23 + ;; 6-typing.watsup:1010.1-1012.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1012.1-1015.27 + ;; 6-typing.watsup:1014.1-1017.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1017.1-1020.24 + ;; 6-typing.watsup:1019.1-1022.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1022.1-1024.24 + ;; 6-typing.watsup:1024.1-1026.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1035.1-1038.43 + ;; 6-typing.watsup:1037.1-1040.43 rule load-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1040.1-1043.35 + ;; 6-typing.watsup:1042.1-1045.35 rule load-pack{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr((Inn : Inn <: numtype), ?((`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1054.1-1057.43 + ;; 6-typing.watsup:1056.1-1059.43 rule store-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1059.1-1062.35 + ;; 6-typing.watsup:1061.1-1064.35 rule store-pack{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1064.1-1067.46 + ;; 6-typing.watsup:1066.1-1069.46 rule vload-val{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1069.1-1072.39 + ;; 6-typing.watsup:1071.1-1074.39 rule vload-pack{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1074.1-1077.35 + ;; 6-typing.watsup:1076.1-1079.35 rule vload-splat{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1079.1-1082.34 + ;; 6-typing.watsup:1081.1-1084.34 rule vload-zero{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) - ;; 6-typing.watsup:1084.1-1088.21 + ;; 6-typing.watsup:1086.1-1090.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1090.1-1093.46 + ;; 6-typing.watsup:1092.1-1095.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1095.1-1099.21 + ;; 6-typing.watsup:1097.1-1101.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) -;; 6-typing.watsup:516.1-516.96 +;; 6-typing.watsup:518.1-518.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; 6-typing.watsup:529.1-530.24 + ;; 6-typing.watsup:531.1-532.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:533.1-537.82 + ;; 6-typing.watsup:535.1-539.82 rule seq{C : context, instr_1 : instr, instr_2* : instr*, t_1* : valtype*, x_1* : idx*, x_2* : idx*, t_3* : valtype*, t_2* : valtype*, init* : init*, t* : valtype*}: `%|-%:%`(C, [instr_1] :: instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx} :: x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) -- Instr_ok: `%|-%:%`(C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init : init, t : valtype, x_1 : idx} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 : localidx}, `%%`_localtype(SET_init, t)*{t : valtype}), instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) - ;; 6-typing.watsup:539.1-543.33 + ;; 6-typing.watsup:541.1-545.33 rule sub{C : context, instr* : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr : instr}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; 6-typing.watsup:546.1-549.33 + ;; 6-typing.watsup:548.1-551.33 rule frame{C : context, instr* : instr*, t* : valtype*, t_1* : valtype*, x* : idx*, t_2* : valtype*}: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t*{t : valtype} :: t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) @@ -9928,22 +9948,22 @@ relation Expr_ok: `%|-%:%`(context, expr, resulttype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1155.1-1155.86 +;; 6-typing.watsup:1157.1-1157.86 def $in_binop(numtype : numtype, binop_ : binop_(numtype), binop_(numtype)*) : bool - ;; 6-typing.watsup:1156.1-1156.42 + ;; 6-typing.watsup:1158.1-1158.42 def $in_binop{nt : numtype, binop : binop_(nt), epsilon : binop_(nt)*}(nt, binop, epsilon) = false - ;; 6-typing.watsup:1157.1-1157.99 + ;; 6-typing.watsup:1159.1-1159.99 def $in_binop{nt : numtype, binop : binop_(nt), ibinop_1 : binop_(nt), ibinop'* : binop_(nt)*}(nt, binop, [ibinop_1] :: ibinop'*{ibinop' : binop_(nt)}) = ((binop = ibinop_1) \/ $in_binop(nt, binop, ibinop'*{ibinop' : binop_(nt)})) } ;; 6-typing.watsup rec { -;; 6-typing.watsup:1151.1-1151.63 +;; 6-typing.watsup:1153.1-1153.63 def $in_numtype(numtype : numtype, numtype*) : bool - ;; 6-typing.watsup:1152.1-1152.37 + ;; 6-typing.watsup:1154.1-1154.37 def $in_numtype{nt : numtype, epsilon : numtype*}(nt, epsilon) = false - ;; 6-typing.watsup:1153.1-1153.68 + ;; 6-typing.watsup:1155.1-1155.68 def $in_numtype{nt : numtype, nt_1 : numtype, nt'* : numtype*}(nt, [nt_1] :: nt'*{nt' : numtype}) = ((nt = nt_1) \/ $in_numtype(nt, nt'*{nt' : numtype})) } @@ -10173,13 +10193,13 @@ syntax moduletype = ;; 6-typing.watsup rec { -;; 6-typing.watsup:1302.1-1302.100 +;; 6-typing.watsup:1304.1-1304.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1339.1-1340.17 + ;; 6-typing.watsup:1341.1-1342.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1342.1-1345.55 + ;; 6-typing.watsup:1344.1-1347.55 rule cons{C : context, global_1 : global, global : global, gt_1 : globaltype, gt* : globaltype*}: `%|-%:%`(C, [global_1] :: global*{}, [gt_1] :: gt*{gt : globaltype}) -- Global_ok: `%|-%:%`(C, global, gt_1) @@ -10189,13 +10209,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1301.1-1301.98 +;; 6-typing.watsup:1303.1-1303.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1331.1-1332.17 + ;; 6-typing.watsup:1333.1-1334.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1334.1-1337.50 + ;; 6-typing.watsup:1336.1-1339.50 rule cons{C : context, type_1 : type, type* : type*, dt_1* : deftype*, dt* : deftype*}: `%|-%:%`(C, [type_1] :: type*{type : type}, dt_1*{dt_1 : deftype} :: dt*{dt : deftype}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 : deftype}) @@ -11929,31 +11949,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:215.1-215.60 +;; 1-syntax.watsup:218.1-218.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:217.1-217.90 +;; 1-syntax.watsup:220.1-220.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:218.1-218.64 +;; 1-syntax.watsup:221.1-221.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:219.1-219.54 +;; 1-syntax.watsup:222.1-222.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:221.1-224.18 +;; 1-syntax.watsup:224.1-227.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:226.1-227.30 +;; 1-syntax.watsup:229.1-230.30 syntax subtype = | SUB{fin : fin, typeuse* : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse : typeuse} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:229.1-230.22 +;; 1-syntax.watsup:232.1-233.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -12073,6 +12093,14 @@ syntax Lnn = | I8 | I16 +;; 1-syntax.watsup +syntax mut1 = + | `MUT%?`(()?) + +;; 1-syntax.watsup +syntax mut2 = + | `MUT%?`(()?) + ;; 1-syntax.watsup syntax limits = | `[%..%]`{u32 : u32}(u32 : u32, u32) @@ -12541,7 +12569,7 @@ syntax blocktype = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:642.1-643.22 +;; 1-syntax.watsup:645.1-646.22 syntax instr = | NOP | UNREACHABLE @@ -14708,11 +14736,11 @@ relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) `%|-%<:%`(C, deftype_1, deftype_2) -- if ($clostype(C, deftype_1) = $clostype(C, deftype_2)) - ;; 6-typing.watsup:450.1-453.40 - rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, yy_1* : typeuse*, yy : typeuse, yy_2* : typeuse*, ct : comptype}: + ;; 6-typing.watsup:450.1-453.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, typeuse* : typeuse*, ct : comptype, i : nat}: `%|-%<:%`(C, deftype_1, deftype_2) - -- if ($unrolldt(deftype_1) = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) - -- Heaptype_sub: `%|-%<:%`(C, (yy : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- if ($unrolldt(deftype_1) = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse : typeuse}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) ;; 6-typing.watsup:283.1-283.104 relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) @@ -14743,20 +14771,20 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) rule array-eq{C : context}: `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) - ;; 6-typing.watsup:315.1-317.35 - rule struct{C : context, deftype : deftype, yt* : fieldtype*}: + ;; 6-typing.watsup:315.1-317.42 + rule struct{C : context, deftype : deftype, fieldtype* : fieldtype*}: `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) - -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(fieldtype*{fieldtype : fieldtype}))) - ;; 6-typing.watsup:319.1-321.33 - rule array{C : context, deftype : deftype, yt : fieldtype}: + ;; 6-typing.watsup:319.1-321.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) - -- Expand: `%~~%`(deftype, ARRAY_comptype(yt)) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) - ;; 6-typing.watsup:323.1-325.32 - rule func{C : context, deftype : deftype, ft : functype}: + ;; 6-typing.watsup:323.1-325.38 + rule func{C : context, deftype : deftype, functype : functype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) - -- Expand: `%~~%`(deftype, FUNC_comptype(ft)) + -- Expand: `%~~%`(deftype, FUNC_comptype(functype)) ;; 6-typing.watsup:327.1-329.46 rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: @@ -14773,10 +14801,10 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) - ;; 6-typing.watsup:339.1-341.48 - rule rec{C : context, i : nat, yy : typeuse, fin : fin, yy_1* : typeuse*, yy_2* : typeuse*, ct : comptype}: - `%|-%<:%`(C, REC_heaptype(i), (yy : typeuse <: heaptype)) - -- if (C.RECS_context[i] = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) + ;; 6-typing.watsup:339.1-341.40 + rule rec{C : context, i : nat, typeuse* : typeuse*, j : nat, fin : fin, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse : typeuse}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) ;; 6-typing.watsup:343.1-345.40 rule none{C : context, heaptype : heaptype}: @@ -14862,11 +14890,20 @@ relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +;; 6-typing.watsup +relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) + ;; 6-typing.watsup + rule _{C : context, t_1* : valtype*, t_2* : valtype*}: + `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} + ;; 6-typing.watsup relation Functype_sub: `%|-%<:%`(context, functype, functype) ;; 6-typing.watsup - rule _{C : context, ft : functype}: - `%|-%<:%`(C, ft, ft) + rule _{C : context, t_11* : valtype*, t_12* : valtype*, t_21* : valtype*, t_22* : valtype*}: + `%|-%<:%`(C, `%->%`_functype(`%`_resulttype(t_11*{t_11 : valtype}), `%`_resulttype(t_12*{t_12 : valtype})), `%->%`_functype(`%`_resulttype(t_21*{t_21 : valtype}), `%`_resulttype(t_22*{t_22 : valtype}))) + -- Resulttype_sub: `%|-%<:%`(C, t_21*{t_21 : valtype}, t_11*{t_11 : valtype}) + -- Resulttype_sub: `%|-%<:%`(C, t_12*{t_12 : valtype}, t_22*{t_22 : valtype}) ;; 6-typing.watsup relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) @@ -15023,13 +15060,6 @@ relation Externtype_ok: `%|-%:OK`(context, externtype) `%|-%:OK`(C, MEM_externtype(memtype)) -- Memtype_ok: `%|-%:OK`(C, memtype) -;; 6-typing.watsup -relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) - ;; 6-typing.watsup - rule _{C : context, t_1* : valtype*, t_2* : valtype*}: - `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) - -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} - ;; 6-typing.watsup relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup @@ -15043,61 +15073,61 @@ relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup relation Limits_sub: `%|-%<:%`(context, limits, limits) ;; 6-typing.watsup - rule _{C : context, n_11 : n, n_12 : n, n_21 : n, n_22 : n}: - `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_11), `%`_u32(n_12)), `[%..%]`_limits(`%`_u32(n_21), `%`_u32(n_22))) - -- if (n_11 >= n_21) - -- if (n_12 <= n_22) + rule _{C : context, n_1 : n, m_1 : m, n_2 : n, m_2 : m}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_1), `%`_u32(m_1)), `[%..%]`_limits(`%`_u32(n_2), `%`_u32(m_2))) + -- if (n_1 >= n_2) + -- if (m_1 <= m_2) ;; 6-typing.watsup relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) ;; 6-typing.watsup - rule const{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), t_1), `%%`_globaltype(`MUT%?`_mut(?()), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), valtype_1), `%%`_globaltype(`MUT%?`_mut(?()), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) ;; 6-typing.watsup - rule var{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), t_1), `%%`_globaltype(`MUT%?`_mut(?(())), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) - -- Valtype_sub: `%|-%<:%`(C, t_2, t_1) + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), valtype_1), `%%`_globaltype(`MUT%?`_mut(?(())), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) ;; 6-typing.watsup relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: - `%|-%<:%`(C, `%%`_tabletype(lim_1, rt_1), `%%`_tabletype(lim_2, rt_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) - -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_2) - -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + rule _{C : context, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%`_tabletype(limits_1, reftype_1), `%%`_tabletype(limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) ;; 6-typing.watsup relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, lim_2 : limits}: - `%|-%<:%`(C, `%PAGE`_memtype(lim_1), `%PAGE`_memtype(lim_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) + rule _{C : context, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%PAGE`_memtype(limits_1), `%PAGE`_memtype(limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) ;; 6-typing.watsup relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) ;; 6-typing.watsup - rule func{C : context, dt_1 : deftype, dt_2 : deftype}: - `%|-%<:%`(C, FUNC_externtype((dt_1 : deftype <: typeuse)), FUNC_externtype((dt_2 : deftype <: typeuse))) - -- Deftype_sub: `%|-%<:%`(C, dt_1, dt_2) + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype((deftype_1 : deftype <: typeuse)), FUNC_externtype((deftype_2 : deftype <: typeuse))) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) ;; 6-typing.watsup - rule global{C : context, gt_1 : globaltype, gt_2 : globaltype}: - `%|-%<:%`(C, GLOBAL_externtype(gt_1), GLOBAL_externtype(gt_2)) - -- Globaltype_sub: `%|-%<:%`(C, gt_1, gt_2) + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) ;; 6-typing.watsup - rule table{C : context, tt_1 : tabletype, tt_2 : tabletype}: - `%|-%<:%`(C, TABLE_externtype(tt_1), TABLE_externtype(tt_2)) - -- Tabletype_sub: `%|-%<:%`(C, tt_1, tt_2) + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) ;; 6-typing.watsup - rule mem{C : context, mt_1 : memtype, mt_2 : memtype}: - `%|-%<:%`(C, MEM_externtype(mt_1), MEM_externtype(mt_2)) - -- Memtype_sub: `%|-%<:%`(C, mt_1, mt_2) + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) ;; 6-typing.watsup relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) @@ -15114,83 +15144,83 @@ relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:515.1-515.95 +;; 6-typing.watsup:517.1-517.95 relation Instr_ok: `%|-%:%`(context, instr, instrtype) - ;; 6-typing.watsup:554.1-555.24 + ;; 6-typing.watsup:556.1-557.24 rule nop{C : context}: `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:557.1-559.42 + ;; 6-typing.watsup:559.1-561.42 rule unreachable{C : context, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:561.1-563.29 + ;; 6-typing.watsup:563.1-565.29 rule drop{C : context, t : valtype}: `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:566.1-568.29 + ;; 6-typing.watsup:568.1-570.29 rule select-expl{C : context, t : valtype}: `%|-%:%`(C, `SELECT()%?`_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:570.1-574.37 + ;; 6-typing.watsup:572.1-576.37 rule select-impl{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, `SELECT()%?`_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) -- Valtype_sub: `%|-%<:%`(C, t, t') -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) - ;; 6-typing.watsup:590.1-593.63 + ;; 6-typing.watsup:592.1-595.63 rule block{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, BLOCK_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:595.1-598.63 + ;; 6-typing.watsup:597.1-600.63 rule loop{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, LOOP_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:600.1-604.67 + ;; 6-typing.watsup:602.1-606.67 rule if{C : context, bt : blocktype, instr_1* : instr*, instr_2* : instr*, t_1* : valtype*, t_2* : valtype*, x_1* : idx*, x_2* : idx*}: `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 : instr}, instr_2*{instr_2 : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_1*{instr_1 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:609.1-612.42 + ;; 6-typing.watsup:611.1-614.42 rule br{C : context, l : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:614.1-616.25 + ;; 6-typing.watsup:616.1-618.25 rule br_if{C : context, l : labelidx, t* : valtype*}: `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [I32_valtype]), [], `%`_resulttype(t*{t : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) - ;; 6-typing.watsup:618.1-622.42 + ;; 6-typing.watsup:620.1-624.42 rule br_table{C : context, l* : labelidx*, l' : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_TABLE_instr(l*{l : labelidx}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- (Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0))*{l : labelidx} -- Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:624.1-627.31 + ;; 6-typing.watsup:626.1-629.31 rule br_on_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:629.1-631.34 + ;; 6-typing.watsup:631.1-633.34 rule br_on_non_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype}))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)])) - ;; 6-typing.watsup:633.1-639.34 + ;; 6-typing.watsup:635.1-641.34 rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [($diffrt(rt_1, rt_2) : reftype <: valtype)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)])) @@ -15199,7 +15229,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) - ;; 6-typing.watsup:641.1-647.49 + ;; 6-typing.watsup:643.1-649.49 rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [(rt_2 : reftype <: valtype)]))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)])) @@ -15208,30 +15238,30 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) - ;; 6-typing.watsup:652.1-654.47 + ;; 6-typing.watsup:654.1-656.47 rule call{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:656.1-658.47 + ;; 6-typing.watsup:658.1-660.47 rule call_ref{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:660.1-664.47 + ;; 6-typing.watsup:662.1-666.47 rule call_indirect{C : context, x : idx, y : idx, t_1* : valtype*, t_2* : valtype*, lim : limits, rt : reftype}: `%|-%:%`(C, CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype)) -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:666.1-669.42 + ;; 6-typing.watsup:668.1-671.42 rule return{C : context, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.RETURN_context = ?(`%`_list(t*{t : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:672.1-677.42 + ;; 6-typing.watsup:674.1-679.42 rule return_call{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) @@ -15239,7 +15269,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:680.1-685.42 + ;; 6-typing.watsup:682.1-687.42 rule return_call_ref{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) @@ -15247,7 +15277,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:688.1-696.42 + ;; 6-typing.watsup:690.1-698.42 rule return_call_indirect{C : context, x : idx, y : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, lim : limits, rt : reftype, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) @@ -15257,458 +15287,458 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:701.1-702.33 + ;; 6-typing.watsup:703.1-704.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:704.1-705.34 + ;; 6-typing.watsup:706.1-707.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:707.1-708.39 + ;; 6-typing.watsup:709.1-710.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:710.1-711.39 + ;; 6-typing.watsup:712.1-713.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:713.1-714.40 + ;; 6-typing.watsup:715.1-716.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:718.1-720.34 + ;; 6-typing.watsup:720.1-722.34 rule cvtop-reinterpret{C : context, nt_1 : numtype, nt_2 : numtype}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, REINTERPRET_cvtop, ?()), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ($size(nt_1) = $size(nt_2)) - ;; 6-typing.watsup:722.1-724.112 + ;; 6-typing.watsup:724.1-726.112 rule cvtop-convert{C : context, nt_1 : numtype, nt_2 : numtype, sx? : sx?, Inn_1 : Inn, Inn_2 : Inn, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, CONVERT_cvtop, sx?{sx : sx}), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ((sx?{sx : sx} = ?()) <=> ((((nt_1 = (Inn_1 : Inn <: numtype)) /\ (nt_2 = (Inn_2 : Inn <: numtype))) /\ ($size(nt_1) > $size(nt_2))) \/ ((nt_1 = (Fnn_1 : Fnn <: numtype)) /\ (nt_2 = (Fnn_2 : Fnn <: numtype))))) - ;; 6-typing.watsup:729.1-731.31 + ;; 6-typing.watsup:731.1-733.31 rule ref.null{C : context, ht : heaptype}: `%|-%:%`(C, REF.NULL_instr(ht), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:734.1-736.24 + ;; 6-typing.watsup:736.1-738.24 rule ref.func{C : context, x : idx, dt : deftype}: `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), (dt : deftype <: heaptype))]))) -- if (C.FUNCS_context[x!`%`_idx.0] = dt) - ;; 6-typing.watsup:738.1-739.34 + ;; 6-typing.watsup:740.1-741.34 rule ref.i31{C : context}: `%|-%:%`(C, REF.I31_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), I31_heaptype)]))) - ;; 6-typing.watsup:741.1-743.31 + ;; 6-typing.watsup:743.1-745.31 rule ref.is_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.IS_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([I32_valtype]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:745.1-747.31 + ;; 6-typing.watsup:747.1-749.31 rule ref.as_non_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.AS_NON_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:749.1-750.51 + ;; 6-typing.watsup:751.1-752.51 rule ref.eq{C : context}: `%|-%:%`(C, REF.EQ_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype) REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:752.1-756.33 + ;; 6-typing.watsup:754.1-758.33 rule ref.test{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.TEST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:758.1-762.33 + ;; 6-typing.watsup:760.1-764.33 rule ref.cast{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.CAST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:767.1-768.42 + ;; 6-typing.watsup:769.1-770.42 rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:773.1-775.44 + ;; 6-typing.watsup:775.1-777.44 rule struct.new{C : context, x : idx, zt* : storagetype*, mut* : mut*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt : storagetype}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) - ;; 6-typing.watsup:777.1-780.40 + ;; 6-typing.watsup:779.1-782.40 rule struct.new_default{C : context, x : idx, mut* : mut*, zt* : storagetype*, val* : val*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) -- (if ($default_($unpack(zt)) = ?(val)))*{val : val, zt : storagetype} - ;; 6-typing.watsup:782.1-786.39 + ;; 6-typing.watsup:784.1-788.39 rule struct.get{C : context, sx? : sx?, x : idx, i : nat, zt : storagetype, yt* : fieldtype*, mut : mut}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx : sx}, x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(mut, zt)) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:788.1-791.24 + ;; 6-typing.watsup:790.1-793.24 rule struct.set{C : context, x : idx, i : nat, zt : storagetype, yt* : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(`MUT%?`_mut(?(())), zt)) - ;; 6-typing.watsup:796.1-798.42 + ;; 6-typing.watsup:798.1-800.42 rule array.new{C : context, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:800.1-803.37 + ;; 6-typing.watsup:802.1-805.37 rule array.new_default{C : context, x : idx, mut : mut, zt : storagetype, val : val}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ($default_($unpack(zt)) = ?(val)) - ;; 6-typing.watsup:805.1-807.42 + ;; 6-typing.watsup:807.1-809.42 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:809.1-812.40 + ;; 6-typing.watsup:811.1-814.40 rule array.new_elem{C : context, x : idx, y : idx, mut : mut, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; 6-typing.watsup:814.1-818.24 + ;; 6-typing.watsup:816.1-820.24 rule array.new_data{C : context, x : idx, y : idx, mut : mut, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:820.1-823.39 + ;; 6-typing.watsup:822.1-825.39 rule array.get{C : context, sx? : sx?, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx : sx}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:825.1-827.42 + ;; 6-typing.watsup:827.1-829.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:829.1-831.42 + ;; 6-typing.watsup:831.1-833.42 rule array.len{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:833.1-835.42 + ;; 6-typing.watsup:835.1-837.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:837.1-841.40 + ;; 6-typing.watsup:839.1-843.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, mut : mut, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x_1) : typevar <: heaptype)) I32_valtype REF_valtype(`NULL%?`_nul(?(())), ($idx(x_2) : typevar <: heaptype)) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; 6-typing.watsup:843.1-846.44 + ;; 6-typing.watsup:845.1-848.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; 6-typing.watsup:848.1-852.24 + ;; 6-typing.watsup:850.1-854.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:857.1-858.62 + ;; 6-typing.watsup:859.1-860.62 rule extern.convert_any{C : context, nul : nul}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]))) - ;; 6-typing.watsup:860.1-861.62 + ;; 6-typing.watsup:862.1-863.62 rule any.convert_extern{C : context, nul : nul}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(nul, ANY_heaptype)]))) - ;; 6-typing.watsup:866.1-867.35 + ;; 6-typing.watsup:868.1-869.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:869.1-870.41 + ;; 6-typing.watsup:871.1-872.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:872.1-873.48 + ;; 6-typing.watsup:874.1-875.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:875.1-876.55 + ;; 6-typing.watsup:877.1-878.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:878.1-879.44 + ;; 6-typing.watsup:880.1-881.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:881.1-882.37 + ;; 6-typing.watsup:883.1-884.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:884.1-885.44 + ;; 6-typing.watsup:886.1-887.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:887.1-888.40 + ;; 6-typing.watsup:889.1-890.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:890.1-891.44 + ;; 6-typing.watsup:892.1-893.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:893.1-894.47 + ;; 6-typing.watsup:895.1-896.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:896.1-897.33 + ;; 6-typing.watsup:898.1-899.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:899.1-900.39 + ;; 6-typing.watsup:901.1-902.39 rule vswizzle{C : context, sh : ishape}: `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:902.1-904.29 + ;; 6-typing.watsup:904.1-906.29 rule vshuffle{C : context, sh : ishape, i* : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i : nat}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i : nat} - ;; 6-typing.watsup:906.1-907.44 + ;; 6-typing.watsup:908.1-909.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:910.1-912.21 + ;; 6-typing.watsup:912.1-914.21 rule vextract_lane{C : context, sh : shape, sx? : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx : sx}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:914.1-916.21 + ;; 6-typing.watsup:916.1-918.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:918.1-919.53 + ;; 6-typing.watsup:920.1-921.53 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:921.1-922.60 + ;; 6-typing.watsup:923.1-924.60 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:924.1-925.48 + ;; 6-typing.watsup:926.1-927.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:928.1-930.160 + ;; 6-typing.watsup:930.1-932.160 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop_(sh_2, sh_1), hf? : half_(sh_2, sh_1)?, sx? : sx?, zero? : zero_(sh_2, sh_1)?, imm_1 : lanetype, imm_2 : lanetype, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, hf?{hf : half_(sh_2, sh_1)}, sx?{sx : sx}, zero?{zero : zero_(sh_2, sh_1)}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if ((sx?{sx : sx} = ?()) <=> (((($lanetype(sh_1) = imm_1) /\ ($lanetype(sh_2) = imm_2)) /\ ($lsize(imm_1) > $lsize(imm_2))) \/ (($lanetype(sh_1) = (Fnn_1 : Fnn <: lanetype)) /\ ($lanetype(sh_2) = (Fnn_2 : Fnn <: lanetype))))) - ;; 6-typing.watsup:935.1-937.28 + ;; 6-typing.watsup:937.1-939.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:939.1-941.29 + ;; 6-typing.watsup:941.1-943.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:943.1-945.29 + ;; 6-typing.watsup:945.1-947.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:950.1-952.29 + ;; 6-typing.watsup:952.1-954.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:954.1-956.29 + ;; 6-typing.watsup:956.1-958.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:961.1-963.29 + ;; 6-typing.watsup:963.1-965.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:965.1-967.29 + ;; 6-typing.watsup:967.1-969.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:969.1-971.29 + ;; 6-typing.watsup:971.1-973.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:973.1-975.29 + ;; 6-typing.watsup:975.1-977.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:977.1-979.29 + ;; 6-typing.watsup:979.1-981.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:981.1-985.36 + ;; 6-typing.watsup:983.1-987.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%`_tabletype(lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:987.1-991.36 + ;; 6-typing.watsup:989.1-993.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:993.1-995.24 + ;; 6-typing.watsup:995.1-997.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1000.1-1002.23 + ;; 6-typing.watsup:1002.1-1004.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1004.1-1006.23 + ;; 6-typing.watsup:1006.1-1008.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1008.1-1010.23 + ;; 6-typing.watsup:1010.1-1012.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1012.1-1015.27 + ;; 6-typing.watsup:1014.1-1017.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1017.1-1020.24 + ;; 6-typing.watsup:1019.1-1022.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1022.1-1024.24 + ;; 6-typing.watsup:1024.1-1026.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1035.1-1038.43 + ;; 6-typing.watsup:1037.1-1040.43 rule load-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1040.1-1043.35 + ;; 6-typing.watsup:1042.1-1045.35 rule load-pack{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr((Inn : Inn <: numtype), ?((`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1054.1-1057.43 + ;; 6-typing.watsup:1056.1-1059.43 rule store-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1059.1-1062.35 + ;; 6-typing.watsup:1061.1-1064.35 rule store-pack{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1064.1-1067.46 + ;; 6-typing.watsup:1066.1-1069.46 rule vload-val{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1069.1-1072.39 + ;; 6-typing.watsup:1071.1-1074.39 rule vload-pack{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1074.1-1077.35 + ;; 6-typing.watsup:1076.1-1079.35 rule vload-splat{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1079.1-1082.34 + ;; 6-typing.watsup:1081.1-1084.34 rule vload-zero{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) - ;; 6-typing.watsup:1084.1-1088.21 + ;; 6-typing.watsup:1086.1-1090.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1090.1-1093.46 + ;; 6-typing.watsup:1092.1-1095.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1095.1-1099.21 + ;; 6-typing.watsup:1097.1-1101.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) -;; 6-typing.watsup:516.1-516.96 +;; 6-typing.watsup:518.1-518.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; 6-typing.watsup:529.1-530.24 + ;; 6-typing.watsup:531.1-532.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:533.1-537.82 + ;; 6-typing.watsup:535.1-539.82 rule seq{C : context, instr_1 : instr, instr_2* : instr*, t_1* : valtype*, x_1* : idx*, x_2* : idx*, t_3* : valtype*, t_2* : valtype*, init* : init*, t* : valtype*}: `%|-%:%`(C, [instr_1] :: instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx} :: x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) -- Instr_ok: `%|-%:%`(C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init : init, t : valtype, x_1 : idx} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 : localidx}, `%%`_localtype(SET_init, t)*{t : valtype}), instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) - ;; 6-typing.watsup:539.1-543.33 + ;; 6-typing.watsup:541.1-545.33 rule sub{C : context, instr* : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr : instr}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; 6-typing.watsup:546.1-549.33 + ;; 6-typing.watsup:548.1-551.33 rule frame{C : context, instr* : instr*, t* : valtype*, t_1* : valtype*, x* : idx*, t_2* : valtype*}: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t*{t : valtype} :: t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) @@ -15725,22 +15755,22 @@ relation Expr_ok: `%|-%:%`(context, expr, resulttype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1155.1-1155.86 +;; 6-typing.watsup:1157.1-1157.86 def $in_binop(numtype : numtype, binop_ : binop_(numtype), binop_(numtype)*) : bool - ;; 6-typing.watsup:1156.1-1156.42 + ;; 6-typing.watsup:1158.1-1158.42 def $in_binop{nt : numtype, binop : binop_(nt), epsilon : binop_(nt)*}(nt, binop, epsilon) = false - ;; 6-typing.watsup:1157.1-1157.99 + ;; 6-typing.watsup:1159.1-1159.99 def $in_binop{nt : numtype, binop : binop_(nt), ibinop_1 : binop_(nt), ibinop'* : binop_(nt)*}(nt, binop, [ibinop_1] :: ibinop'*{ibinop' : binop_(nt)}) = ((binop = ibinop_1) \/ $in_binop(nt, binop, ibinop'*{ibinop' : binop_(nt)})) } ;; 6-typing.watsup rec { -;; 6-typing.watsup:1151.1-1151.63 +;; 6-typing.watsup:1153.1-1153.63 def $in_numtype(numtype : numtype, numtype*) : bool - ;; 6-typing.watsup:1152.1-1152.37 + ;; 6-typing.watsup:1154.1-1154.37 def $in_numtype{nt : numtype, epsilon : numtype*}(nt, epsilon) = false - ;; 6-typing.watsup:1153.1-1153.68 + ;; 6-typing.watsup:1155.1-1155.68 def $in_numtype{nt : numtype, nt_1 : numtype, nt'* : numtype*}(nt, [nt_1] :: nt'*{nt' : numtype}) = ((nt = nt_1) \/ $in_numtype(nt, nt'*{nt' : numtype})) } @@ -15970,13 +16000,13 @@ syntax moduletype = ;; 6-typing.watsup rec { -;; 6-typing.watsup:1302.1-1302.100 +;; 6-typing.watsup:1304.1-1304.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1339.1-1340.17 + ;; 6-typing.watsup:1341.1-1342.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1342.1-1345.55 + ;; 6-typing.watsup:1344.1-1347.55 rule cons{C : context, global_1 : global, global : global, gt_1 : globaltype, gt* : globaltype*}: `%|-%:%`(C, [global_1] :: global*{}, [gt_1] :: gt*{gt : globaltype}) -- Global_ok: `%|-%:%`(C, global, gt_1) @@ -15986,13 +16016,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1301.1-1301.98 +;; 6-typing.watsup:1303.1-1303.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1331.1-1332.17 + ;; 6-typing.watsup:1333.1-1334.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1334.1-1337.50 + ;; 6-typing.watsup:1336.1-1339.50 rule cons{C : context, type_1 : type, type* : type*, dt_1* : deftype*, dt* : deftype*}: `%|-%:%`(C, [type_1] :: type*{type : type}, dt_1*{dt_1 : deftype} :: dt*{dt : deftype}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 : deftype}) @@ -17726,31 +17756,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:215.1-215.60 +;; 1-syntax.watsup:218.1-218.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:217.1-217.90 +;; 1-syntax.watsup:220.1-220.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:218.1-218.64 +;; 1-syntax.watsup:221.1-221.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:219.1-219.54 +;; 1-syntax.watsup:222.1-222.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:221.1-224.18 +;; 1-syntax.watsup:224.1-227.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:226.1-227.30 +;; 1-syntax.watsup:229.1-230.30 syntax subtype = | SUB{fin : fin, typeuse* : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse : typeuse} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:229.1-230.22 +;; 1-syntax.watsup:232.1-233.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -17870,6 +17900,14 @@ syntax Lnn = | I8 | I16 +;; 1-syntax.watsup +syntax mut1 = + | `MUT%?`(()?) + +;; 1-syntax.watsup +syntax mut2 = + | `MUT%?`(()?) + ;; 1-syntax.watsup syntax limits = | `[%..%]`{u32 : u32}(u32 : u32, u32) @@ -18338,7 +18376,7 @@ syntax blocktype = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:642.1-643.22 +;; 1-syntax.watsup:645.1-646.22 syntax instr = | NOP | UNREACHABLE @@ -20509,11 +20547,12 @@ relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) `%|-%<:%`(C, deftype_1, deftype_2) -- if ($clostype(C, deftype_1) = $clostype(C, deftype_2)) - ;; 6-typing.watsup:450.1-453.40 - rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, yy_1* : typeuse*, yy : typeuse, yy_2* : typeuse*, ct : comptype}: + ;; 6-typing.watsup:450.1-453.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, typeuse* : typeuse*, ct : comptype, i : nat}: `%|-%<:%`(C, deftype_1, deftype_2) - -- if ($unrolldt(deftype_1) = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) - -- Heaptype_sub: `%|-%<:%`(C, (yy : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- if (i < |typeuse*{typeuse : typeuse}|) + -- if ($unrolldt(deftype_1) = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse : typeuse}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) ;; 6-typing.watsup:283.1-283.104 relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) @@ -20544,20 +20583,20 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) rule array-eq{C : context}: `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) - ;; 6-typing.watsup:315.1-317.35 - rule struct{C : context, deftype : deftype, yt* : fieldtype*}: + ;; 6-typing.watsup:315.1-317.42 + rule struct{C : context, deftype : deftype, fieldtype* : fieldtype*}: `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) - -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(fieldtype*{fieldtype : fieldtype}))) - ;; 6-typing.watsup:319.1-321.33 - rule array{C : context, deftype : deftype, yt : fieldtype}: + ;; 6-typing.watsup:319.1-321.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) - -- Expand: `%~~%`(deftype, ARRAY_comptype(yt)) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) - ;; 6-typing.watsup:323.1-325.32 - rule func{C : context, deftype : deftype, ft : functype}: + ;; 6-typing.watsup:323.1-325.38 + rule func{C : context, deftype : deftype, functype : functype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) - -- Expand: `%~~%`(deftype, FUNC_comptype(ft)) + -- Expand: `%~~%`(deftype, FUNC_comptype(functype)) ;; 6-typing.watsup:327.1-329.46 rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: @@ -20576,11 +20615,12 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) -- if (typeidx!`%`_typeidx.0 < |C.TYPES_context|) -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) - ;; 6-typing.watsup:339.1-341.48 - rule rec{C : context, i : nat, yy : typeuse, fin : fin, yy_1* : typeuse*, yy_2* : typeuse*, ct : comptype}: - `%|-%<:%`(C, REC_heaptype(i), (yy : typeuse <: heaptype)) + ;; 6-typing.watsup:339.1-341.40 + rule rec{C : context, i : nat, typeuse* : typeuse*, j : nat, fin : fin, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse : typeuse}[j] : typeuse <: heaptype)) -- if (i < |C.RECS_context|) - -- if (C.RECS_context[i] = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) + -- if (j < |typeuse*{typeuse : typeuse}|) + -- if (C.RECS_context[i] = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) ;; 6-typing.watsup:343.1-345.40 rule none{C : context, heaptype : heaptype}: @@ -20666,11 +20706,21 @@ relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +;; 6-typing.watsup +relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) + ;; 6-typing.watsup + rule _{C : context, t_1* : valtype*, t_2* : valtype*}: + `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) + -- if (|t_1*{t_1 : valtype}| = |t_2*{t_2 : valtype}|) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} + ;; 6-typing.watsup relation Functype_sub: `%|-%<:%`(context, functype, functype) ;; 6-typing.watsup - rule _{C : context, ft : functype}: - `%|-%<:%`(C, ft, ft) + rule _{C : context, t_11* : valtype*, t_12* : valtype*, t_21* : valtype*, t_22* : valtype*}: + `%|-%<:%`(C, `%->%`_functype(`%`_resulttype(t_11*{t_11 : valtype}), `%`_resulttype(t_12*{t_12 : valtype})), `%->%`_functype(`%`_resulttype(t_21*{t_21 : valtype}), `%`_resulttype(t_22*{t_22 : valtype}))) + -- Resulttype_sub: `%|-%<:%`(C, t_21*{t_21 : valtype}, t_11*{t_11 : valtype}) + -- Resulttype_sub: `%|-%<:%`(C, t_12*{t_12 : valtype}, t_22*{t_22 : valtype}) ;; 6-typing.watsup relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) @@ -20833,14 +20883,6 @@ relation Externtype_ok: `%|-%:OK`(context, externtype) `%|-%:OK`(C, MEM_externtype(memtype)) -- Memtype_ok: `%|-%:OK`(C, memtype) -;; 6-typing.watsup -relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) - ;; 6-typing.watsup - rule _{C : context, t_1* : valtype*, t_2* : valtype*}: - `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) - -- if (|t_1*{t_1 : valtype}| = |t_2*{t_2 : valtype}|) - -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} - ;; 6-typing.watsup relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup @@ -20856,61 +20898,61 @@ relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup relation Limits_sub: `%|-%<:%`(context, limits, limits) ;; 6-typing.watsup - rule _{C : context, n_11 : n, n_12 : n, n_21 : n, n_22 : n}: - `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_11), `%`_u32(n_12)), `[%..%]`_limits(`%`_u32(n_21), `%`_u32(n_22))) - -- if (n_11 >= n_21) - -- if (n_12 <= n_22) + rule _{C : context, n_1 : n, m_1 : m, n_2 : n, m_2 : m}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_1), `%`_u32(m_1)), `[%..%]`_limits(`%`_u32(n_2), `%`_u32(m_2))) + -- if (n_1 >= n_2) + -- if (m_1 <= m_2) ;; 6-typing.watsup relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) ;; 6-typing.watsup - rule const{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), t_1), `%%`_globaltype(`MUT%?`_mut(?()), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), valtype_1), `%%`_globaltype(`MUT%?`_mut(?()), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) ;; 6-typing.watsup - rule var{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), t_1), `%%`_globaltype(`MUT%?`_mut(?(())), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) - -- Valtype_sub: `%|-%<:%`(C, t_2, t_1) + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), valtype_1), `%%`_globaltype(`MUT%?`_mut(?(())), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) ;; 6-typing.watsup relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: - `%|-%<:%`(C, `%%`_tabletype(lim_1, rt_1), `%%`_tabletype(lim_2, rt_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) - -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_2) - -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + rule _{C : context, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%`_tabletype(limits_1, reftype_1), `%%`_tabletype(limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) ;; 6-typing.watsup relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, lim_2 : limits}: - `%|-%<:%`(C, `%PAGE`_memtype(lim_1), `%PAGE`_memtype(lim_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) + rule _{C : context, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%PAGE`_memtype(limits_1), `%PAGE`_memtype(limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) ;; 6-typing.watsup relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) ;; 6-typing.watsup - rule func{C : context, dt_1 : deftype, dt_2 : deftype}: - `%|-%<:%`(C, FUNC_externtype((dt_1 : deftype <: typeuse)), FUNC_externtype((dt_2 : deftype <: typeuse))) - -- Deftype_sub: `%|-%<:%`(C, dt_1, dt_2) + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype((deftype_1 : deftype <: typeuse)), FUNC_externtype((deftype_2 : deftype <: typeuse))) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) ;; 6-typing.watsup - rule global{C : context, gt_1 : globaltype, gt_2 : globaltype}: - `%|-%<:%`(C, GLOBAL_externtype(gt_1), GLOBAL_externtype(gt_2)) - -- Globaltype_sub: `%|-%<:%`(C, gt_1, gt_2) + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) ;; 6-typing.watsup - rule table{C : context, tt_1 : tabletype, tt_2 : tabletype}: - `%|-%<:%`(C, TABLE_externtype(tt_1), TABLE_externtype(tt_2)) - -- Tabletype_sub: `%|-%<:%`(C, tt_1, tt_2) + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) ;; 6-typing.watsup - rule mem{C : context, mt_1 : memtype, mt_2 : memtype}: - `%|-%<:%`(C, MEM_externtype(mt_1), MEM_externtype(mt_2)) - -- Memtype_sub: `%|-%<:%`(C, mt_1, mt_2) + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) ;; 6-typing.watsup relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) @@ -20928,67 +20970,67 @@ relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:515.1-515.95 +;; 6-typing.watsup:517.1-517.95 relation Instr_ok: `%|-%:%`(context, instr, instrtype) - ;; 6-typing.watsup:554.1-555.24 + ;; 6-typing.watsup:556.1-557.24 rule nop{C : context}: `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:557.1-559.42 + ;; 6-typing.watsup:559.1-561.42 rule unreachable{C : context, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:561.1-563.29 + ;; 6-typing.watsup:563.1-565.29 rule drop{C : context, t : valtype}: `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:566.1-568.29 + ;; 6-typing.watsup:568.1-570.29 rule select-expl{C : context, t : valtype}: `%|-%:%`(C, `SELECT()%?`_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:570.1-574.37 + ;; 6-typing.watsup:572.1-576.37 rule select-impl{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, `SELECT()%?`_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) -- Valtype_sub: `%|-%<:%`(C, t, t') -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) - ;; 6-typing.watsup:590.1-593.63 + ;; 6-typing.watsup:592.1-595.63 rule block{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, BLOCK_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:595.1-598.63 + ;; 6-typing.watsup:597.1-600.63 rule loop{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, LOOP_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:600.1-604.67 + ;; 6-typing.watsup:602.1-606.67 rule if{C : context, bt : blocktype, instr_1* : instr*, instr_2* : instr*, t_1* : valtype*, t_2* : valtype*, x_1* : idx*, x_2* : idx*}: `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 : instr}, instr_2*{instr_2 : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_1*{instr_1 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:609.1-612.42 + ;; 6-typing.watsup:611.1-614.42 rule br{C : context, l : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:614.1-616.25 + ;; 6-typing.watsup:616.1-618.25 rule br_if{C : context, l : labelidx, t* : valtype*}: `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [I32_valtype]), [], `%`_resulttype(t*{t : valtype}))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) - ;; 6-typing.watsup:618.1-622.42 + ;; 6-typing.watsup:620.1-624.42 rule br_table{C : context, l* : labelidx*, l' : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_TABLE_instr(l*{l : labelidx}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- (if (l!`%`_labelidx.0 < |C.LABELS_context|))*{l : labelidx} @@ -20997,20 +21039,20 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:624.1-627.31 + ;; 6-typing.watsup:626.1-629.31 rule br_on_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)]))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype})) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:629.1-631.34 + ;; 6-typing.watsup:631.1-633.34 rule br_on_non_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype}))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)])) - ;; 6-typing.watsup:633.1-639.34 + ;; 6-typing.watsup:635.1-641.34 rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [($diffrt(rt_1, rt_2) : reftype <: valtype)]))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) @@ -21020,7 +21062,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) - ;; 6-typing.watsup:641.1-647.49 + ;; 6-typing.watsup:643.1-649.49 rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [(rt_2 : reftype <: valtype)]))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) @@ -21030,19 +21072,19 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) - ;; 6-typing.watsup:652.1-654.47 + ;; 6-typing.watsup:654.1-656.47 rule call{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (x!`%`_idx.0 < |C.FUNCS_context|) -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:656.1-658.47 + ;; 6-typing.watsup:658.1-660.47 rule call_ref{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:660.1-664.47 + ;; 6-typing.watsup:662.1-666.47 rule call_indirect{C : context, x : idx, y : idx, t_1* : valtype*, t_2* : valtype*, lim : limits, rt : reftype}: `%|-%:%`(C, CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (x!`%`_idx.0 < |C.TABLES_context|) @@ -21051,13 +21093,13 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype)) -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype})))) - ;; 6-typing.watsup:666.1-669.42 + ;; 6-typing.watsup:668.1-671.42 rule return{C : context, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (C.RETURN_context = ?(`%`_list(t*{t : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:672.1-677.42 + ;; 6-typing.watsup:674.1-679.42 rule return_call{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (x!`%`_idx.0 < |C.FUNCS_context|) @@ -21066,7 +21108,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:680.1-685.42 + ;; 6-typing.watsup:682.1-687.42 rule return_call_ref{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -21075,7 +21117,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:688.1-696.42 + ;; 6-typing.watsup:690.1-698.42 rule return_call_indirect{C : context, x : idx, y : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, lim : limits, rt : reftype, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (x!`%`_idx.0 < |C.TABLES_context|) @@ -21087,91 +21129,91 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) - ;; 6-typing.watsup:701.1-702.33 + ;; 6-typing.watsup:703.1-704.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:704.1-705.34 + ;; 6-typing.watsup:706.1-707.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:707.1-708.39 + ;; 6-typing.watsup:709.1-710.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:710.1-711.39 + ;; 6-typing.watsup:712.1-713.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:713.1-714.40 + ;; 6-typing.watsup:715.1-716.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:718.1-720.34 + ;; 6-typing.watsup:720.1-722.34 rule cvtop-reinterpret{C : context, nt_1 : numtype, nt_2 : numtype}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, REINTERPRET_cvtop, ?()), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ($size(nt_1) = $size(nt_2)) - ;; 6-typing.watsup:722.1-724.112 + ;; 6-typing.watsup:724.1-726.112 rule cvtop-convert{C : context, nt_1 : numtype, nt_2 : numtype, sx? : sx?, Inn_1 : Inn, Inn_2 : Inn, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, CONVERT_cvtop, sx?{sx : sx}), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ((sx?{sx : sx} = ?()) <=> ((((nt_1 = (Inn_1 : Inn <: numtype)) /\ (nt_2 = (Inn_2 : Inn <: numtype))) /\ ($size(nt_1) > $size(nt_2))) \/ ((nt_1 = (Fnn_1 : Fnn <: numtype)) /\ (nt_2 = (Fnn_2 : Fnn <: numtype))))) - ;; 6-typing.watsup:729.1-731.31 + ;; 6-typing.watsup:731.1-733.31 rule ref.null{C : context, ht : heaptype}: `%|-%:%`(C, REF.NULL_instr(ht), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:734.1-736.24 + ;; 6-typing.watsup:736.1-738.24 rule ref.func{C : context, x : idx, dt : deftype}: `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), (dt : deftype <: heaptype))]))) -- if (x!`%`_idx.0 < |C.FUNCS_context|) -- if (C.FUNCS_context[x!`%`_idx.0] = dt) - ;; 6-typing.watsup:738.1-739.34 + ;; 6-typing.watsup:740.1-741.34 rule ref.i31{C : context}: `%|-%:%`(C, REF.I31_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), I31_heaptype)]))) - ;; 6-typing.watsup:741.1-743.31 + ;; 6-typing.watsup:743.1-745.31 rule ref.is_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.IS_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([I32_valtype]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:745.1-747.31 + ;; 6-typing.watsup:747.1-749.31 rule ref.as_non_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.AS_NON_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:749.1-750.51 + ;; 6-typing.watsup:751.1-752.51 rule ref.eq{C : context}: `%|-%:%`(C, REF.EQ_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype) REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:752.1-756.33 + ;; 6-typing.watsup:754.1-758.33 rule ref.test{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.TEST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:758.1-762.33 + ;; 6-typing.watsup:760.1-764.33 rule ref.cast{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.CAST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; 6-typing.watsup:767.1-768.42 + ;; 6-typing.watsup:769.1-770.42 rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:773.1-775.44 + ;; 6-typing.watsup:775.1-777.44 rule struct.new{C : context, x : idx, zt* : storagetype*, mut* : mut*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt : storagetype}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- if (|mut*{mut : mut}| = |zt*{zt : storagetype}|) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) - ;; 6-typing.watsup:777.1-780.40 + ;; 6-typing.watsup:779.1-782.40 rule struct.new_default{C : context, x : idx, mut* : mut*, zt* : storagetype*, val* : val*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -21180,7 +21222,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype}))) -- (if ($default_($unpack(zt)) = ?(val)))*{val : val, zt : storagetype} - ;; 6-typing.watsup:782.1-786.39 + ;; 6-typing.watsup:784.1-788.39 rule struct.get{C : context, sx? : sx?, x : idx, i : nat, zt : storagetype, yt* : fieldtype*, mut : mut}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx : sx}, x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype([$unpack(zt)]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -21189,7 +21231,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(mut, zt)) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:788.1-791.24 + ;; 6-typing.watsup:790.1-793.24 rule struct.set{C : context, x : idx, i : nat, zt : storagetype, yt* : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) $unpack(zt)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -21197,26 +21239,26 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) -- if (yt*{yt : fieldtype}[i] = `%%`_fieldtype(`MUT%?`_mut(?(())), zt)) - ;; 6-typing.watsup:796.1-798.42 + ;; 6-typing.watsup:798.1-800.42 rule array.new{C : context, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:800.1-803.37 + ;; 6-typing.watsup:802.1-805.37 rule array.new_default{C : context, x : idx, mut : mut, zt : storagetype, val : val}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ($default_($unpack(zt)) = ?(val)) - ;; 6-typing.watsup:805.1-807.42 + ;; 6-typing.watsup:807.1-809.42 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 6-typing.watsup:809.1-812.40 + ;; 6-typing.watsup:811.1-814.40 rule array.new_elem{C : context, x : idx, y : idx, mut : mut, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -21224,7 +21266,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; 6-typing.watsup:814.1-818.24 + ;; 6-typing.watsup:816.1-820.24 rule array.new_data{C : context, x : idx, y : idx, mut : mut, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -21233,32 +21275,32 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:820.1-823.39 + ;; 6-typing.watsup:822.1-825.39 rule array.get{C : context, sx? : sx?, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx : sx}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt))) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:825.1-827.42 + ;; 6-typing.watsup:827.1-829.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:829.1-831.42 + ;; 6-typing.watsup:831.1-833.42 rule array.len{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:833.1-835.42 + ;; 6-typing.watsup:835.1-837.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:837.1-841.40 + ;; 6-typing.watsup:839.1-843.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, mut : mut, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x_1) : typevar <: heaptype)) I32_valtype REF_valtype(`NULL%?`_nul(?(())), ($idx(x_2) : typevar <: heaptype)) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x_1!`%`_idx.0 < |C.TYPES_context|) @@ -21267,7 +21309,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(mut, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; 6-typing.watsup:843.1-846.44 + ;; 6-typing.watsup:845.1-848.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -21275,7 +21317,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; 6-typing.watsup:848.1-852.24 + ;; 6-typing.watsup:850.1-854.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -21284,159 +21326,159 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:857.1-858.62 + ;; 6-typing.watsup:859.1-860.62 rule extern.convert_any{C : context, nul : nul}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]))) - ;; 6-typing.watsup:860.1-861.62 + ;; 6-typing.watsup:862.1-863.62 rule any.convert_extern{C : context, nul : nul}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(nul, ANY_heaptype)]))) - ;; 6-typing.watsup:866.1-867.35 + ;; 6-typing.watsup:868.1-869.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:869.1-870.41 + ;; 6-typing.watsup:871.1-872.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:872.1-873.48 + ;; 6-typing.watsup:874.1-875.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:875.1-876.55 + ;; 6-typing.watsup:877.1-878.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:878.1-879.44 + ;; 6-typing.watsup:880.1-881.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:881.1-882.37 + ;; 6-typing.watsup:883.1-884.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:884.1-885.44 + ;; 6-typing.watsup:886.1-887.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:887.1-888.40 + ;; 6-typing.watsup:889.1-890.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:890.1-891.44 + ;; 6-typing.watsup:892.1-893.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:893.1-894.47 + ;; 6-typing.watsup:895.1-896.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:896.1-897.33 + ;; 6-typing.watsup:898.1-899.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:899.1-900.39 + ;; 6-typing.watsup:901.1-902.39 rule vswizzle{C : context, sh : ishape}: `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:902.1-904.29 + ;; 6-typing.watsup:904.1-906.29 rule vshuffle{C : context, sh : ishape, i* : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i : nat}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i : nat} - ;; 6-typing.watsup:906.1-907.44 + ;; 6-typing.watsup:908.1-909.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:910.1-912.21 + ;; 6-typing.watsup:912.1-914.21 rule vextract_lane{C : context, sh : shape, sx? : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx : sx}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:914.1-916.21 + ;; 6-typing.watsup:916.1-918.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:918.1-919.53 + ;; 6-typing.watsup:920.1-921.53 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:921.1-922.60 + ;; 6-typing.watsup:923.1-924.60 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:924.1-925.48 + ;; 6-typing.watsup:926.1-927.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:928.1-930.160 + ;; 6-typing.watsup:930.1-932.160 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop_(sh_2, sh_1), hf? : half_(sh_2, sh_1)?, sx? : sx?, zero? : zero_(sh_2, sh_1)?, imm_1 : lanetype, imm_2 : lanetype, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, hf?{hf : half_(sh_2, sh_1)}, sx?{sx : sx}, zero?{zero : zero_(sh_2, sh_1)}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if ((sx?{sx : sx} = ?()) <=> (((($lanetype(sh_1) = imm_1) /\ ($lanetype(sh_2) = imm_2)) /\ ($lsize(imm_1) > $lsize(imm_2))) \/ (($lanetype(sh_1) = (Fnn_1 : Fnn <: lanetype)) /\ ($lanetype(sh_2) = (Fnn_2 : Fnn <: lanetype))))) - ;; 6-typing.watsup:935.1-937.28 + ;; 6-typing.watsup:937.1-939.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (x!`%`_idx.0 < |C.LOCALS_context|) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:939.1-941.29 + ;; 6-typing.watsup:941.1-943.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.LOCALS_context|) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:943.1-945.29 + ;; 6-typing.watsup:945.1-947.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (x!`%`_idx.0 < |C.LOCALS_context|) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:950.1-952.29 + ;; 6-typing.watsup:952.1-954.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (x!`%`_idx.0 < |C.GLOBALS_context|) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:954.1-956.29 + ;; 6-typing.watsup:956.1-958.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.GLOBALS_context|) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:961.1-963.29 + ;; 6-typing.watsup:963.1-965.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:965.1-967.29 + ;; 6-typing.watsup:967.1-969.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:969.1-971.29 + ;; 6-typing.watsup:971.1-973.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:973.1-975.29 + ;; 6-typing.watsup:975.1-977.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:977.1-979.29 + ;; 6-typing.watsup:979.1-981.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:981.1-985.36 + ;; 6-typing.watsup:983.1-987.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x_1!`%`_idx.0 < |C.TABLES_context|) @@ -21445,7 +21487,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:987.1-991.36 + ;; 6-typing.watsup:989.1-993.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) @@ -21454,31 +21496,31 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:993.1-995.24 + ;; 6-typing.watsup:995.1-997.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.ELEMS_context|) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1000.1-1002.23 + ;; 6-typing.watsup:1002.1-1004.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1004.1-1006.23 + ;; 6-typing.watsup:1006.1-1008.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1008.1-1010.23 + ;; 6-typing.watsup:1010.1-1012.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1012.1-1015.27 + ;; 6-typing.watsup:1014.1-1017.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x_1!`%`_idx.0 < |C.MEMS_context|) @@ -21486,7 +21528,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1017.1-1020.24 + ;; 6-typing.watsup:1019.1-1022.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) @@ -21494,69 +21536,69 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1022.1-1024.24 + ;; 6-typing.watsup:1024.1-1026.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.DATAS_context|) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1035.1-1038.43 + ;; 6-typing.watsup:1037.1-1040.43 rule load-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1040.1-1043.35 + ;; 6-typing.watsup:1042.1-1045.35 rule load-pack{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr((Inn : Inn <: numtype), ?((`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1054.1-1057.43 + ;; 6-typing.watsup:1056.1-1059.43 rule store-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1059.1-1062.35 + ;; 6-typing.watsup:1061.1-1064.35 rule store-pack{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1064.1-1067.46 + ;; 6-typing.watsup:1066.1-1069.46 rule vload-val{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1069.1-1072.39 + ;; 6-typing.watsup:1071.1-1074.39 rule vload-pack{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1074.1-1077.35 + ;; 6-typing.watsup:1076.1-1079.35 rule vload-splat{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1079.1-1082.34 + ;; 6-typing.watsup:1081.1-1084.34 rule vload-zero{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) - ;; 6-typing.watsup:1084.1-1088.21 + ;; 6-typing.watsup:1086.1-1090.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) @@ -21564,14 +21606,14 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1090.1-1093.46 + ;; 6-typing.watsup:1092.1-1095.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1095.1-1099.21 + ;; 6-typing.watsup:1097.1-1101.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) @@ -21579,13 +21621,13 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- if (i < (128 / N)) -;; 6-typing.watsup:516.1-516.96 +;; 6-typing.watsup:518.1-518.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; 6-typing.watsup:529.1-530.24 + ;; 6-typing.watsup:531.1-532.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:533.1-537.82 + ;; 6-typing.watsup:535.1-539.82 rule seq{C : context, instr_1 : instr, instr_2* : instr*, t_1* : valtype*, x_1* : idx*, x_2* : idx*, t_3* : valtype*, t_2* : valtype*, init* : init*, t* : valtype*}: `%|-%:%`(C, [instr_1] :: instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx} :: x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) -- if (|init*{init : init}| = |t*{t : valtype}|) @@ -21595,14 +21637,14 @@ relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init : init, t : valtype, x_1 : idx} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 : localidx}, `%%`_localtype(SET_init, t)*{t : valtype}), instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) - ;; 6-typing.watsup:539.1-543.33 + ;; 6-typing.watsup:541.1-545.33 rule sub{C : context, instr* : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr : instr}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; 6-typing.watsup:546.1-549.33 + ;; 6-typing.watsup:548.1-551.33 rule frame{C : context, instr* : instr*, t* : valtype*, t_1* : valtype*, x* : idx*, t_2* : valtype*}: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t*{t : valtype} :: t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) @@ -21619,22 +21661,22 @@ relation Expr_ok: `%|-%:%`(context, expr, resulttype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1155.1-1155.86 +;; 6-typing.watsup:1157.1-1157.86 def $in_binop(numtype : numtype, binop_ : binop_(numtype), binop_(numtype)*) : bool - ;; 6-typing.watsup:1156.1-1156.42 + ;; 6-typing.watsup:1158.1-1158.42 def $in_binop{nt : numtype, binop : binop_(nt), epsilon : binop_(nt)*}(nt, binop, epsilon) = false - ;; 6-typing.watsup:1157.1-1157.99 + ;; 6-typing.watsup:1159.1-1159.99 def $in_binop{nt : numtype, binop : binop_(nt), ibinop_1 : binop_(nt), ibinop'* : binop_(nt)*}(nt, binop, [ibinop_1] :: ibinop'*{ibinop' : binop_(nt)}) = ((binop = ibinop_1) \/ $in_binop(nt, binop, ibinop'*{ibinop' : binop_(nt)})) } ;; 6-typing.watsup rec { -;; 6-typing.watsup:1151.1-1151.63 +;; 6-typing.watsup:1153.1-1153.63 def $in_numtype(numtype : numtype, numtype*) : bool - ;; 6-typing.watsup:1152.1-1152.37 + ;; 6-typing.watsup:1154.1-1154.37 def $in_numtype{nt : numtype, epsilon : numtype*}(nt, epsilon) = false - ;; 6-typing.watsup:1153.1-1153.68 + ;; 6-typing.watsup:1155.1-1155.68 def $in_numtype{nt : numtype, nt_1 : numtype, nt'* : numtype*}(nt, [nt_1] :: nt'*{nt' : numtype}) = ((nt = nt_1) \/ $in_numtype(nt, nt'*{nt' : numtype})) } @@ -21874,13 +21916,13 @@ syntax moduletype = ;; 6-typing.watsup rec { -;; 6-typing.watsup:1302.1-1302.100 +;; 6-typing.watsup:1304.1-1304.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1339.1-1340.17 + ;; 6-typing.watsup:1341.1-1342.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1342.1-1345.55 + ;; 6-typing.watsup:1344.1-1347.55 rule cons{C : context, global_1 : global, global : global, gt_1 : globaltype, gt* : globaltype*}: `%|-%:%`(C, [global_1] :: global*{}, [gt_1] :: gt*{gt : globaltype}) -- Global_ok: `%|-%:%`(C, global, gt_1) @@ -21890,13 +21932,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1301.1-1301.98 +;; 6-typing.watsup:1303.1-1303.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1331.1-1332.17 + ;; 6-typing.watsup:1333.1-1334.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1334.1-1337.50 + ;; 6-typing.watsup:1336.1-1339.50 rule cons{C : context, type_1 : type, type* : type*, dt_1* : deftype*, dt* : deftype*}: `%|-%:%`(C, [type_1] :: type*{type : type}, dt_1*{dt_1 : deftype} :: dt*{dt : deftype}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 : deftype}) @@ -23686,31 +23728,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:215.1-215.60 +;; 1-syntax.watsup:218.1-218.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:217.1-217.90 +;; 1-syntax.watsup:220.1-220.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:218.1-218.64 +;; 1-syntax.watsup:221.1-221.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:219.1-219.54 +;; 1-syntax.watsup:222.1-222.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:221.1-224.18 +;; 1-syntax.watsup:224.1-227.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:226.1-227.30 +;; 1-syntax.watsup:229.1-230.30 syntax subtype = | SUB{fin : fin, typeuse* : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse : typeuse} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:229.1-230.22 +;; 1-syntax.watsup:232.1-233.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -23830,6 +23872,14 @@ syntax Lnn = | I8 | I16 +;; 1-syntax.watsup +syntax mut1 = + | `MUT%?`(()?) + +;; 1-syntax.watsup +syntax mut2 = + | `MUT%?`(()?) + ;; 1-syntax.watsup syntax limits = | `[%..%]`{u32 : u32}(u32 : u32, u32) @@ -24298,7 +24348,7 @@ syntax blocktype = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:642.1-643.22 +;; 1-syntax.watsup:645.1-646.22 syntax instr = | NOP | UNREACHABLE @@ -26470,11 +26520,12 @@ relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) `%|-%<:%`(C, deftype_1, deftype_2) -- if ($clostype(C, deftype_1) = $clostype(C, deftype_2)) - ;; 6-typing.watsup:450.1-453.40 - rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, yy_1* : typeuse*, yy : typeuse, yy_2* : typeuse*, ct : comptype}: + ;; 6-typing.watsup:450.1-453.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, fin : fin, typeuse* : typeuse*, ct : comptype, i : nat}: `%|-%<:%`(C, deftype_1, deftype_2) - -- if ($unrolldt(deftype_1) = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) - -- Heaptype_sub: `%|-%<:%`(C, (yy : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- if (i < |typeuse*{typeuse : typeuse}|) + -- if ($unrolldt(deftype_1) = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse : typeuse}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) ;; 6-typing.watsup:283.1-283.104 relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) @@ -26505,20 +26556,20 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) rule array-eq{C : context}: `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) - ;; 6-typing.watsup:315.1-317.35 - rule struct{C : context, deftype : deftype, yt* : fieldtype*}: + ;; 6-typing.watsup:315.1-317.42 + rule struct{C : context, deftype : deftype, fieldtype* : fieldtype*}: `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) - -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(yt*{yt : fieldtype}))) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_structtype(fieldtype*{fieldtype : fieldtype}))) - ;; 6-typing.watsup:319.1-321.33 - rule array{C : context, deftype : deftype, yt : fieldtype}: + ;; 6-typing.watsup:319.1-321.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) - -- Expand: `%~~%`(deftype, ARRAY_comptype(yt)) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) - ;; 6-typing.watsup:323.1-325.32 - rule func{C : context, deftype : deftype, ft : functype}: + ;; 6-typing.watsup:323.1-325.38 + rule func{C : context, deftype : deftype, functype : functype}: `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) - -- Expand: `%~~%`(deftype, FUNC_comptype(ft)) + -- Expand: `%~~%`(deftype, FUNC_comptype(functype)) ;; 6-typing.watsup:327.1-329.46 rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: @@ -26537,11 +26588,12 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) -- if (typeidx!`%`_typeidx.0 < |C.TYPES_context|) -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) - ;; 6-typing.watsup:339.1-341.48 - rule rec{C : context, i : nat, yy : typeuse, fin : fin, yy_1* : typeuse*, yy_2* : typeuse*, ct : comptype}: - `%|-%<:%`(C, REC_heaptype(i), (yy : typeuse <: heaptype)) + ;; 6-typing.watsup:339.1-341.40 + rule rec{C : context, i : nat, typeuse* : typeuse*, j : nat, fin : fin, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse : typeuse}[j] : typeuse <: heaptype)) -- if (i < |C.RECS_context|) - -- if (C.RECS_context[i] = SUB_subtype(fin, yy_1*{yy_1 : typeuse} :: [yy] :: yy_2*{yy_2 : typeuse}, ct)) + -- if (j < |typeuse*{typeuse : typeuse}|) + -- if (C.RECS_context[i] = SUB_subtype(fin, typeuse*{typeuse : typeuse}, ct)) ;; 6-typing.watsup:343.1-345.40 rule none{C : context, heaptype : heaptype}: @@ -26627,11 +26679,21 @@ relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +;; 6-typing.watsup +relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) + ;; 6-typing.watsup + rule _{C : context, t_1* : valtype*, t_2* : valtype*}: + `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) + -- if (|t_1*{t_1 : valtype}| = |t_2*{t_2 : valtype}|) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} + ;; 6-typing.watsup relation Functype_sub: `%|-%<:%`(context, functype, functype) ;; 6-typing.watsup - rule _{C : context, ft : functype}: - `%|-%<:%`(C, ft, ft) + rule _{C : context, t_11* : valtype*, t_12* : valtype*, t_21* : valtype*, t_22* : valtype*}: + `%|-%<:%`(C, `%->%`_functype(`%`_resulttype(t_11*{t_11 : valtype}), `%`_resulttype(t_12*{t_12 : valtype})), `%->%`_functype(`%`_resulttype(t_21*{t_21 : valtype}), `%`_resulttype(t_22*{t_22 : valtype}))) + -- Resulttype_sub: `%|-%<:%`(C, t_21*{t_21 : valtype}, t_11*{t_11 : valtype}) + -- Resulttype_sub: `%|-%<:%`(C, t_12*{t_12 : valtype}, t_22*{t_22 : valtype}) ;; 6-typing.watsup relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) @@ -26795,14 +26857,6 @@ relation Externtype_ok: `%|-%:OK`(context, externtype) `%|-%:OK`(C, MEM_externtype(memtype)) -- Memtype_ok: `%|-%:OK`(C, memtype) -;; 6-typing.watsup -relation Resulttype_sub: `%|-%<:%`(context, valtype*, valtype*) - ;; 6-typing.watsup - rule _{C : context, t_1* : valtype*, t_2* : valtype*}: - `%|-%<:%`(C, t_1*{t_1 : valtype}, t_2*{t_2 : valtype}) - -- if (|t_1*{t_1 : valtype}| = |t_2*{t_2 : valtype}|) - -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 : valtype, t_2 : valtype} - ;; 6-typing.watsup relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup @@ -26818,61 +26872,61 @@ relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) ;; 6-typing.watsup relation Limits_sub: `%|-%<:%`(context, limits, limits) ;; 6-typing.watsup - rule _{C : context, n_11 : n, n_12 : n, n_21 : n, n_22 : n}: - `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_11), `%`_u32(n_12)), `[%..%]`_limits(`%`_u32(n_21), `%`_u32(n_22))) - -- if (n_11 >= n_21) - -- if (n_12 <= n_22) + rule _{C : context, n_1 : n, m_1 : m, n_2 : n, m_2 : m}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u32(n_1), `%`_u32(m_1)), `[%..%]`_limits(`%`_u32(n_2), `%`_u32(m_2))) + -- if (n_1 >= n_2) + -- if (m_1 <= m_2) ;; 6-typing.watsup relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) ;; 6-typing.watsup - rule const{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), t_1), `%%`_globaltype(`MUT%?`_mut(?()), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?()), valtype_1), `%%`_globaltype(`MUT%?`_mut(?()), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) ;; 6-typing.watsup - rule var{C : context, t_1 : valtype, t_2 : valtype}: - `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), t_1), `%%`_globaltype(`MUT%?`_mut(?(())), t_2)) - -- Valtype_sub: `%|-%<:%`(C, t_1, t_2) - -- Valtype_sub: `%|-%<:%`(C, t_2, t_1) + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(`MUT%?`_mut(?(())), valtype_1), `%%`_globaltype(`MUT%?`_mut(?(())), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) ;; 6-typing.watsup relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: - `%|-%<:%`(C, `%%`_tabletype(lim_1, rt_1), `%%`_tabletype(lim_2, rt_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) - -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_2) - -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + rule _{C : context, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%`_tabletype(limits_1, reftype_1), `%%`_tabletype(limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) ;; 6-typing.watsup relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) ;; 6-typing.watsup - rule _{C : context, lim_1 : limits, lim_2 : limits}: - `%|-%<:%`(C, `%PAGE`_memtype(lim_1), `%PAGE`_memtype(lim_2)) - -- Limits_sub: `%|-%<:%`(C, lim_1, lim_2) + rule _{C : context, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%PAGE`_memtype(limits_1), `%PAGE`_memtype(limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) ;; 6-typing.watsup relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) ;; 6-typing.watsup - rule func{C : context, dt_1 : deftype, dt_2 : deftype}: - `%|-%<:%`(C, FUNC_externtype((dt_1 : deftype <: typeuse)), FUNC_externtype((dt_2 : deftype <: typeuse))) - -- Deftype_sub: `%|-%<:%`(C, dt_1, dt_2) + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype((deftype_1 : deftype <: typeuse)), FUNC_externtype((deftype_2 : deftype <: typeuse))) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) ;; 6-typing.watsup - rule global{C : context, gt_1 : globaltype, gt_2 : globaltype}: - `%|-%<:%`(C, GLOBAL_externtype(gt_1), GLOBAL_externtype(gt_2)) - -- Globaltype_sub: `%|-%<:%`(C, gt_1, gt_2) + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) ;; 6-typing.watsup - rule table{C : context, tt_1 : tabletype, tt_2 : tabletype}: - `%|-%<:%`(C, TABLE_externtype(tt_1), TABLE_externtype(tt_2)) - -- Tabletype_sub: `%|-%<:%`(C, tt_1, tt_2) + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) ;; 6-typing.watsup - rule mem{C : context, mt_1 : memtype, mt_2 : memtype}: - `%|-%<:%`(C, MEM_externtype(mt_1), MEM_externtype(mt_2)) - -- Memtype_sub: `%|-%<:%`(C, mt_1, mt_2) + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) ;; 6-typing.watsup relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) @@ -26890,74 +26944,74 @@ relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:515.1-515.95 +;; 6-typing.watsup:517.1-517.95 relation Instr_ok: `%|-%:%`(context, instr, instrtype) - ;; 6-typing.watsup:554.1-555.24 + ;; 6-typing.watsup:556.1-557.24 rule nop{C : context}: `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:557.1-559.42 + ;; 6-typing.watsup:559.1-561.42 rule unreachable{C : context, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:561.1-563.29 + ;; 6-typing.watsup:563.1-565.29 rule drop{C : context, t : valtype}: `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:566.1-568.29 + ;; 6-typing.watsup:568.1-570.29 rule select-expl{C : context, t : valtype}: `%|-%:%`(C, `SELECT()%?`_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) - ;; 6-typing.watsup:570.1-574.37 + ;; 6-typing.watsup:572.1-576.37 rule select-impl-0{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, `SELECT()%?`_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) -- Valtype_sub: `%|-%<:%`(C, t, t') -- where (numtype : numtype <: valtype) = t' - ;; 6-typing.watsup:570.1-574.37 + ;; 6-typing.watsup:572.1-576.37 rule select-impl-1{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, `SELECT()%?`_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype]), [], `%`_resulttype([t]))) -- Valtype_ok: `%|-%:OK`(C, t) -- Valtype_sub: `%|-%<:%`(C, t, t') -- where (vectype : vectype <: valtype) = t' - ;; 6-typing.watsup:590.1-593.63 + ;; 6-typing.watsup:592.1-595.63 rule block{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, BLOCK_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:595.1-598.63 + ;; 6-typing.watsup:597.1-600.63 rule loop{C : context, bt : blocktype, instr* : instr*, t_1* : valtype*, t_2* : valtype*, x* : idx*}: `%|-%:%`(C, LOOP_instr(bt, instr*{instr : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 : valtype})], RETURN ?()}, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:600.1-604.67 + ;; 6-typing.watsup:602.1-606.67 rule if{C : context, bt : blocktype, instr_1* : instr*, instr_2* : instr*, t_1* : valtype*, t_2* : valtype*, x_1* : idx*, x_2* : idx*}: `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 : instr}, instr_2*{instr_2 : instr}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_1*{instr_1 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- Instrs_ok: `%|-%:%`(C ++ {TYPES [], RECS [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 : valtype})], RETURN ?()}, instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:609.1-612.42 + ;; 6-typing.watsup:611.1-614.42 rule br{C : context, l : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) -- where `%`_resulttype(t*{t : valtype}) = C.LABELS_context[l!`%`_labelidx.0] -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:614.1-616.25 + ;; 6-typing.watsup:616.1-618.25 rule br_if{C : context, l : labelidx, t* : valtype*}: `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [I32_valtype]), [], `%`_resulttype(t*{t : valtype}))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) -- where `%`_resulttype(t*{t : valtype}) = C.LABELS_context[l!`%`_labelidx.0] - ;; 6-typing.watsup:618.1-622.42 + ;; 6-typing.watsup:620.1-624.42 rule br_table{C : context, l* : labelidx*, l' : labelidx, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, BR_TABLE_instr(l*{l : labelidx}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- (if (l!`%`_labelidx.0 < |C.LABELS_context|))*{l : labelidx} @@ -26966,20 +27020,20 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:624.1-627.31 + ;; 6-typing.watsup:626.1-629.31 rule br_on_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)]))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) -- Heaptype_ok: `%|-%:OK`(C, ht) -- where `%`_resulttype(t*{t : valtype}) = C.LABELS_context[l!`%`_labelidx.0] - ;; 6-typing.watsup:629.1-631.34 + ;; 6-typing.watsup:631.1-633.34 rule br_on_non_null{C : context, l : labelidx, t* : valtype*, ht : heaptype}: `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype(t*{t : valtype}))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) -- where `%`_resulttype(t*{t : valtype} :: [REF_valtype(`NULL%?`_nul(?()), ht)]) = C.LABELS_context[l!`%`_labelidx.0] - ;; 6-typing.watsup:633.1-639.34 + ;; 6-typing.watsup:635.1-641.34 rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [($diffrt(rt_1, rt_2) : reftype <: valtype)]))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) @@ -26989,7 +27043,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)]) = C.LABELS_context[l!`%`_labelidx.0] -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) - ;; 6-typing.watsup:641.1-647.49 + ;; 6-typing.watsup:643.1-649.49 rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t* : valtype*, rt : reftype}: `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: [(rt_1 : reftype <: valtype)]), [], `%`_resulttype(t*{t : valtype} :: [(rt_2 : reftype <: valtype)]))) -- if (l!`%`_labelidx.0 < |C.LABELS_context|) @@ -26999,19 +27053,19 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where `%`_resulttype(t*{t : valtype} :: [(rt : reftype <: valtype)]) = C.LABELS_context[l!`%`_labelidx.0] -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) - ;; 6-typing.watsup:652.1-654.47 + ;; 6-typing.watsup:654.1-656.47 rule call{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (x!`%`_idx.0 < |C.FUNCS_context|) -- where FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype}))) = $expanddt(C.FUNCS_context[x!`%`_idx.0]) - ;; 6-typing.watsup:656.1-658.47 + ;; 6-typing.watsup:658.1-660.47 rule call_ref{C : context, x : idx, t_1* : valtype*, t_2* : valtype*}: `%|-%:%`(C, CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- where FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype}))) = $expanddt(C.TYPES_context[x!`%`_idx.0]) - ;; 6-typing.watsup:660.1-664.47 + ;; 6-typing.watsup:662.1-666.47 rule call_indirect{C : context, x : idx, y : idx, t_1* : valtype*, t_2* : valtype*, lim : limits, rt : reftype}: `%|-%:%`(C, CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- if (x!`%`_idx.0 < |C.TABLES_context|) @@ -27020,13 +27074,13 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where FUNC_comptype(`%->%`_functype(`%`_resulttype(t_1*{t_1 : valtype}), `%`_resulttype(t_2*{t_2 : valtype}))) = $expanddt(C.TYPES_context[y!`%`_idx.0]) -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype)) - ;; 6-typing.watsup:666.1-669.42 + ;; 6-typing.watsup:668.1-671.42 rule return{C : context, t_1* : valtype*, t* : valtype*, t_2* : valtype*}: `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype} :: t*{t : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) -- where ?(`%`_list(t*{t : valtype})) = C.RETURN_context -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), [], `%`_resulttype(t_2*{t_2 : valtype}))) - ;; 6-typing.watsup:672.1-677.42 + ;; 6-typing.watsup:674.1-679.42 rule return_call{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype}), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (x!`%`_idx.0 < |C.FUNCS_context|) @@ -27035,7 +27089,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- if (C.RETURN_context = ?(`%`_list(t'_2*{t'_2 : valtype}))) - ;; 6-typing.watsup:680.1-685.42 + ;; 6-typing.watsup:682.1-687.42 rule return_call_ref{C : context, x : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_REF_instr(($idx(x) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27044,7 +27098,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- if (C.RETURN_context = ?(`%`_list(t'_2*{t'_2 : valtype}))) - ;; 6-typing.watsup:688.1-696.42 + ;; 6-typing.watsup:690.1-698.42 rule return_call_indirect{C : context, x : idx, y : idx, t_3* : valtype*, t_1* : valtype*, t_4* : valtype*, lim : limits, rt : reftype, t_2* : valtype*, t'_2* : valtype*}: `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, ($idx(y) : typevar <: typeuse)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 : valtype} :: t_1*{t_1 : valtype} :: [I32_valtype]), [], `%`_resulttype(t_4*{t_4 : valtype}))) -- if (x!`%`_idx.0 < |C.TABLES_context|) @@ -27056,91 +27110,91 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype}) -- if (C.RETURN_context = ?(`%`_list(t'_2*{t'_2 : valtype}))) - ;; 6-typing.watsup:701.1-702.33 + ;; 6-typing.watsup:703.1-704.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:704.1-705.34 + ;; 6-typing.watsup:706.1-707.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:707.1-708.39 + ;; 6-typing.watsup:709.1-710.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; 6-typing.watsup:710.1-711.39 + ;; 6-typing.watsup:712.1-713.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:713.1-714.40 + ;; 6-typing.watsup:715.1-716.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:718.1-720.34 + ;; 6-typing.watsup:720.1-722.34 rule cvtop-reinterpret{C : context, nt_1 : numtype, nt_2 : numtype}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, REINTERPRET_cvtop, ?()), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ($size(nt_1) = $size(nt_2)) - ;; 6-typing.watsup:722.1-724.112 + ;; 6-typing.watsup:724.1-726.112 rule cvtop-convert{C : context, nt_1 : numtype, nt_2 : numtype, sx? : sx?, Inn_1 : Inn, Inn_2 : Inn, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, CONVERT_cvtop, sx?{sx : sx}), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) -- if ((sx?{sx : sx} = ?()) <=> ((((nt_1 = (Inn_1 : Inn <: numtype)) /\ (nt_2 = (Inn_2 : Inn <: numtype))) /\ ($size(nt_1) > $size(nt_2))) \/ ((nt_1 = (Fnn_1 : Fnn <: numtype)) /\ (nt_2 = (Fnn_2 : Fnn <: numtype))))) - ;; 6-typing.watsup:729.1-731.31 + ;; 6-typing.watsup:731.1-733.31 rule ref.null{C : context, ht : heaptype}: `%|-%:%`(C, REF.NULL_instr(ht), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:734.1-736.24 + ;; 6-typing.watsup:736.1-738.24 rule ref.func{C : context, x : idx, dt : deftype}: `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), (dt : deftype <: heaptype))]))) -- if (x!`%`_idx.0 < |C.FUNCS_context|) -- where dt = C.FUNCS_context[x!`%`_idx.0] - ;; 6-typing.watsup:738.1-739.34 + ;; 6-typing.watsup:740.1-741.34 rule ref.i31{C : context}: `%|-%:%`(C, REF.I31_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), I31_heaptype)]))) - ;; 6-typing.watsup:741.1-743.31 + ;; 6-typing.watsup:743.1-745.31 rule ref.is_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.IS_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([I32_valtype]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:745.1-747.31 + ;; 6-typing.watsup:747.1-749.31 rule ref.as_non_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.AS_NON_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ht)]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; 6-typing.watsup:749.1-750.51 + ;; 6-typing.watsup:751.1-752.51 rule ref.eq{C : context}: `%|-%:%`(C, REF.EQ_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype) REF_valtype(`NULL%?`_nul(?(())), EQ_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:752.1-756.33 + ;; 6-typing.watsup:754.1-758.33 rule ref.test{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.TEST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_sub: `%|-%<:%`(C, rt, rt') -- Reftype_ok: `%|-%:OK`(C, rt') - ;; 6-typing.watsup:758.1-762.33 + ;; 6-typing.watsup:760.1-764.33 rule ref.cast{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.CAST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_sub: `%|-%<:%`(C, rt, rt') -- Reftype_ok: `%|-%:OK`(C, rt') - ;; 6-typing.watsup:767.1-768.42 + ;; 6-typing.watsup:769.1-770.42 rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:773.1-775.44 + ;; 6-typing.watsup:775.1-777.44 rule struct.new{C : context, x : idx, zt* : storagetype*, mut* : mut*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt : storagetype}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- where STRUCT_comptype(`%`_structtype(`%%`_fieldtype(mut, zt)*{mut : mut, zt : storagetype})) = $expanddt(C.TYPES_context[x!`%`_idx.0]) -- if (|mut*{mut : mut}| = |zt*{zt : storagetype}|) - ;; 6-typing.watsup:777.1-780.40 + ;; 6-typing.watsup:779.1-782.40 rule struct.new_default{C : context, x : idx, mut* : mut*, zt* : storagetype*, val* : val*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27149,7 +27203,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- (where ?(val) = $default_($unpack(zt)))*{val : val, zt : storagetype} -- if (|val*{val : val}| = |zt*{zt : storagetype}|) - ;; 6-typing.watsup:782.1-786.39 + ;; 6-typing.watsup:784.1-788.39 rule struct.get{C : context, sx? : sx?, x : idx, i : nat, zt : storagetype, yt* : fieldtype*, mut : mut}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx : sx}, x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype))]), [], `%`_resulttype([$unpack(zt)]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27158,7 +27212,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where `%%`_fieldtype(mut, zt) = yt*{yt : fieldtype}[i] -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:788.1-791.24 + ;; 6-typing.watsup:790.1-793.24 rule struct.set{C : context, x : idx, i : nat, zt : storagetype, yt* : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, `%`_u32(i)), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) $unpack(zt)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27166,26 +27220,26 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (i < |yt*{yt : fieldtype}|) -- where `%%`_fieldtype(`MUT%?`_mut(?(())), zt) = yt*{yt : fieldtype}[i] - ;; 6-typing.watsup:796.1-798.42 + ;; 6-typing.watsup:798.1-800.42 rule array.new{C : context, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- where ARRAY_comptype(`%%`_arraytype(mut, zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) - ;; 6-typing.watsup:800.1-803.37 + ;; 6-typing.watsup:802.1-805.37 rule array.new_default{C : context, x : idx, mut : mut, zt : storagetype, val : val}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- where ARRAY_comptype(`%%`_arraytype(mut, zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) -- where ?(val) = $default_($unpack(zt)) - ;; 6-typing.watsup:805.1-807.42 + ;; 6-typing.watsup:807.1-809.42 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- where ARRAY_comptype(`%%`_arraytype(mut, zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) - ;; 6-typing.watsup:809.1-812.40 + ;; 6-typing.watsup:811.1-814.40 rule array.new_elem{C : context, x : idx, y : idx, mut : mut, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27193,7 +27247,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where ARRAY_comptype(`%%`_arraytype(mut, (rt : reftype <: storagetype))) = $expanddt(C.TYPES_context[x!`%`_idx.0]) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; 6-typing.watsup:814.1-818.24 + ;; 6-typing.watsup:816.1-820.24 rule array.new_data-0{C : context, x : idx, y : idx, mut : mut, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27202,7 +27256,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where ARRAY_comptype(`%%`_arraytype(mut, zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) -- where (numtype : numtype <: valtype) = $unpack(zt) - ;; 6-typing.watsup:814.1-818.24 + ;; 6-typing.watsup:816.1-820.24 rule array.new_data-1{C : context, x : idx, y : idx, mut : mut, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(`NULL%?`_nul(?()), ($idx(x) : typevar <: heaptype))]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27211,32 +27265,32 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where ARRAY_comptype(`%%`_arraytype(mut, zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) -- where (vectype : vectype <: valtype) = $unpack(zt) - ;; 6-typing.watsup:820.1-823.39 + ;; 6-typing.watsup:822.1-825.39 rule array.get{C : context, sx? : sx?, x : idx, zt : storagetype, mut : mut}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx : sx}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- where ARRAY_comptype(`%%`_arraytype(mut, zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) -- if ((sx?{sx : sx} = ?()) <=> (zt = ($unpack(zt) : valtype <: storagetype))) - ;; 6-typing.watsup:825.1-827.42 + ;; 6-typing.watsup:827.1-829.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- where ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) - ;; 6-typing.watsup:829.1-831.42 + ;; 6-typing.watsup:831.1-833.42 rule array.len{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) -- where $expanddt(C.TYPES_context[x!`%`_idx.0]) = ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt)) -- if (x!`%`_idx.0 < |C.TYPES_context|) - ;; 6-typing.watsup:833.1-835.42 + ;; 6-typing.watsup:835.1-837.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) -- where ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) - ;; 6-typing.watsup:837.1-841.40 + ;; 6-typing.watsup:839.1-843.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, mut : mut, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x_1) : typevar <: heaptype)) I32_valtype REF_valtype(`NULL%?`_nul(?(())), ($idx(x_2) : typevar <: heaptype)) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x_1!`%`_idx.0 < |C.TYPES_context|) @@ -27245,7 +27299,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) -- if ($expanddt(C.TYPES_context[x_1!`%`_idx.0]) = ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt_1))) - ;; 6-typing.watsup:843.1-846.44 + ;; 6-typing.watsup:845.1-848.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27253,7 +27307,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) -- if ($expanddt(C.TYPES_context[x!`%`_idx.0]) = ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt))) - ;; 6-typing.watsup:848.1-852.24 + ;; 6-typing.watsup:850.1-854.24 rule array.init_data-0{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27262,7 +27316,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) -- where (numtype : numtype <: valtype) = $unpack(zt) - ;; 6-typing.watsup:848.1-852.24 + ;; 6-typing.watsup:850.1-854.24 rule array.init_data-1{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(`NULL%?`_nul(?(())), ($idx(x) : typevar <: heaptype)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TYPES_context|) @@ -27271,159 +27325,159 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where ARRAY_comptype(`%%`_arraytype(`MUT%?`_mut(?(())), zt)) = $expanddt(C.TYPES_context[x!`%`_idx.0]) -- where (vectype : vectype <: valtype) = $unpack(zt) - ;; 6-typing.watsup:857.1-858.62 + ;; 6-typing.watsup:859.1-860.62 rule extern.convert_any{C : context, nul : nul}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]))) - ;; 6-typing.watsup:860.1-861.62 + ;; 6-typing.watsup:862.1-863.62 rule any.convert_extern{C : context, nul : nul}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(nul, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(nul, ANY_heaptype)]))) - ;; 6-typing.watsup:866.1-867.35 + ;; 6-typing.watsup:868.1-869.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:869.1-870.41 + ;; 6-typing.watsup:871.1-872.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:872.1-873.48 + ;; 6-typing.watsup:874.1-875.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:875.1-876.55 + ;; 6-typing.watsup:877.1-878.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:878.1-879.44 + ;; 6-typing.watsup:880.1-881.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:881.1-882.37 + ;; 6-typing.watsup:883.1-884.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:884.1-885.44 + ;; 6-typing.watsup:886.1-887.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:887.1-888.40 + ;; 6-typing.watsup:889.1-890.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:890.1-891.44 + ;; 6-typing.watsup:892.1-893.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:893.1-894.47 + ;; 6-typing.watsup:895.1-896.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:896.1-897.33 + ;; 6-typing.watsup:898.1-899.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:899.1-900.39 + ;; 6-typing.watsup:901.1-902.39 rule vswizzle{C : context, sh : ishape}: `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:902.1-904.29 + ;; 6-typing.watsup:904.1-906.29 rule vshuffle{C : context, sh : ishape, i* : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i : nat}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i : nat} - ;; 6-typing.watsup:906.1-907.44 + ;; 6-typing.watsup:908.1-909.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:910.1-912.21 + ;; 6-typing.watsup:912.1-914.21 rule vextract_lane{C : context, sh : shape, sx? : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx : sx}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:914.1-916.21 + ;; 6-typing.watsup:916.1-918.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:918.1-919.53 + ;; 6-typing.watsup:920.1-921.53 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:921.1-922.60 + ;; 6-typing.watsup:923.1-924.60 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop_(sh_1), sx : sx}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:924.1-925.48 + ;; 6-typing.watsup:926.1-927.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:928.1-930.160 + ;; 6-typing.watsup:930.1-932.160 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop_(sh_2, sh_1), hf? : half_(sh_2, sh_1)?, sx? : sx?, zero? : zero_(sh_2, sh_1)?, imm_1 : lanetype, imm_2 : lanetype, Fnn_1 : Fnn, Fnn_2 : Fnn}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, hf?{hf : half_(sh_2, sh_1)}, sx?{sx : sx}, zero?{zero : zero_(sh_2, sh_1)}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if ((sx?{sx : sx} = ?()) <=> (((($lanetype(sh_1) = imm_1) /\ ($lanetype(sh_2) = imm_2)) /\ ($lsize(imm_1) > $lsize(imm_2))) \/ (($lanetype(sh_1) = (Fnn_1 : Fnn <: lanetype)) /\ ($lanetype(sh_2) = (Fnn_2 : Fnn <: lanetype))))) - ;; 6-typing.watsup:935.1-937.28 + ;; 6-typing.watsup:937.1-939.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (x!`%`_idx.0 < |C.LOCALS_context|) -- where `%%`_localtype(SET_init, t) = C.LOCALS_context[x!`%`_idx.0] - ;; 6-typing.watsup:939.1-941.29 + ;; 6-typing.watsup:941.1-943.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.LOCALS_context|) -- where `%%`_localtype(init, t) = C.LOCALS_context[x!`%`_idx.0] - ;; 6-typing.watsup:943.1-945.29 + ;; 6-typing.watsup:945.1-947.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (x!`%`_idx.0 < |C.LOCALS_context|) -- where `%%`_localtype(init, t) = C.LOCALS_context[x!`%`_idx.0] - ;; 6-typing.watsup:950.1-952.29 + ;; 6-typing.watsup:952.1-954.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (x!`%`_idx.0 < |C.GLOBALS_context|) -- where `%%`_globaltype(mut, t) = C.GLOBALS_context[x!`%`_idx.0] - ;; 6-typing.watsup:954.1-956.29 + ;; 6-typing.watsup:956.1-958.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.GLOBALS_context|) -- where `%%`_globaltype(`MUT%?`_mut(?(())), t) = C.GLOBALS_context[x!`%`_idx.0] - ;; 6-typing.watsup:961.1-963.29 + ;; 6-typing.watsup:963.1-965.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- where `%%`_tabletype(lim, rt) = C.TABLES_context[x!`%`_idx.0] - ;; 6-typing.watsup:965.1-967.29 + ;; 6-typing.watsup:967.1-969.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- where `%%`_tabletype(lim, rt) = C.TABLES_context[x!`%`_idx.0] - ;; 6-typing.watsup:969.1-971.29 + ;; 6-typing.watsup:971.1-973.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- where `%%`_tabletype(lim, rt) = C.TABLES_context[x!`%`_idx.0] - ;; 6-typing.watsup:973.1-975.29 + ;; 6-typing.watsup:975.1-977.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- where `%%`_tabletype(lim, rt) = C.TABLES_context[x!`%`_idx.0] - ;; 6-typing.watsup:977.1-979.29 + ;; 6-typing.watsup:979.1-981.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- where `%%`_tabletype(lim, rt) = C.TABLES_context[x!`%`_idx.0] - ;; 6-typing.watsup:981.1-985.36 + ;; 6-typing.watsup:983.1-987.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x_1!`%`_idx.0 < |C.TABLES_context|) @@ -27432,7 +27486,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where `%%`_tabletype(lim_2, rt_2) = C.TABLES_context[x_2!`%`_idx.0] -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:987.1-991.36 + ;; 6-typing.watsup:989.1-993.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) @@ -27441,31 +27495,31 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where `%%`_tabletype(lim, rt_1) = C.TABLES_context[x!`%`_idx.0] -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:993.1-995.24 + ;; 6-typing.watsup:995.1-997.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.ELEMS_context|) -- where rt = C.ELEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1000.1-1002.23 + ;; 6-typing.watsup:1002.1-1004.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1004.1-1006.23 + ;; 6-typing.watsup:1006.1-1008.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1008.1-1010.23 + ;; 6-typing.watsup:1010.1-1012.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1012.1-1015.27 + ;; 6-typing.watsup:1014.1-1017.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x_1!`%`_idx.0 < |C.MEMS_context|) @@ -27473,7 +27527,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- where mt_1 = C.MEMS_context[x_1!`%`_idx.0] -- where mt_2 = C.MEMS_context[x_2!`%`_idx.0] - ;; 6-typing.watsup:1017.1-1020.24 + ;; 6-typing.watsup:1019.1-1022.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) @@ -27481,69 +27535,69 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1022.1-1024.24 + ;; 6-typing.watsup:1024.1-1026.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.DATAS_context|) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1035.1-1038.43 + ;; 6-typing.watsup:1037.1-1040.43 rule load-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1040.1-1043.35 + ;; 6-typing.watsup:1042.1-1045.35 rule load-pack{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, `LOAD%(_)%?%%`_instr((Inn : Inn <: numtype), ?((`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1054.1-1057.43 + ;; 6-typing.watsup:1056.1-1059.43 rule store-val{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1059.1-1062.35 + ;; 6-typing.watsup:1061.1-1064.35 rule store-pack{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1064.1-1067.46 + ;; 6-typing.watsup:1066.1-1069.46 rule vload-val{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1069.1-1072.39 + ;; 6-typing.watsup:1071.1-1074.39 rule vload-pack{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1074.1-1077.35 + ;; 6-typing.watsup:1076.1-1079.35 rule vload-splat{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1079.1-1082.34 + ;; 6-typing.watsup:1081.1-1084.34 rule vload-zero{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) < (N / 8)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1084.1-1088.21 + ;; 6-typing.watsup:1086.1-1090.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) @@ -27551,14 +27605,14 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (i < (128 / N)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1090.1-1093.46 + ;; 6-typing.watsup:1092.1-1095.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) -- where mt = C.MEMS_context[x!`%`_idx.0] - ;; 6-typing.watsup:1095.1-1099.21 + ;; 6-typing.watsup:1097.1-1101.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) @@ -27566,13 +27620,13 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (i < (128 / N)) -- where mt = C.MEMS_context[x!`%`_idx.0] -;; 6-typing.watsup:516.1-516.96 +;; 6-typing.watsup:518.1-518.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; 6-typing.watsup:529.1-530.24 + ;; 6-typing.watsup:531.1-532.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; 6-typing.watsup:533.1-537.82 + ;; 6-typing.watsup:535.1-539.82 rule seq{C : context, instr_1 : instr, instr_2* : instr*, t_1* : valtype*, x_1* : idx*, x_2* : idx*, t_3* : valtype*, t_2* : valtype*, init* : init*, t* : valtype*}: `%|-%:%`(C, [instr_1] :: instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx} :: x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) -- Instr_ok: `%|-%:%`(C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 : valtype}), x_1*{x_1 : localidx}, `%`_resulttype(t_2*{t_2 : valtype}))) @@ -27582,14 +27636,14 @@ relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init : init, t : valtype, x_1 : idx} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 : localidx}, `%%`_localtype(SET_init, t)*{t : valtype}), instr_2*{instr_2 : instr}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 : valtype}), x_2*{x_2 : localidx}, `%`_resulttype(t_3*{t_3 : valtype}))) - ;; 6-typing.watsup:539.1-543.33 + ;; 6-typing.watsup:541.1-545.33 rule sub{C : context, instr* : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr : instr}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr : instr}, it) -- Instrtype_ok: `%|-%:OK`(C, it') -- Instrtype_sub: `%|-%<:%`(C, it, it') - ;; 6-typing.watsup:546.1-549.33 + ;; 6-typing.watsup:548.1-551.33 rule frame{C : context, instr* : instr*, t* : valtype*, t_1* : valtype*, x* : idx*, t_2* : valtype*}: `%|-%:%`(C, instr*{instr : instr}, `%->_%%`_instrtype(`%`_resulttype(t*{t : valtype} :: t_1*{t_1 : valtype}), x*{x : localidx}, `%`_resulttype(t*{t : valtype} :: t_2*{t_2 : valtype}))) -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t : valtype})) @@ -27606,22 +27660,22 @@ relation Expr_ok: `%|-%:%`(context, expr, resulttype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1155.1-1155.86 +;; 6-typing.watsup:1157.1-1157.86 def $in_binop(numtype : numtype, binop_ : binop_(numtype), binop_(numtype)*) : bool - ;; 6-typing.watsup:1156.1-1156.42 + ;; 6-typing.watsup:1158.1-1158.42 def $in_binop{nt : numtype, binop : binop_(nt), epsilon : binop_(nt)*}(nt, binop, epsilon) = false - ;; 6-typing.watsup:1157.1-1157.99 + ;; 6-typing.watsup:1159.1-1159.99 def $in_binop{nt : numtype, binop : binop_(nt), ibinop_1 : binop_(nt), ibinop'* : binop_(nt)*}(nt, binop, [ibinop_1] :: ibinop'*{ibinop' : binop_(nt)}) = ((binop = ibinop_1) \/ $in_binop(nt, binop, ibinop'*{ibinop' : binop_(nt)})) } ;; 6-typing.watsup rec { -;; 6-typing.watsup:1151.1-1151.63 +;; 6-typing.watsup:1153.1-1153.63 def $in_numtype(numtype : numtype, numtype*) : bool - ;; 6-typing.watsup:1152.1-1152.37 + ;; 6-typing.watsup:1154.1-1154.37 def $in_numtype{nt : numtype, epsilon : numtype*}(nt, epsilon) = false - ;; 6-typing.watsup:1153.1-1153.68 + ;; 6-typing.watsup:1155.1-1155.68 def $in_numtype{nt : numtype, nt_1 : numtype, nt'* : numtype*}(nt, [nt_1] :: nt'*{nt' : numtype}) = ((nt = nt_1) \/ $in_numtype(nt, nt'*{nt' : numtype})) } @@ -27861,13 +27915,13 @@ syntax moduletype = ;; 6-typing.watsup rec { -;; 6-typing.watsup:1302.1-1302.100 +;; 6-typing.watsup:1304.1-1304.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1339.1-1340.17 + ;; 6-typing.watsup:1341.1-1342.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1342.1-1345.55 + ;; 6-typing.watsup:1344.1-1347.55 rule cons{C : context, global_1 : global, global : global, gt_1 : globaltype, gt* : globaltype*}: `%|-%:%`(C, [global_1] :: global*{}, [gt_1] :: gt*{gt : globaltype}) -- Global_ok: `%|-%:%`(C, global, gt_1) @@ -27877,13 +27931,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1301.1-1301.98 +;; 6-typing.watsup:1303.1-1303.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1331.1-1332.17 + ;; 6-typing.watsup:1333.1-1334.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1334.1-1337.50 + ;; 6-typing.watsup:1336.1-1339.50 rule cons{C : context, type_1 : type, type* : type*, dt_1* : deftype*, dt* : deftype*}: `%|-%:%`(C, [type_1] :: type*{type : type}, dt_1*{dt_1 : deftype} :: dt*{dt : deftype}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 : deftype}) diff --git a/spectec/test-prose/TEST.md b/spectec/test-prose/TEST.md index 877bd2d4d1..8851b0f790 100644 --- a/spectec/test-prose/TEST.md +++ b/spectec/test-prose/TEST.md @@ -3638,25 +3638,25 @@ watsup 0.4 generator 8-reduction.watsup:226.12-226.36: translate_rulepr: Yet `(`%;%`_config(z, (instr : instr <: admininstr)*{instr : instr}), `%;%`_config(z', (instr' : instr <: admininstr)*{instr' : instr}))` 8-reduction.watsup:230.12-230.44: translate_rulepr: Yet `(`%;%`_config(`%;%`_state(s, f'), (instr : instr <: admininstr)*{instr : instr}), `%;%`_config(`%;%`_state(s', f'), (instr' : instr <: admininstr)*{instr' : instr}))` == Prose Generation... -6-typing.watsup:620.7-620.45: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0)` -6-typing.watsup:621.6-621.45: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0)` -6-typing.watsup:638.6-638.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` -6-typing.watsup:639.6-639.34: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt)` -6-typing.watsup:646.6-646.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` -6-typing.watsup:647.6-647.49: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt)` -6-typing.watsup:663.6-663.45: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype))` -6-typing.watsup:676.6-676.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` -6-typing.watsup:684.6-684.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` -6-typing.watsup:691.6-691.45: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype))` -6-typing.watsup:695.6-695.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` -6-typing.watsup:756.6-756.33: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, rt')` -6-typing.watsup:762.6-762.33: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, rt')` -6-typing.watsup:780.7-780.38: prem_to_instrs: Yet `where ?(val) = $default_($unpack(zt))` -6-typing.watsup:812.6-812.40: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt)` -6-typing.watsup:841.6-841.40: prem_to_instrs: Yet `Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1)` -6-typing.watsup:846.6-846.44: prem_to_instrs: Yet `Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt)` -6-typing.watsup:985.6-985.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` -6-typing.watsup:991.6-991.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` +6-typing.watsup:622.7-622.45: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0)` +6-typing.watsup:623.6-623.45: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0)` +6-typing.watsup:640.6-640.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` +6-typing.watsup:641.6-641.34: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt)` +6-typing.watsup:648.6-648.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` +6-typing.watsup:649.6-649.49: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt)` +6-typing.watsup:665.6-665.45: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype))` +6-typing.watsup:678.6-678.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` +6-typing.watsup:686.6-686.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` +6-typing.watsup:693.6-693.45: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype))` +6-typing.watsup:697.6-697.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` +6-typing.watsup:758.6-758.33: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, rt')` +6-typing.watsup:764.6-764.33: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, rt')` +6-typing.watsup:782.7-782.38: prem_to_instrs: Yet `where ?(val) = $default_($unpack(zt))` +6-typing.watsup:814.6-814.40: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt)` +6-typing.watsup:843.6-843.40: prem_to_instrs: Yet `Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1)` +6-typing.watsup:848.6-848.44: prem_to_instrs: Yet `Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt)` +6-typing.watsup:987.6-987.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` +6-typing.watsup:993.6-993.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` ================= Generated prose ================= diff --git a/spectec/test-splice/TEST.md b/spectec/test-splice/TEST.md index 0f860e40e2..5708c71e74 100644 --- a/spectec/test-splice/TEST.md +++ b/spectec/test-splice/TEST.md @@ -13,25 +13,25 @@ $ (../src/exe-watsup/main.exe ../spec/wasm-3.0/*.watsup -l --splice-latex -p spe ../spec/wasm-3.0/8-reduction.watsup:226.12-226.36: translate_rulepr: Yet `(`%;%`_config(z, (instr : instr <: admininstr)*{instr : instr}), `%;%`_config(z', (instr' : instr <: admininstr)*{instr' : instr}))` ../spec/wasm-3.0/8-reduction.watsup:230.12-230.44: translate_rulepr: Yet `(`%;%`_config(`%;%`_state(s, f'), (instr : instr <: admininstr)*{instr : instr}), `%;%`_config(`%;%`_state(s', f'), (instr' : instr <: admininstr)*{instr' : instr}))` == Prose Generation... -../spec/wasm-3.0/6-typing.watsup:620.7-620.45: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0)` -../spec/wasm-3.0/6-typing.watsup:621.6-621.45: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0)` -../spec/wasm-3.0/6-typing.watsup:638.6-638.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` -../spec/wasm-3.0/6-typing.watsup:639.6-639.34: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt)` -../spec/wasm-3.0/6-typing.watsup:646.6-646.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` -../spec/wasm-3.0/6-typing.watsup:647.6-647.49: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt)` -../spec/wasm-3.0/6-typing.watsup:663.6-663.45: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype))` -../spec/wasm-3.0/6-typing.watsup:676.6-676.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` -../spec/wasm-3.0/6-typing.watsup:684.6-684.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` -../spec/wasm-3.0/6-typing.watsup:691.6-691.45: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype))` -../spec/wasm-3.0/6-typing.watsup:695.6-695.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` -../spec/wasm-3.0/6-typing.watsup:756.6-756.33: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, rt')` -../spec/wasm-3.0/6-typing.watsup:762.6-762.33: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, rt')` -../spec/wasm-3.0/6-typing.watsup:780.7-780.38: prem_to_instrs: Yet `where ?(val) = $default_($unpack(zt))` -../spec/wasm-3.0/6-typing.watsup:812.6-812.40: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt)` -../spec/wasm-3.0/6-typing.watsup:841.6-841.40: prem_to_instrs: Yet `Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1)` -../spec/wasm-3.0/6-typing.watsup:846.6-846.44: prem_to_instrs: Yet `Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt)` -../spec/wasm-3.0/6-typing.watsup:985.6-985.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` -../spec/wasm-3.0/6-typing.watsup:991.6-991.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` +../spec/wasm-3.0/6-typing.watsup:622.7-622.45: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0)` +../spec/wasm-3.0/6-typing.watsup:623.6-623.45: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t*{t : valtype}, C.LABELS_context[l'!`%`_labelidx.0]!`%`_resulttype.0)` +../spec/wasm-3.0/6-typing.watsup:640.6-640.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` +../spec/wasm-3.0/6-typing.watsup:641.6-641.34: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt)` +../spec/wasm-3.0/6-typing.watsup:648.6-648.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` +../spec/wasm-3.0/6-typing.watsup:649.6-649.49: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt)` +../spec/wasm-3.0/6-typing.watsup:665.6-665.45: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype))` +../spec/wasm-3.0/6-typing.watsup:678.6-678.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` +../spec/wasm-3.0/6-typing.watsup:686.6-686.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` +../spec/wasm-3.0/6-typing.watsup:693.6-693.45: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(`NULL%?`_nul(?(())), FUNC_heaptype))` +../spec/wasm-3.0/6-typing.watsup:697.6-697.40: prem_to_instrs: Yet `Resulttype_sub: `%|-%<:%`(C, t_2*{t_2 : valtype}, t'_2*{t'_2 : valtype})` +../spec/wasm-3.0/6-typing.watsup:758.6-758.33: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, rt')` +../spec/wasm-3.0/6-typing.watsup:764.6-764.33: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt, rt')` +../spec/wasm-3.0/6-typing.watsup:782.7-782.38: prem_to_instrs: Yet `where ?(val) = $default_($unpack(zt))` +../spec/wasm-3.0/6-typing.watsup:814.6-814.40: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt)` +../spec/wasm-3.0/6-typing.watsup:843.6-843.40: prem_to_instrs: Yet `Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1)` +../spec/wasm-3.0/6-typing.watsup:848.6-848.44: prem_to_instrs: Yet `Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt)` +../spec/wasm-3.0/6-typing.watsup:987.6-987.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` +../spec/wasm-3.0/6-typing.watsup:993.6-993.36: prem_to_instrs: Yet `Reftype_sub: `%|-%<:%`(C, rt_2, rt_1)` == Splicing... \documentclass[a4paper]{scrartcl} @@ -429,6 +429,8 @@ warning: syntax `module` was never spliced warning: syntax `moduleinst` was never spliced warning: syntax `moduletype` was never spliced warning: syntax `mut` was never spliced +warning: syntax `mut1` was never spliced +warning: syntax `mut2` was never spliced warning: syntax `n` was never spliced warning: syntax `name` was never spliced warning: syntax `nul` was never spliced