@@ -22004,103 +22004,107 @@ \subsection{Subtypes}
22004
22004
\begin{figure}[p]
22005
22005
\def\VSP{\vspace{4mm}}
22006
22006
\def\ExtraVSP{\vspace{2mm}}
22007
- \def\Axiom#1#2#3#4{\centerline{\inference[#1]{}{\SubtypeStd{#3}{#4}}}\VSP}
22008
- \def\Rule#1#2#3#4#5#6{\centerline{\inference[#1]{\SubtypeStd{#3}{#4}}{\SubtypeStd{#5}{#6}}}\VSP}
22009
- \def\RuleTwo#1#2#3#4#5#6#7#8{%
22010
- \centerline{\inference[#1]{\SubtypeStd{#3}{#4} & \SubtypeStd{#5}{#6}}{\SubtypeStd{#7}{#8}}}\VSP}
22011
- \def\RuleRaw#1#2#3#4#5{%
22012
- \centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22013
- \def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22007
+ \def\Axiom#1#2#3{\centerline{\inference[#1]{}{\SubtypeStd{#2}{#3}}}\VSP}
22008
+ \def\Rule#1#2#3#4#5{%
22009
+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3}}{\SubtypeStd{#4}{#5}}}\VSP}
22010
+ \def\RuleTwo#1#2#3#4#5#6#7{%
22011
+ \centerline{\inference[#1]{\SubtypeStd{#2}{#3} & %
22012
+ \SubtypeStd{#4}{#5}}{\SubtypeStd{#6}{#7}}}\VSP}
22013
+ \def\RuleRaw#1#2#3#4{%
22014
+ \centerline{\inference[#1]{#2}{\SubtypeStd{#3}{#4}}}\VSP}
22015
+ \def\RuleRawRaw#1#2#3{\centerline{\inference[#1]{#2}{#3}}\VSP}
22014
22016
%
22015
22017
% ----------------------------------------------------------------------
22016
22018
% Omitted rules stated here, with justification for
22017
22019
% the omission.
22018
22020
% ------------------------------------------------ Right Object 1
22019
22021
% Not needed unless algorithmic: Instance of
22020
22022
% \SrnLeftVariableBound.
22021
- % \RuleRaw{\SrnRightObjectOne}{Right Object 1}{ %
22023
+ % \RuleRaw{\SrnRightObjectOne}{%
22022
22024
% \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22023
22025
% }{X}{\code{Object}}
22024
22026
% ------------------------------------------------ Right Object 2
22025
22027
% Not needed unless algorithmic: Instance of
22026
22028
% \SrnLeftPromotedVariable.
22027
- % \RuleRaw{\SrnRightObjectTwo}{}{%
22028
- % \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22029
+ % \RuleRaw{\SrnRightObjectTwo}{%
22030
+ % \SubtypeStd{S}{\code{Object}}}{%
22031
+ % \code{$X$\,\&\,$S$}}{\code{Object}}
22029
22032
% ------------------------------------------------ Right Object 3
22030
22033
% Not needed unless algorithmic: Derivable from
22031
22034
% \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
22032
22035
% Future<S> <: Object).
22033
- % \RuleRaw{\SrnRightObjectThree}{}{%
22034
- % \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22036
+ % \RuleRaw{\SrnRightObjectThree}{%
22037
+ % \SubtypeStd{S}{\code{Object}}}{%
22038
+ % \code{FutureOr<$S$>}}{\code{Object}}
22035
22039
% ----------------------------------------------------------------------
22036
22040
\begin{minipage}[c]{0.49\textwidth}
22037
22041
% ------------------------------------------------ Reflexivity
22038
- \Axiom{\SrnReflexivity}{}{ T}{T}
22042
+ \Axiom{\SrnReflexivity}{T}{T}
22039
22043
\ExtraVSP
22040
22044
% ------------------------------------------------ Left Top
22041
22045
% Non-algorithmic justification for this rule: Needed
22042
22046
% to prove dynamic/void <: FutureOr<Object>?.
22043
- \RuleRaw{\SrnLeftTop}{}{ %
22047
+ \RuleRaw{\SrnLeftTop}{%
22044
22048
S \in \{\DYNAMIC, \VOID\}\\
22045
22049
\SubtypeStd{\code{Object?}}{T}}{S}{T}
22046
22050
% ------------------------------------------------ Left Bottom
22047
- \Axiom{\SrnBottom}{}{ \code{Never}}{T}
22051
+ \Axiom{\SrnBottom}{\code{Never}}{T}
22048
22052
% ------------------------------------------------ Left Null 1
22049
- \Axiom{\SrnNullOne}{}{ \code{Null}}{\code{$T$?}}
22053
+ \Axiom{\SrnNullOne}{\code{Null}}{\code{$T$?}}
22050
22054
\end{minipage}
22051
22055
\begin{minipage}[c]{0.49\textwidth}
22052
22056
% ------------------------------------------------ Right Top
22053
- \RuleRaw{\SrnRightTop}{}{ %
22057
+ \RuleRaw{\SrnRightTop}{%
22054
22058
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
22055
22059
% ------------------------------------------------ Right Object 4
22056
- \RuleRaw{\SrnRightObjectFour}{}{ %
22060
+ \RuleRaw{\SrnRightObjectFour}{%
22057
22061
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
22058
22062
\mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
22059
22063
\mbox{\code{$X$\,\&\,$U$}, %
22060
22064
or \code{FutureOr<$U$>}}}{S}{\code{Object}}
22061
22065
% ------------------------------------------------ Left Null 2
22062
- \Rule{\SrnNullTwo}{}{ \code{Null}}{T}{%
22066
+ \Rule{\SrnNullTwo}{\code{Null}}{T}{%
22063
22067
\code{Null}}{\code{FutureOr<$T$>}}
22064
22068
\end{minipage}
22065
22069
22066
22070
\begin{minipage}[c]{0.49\textwidth}
22067
22071
% ------------------------------------------------ Left FutureOr
22068
- \RuleTwo{\SrnLeftFutureOr}{}{ %
22072
+ \RuleTwo{\SrnLeftFutureOr}{%
22069
22073
\code{Future<$S$>}}{T}{S}{T}{%
22070
22074
\code{FutureOr<$S$>}}{T}
22071
22075
% ------------------------------------------------ Right Promoted Variable
22072
- \RuleTwo{\SrnRightPromotedVariable}{}{ S}{X}{S}{T}{%
22076
+ \RuleTwo{\SrnRightPromotedVariable}{S}{X}{S}{T}{%
22073
22077
S}{X \& T}
22074
22078
% ------------------------------------------------ Right FutureOr B
22075
- \Rule{\SrnRightFutureOrB}{}{ S}{T}{S}{%
22079
+ \Rule{\SrnRightFutureOrB}{S}{T}{S}{%
22076
22080
\code{FutureOr<$T$>}}
22077
22081
% ------------------------------------------------ Right Nullable 2
22078
- \Rule{\SrnRightNullableTwo}{}{ S}{\code{Null}}{S}{%
22082
+ \Rule{\SrnRightNullableTwo}{S}{\code{Null}}{S}{%
22079
22083
\code{$T$?}}
22080
22084
% ------------------------------------------------ Left Variable Bound
22081
- \Rule{\SrnLeftVariableBound}{}{ \Gamma(X)}{T}{X}{T}
22085
+ \Rule{\SrnLeftVariableBound}{\Gamma(X)}{T}{X}{T}
22082
22086
\end{minipage}
22083
22087
\begin{minipage}[c]{0.49\textwidth}
22084
22088
% ------------------------------------------------ Left Nullable
22085
- \RuleTwo{\SrnLeftNullable}{}{ S}{T}{\code{Null}}{T}{%
22089
+ \RuleTwo{\SrnLeftNullable}{S}{T}{\code{Null}}{T}{%
22086
22090
\code{$S$?}}{T}
22087
22091
% ------------------------------------------------ Left Promoted Variable A
22088
- \Axiom{\SrnTypeVariableReflexivityA}{}{ X \& S}{X}
22092
+ \Axiom{\SrnTypeVariableReflexivityA}{X \& S}{X}
22089
22093
% ------------------------------------------------ Right FutureOr A
22090
- \Rule{\SrnRightFutureOrA}{}{ S}{%
22094
+ \Rule{\SrnRightFutureOrA}{S}{%
22091
22095
\code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
22092
22096
% ------------------------------------------------ Right Nullable 1
22093
- \Rule{\SrnRightNullableOne}{}{ S}{T}{S}{\code{$T$?}}
22097
+ \Rule{\SrnRightNullableOne}{S}{T}{S}{\code{$T$?}}
22094
22098
% ------------------------------------------------ Left Promoted Variable B
22095
- \Rule{\SrnLeftPromotedVariable}{}{ S}{T}{X \& S}{T}
22099
+ \Rule{\SrnLeftPromotedVariable}{S}{T}{X \& S}{T}
22096
22100
% ------------------------------------------------ Right Function
22097
- \RuleRaw{\SrnRightFunction}{}{ %
22101
+ \RuleRaw{\SrnRightFunction}{%
22098
22102
T\mbox{ is a function type}}{T}{\FUNCTION}
22099
22103
\end{minipage}
22100
22104
%
22101
22105
\ExtraVSP
22102
22106
% ------------------------------------------------ Positional Function Type
22103
- \RuleRawRaw{\SrnPositionalFunctionType}{}{ %
22107
+ \RuleRawRaw{\SrnPositionalFunctionType}{%
22104
22108
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22105
22109
\Subtype{\Gamma'}{S_0}{T_0} \\
22106
22110
n_1 \leq n_2 &
@@ -22112,7 +22116,7 @@ \subsection{Subtypes}
22112
22116
\end{array}}
22113
22117
\ExtraVSP\ExtraVSP
22114
22118
% ------------------------------------------------ Named Function Type
22115
- \RuleRawRaw{\SrnNamedFunctionType}{}{ %
22119
+ \RuleRawRaw{\SrnNamedFunctionType}{%
22116
22120
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22117
22121
\Subtype{\Gamma'}{S_0}{T_0} &
22118
22122
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22126,13 +22130,13 @@ \subsection{Subtypes}
22126
22130
%
22127
22131
\ExtraVSP
22128
22132
% ------------------------------------------------ Covariance
22129
- \RuleRaw{\SrnCovariance}{}{ %
22133
+ \RuleRaw{\SrnCovariance}{%
22130
22134
\mbox{$C$ is an interface type with $s$ type parameters} &
22131
22135
\SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
22132
22136
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
22133
22137
\ExtraVSP
22134
22138
% ------------------------------------------------ Superinterface
22135
- \RuleRaw{\SrnSuperinterface}{}{ %
22139
+ \RuleRaw{\SrnSuperinterface}{%
22136
22140
\mbox{$C$ is an interface type with type parameters \List{X}{1}{s}}\\
22137
22141
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
22138
22142
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%
0 commit comments