@@ -22432,104 +22432,108 @@ \subsection{Subtypes}
22432
22432
\begin{figure}[p]
22433
22433
\def\VSP{\vspace{4mm}}
22434
22434
\def\ExtraVSP{\vspace{2mm}}
22435
- \def\Axiom#1#2#3#4{\centerline{\inference[#1]{}{\SubtypeStd{#3}{#4}}}\VSP}
22436
- \def\Rule#1#2#3#4#5#6{\centerline{\inference[#1]{\SubtypeStd{#3}{#4}}{\SubtypeStd{#5}{#6}}}\VSP}
22437
- \def\RuleTwo#1#2#3#4#5#6#7#8{%
22438
- \centerline{\inference[#1]{\SubtypeStd{#3}{#4} & \SubtypeStd{#5}{#6}}{\SubtypeStd{#7}{#8}}}\VSP}
22439
- \def\RuleRaw#1#2#3#4#5{%
22440
- \centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22441
- \def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22435
+ \def\Axiom#1#2#3{\centerline{\inference[#1]{}{\SubtypeStd{#2}{#3}}}\VSP}
22436
+ \def\Rule#1#2#3#4#5{%
22437
+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3}}{\SubtypeStd{#4}{#5}}}\VSP}
22438
+ \def\RuleTwo#1#2#3#4#5#6#7{%
22439
+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3} & %
22440
+ \SubtypeStd{#4}{#5}}{\SubtypeStd{#6}{#7}}}\VSP}
22441
+ \def\RuleRaw#1#2#3#4{%
22442
+ \centerline{\inference[#1]{#2}{\SubtypeStd{#3}{#4}}}\VSP}
22443
+ \def\RuleRawRaw#1#2#3{\centerline{\inference[#1]{#2}{#3}}\VSP}
22442
22444
%
22443
22445
% ----------------------------------------------------------------------
22444
22446
% Omitted rules stated here, with justification for
22445
22447
% the omission.
22446
22448
% ------------------------------------------------ Right Object 1
22447
22449
% Not needed unless algorithmic: Instance of
22448
22450
% \SrnLeftVariableBound.
22449
- % \RuleRaw{\SrnRightObjectOne}{Right Object 1}{ %
22451
+ % \RuleRaw{\SrnRightObjectOne}{%
22450
22452
% \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22451
22453
% }{X}{\code{Object}}
22452
22454
% ------------------------------------------------ Right Object 2
22453
22455
% Not needed unless algorithmic: Instance of
22454
22456
% \SrnLeftPromotedVariable.
22455
- % \RuleRaw{\SrnRightObjectTwo}{}{%
22456
- % \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22457
+ % \RuleRaw{\SrnRightObjectTwo}{%
22458
+ % \SubtypeStd{S}{\code{Object}}}{%
22459
+ % \code{$X$\,\&\,$S$}}{\code{Object}}
22457
22460
% ------------------------------------------------ Right Object 3
22458
22461
% Not needed unless algorithmic: Derivable from
22459
22462
% \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
22460
22463
% Future<S> <: Object).
22461
- % \RuleRaw{\SrnRightObjectThree}{}{%
22462
- % \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22464
+ % \RuleRaw{\SrnRightObjectThree}{%
22465
+ % \SubtypeStd{S}{\code{Object}}}{%
22466
+ % \code{FutureOr<$S$>}}{\code{Object}}
22463
22467
% ----------------------------------------------------------------------
22464
22468
\begin{minipage}[c]{0.49\textwidth}
22465
22469
% ------------------------------------------------ Reflexivity
22466
- \Axiom{\SrnReflexivity}{}{ T}{T}
22470
+ \Axiom{\SrnReflexivity}{T}{T}
22467
22471
\ExtraVSP
22468
22472
% ------------------------------------------------ Left Top
22469
22473
% Non-algorithmic justification for this rule: Needed
22470
22474
% to prove dynamic/void <: FutureOr<Object>?.
22471
- \RuleRaw{\SrnLeftTop}{}{ %
22475
+ \RuleRaw{\SrnLeftTop}{%
22472
22476
S \in \{\DYNAMIC, \VOID\}\\
22473
22477
\SubtypeStd{\code{Object?}}{T}}{S}{T}
22474
22478
% ------------------------------------------------ Left Bottom
22475
- \Axiom{\SrnBottom}{}{ \code{Never}}{T}
22479
+ \Axiom{\SrnBottom}{\code{Never}}{T}
22476
22480
% ------------------------------------------------ Left Null 1
22477
- \Axiom{\SrnNullOne}{}{ \code{Null}}{\code{$T$?}}
22481
+ \Axiom{\SrnNullOne}{\code{Null}}{\code{$T$?}}
22478
22482
\end{minipage}
22479
22483
\begin{minipage}[c]{0.49\textwidth}
22480
22484
% ------------------------------------------------ Right Top
22481
- \RuleRaw{\SrnRightTop}{}{ %
22485
+ \RuleRaw{\SrnRightTop}{%
22482
22486
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
22483
22487
% ------------------------------------------------ Right Object 4
22484
- \RuleRaw{\SrnRightObjectFour}{}{ %
22488
+ \RuleRaw{\SrnRightObjectFour}{%
22485
22489
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
22486
22490
\mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
22487
22491
\mbox{\code{$X$\,\&\,$U$}, %
22488
22492
or \code{FutureOr<$U$>}}}{S}{\code{Object}}
22489
22493
% ------------------------------------------------ Left Null 2
22490
- \Rule{\SrnNullTwo}{}{ \code{Null}}{T}{%
22494
+ \Rule{\SrnNullTwo}{\code{Null}}{T}{%
22491
22495
\code{Null}}{\code{FutureOr<$T$>}}
22492
22496
\end{minipage}
22493
22497
22494
22498
\begin{minipage}[c]{0.49\textwidth}
22495
22499
% ------------------------------------------------ Left FutureOr
22496
- \RuleTwo{\SrnLeftFutureOr}{}{ %
22500
+ \RuleTwo{\SrnLeftFutureOr}{%
22497
22501
\code{Future<$S$>}}{T}{S}{T}{%
22498
22502
\code{FutureOr<$S$>}}{T}
22499
22503
% ------------------------------------------------ Right Promoted Variable
22500
- \RuleTwo{\SrnRightPromotedVariable}{}{ S}{X}{S}{T}{%
22504
+ \RuleTwo{\SrnRightPromotedVariable}{S}{X}{S}{T}{%
22501
22505
S}{X \& T}
22502
22506
% ------------------------------------------------ Right FutureOr B
22503
- \Rule{\SrnRightFutureOrB}{}{ S}{T}{S}{%
22507
+ \Rule{\SrnRightFutureOrB}{S}{T}{S}{%
22504
22508
\code{FutureOr<$T$>}}
22505
22509
% ------------------------------------------------ Right Nullable 2
22506
- \Rule{\SrnRightNullableTwo}{}{ S}{\code{Null}}{S}{%
22510
+ \Rule{\SrnRightNullableTwo}{S}{\code{Null}}{S}{%
22507
22511
\code{$T$?}}
22508
22512
% ------------------------------------------------ Left Variable Bound
22509
22513
\Rule{\SrnLeftVariableBound}{}{\Delta(X)}{T}{X}{T}
22510
22514
\end{minipage}
22511
22515
\begin{minipage}[c]{0.49\textwidth}
22512
22516
% ------------------------------------------------ Left Nullable
22513
- \RuleTwo{\SrnLeftNullable}{}{ S}{T}{\code{Null}}{T}{%
22517
+ \RuleTwo{\SrnLeftNullable}{S}{T}{\code{Null}}{T}{%
22514
22518
\code{$S$?}}{T}
22515
22519
% ------------------------------------------------ Left Promoted Variable A
22516
- \Axiom{\SrnTypeVariableReflexivityA}{}{ X \& S}{X}
22520
+ \Axiom{\SrnTypeVariableReflexivityA}{X \& S}{X}
22517
22521
% ------------------------------------------------ Right FutureOr A
22518
- \Rule{\SrnRightFutureOrA}{}{ S}{%
22522
+ \Rule{\SrnRightFutureOrA}{S}{%
22519
22523
\code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
22520
22524
% ------------------------------------------------ Right Nullable 1
22521
- \Rule{\SrnRightNullableOne}{}{ S}{T}{S}{\code{$T$?}}
22525
+ \Rule{\SrnRightNullableOne}{S}{T}{S}{\code{$T$?}}
22522
22526
% ------------------------------------------------ Left Promoted Variable B
22523
- \Rule{\SrnLeftPromotedVariable}{}{ S}{T}{X \& S}{T}
22527
+ \Rule{\SrnLeftPromotedVariable}{S}{T}{X \& S}{T}
22524
22528
% ------------------------------------------------ Right Function
22525
- \RuleRaw{\SrnRightFunction}{}{ %
22529
+ \RuleRaw{\SrnRightFunction}{%
22526
22530
T\mbox{ is a function type}}{T}{\FUNCTION}
22527
22531
\end{minipage}
22528
22532
%
22529
22533
\ExtraVSP
22530
22534
% ------------------------------------------------ Positional Function Type
22531
22535
\RuleRawRaw{\SrnPositionalFunctionType}{}{%
22532
- \Gamma ' = \Delta\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22536
+ \Delta ' = \Delta\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22533
22537
\Subtype{\Delta'}{S_0}{T_0} \\
22534
22538
n_1 \leq n_2 &
22535
22539
n_1 + k_1 \geq n_2 + k_2 &
@@ -22541,7 +22545,7 @@ \subsection{Subtypes}
22541
22545
\ExtraVSP\ExtraVSP
22542
22546
% ------------------------------------------------ Named Function Type
22543
22547
\RuleRawRaw{\SrnNamedFunctionType}{}{%
22544
- \Gamma ' = \Delta\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22548
+ \Delta ' = \Delta\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22545
22549
\Subtype{\Delta'}{S_0}{T_0} &
22546
22550
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
22547
22551
\{\,\List{y}{n+1}{n+k_2}\,\} \subseteq \{\,\List{x}{n+1}{n+k_1}\,\} \\
@@ -22554,13 +22558,13 @@ \subsection{Subtypes}
22554
22558
%
22555
22559
\ExtraVSP
22556
22560
% ------------------------------------------------ Covariance
22557
- \RuleRaw{\SrnCovariance}{}{ %
22561
+ \RuleRaw{\SrnCovariance}{%
22558
22562
\mbox{$C$ is an interface type with $s$ type parameters} &
22559
22563
\SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
22560
22564
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
22561
22565
\ExtraVSP
22562
22566
% ------------------------------------------------ Superinterface
22563
- \RuleRaw{\SrnSuperinterface}{}{ %
22567
+ \RuleRaw{\SrnSuperinterface}{%
22564
22568
\mbox{$C$ is an interface type with type parameters \List{X}{1}{s}}\\
22565
22569
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
22566
22570
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%
0 commit comments