@@ -13697,7 +13697,7 @@ \subsection{Lookup}
13697
13697
13698
13698
{ % Scope for `lookup' definition.
13699
13699
13700
- \def\LookupDefinitionWithStart#1{
13700
+ \def\LookupDefinitionWithStart#1{%
13701
13701
\LMHash{}%
13702
13702
The result of a
13703
13703
{\em {#1} lookup for $m$ in $o$ with respect to $L$ starting in class $C$}
@@ -14020,7 +14020,7 @@ \subsection{Member Invocations}
14020
14020
expression $r$ is an expression of
14021
14021
one of the forms shown in Fig.~\ref{fig:memberInvocations}.
14022
14022
Each member invocation has a
14023
- \IndexCustom{corresponding member name}{
14023
+ \IndexCustom{corresponding member name}{%
14024
14024
member invocation!corresponding member name}
14025
14025
as shown in the figure.
14026
14026
@@ -15662,7 +15662,7 @@ \subsection{Null Shorting}
15662
15662
\IndexCustom{\metaCode{SHORT}}{null shorting!\metaCode{SHORT}}
15663
15663
is defined as follows:
15664
15664
15665
- {
15665
+ {%
15666
15666
\def\Base#1{\textcolor{normativeColor}{#1}}
15667
15667
\def\Meta#1{\textcolor{metaColor}{#1}}
15668
15668
\begin{metaLevelCode}
@@ -21979,29 +21979,27 @@ \subsection{Subtypes}
21979
21979
\newcommand{\SrnRightTop}{2}
21980
21980
\newcommand{\SrnLeftTop}{3}
21981
21981
\newcommand{\SrnBottom}{4}
21982
- \newcommand{\SrnRightObjectOne}{5.1}
21983
- \newcommand{\SrnRightObjectTwo}{5.2}
21984
- \newcommand{\SrnRightObjectThree}{5.3}
21985
- \newcommand{\SrnRightObjectFour}{5.4}
21986
- \newcommand{\SrnNullOne}{6.1}
21987
- \newcommand{\SrnNullTwo}{6.2}
21988
- \newcommand{\SrnLeftFutureOr}{7}
21989
- \newcommand{\SrnLeftNullable}{7b}
21990
- \newcommand{\SrnTypeVariableReflexivityA}{8}
21991
- \newcommand{\SrnRightPromotedVariable}{9}
21992
- \newcommand{\SrnRightFutureOrA}{10}
21993
- \newcommand{\SrnRightFutureOrB}{11}
21994
- \newcommand{\SrnRightNullableOne}{11b.1}
21995
- \newcommand{\SrnRightNullableTwo}{11b.2}
21996
- \newcommand{\SrnRightNullableThree}{11b.3}
21997
- \newcommand{\SrnRightNullableFour}{11b.4}
21998
- \newcommand{\SrnLeftPromotedVariable}{12}
21999
- \newcommand{\SrnLeftVariableBound}{13}
22000
- \newcommand{\SrnRightFunction}{14}
22001
- \newcommand{\SrnPositionalFunctionType}{15}
22002
- \newcommand{\SrnNamedFunctionType}{16}
22003
- \newcommand{\SrnCovariance}{17}
22004
- \newcommand{\SrnSuperinterface}{18}
21982
+ %\newcommand{\SrnRightObjectOne}{}
21983
+ %\newcommand{\SrnRightObjectTwo}{}
21984
+ %\newcommand{\SrnRightObjectThree}{}
21985
+ \newcommand{\SrnRightObjectFour}{5}
21986
+ \newcommand{\SrnNullOne}{6}
21987
+ \newcommand{\SrnNullTwo}{7}
21988
+ \newcommand{\SrnLeftFutureOr}{8}
21989
+ \newcommand{\SrnLeftNullable}{9}
21990
+ \newcommand{\SrnTypeVariableReflexivityA}{10}
21991
+ \newcommand{\SrnRightPromotedVariable}{11}
21992
+ \newcommand{\SrnRightFutureOrA}{12}
21993
+ \newcommand{\SrnRightFutureOrB}{13}
21994
+ \newcommand{\SrnRightNullableOne}{14}
21995
+ \newcommand{\SrnRightNullableTwo}{15}
21996
+ \newcommand{\SrnLeftPromotedVariable}{16}
21997
+ \newcommand{\SrnLeftVariableBound}{17}
21998
+ \newcommand{\SrnRightFunction}{18}
21999
+ \newcommand{\SrnPositionalFunctionType}{19}
22000
+ \newcommand{\SrnNamedFunctionType}{20}
22001
+ \newcommand{\SrnCovariance}{21}
22002
+ \newcommand{\SrnSuperinterface}{22}
22005
22003
22006
22004
\begin{figure}[p]
22007
22005
\def\VSP{\vspace{4mm}}
@@ -22014,55 +22012,95 @@ \subsection{Subtypes}
22014
22012
\centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22015
22013
\def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22016
22014
%
22015
+ % ----------------------------------------------------------------------
22016
+ % Omitted rules stated here, with justification for
22017
+ % the omission.
22018
+ % ------------------------------------------------ Right Object 1
22019
+ % Not needed unless algorithmic: Instance of
22020
+ % \SrnLeftVariableBound.
22021
+ % \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22022
+ % \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22023
+ % }{X}{\code{Object}}
22024
+ % ------------------------------------------------ Right Object 2
22025
+ % Not needed unless algorithmic: Instance of
22026
+ % \SrnLeftPromotedVariable.
22027
+ % \RuleRaw{\SrnRightObjectTwo}{}{%
22028
+ % \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22029
+ % ------------------------------------------------ Right Object 3
22030
+ % Not needed unless algorithmic: Derivable from
22031
+ % \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
22032
+ % Future<S> <: Object).
22033
+ % \RuleRaw{\SrnRightObjectThree}{}{%
22034
+ % \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22035
+ % ----------------------------------------------------------------------
22017
22036
\begin{minipage}[c]{0.49\textwidth}
22018
- \Axiom{\SrnReflexivity}{Reflexivity}{T}{T}
22019
- \Axiom{\SrnBottom}{Left Bottom}{\code{Never}}{T}
22020
- \RuleRaw{\SrnRightObjectTwo}{Right Object 2}{%
22021
- \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22022
- \RuleRaw{\SrnRightObjectThree}{Right Object 3}{%
22023
- \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22024
- \Axiom{\SrnNullOne}{Left Null One}{\code{Null}}{\code{$T$?}}
22037
+ % ------------------------------------------------ Reflexivity
22038
+ \Axiom{\SrnReflexivity}{}{T}{T}
22039
+ \ExtraVSP
22040
+ % ------------------------------------------------ Left Top
22041
+ % Non-algorithmic justification for this rule: Needed
22042
+ % to prove dynamic/void <: FutureOr<Object>?.
22043
+ \RuleRaw{\SrnLeftTop}{}{%
22044
+ S \in \{\DYNAMIC, \VOID\}\\
22045
+ \SubtypeStd{\code{Object?}}{T}}{S}{T}
22046
+ % ------------------------------------------------ Left Bottom
22047
+ \Axiom{\SrnBottom}{}{\code{Never}}{T}
22048
+ % ------------------------------------------------ Left Null 1
22049
+ \Axiom{\SrnNullOne}{}{\code{Null}}{\code{$T$?}}
22025
22050
\end{minipage}
22026
22051
\begin{minipage}[c]{0.49\textwidth}
22027
- \RuleRaw{\SrnRightTop}{Right Top}{%
22052
+ % ------------------------------------------------ Right Top
22053
+ \RuleRaw{\SrnRightTop}{}{%
22028
22054
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
22029
- \RuleRaw{\SrnLeftTop}{Left Top}{%
22030
- S \in \{\DYNAMIC, \VOID\} & \SubtypeStd{\code{Object?}}{T}}{S}{T}
22031
- \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22032
- \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22033
- }{X}{\code{Object}}
22034
- \RuleRaw{\SrnRightObjectFour}{Right Object 4}{%
22055
+ % ------------------------------------------------ Right Object 4
22056
+ \RuleRaw{\SrnRightObjectFour}{}{%
22035
22057
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
22036
- \mbox{$S$ is not of the form \code{$U$?}, $X$, %
22037
- \code{$X$\,\&\,$U$}, \code{FutureOr<$U$>}}}{S}{\code{Object}}
22038
- \Rule{\SrnNullTwo}{Left Null Two}{\code{Null}}{T}{%
22058
+ \mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
22059
+ \mbox{\code{$X$\,\&\,$U$}, %
22060
+ or \code{FutureOr<$U$>}}}{S}{\code{Object}}
22061
+ % ------------------------------------------------ Left Null 2
22062
+ \Rule{\SrnNullTwo}{}{\code{Null}}{T}{%
22039
22063
\code{Null}}{\code{FutureOr<$T$>}}
22040
22064
\end{minipage}
22041
22065
22042
22066
\begin{minipage}[c]{0.49\textwidth}
22043
- \RuleTwo{\SrnLeftFutureOr}{Left FutureOr}{S}{T}{%
22044
- \code{Future<$S$>}}{T}{\code{FutureOr<$S$>}}{T}
22045
- \RuleTwo{\SrnRightPromotedVariable}{Right Promoted Variable}{S}{X}{S}{T}{%
22067
+ % ------------------------------------------------ Left FutureOr
22068
+ \RuleTwo{\SrnLeftFutureOr}{}{%
22069
+ \code{Future<$S$>}}{T}{S}{T}{%
22070
+ \code{FutureOr<$S$>}}{T}
22071
+ % ------------------------------------------------ Right Promoted Variable
22072
+ \RuleTwo{\SrnRightPromotedVariable}{}{S}{X}{S}{T}{%
22046
22073
S}{X \& T}
22047
- \Rule{\SrnRightFutureOrB}{Right FutureOr B}{S}{T}{S}{\code{FutureOr<$T$>}}
22048
- \Rule{\SrnRightNullableTwo}{Right Nullable 2}{S}{\code{Null}}{S}{%
22074
+ % ------------------------------------------------ Right FutureOr B
22075
+ \Rule{\SrnRightFutureOrB}{}{S}{T}{S}{%
22076
+ \code{FutureOr<$T$>}}
22077
+ % ------------------------------------------------ Right Nullable 2
22078
+ \Rule{\SrnRightNullableTwo}{}{S}{\code{Null}}{S}{%
22049
22079
\code{$T$?}}
22050
- \Rule{\SrnLeftVariableBound}{Left Variable Bound}{\Gamma(X)}{T}{X}{T}
22080
+ % ------------------------------------------------ Left Variable Bound
22081
+ \Rule{\SrnLeftVariableBound}{}{\Gamma(X)}{T}{X}{T}
22051
22082
\end{minipage}
22052
22083
\begin{minipage}[c]{0.49\textwidth}
22053
- \RuleTwo{\SrnLeftNullable}{Left Nullable}{S}{T}{\code{Null}}{T}{
22084
+ % ------------------------------------------------ Left Nullable
22085
+ \RuleTwo{\SrnLeftNullable}{}{S}{T}{\code{Null}}{T}{%
22054
22086
\code{$S$?}}{T}
22055
- \Axiom{\SrnTypeVariableReflexivityA}{Left Promoted Variable A}{X \& S}{X}
22056
- \Rule{\SrnRightFutureOrA}{Right FutureOr A}{S}{\code{Future<$T$>}}{%
22057
- S}{\code{FutureOr<$T$>}}
22058
- \Rule{\SrnRightNullableOne}{Right Nullable 1}{S}{T}{S}{\code{$T$?}}
22059
- \Rule{\SrnLeftPromotedVariable}{Left Promoted Variable B}{S}{T}{X \& S}{T}
22060
- \RuleRaw{\SrnRightFunction}{Right Function}{T\mbox{ is a function type}}{%
22061
- T}{\FUNCTION}
22087
+ % ------------------------------------------------ Left Promoted Variable A
22088
+ \Axiom{\SrnTypeVariableReflexivityA}{}{X \& S}{X}
22089
+ % ------------------------------------------------ Right FutureOr A
22090
+ \Rule{\SrnRightFutureOrA}{}{S}{%
22091
+ \code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
22092
+ % ------------------------------------------------ Right Nullable 1
22093
+ \Rule{\SrnRightNullableOne}{}{S}{T}{S}{\code{$T$?}}
22094
+ % ------------------------------------------------ Left Promoted Variable B
22095
+ \Rule{\SrnLeftPromotedVariable}{}{S}{T}{X \& S}{T}
22096
+ % ------------------------------------------------ Right Function
22097
+ \RuleRaw{\SrnRightFunction}{}{%
22098
+ T\mbox{ is a function type}}{T}{\FUNCTION}
22062
22099
\end{minipage}
22063
22100
%
22064
22101
\ExtraVSP
22065
- \RuleRawRaw{\SrnPositionalFunctionType}{Positional Function Types}{%
22102
+ % ------------------------------------------------ Positional Function Type
22103
+ \RuleRawRaw{\SrnPositionalFunctionType}{}{%
22066
22104
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22067
22105
\Subtype{\Gamma'}{S_0}{T_0} \\
22068
22106
n_1 \leq n_2 &
@@ -22073,7 +22111,8 @@ \subsection{Subtypes}
22073
22111
\RawFunctionTypePositional{T_0}{X}{B}{s}{T}{n_2}{k_2}
22074
22112
\end{array}}
22075
22113
\ExtraVSP\ExtraVSP
22076
- \RuleRawRaw{\SrnNamedFunctionType}{Named Function Types}{%
22114
+ % ------------------------------------------------ Named Function Type
22115
+ \RuleRawRaw{\SrnNamedFunctionType}{}{%
22077
22116
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22078
22117
\Subtype{\Gamma'}{S_0}{T_0} &
22079
22118
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22086,14 +22125,15 @@ \subsection{Subtypes}
22086
22125
\end{array}}
22087
22126
%
22088
22127
\ExtraVSP
22089
- \RuleRaw{\SrnCovariance}{Covariance}{%
22090
- \code{\CLASS{} $C$<\TypeParametersNoBounds{X}{s}>\,\ldots\,\{\}} &
22091
- \forall j \in 1 .. s\!:\;\SubtypeStd{S_j}{T_j}}{%
22128
+ % ------------------------------------------------ Covariance
22129
+ \RuleRaw{\SrnCovariance}{}{%
22130
+ \mbox{$C$ is an interface type with $s$ type parameters} &
22131
+ \SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
22092
22132
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
22093
22133
\ExtraVSP
22094
- %% !!! Should include mixins (and other non-class interface types, if any).
22095
- \RuleRaw{\SrnSuperinterface}{Superinterface }{%
22096
- \code{\CLASS{} $C$<\TypeParametersNoBounds {X}{s}>\,\ldots\,\{\ }}\\
22134
+ % ------------------------------------------------ Superinterface
22135
+ \RuleRaw{\SrnSuperinterface}{}{%
22136
+ \mbox{ $C$ is an interface type with type parameters \List {X}{1}{s }}\\
22097
22137
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
22098
22138
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%
22099
22139
\code{$C$<\List{S}{1}{s}>}\;}{\;T}
@@ -23459,7 +23499,7 @@ \subsubsection{Standard Upper Bounds and Standard Lower Bounds}
23459
23499
\DefEquals{\UpperBoundType{$T_1$}{$T_2$}}{T_2},
23460
23500
if \SubtypeNE{T_1}{T_2}.
23461
23501
23462
- \commentary{
23502
+ \commentary{%
23463
23503
In this and in the following cases, both types must be interface types.%
23464
23504
}
23465
23505
\item
@@ -23716,7 +23756,7 @@ \subsubsection{Standard Upper Bounds and Standard Lower Bounds}
23716
23756
\DefEquals{\LowerBoundType{$T_1$}{$T_2$}}{\code{Never}}, otherwise.
23717
23757
\end{itemize}
23718
23758
23719
- \rationale{
23759
+ \rationale{%
23720
23760
The rules defining \UpperBoundTypeName{} and \LowerBoundTypeName{}
23721
23761
are somewhat redundant in that they explicitly specify
23722
23762
a lot of pairs of symmetric cases.
0 commit comments