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