@@ -22269,103 +22269,107 @@ \subsection{Subtypes}
22269
22269
\begin{figure}[p]
22270
22270
\def\VSP{\vspace{4mm}}
22271
22271
\def\ExtraVSP{\vspace{2mm}}
22272
- \def\Axiom#1#2#3#4{\centerline{\inference[#1]{}{\SubtypeStd{#3}{#4}}}\VSP}
22273
- \def\Rule#1#2#3#4#5#6{\centerline{\inference[#1]{\SubtypeStd{#3}{#4}}{\SubtypeStd{#5}{#6}}}\VSP}
22274
- \def\RuleTwo#1#2#3#4#5#6#7#8{%
22275
- \centerline{\inference[#1]{\SubtypeStd{#3}{#4} & \SubtypeStd{#5}{#6}}{\SubtypeStd{#7}{#8}}}\VSP}
22276
- \def\RuleRaw#1#2#3#4#5{%
22277
- \centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22278
- \def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22272
+ \def\Axiom#1#2#3{\centerline{\inference[#1]{}{\SubtypeStd{#2}{#3}}}\VSP}
22273
+ \def\Rule#1#2#3#4#5{%
22274
+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3}}{\SubtypeStd{#4}{#5}}}\VSP}
22275
+ \def\RuleTwo#1#2#3#4#5#6#7{%
22276
+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3} & %
22277
+ \SubtypeStd{#4}{#5}}{\SubtypeStd{#6}{#7}}}\VSP}
22278
+ \def\RuleRaw#1#2#3#4{%
22279
+ \centerline{\inference[#1]{#2}{\SubtypeStd{#3}{#4}}}\VSP}
22280
+ \def\RuleRawRaw#1#2#3{\centerline{\inference[#1]{#2}{#3}}\VSP}
22279
22281
%
22280
22282
% ----------------------------------------------------------------------
22281
22283
% Omitted rules stated here, with justification for
22282
22284
% the omission.
22283
22285
% ------------------------------------------------ Right Object 1
22284
22286
% Not needed unless algorithmic: Instance of
22285
22287
% \SrnLeftVariableBound.
22286
- % \RuleRaw{\SrnRightObjectOne}{Right Object 1}{ %
22288
+ % \RuleRaw{\SrnRightObjectOne}{%
22287
22289
% \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22288
22290
% }{X}{\code{Object}}
22289
22291
% ------------------------------------------------ Right Object 2
22290
22292
% Not needed unless algorithmic: Instance of
22291
22293
% \SrnLeftPromotedVariable.
22292
- % \RuleRaw{\SrnRightObjectTwo}{}{%
22293
- % \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22294
+ % \RuleRaw{\SrnRightObjectTwo}{%
22295
+ % \SubtypeStd{S}{\code{Object}}}{%
22296
+ % \code{$X$\,\&\,$S$}}{\code{Object}}
22294
22297
% ------------------------------------------------ Right Object 3
22295
22298
% Not needed unless algorithmic: Derivable from
22296
22299
% \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
22297
22300
% Future<S> <: Object).
22298
- % \RuleRaw{\SrnRightObjectThree}{}{%
22299
- % \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22301
+ % \RuleRaw{\SrnRightObjectThree}{%
22302
+ % \SubtypeStd{S}{\code{Object}}}{%
22303
+ % \code{FutureOr<$S$>}}{\code{Object}}
22300
22304
% ----------------------------------------------------------------------
22301
22305
\begin{minipage}[c]{0.49\textwidth}
22302
22306
% ------------------------------------------------ Reflexivity
22303
- \Axiom{\SrnReflexivity}{}{ T}{T}
22307
+ \Axiom{\SrnReflexivity}{T}{T}
22304
22308
\ExtraVSP
22305
22309
% ------------------------------------------------ Left Top
22306
22310
% Non-algorithmic justification for this rule: Needed
22307
22311
% to prove dynamic/void <: FutureOr<Object>?.
22308
- \RuleRaw{\SrnLeftTop}{}{ %
22312
+ \RuleRaw{\SrnLeftTop}{%
22309
22313
S \in \{\DYNAMIC, \VOID\}\\
22310
22314
\SubtypeStd{\code{Object?}}{T}}{S}{T}
22311
22315
% ------------------------------------------------ Left Bottom
22312
- \Axiom{\SrnBottom}{}{ \code{Never}}{T}
22316
+ \Axiom{\SrnBottom}{\code{Never}}{T}
22313
22317
% ------------------------------------------------ Left Null 1
22314
- \Axiom{\SrnNullOne}{}{ \code{Null}}{\code{$T$?}}
22318
+ \Axiom{\SrnNullOne}{\code{Null}}{\code{$T$?}}
22315
22319
\end{minipage}
22316
22320
\begin{minipage}[c]{0.49\textwidth}
22317
22321
% ------------------------------------------------ Right Top
22318
- \RuleRaw{\SrnRightTop}{}{ %
22322
+ \RuleRaw{\SrnRightTop}{%
22319
22323
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
22320
22324
% ------------------------------------------------ Right Object 4
22321
- \RuleRaw{\SrnRightObjectFour}{}{ %
22325
+ \RuleRaw{\SrnRightObjectFour}{%
22322
22326
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
22323
22327
\mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
22324
22328
\mbox{\code{$X$\,\&\,$U$}, %
22325
22329
or \code{FutureOr<$U$>}}}{S}{\code{Object}}
22326
22330
% ------------------------------------------------ Left Null 2
22327
- \Rule{\SrnNullTwo}{}{ \code{Null}}{T}{%
22331
+ \Rule{\SrnNullTwo}{\code{Null}}{T}{%
22328
22332
\code{Null}}{\code{FutureOr<$T$>}}
22329
22333
\end{minipage}
22330
22334
22331
22335
\begin{minipage}[c]{0.49\textwidth}
22332
22336
% ------------------------------------------------ Left FutureOr
22333
- \RuleTwo{\SrnLeftFutureOr}{}{ %
22337
+ \RuleTwo{\SrnLeftFutureOr}{%
22334
22338
\code{Future<$S$>}}{T}{S}{T}{%
22335
22339
\code{FutureOr<$S$>}}{T}
22336
22340
% ------------------------------------------------ Right Promoted Variable
22337
- \RuleTwo{\SrnRightPromotedVariable}{}{ S}{X}{S}{T}{%
22341
+ \RuleTwo{\SrnRightPromotedVariable}{S}{X}{S}{T}{%
22338
22342
S}{X \& T}
22339
22343
% ------------------------------------------------ Right FutureOr B
22340
- \Rule{\SrnRightFutureOrB}{}{ S}{T}{S}{%
22344
+ \Rule{\SrnRightFutureOrB}{S}{T}{S}{%
22341
22345
\code{FutureOr<$T$>}}
22342
22346
% ------------------------------------------------ Right Nullable 2
22343
- \Rule{\SrnRightNullableTwo}{}{ S}{\code{Null}}{S}{%
22347
+ \Rule{\SrnRightNullableTwo}{S}{\code{Null}}{S}{%
22344
22348
\code{$T$?}}
22345
22349
% ------------------------------------------------ Left Variable Bound
22346
- \Rule{\SrnLeftVariableBound}{}{ \Gamma(X)}{T}{X}{T}
22350
+ \Rule{\SrnLeftVariableBound}{\Gamma(X)}{T}{X}{T}
22347
22351
\end{minipage}
22348
22352
\begin{minipage}[c]{0.49\textwidth}
22349
22353
% ------------------------------------------------ Left Nullable
22350
- \RuleTwo{\SrnLeftNullable}{}{ S}{T}{\code{Null}}{T}{%
22354
+ \RuleTwo{\SrnLeftNullable}{S}{T}{\code{Null}}{T}{%
22351
22355
\code{$S$?}}{T}
22352
22356
% ------------------------------------------------ Left Promoted Variable A
22353
- \Axiom{\SrnTypeVariableReflexivityA}{}{ X \& S}{X}
22357
+ \Axiom{\SrnTypeVariableReflexivityA}{X \& S}{X}
22354
22358
% ------------------------------------------------ Right FutureOr A
22355
- \Rule{\SrnRightFutureOrA}{}{ S}{%
22359
+ \Rule{\SrnRightFutureOrA}{S}{%
22356
22360
\code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
22357
22361
% ------------------------------------------------ Right Nullable 1
22358
- \Rule{\SrnRightNullableOne}{}{ S}{T}{S}{\code{$T$?}}
22362
+ \Rule{\SrnRightNullableOne}{S}{T}{S}{\code{$T$?}}
22359
22363
% ------------------------------------------------ Left Promoted Variable B
22360
- \Rule{\SrnLeftPromotedVariable}{}{ S}{T}{X \& S}{T}
22364
+ \Rule{\SrnLeftPromotedVariable}{S}{T}{X \& S}{T}
22361
22365
% ------------------------------------------------ Right Function
22362
- \RuleRaw{\SrnRightFunction}{}{ %
22366
+ \RuleRaw{\SrnRightFunction}{%
22363
22367
T\mbox{ is a function type}}{T}{\FUNCTION}
22364
22368
\end{minipage}
22365
22369
%
22366
22370
\ExtraVSP
22367
22371
% ------------------------------------------------ Positional Function Type
22368
- \RuleRawRaw{\SrnPositionalFunctionType}{}{ %
22372
+ \RuleRawRaw{\SrnPositionalFunctionType}{%
22369
22373
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22370
22374
\Subtype{\Gamma'}{S_0}{T_0} \\
22371
22375
n_1 \leq n_2 &
@@ -22377,7 +22381,7 @@ \subsection{Subtypes}
22377
22381
\end{array}}
22378
22382
\ExtraVSP\ExtraVSP
22379
22383
% ------------------------------------------------ Named Function Type
22380
- \RuleRawRaw{\SrnNamedFunctionType}{}{ %
22384
+ \RuleRawRaw{\SrnNamedFunctionType}{%
22381
22385
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22382
22386
\Subtype{\Gamma'}{S_0}{T_0} &
22383
22387
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22391,13 +22395,13 @@ \subsection{Subtypes}
22391
22395
%
22392
22396
\ExtraVSP
22393
22397
% ------------------------------------------------ Covariance
22394
- \RuleRaw{\SrnCovariance}{}{ %
22398
+ \RuleRaw{\SrnCovariance}{%
22395
22399
\mbox{$C$ is an interface type with $s$ type parameters} &
22396
22400
\SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
22397
22401
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
22398
22402
\ExtraVSP
22399
22403
% ------------------------------------------------ Superinterface
22400
- \RuleRaw{\SrnSuperinterface}{}{ %
22404
+ \RuleRaw{\SrnSuperinterface}{%
22401
22405
\mbox{$C$ is an interface type with type parameters \List{X}{1}{s}}\\
22402
22406
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
22403
22407
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%
0 commit comments