@@ -22131,103 +22131,107 @@ \subsection{Subtypes}
22131
22131
\begin{figure}[p]
22132
22132
\def\VSP{\vspace{4mm}}
22133
22133
\def\ExtraVSP{\vspace{2mm}}
22134
- \def\Axiom#1#2#3#4{\centerline{\inference[#1]{}{\SubtypeStd{#3}{#4}}}\VSP}
22135
- \def\Rule#1#2#3#4#5#6{\centerline{\inference[#1]{\SubtypeStd{#3}{#4}}{\SubtypeStd{#5}{#6}}}\VSP}
22136
- \def\RuleTwo#1#2#3#4#5#6#7#8{%
22137
- \centerline{\inference[#1]{\SubtypeStd{#3}{#4} & \SubtypeStd{#5}{#6}}{\SubtypeStd{#7}{#8}}}\VSP}
22138
- \def\RuleRaw#1#2#3#4#5{%
22139
- \centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22140
- \def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22134
+ \def\Axiom#1#2#3{\centerline{\inference[#1]{}{\SubtypeStd{#2}{#3}}}\VSP}
22135
+ \def\Rule#1#2#3#4#5{%
22136
+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3}}{\SubtypeStd{#4}{#5}}}\VSP}
22137
+ \def\RuleTwo#1#2#3#4#5#6#7{%
22138
+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3} & %
22139
+ \SubtypeStd{#4}{#5}}{\SubtypeStd{#6}{#7}}}\VSP}
22140
+ \def\RuleRaw#1#2#3#4{%
22141
+ \centerline{\inference[#1]{#2}{\SubtypeStd{#3}{#4}}}\VSP}
22142
+ \def\RuleRawRaw#1#2#3{\centerline{\inference[#1]{#2}{#3}}\VSP}
22141
22143
%
22142
22144
% ----------------------------------------------------------------------
22143
22145
% Omitted rules stated here, with justification for
22144
22146
% the omission.
22145
22147
% ------------------------------------------------ Right Object 1
22146
22148
% Not needed unless algorithmic: Instance of
22147
22149
% \SrnLeftVariableBound.
22148
- % \RuleRaw{\SrnRightObjectOne}{Right Object 1}{ %
22150
+ % \RuleRaw{\SrnRightObjectOne}{%
22149
22151
% \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22150
22152
% }{X}{\code{Object}}
22151
22153
% ------------------------------------------------ Right Object 2
22152
22154
% Not needed unless algorithmic: Instance of
22153
22155
% \SrnLeftPromotedVariable.
22154
- % \RuleRaw{\SrnRightObjectTwo}{}{%
22155
- % \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22156
+ % \RuleRaw{\SrnRightObjectTwo}{%
22157
+ % \SubtypeStd{S}{\code{Object}}}{%
22158
+ % \code{$X$\,\&\,$S$}}{\code{Object}}
22156
22159
% ------------------------------------------------ Right Object 3
22157
22160
% Not needed unless algorithmic: Derivable from
22158
22161
% \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
22159
22162
% Future<S> <: Object).
22160
- % \RuleRaw{\SrnRightObjectThree}{}{%
22161
- % \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22163
+ % \RuleRaw{\SrnRightObjectThree}{%
22164
+ % \SubtypeStd{S}{\code{Object}}}{%
22165
+ % \code{FutureOr<$S$>}}{\code{Object}}
22162
22166
% ----------------------------------------------------------------------
22163
22167
\begin{minipage}[c]{0.49\textwidth}
22164
22168
% ------------------------------------------------ Reflexivity
22165
- \Axiom{\SrnReflexivity}{}{ T}{T}
22169
+ \Axiom{\SrnReflexivity}{T}{T}
22166
22170
\ExtraVSP
22167
22171
% ------------------------------------------------ Left Top
22168
22172
% Non-algorithmic justification for this rule: Needed
22169
22173
% to prove dynamic/void <: FutureOr<Object>?.
22170
- \RuleRaw{\SrnLeftTop}{}{ %
22174
+ \RuleRaw{\SrnLeftTop}{%
22171
22175
S \in \{\DYNAMIC, \VOID\}\\
22172
22176
\SubtypeStd{\code{Object?}}{T}}{S}{T}
22173
22177
% ------------------------------------------------ Left Bottom
22174
- \Axiom{\SrnBottom}{}{ \code{Never}}{T}
22178
+ \Axiom{\SrnBottom}{\code{Never}}{T}
22175
22179
% ------------------------------------------------ Left Null 1
22176
- \Axiom{\SrnNullOne}{}{ \code{Null}}{\code{$T$?}}
22180
+ \Axiom{\SrnNullOne}{\code{Null}}{\code{$T$?}}
22177
22181
\end{minipage}
22178
22182
\begin{minipage}[c]{0.49\textwidth}
22179
22183
% ------------------------------------------------ Right Top
22180
- \RuleRaw{\SrnRightTop}{}{ %
22184
+ \RuleRaw{\SrnRightTop}{%
22181
22185
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
22182
22186
% ------------------------------------------------ Right Object 4
22183
- \RuleRaw{\SrnRightObjectFour}{}{ %
22187
+ \RuleRaw{\SrnRightObjectFour}{%
22184
22188
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
22185
22189
\mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
22186
22190
\mbox{\code{$X$\,\&\,$U$}, %
22187
22191
or \code{FutureOr<$U$>}}}{S}{\code{Object}}
22188
22192
% ------------------------------------------------ Left Null 2
22189
- \Rule{\SrnNullTwo}{}{ \code{Null}}{T}{%
22193
+ \Rule{\SrnNullTwo}{\code{Null}}{T}{%
22190
22194
\code{Null}}{\code{FutureOr<$T$>}}
22191
22195
\end{minipage}
22192
22196
22193
22197
\begin{minipage}[c]{0.49\textwidth}
22194
22198
% ------------------------------------------------ Left FutureOr
22195
- \RuleTwo{\SrnLeftFutureOr}{}{ %
22199
+ \RuleTwo{\SrnLeftFutureOr}{%
22196
22200
\code{Future<$S$>}}{T}{S}{T}{%
22197
22201
\code{FutureOr<$S$>}}{T}
22198
22202
% ------------------------------------------------ Right Promoted Variable
22199
- \RuleTwo{\SrnRightPromotedVariable}{}{ S}{X}{S}{T}{%
22203
+ \RuleTwo{\SrnRightPromotedVariable}{S}{X}{S}{T}{%
22200
22204
S}{X \& T}
22201
22205
% ------------------------------------------------ Right FutureOr B
22202
- \Rule{\SrnRightFutureOrB}{}{ S}{T}{S}{%
22206
+ \Rule{\SrnRightFutureOrB}{S}{T}{S}{%
22203
22207
\code{FutureOr<$T$>}}
22204
22208
% ------------------------------------------------ Right Nullable 2
22205
- \Rule{\SrnRightNullableTwo}{}{ S}{\code{Null}}{S}{%
22209
+ \Rule{\SrnRightNullableTwo}{S}{\code{Null}}{S}{%
22206
22210
\code{$T$?}}
22207
22211
% ------------------------------------------------ Left Variable Bound
22208
- \Rule{\SrnLeftVariableBound}{}{ \Gamma(X)}{T}{X}{T}
22212
+ \Rule{\SrnLeftVariableBound}{\Gamma(X)}{T}{X}{T}
22209
22213
\end{minipage}
22210
22214
\begin{minipage}[c]{0.49\textwidth}
22211
22215
% ------------------------------------------------ Left Nullable
22212
- \RuleTwo{\SrnLeftNullable}{}{ S}{T}{\code{Null}}{T}{%
22216
+ \RuleTwo{\SrnLeftNullable}{S}{T}{\code{Null}}{T}{%
22213
22217
\code{$S$?}}{T}
22214
22218
% ------------------------------------------------ Left Promoted Variable A
22215
- \Axiom{\SrnTypeVariableReflexivityA}{}{ X \& S}{X}
22219
+ \Axiom{\SrnTypeVariableReflexivityA}{X \& S}{X}
22216
22220
% ------------------------------------------------ Right FutureOr A
22217
- \Rule{\SrnRightFutureOrA}{}{ S}{%
22221
+ \Rule{\SrnRightFutureOrA}{S}{%
22218
22222
\code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
22219
22223
% ------------------------------------------------ Right Nullable 1
22220
- \Rule{\SrnRightNullableOne}{}{ S}{T}{S}{\code{$T$?}}
22224
+ \Rule{\SrnRightNullableOne}{S}{T}{S}{\code{$T$?}}
22221
22225
% ------------------------------------------------ Left Promoted Variable B
22222
- \Rule{\SrnLeftPromotedVariable}{}{ S}{T}{X \& S}{T}
22226
+ \Rule{\SrnLeftPromotedVariable}{S}{T}{X \& S}{T}
22223
22227
% ------------------------------------------------ Right Function
22224
- \RuleRaw{\SrnRightFunction}{}{ %
22228
+ \RuleRaw{\SrnRightFunction}{%
22225
22229
T\mbox{ is a function type}}{T}{\FUNCTION}
22226
22230
\end{minipage}
22227
22231
%
22228
22232
\ExtraVSP
22229
22233
% ------------------------------------------------ Positional Function Type
22230
- \RuleRawRaw{\SrnPositionalFunctionType}{}{ %
22234
+ \RuleRawRaw{\SrnPositionalFunctionType}{%
22231
22235
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22232
22236
\Subtype{\Gamma'}{S_0}{T_0} \\
22233
22237
n_1 \leq n_2 &
@@ -22239,7 +22243,7 @@ \subsection{Subtypes}
22239
22243
\end{array}}
22240
22244
\ExtraVSP\ExtraVSP
22241
22245
% ------------------------------------------------ Named Function Type
22242
- \RuleRawRaw{\SrnNamedFunctionType}{}{ %
22246
+ \RuleRawRaw{\SrnNamedFunctionType}{%
22243
22247
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22244
22248
\Subtype{\Gamma'}{S_0}{T_0} &
22245
22249
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22253,13 +22257,13 @@ \subsection{Subtypes}
22253
22257
%
22254
22258
\ExtraVSP
22255
22259
% ------------------------------------------------ Covariance
22256
- \RuleRaw{\SrnCovariance}{}{ %
22260
+ \RuleRaw{\SrnCovariance}{%
22257
22261
\mbox{$C$ is an interface type with $s$ type parameters} &
22258
22262
\SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
22259
22263
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
22260
22264
\ExtraVSP
22261
22265
% ------------------------------------------------ Superinterface
22262
- \RuleRaw{\SrnSuperinterface}{}{ %
22266
+ \RuleRaw{\SrnSuperinterface}{%
22263
22267
\mbox{$C$ is an interface type with type parameters \List{X}{1}{s}}\\
22264
22268
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
22265
22269
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%
0 commit comments