@@ -22002,103 +22002,107 @@ \subsection{Subtypes}
2200222002\begin{figure}[p]
2200322003 \def\VSP{\vspace{4mm}}
2200422004 \def\ExtraVSP{\vspace{2mm}}
22005- \def\Axiom#1#2#3#4{\centerline{\inference[#1]{}{\SubtypeStd{#3}{#4}}}\VSP}
22006- \def\Rule#1#2#3#4#5#6{\centerline{\inference[#1]{\SubtypeStd{#3}{#4}}{\SubtypeStd{#5}{#6}}}\VSP}
22007- \def\RuleTwo#1#2#3#4#5#6#7#8{%
22008- \centerline{\inference[#1]{\SubtypeStd{#3}{#4} & \SubtypeStd{#5}{#6}}{\SubtypeStd{#7}{#8}}}\VSP}
22009- \def\RuleRaw#1#2#3#4#5{%
22010- \centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22011- \def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22005+ \def\Axiom#1#2#3{\centerline{\inference[#1]{}{\SubtypeStd{#2}{#3}}}\VSP}
22006+ \def\Rule#1#2#3#4#5{%
22007+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3}}{\SubtypeStd{#4}{#5}}}\VSP}
22008+ \def\RuleTwo#1#2#3#4#5#6#7{%
22009+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3} & %
22010+ \SubtypeStd{#4}{#5}}{\SubtypeStd{#6}{#7}}}\VSP}
22011+ \def\RuleRaw#1#2#3#4{%
22012+ \centerline{\inference[#1]{#2}{\SubtypeStd{#3}{#4}}}\VSP}
22013+ \def\RuleRawRaw#1#2#3{\centerline{\inference[#1]{#2}{#3}}\VSP}
2201222014 %
2201322015 % ----------------------------------------------------------------------
2201422016 % Omitted rules stated here, with justification for
2201522017 % the omission.
2201622018 % ------------------------------------------------ Right Object 1
2201722019 % Not needed unless algorithmic: Instance of
2201822020 % \SrnLeftVariableBound.
22019- % \RuleRaw{\SrnRightObjectOne}{Right Object 1}{ %
22021+ % \RuleRaw{\SrnRightObjectOne}{%
2202022022 % \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
2202122023 % }{X}{\code{Object}}
2202222024 % ------------------------------------------------ Right Object 2
2202322025 % Not needed unless algorithmic: Instance of
2202422026 % \SrnLeftPromotedVariable.
22025- % \RuleRaw{\SrnRightObjectTwo}{}{%
22026- % \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22027+ % \RuleRaw{\SrnRightObjectTwo}{%
22028+ % \SubtypeStd{S}{\code{Object}}}{%
22029+ % \code{$X$\,\&\,$S$}}{\code{Object}}
2202722030 % ------------------------------------------------ Right Object 3
2202822031 % Not needed unless algorithmic: Derivable from
2202922032 % \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
2203022033 % Future<S> <: Object).
22031- % \RuleRaw{\SrnRightObjectThree}{}{%
22032- % \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22034+ % \RuleRaw{\SrnRightObjectThree}{%
22035+ % \SubtypeStd{S}{\code{Object}}}{%
22036+ % \code{FutureOr<$S$>}}{\code{Object}}
2203322037 % ----------------------------------------------------------------------
2203422038 \begin{minipage}[c]{0.49\textwidth}
2203522039 % ------------------------------------------------ Reflexivity
22036- \Axiom{\SrnReflexivity}{}{ T}{T}
22040+ \Axiom{\SrnReflexivity}{T}{T}
2203722041 \ExtraVSP
2203822042 % ------------------------------------------------ Left Top
2203922043 % Non-algorithmic justification for this rule: Needed
2204022044 % to prove dynamic/void <: FutureOr<Object>?.
22041- \RuleRaw{\SrnLeftTop}{}{ %
22045+ \RuleRaw{\SrnLeftTop}{%
2204222046 S \in \{\DYNAMIC, \VOID\}\\
2204322047 \SubtypeStd{\code{Object?}}{T}}{S}{T}
2204422048 % ------------------------------------------------ Left Bottom
22045- \Axiom{\SrnBottom}{}{ \code{Never}}{T}
22049+ \Axiom{\SrnBottom}{\code{Never}}{T}
2204622050 % ------------------------------------------------ Left Null 1
22047- \Axiom{\SrnNullOne}{}{ \code{Null}}{\code{$T$?}}
22051+ \Axiom{\SrnNullOne}{\code{Null}}{\code{$T$?}}
2204822052 \end{minipage}
2204922053 \begin{minipage}[c]{0.49\textwidth}
2205022054 % ------------------------------------------------ Right Top
22051- \RuleRaw{\SrnRightTop}{}{ %
22055+ \RuleRaw{\SrnRightTop}{%
2205222056 T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
2205322057 % ------------------------------------------------ Right Object 4
22054- \RuleRaw{\SrnRightObjectFour}{}{ %
22058+ \RuleRaw{\SrnRightObjectFour}{%
2205522059 $S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
2205622060 \mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
2205722061 \mbox{\code{$X$\,\&\,$U$}, %
2205822062 or \code{FutureOr<$U$>}}}{S}{\code{Object}}
2205922063 % ------------------------------------------------ Left Null 2
22060- \Rule{\SrnNullTwo}{}{ \code{Null}}{T}{%
22064+ \Rule{\SrnNullTwo}{\code{Null}}{T}{%
2206122065 \code{Null}}{\code{FutureOr<$T$>}}
2206222066 \end{minipage}
2206322067
2206422068 \begin{minipage}[c]{0.49\textwidth}
2206522069 % ------------------------------------------------ Left FutureOr
22066- \RuleTwo{\SrnLeftFutureOr}{}{ %
22070+ \RuleTwo{\SrnLeftFutureOr}{%
2206722071 \code{Future<$S$>}}{T}{S}{T}{%
2206822072 \code{FutureOr<$S$>}}{T}
2206922073 % ------------------------------------------------ Right Promoted Variable
22070- \RuleTwo{\SrnRightPromotedVariable}{}{ S}{X}{S}{T}{%
22074+ \RuleTwo{\SrnRightPromotedVariable}{S}{X}{S}{T}{%
2207122075 S}{X \& T}
2207222076 % ------------------------------------------------ Right FutureOr B
22073- \Rule{\SrnRightFutureOrB}{}{ S}{T}{S}{%
22077+ \Rule{\SrnRightFutureOrB}{S}{T}{S}{%
2207422078 \code{FutureOr<$T$>}}
2207522079 % ------------------------------------------------ Right Nullable 2
22076- \Rule{\SrnRightNullableTwo}{}{ S}{\code{Null}}{S}{%
22080+ \Rule{\SrnRightNullableTwo}{S}{\code{Null}}{S}{%
2207722081 \code{$T$?}}
2207822082 % ------------------------------------------------ Left Variable Bound
22079- \Rule{\SrnLeftVariableBound}{}{ \Gamma(X)}{T}{X}{T}
22083+ \Rule{\SrnLeftVariableBound}{\Gamma(X)}{T}{X}{T}
2208022084 \end{minipage}
2208122085 \begin{minipage}[c]{0.49\textwidth}
2208222086 % ------------------------------------------------ Left Nullable
22083- \RuleTwo{\SrnLeftNullable}{}{ S}{T}{\code{Null}}{T}{%
22087+ \RuleTwo{\SrnLeftNullable}{S}{T}{\code{Null}}{T}{%
2208422088 \code{$S$?}}{T}
2208522089 % ------------------------------------------------ Left Promoted Variable A
22086- \Axiom{\SrnTypeVariableReflexivityA}{}{ X \& S}{X}
22090+ \Axiom{\SrnTypeVariableReflexivityA}{X \& S}{X}
2208722091 % ------------------------------------------------ Right FutureOr A
22088- \Rule{\SrnRightFutureOrA}{}{ S}{%
22092+ \Rule{\SrnRightFutureOrA}{S}{%
2208922093 \code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
2209022094 % ------------------------------------------------ Right Nullable 1
22091- \Rule{\SrnRightNullableOne}{}{ S}{T}{S}{\code{$T$?}}
22095+ \Rule{\SrnRightNullableOne}{S}{T}{S}{\code{$T$?}}
2209222096 % ------------------------------------------------ Left Promoted Variable B
22093- \Rule{\SrnLeftPromotedVariable}{}{ S}{T}{X \& S}{T}
22097+ \Rule{\SrnLeftPromotedVariable}{S}{T}{X \& S}{T}
2209422098 % ------------------------------------------------ Right Function
22095- \RuleRaw{\SrnRightFunction}{}{ %
22099+ \RuleRaw{\SrnRightFunction}{%
2209622100 T\mbox{ is a function type}}{T}{\FUNCTION}
2209722101 \end{minipage}
2209822102 %
2209922103 \ExtraVSP
2210022104 % ------------------------------------------------ Positional Function Type
22101- \RuleRawRaw{\SrnPositionalFunctionType}{}{ %
22105+ \RuleRawRaw{\SrnPositionalFunctionType}{%
2210222106 \Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2210322107 \Subtype{\Gamma'}{S_0}{T_0} \\
2210422108 n_1 \leq n_2 &
@@ -22110,7 +22114,7 @@ \subsection{Subtypes}
2211022114 \end{array}}
2211122115 \ExtraVSP\ExtraVSP
2211222116 % ------------------------------------------------ Named Function Type
22113- \RuleRawRaw{\SrnNamedFunctionType}{}{ %
22117+ \RuleRawRaw{\SrnNamedFunctionType}{%
2211422118 \Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2211522119 \Subtype{\Gamma'}{S_0}{T_0} &
2211622120 \forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22124,13 +22128,13 @@ \subsection{Subtypes}
2212422128 %
2212522129 \ExtraVSP
2212622130 % ------------------------------------------------ Covariance
22127- \RuleRaw{\SrnCovariance}{}{ %
22131+ \RuleRaw{\SrnCovariance}{%
2212822132 \mbox{$C$ is an interface type with $s$ type parameters} &
2212922133 \SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
2213022134 \code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
2213122135 \ExtraVSP
2213222136 % ------------------------------------------------ Superinterface
22133- \RuleRaw{\SrnSuperinterface}{}{ %
22137+ \RuleRaw{\SrnSuperinterface}{%
2213422138 \mbox{$C$ is an interface type with type parameters \List{X}{1}{s}}\\
2213522139 \Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
2213622140 \SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%
0 commit comments