Skip to content

Commit 5eb637a

Browse files
committed
Rebase
1 parent 2526db5 commit 5eb637a

File tree

1 file changed

+38
-34
lines changed

1 file changed

+38
-34
lines changed

specification/dartLangSpec.tex

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22131,103 +22131,107 @@ \subsection{Subtypes}
2213122131
\begin{figure}[p]
2213222132
\def\VSP{\vspace{4mm}}
2213322133
\def\ExtraVSP{\vspace{2mm}}
22134-
\def\Axiom#1#2#3#4{\centerline{\inference[#1]{}{\SubtypeStd{#3}{#4}}}\VSP}
22135-
\def\Rule#1#2#3#4#5#6{\centerline{\inference[#1]{\SubtypeStd{#3}{#4}}{\SubtypeStd{#5}{#6}}}\VSP}
22136-
\def\RuleTwo#1#2#3#4#5#6#7#8{%
22137-
\centerline{\inference[#1]{\SubtypeStd{#3}{#4} & \SubtypeStd{#5}{#6}}{\SubtypeStd{#7}{#8}}}\VSP}
22138-
\def\RuleRaw#1#2#3#4#5{%
22139-
\centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22140-
\def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22134+
\def\Axiom#1#2#3{\centerline{\inference[#1]{}{\SubtypeStd{#2}{#3}}}\VSP}
22135+
\def\Rule#1#2#3#4#5{%
22136+
\centerline{\inference[#1]{\SubtypeStd{#2}{#3}}{\SubtypeStd{#4}{#5}}}\VSP}
22137+
\def\RuleTwo#1#2#3#4#5#6#7{%
22138+
\centerline{\inference[#1]{\SubtypeStd{#2}{#3} & %
22139+
\SubtypeStd{#4}{#5}}{\SubtypeStd{#6}{#7}}}\VSP}
22140+
\def\RuleRaw#1#2#3#4{%
22141+
\centerline{\inference[#1]{#2}{\SubtypeStd{#3}{#4}}}\VSP}
22142+
\def\RuleRawRaw#1#2#3{\centerline{\inference[#1]{#2}{#3}}\VSP}
2214122143
%
2214222144
% ----------------------------------------------------------------------
2214322145
% Omitted rules stated here, with justification for
2214422146
% the omission.
2214522147
% ------------------------------------------------ Right Object 1
2214622148
% Not needed unless algorithmic: Instance of
2214722149
% \SrnLeftVariableBound.
22148-
% \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22150+
% \RuleRaw{\SrnRightObjectOne}{%
2214922151
% \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
2215022152
% }{X}{\code{Object}}
2215122153
% ------------------------------------------------ Right Object 2
2215222154
% Not needed unless algorithmic: Instance of
2215322155
% \SrnLeftPromotedVariable.
22154-
% \RuleRaw{\SrnRightObjectTwo}{}{%
22155-
% \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22156+
% \RuleRaw{\SrnRightObjectTwo}{%
22157+
% \SubtypeStd{S}{\code{Object}}}{%
22158+
% \code{$X$\,\&\,$S$}}{\code{Object}}
2215622159
% ------------------------------------------------ Right Object 3
2215722160
% Not needed unless algorithmic: Derivable from
2215822161
% \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
2215922162
% Future<S> <: Object).
22160-
% \RuleRaw{\SrnRightObjectThree}{}{%
22161-
% \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22163+
% \RuleRaw{\SrnRightObjectThree}{%
22164+
% \SubtypeStd{S}{\code{Object}}}{%
22165+
% \code{FutureOr<$S$>}}{\code{Object}}
2216222166
% ----------------------------------------------------------------------
2216322167
\begin{minipage}[c]{0.49\textwidth}
2216422168
% ------------------------------------------------ Reflexivity
22165-
\Axiom{\SrnReflexivity}{}{T}{T}
22169+
\Axiom{\SrnReflexivity}{T}{T}
2216622170
\ExtraVSP
2216722171
% ------------------------------------------------ Left Top
2216822172
% Non-algorithmic justification for this rule: Needed
2216922173
% to prove dynamic/void <: FutureOr<Object>?.
22170-
\RuleRaw{\SrnLeftTop}{}{%
22174+
\RuleRaw{\SrnLeftTop}{%
2217122175
S \in \{\DYNAMIC, \VOID\}\\
2217222176
\SubtypeStd{\code{Object?}}{T}}{S}{T}
2217322177
% ------------------------------------------------ Left Bottom
22174-
\Axiom{\SrnBottom}{}{\code{Never}}{T}
22178+
\Axiom{\SrnBottom}{\code{Never}}{T}
2217522179
% ------------------------------------------------ Left Null 1
22176-
\Axiom{\SrnNullOne}{}{\code{Null}}{\code{$T$?}}
22180+
\Axiom{\SrnNullOne}{\code{Null}}{\code{$T$?}}
2217722181
\end{minipage}
2217822182
\begin{minipage}[c]{0.49\textwidth}
2217922183
% ------------------------------------------------ Right Top
22180-
\RuleRaw{\SrnRightTop}{}{%
22184+
\RuleRaw{\SrnRightTop}{%
2218122185
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
2218222186
% ------------------------------------------------ Right Object 4
22183-
\RuleRaw{\SrnRightObjectFour}{}{%
22187+
\RuleRaw{\SrnRightObjectFour}{%
2218422188
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
2218522189
\mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
2218622190
\mbox{\code{$X$\,\&\,$U$}, %
2218722191
or \code{FutureOr<$U$>}}}{S}{\code{Object}}
2218822192
% ------------------------------------------------ Left Null 2
22189-
\Rule{\SrnNullTwo}{}{\code{Null}}{T}{%
22193+
\Rule{\SrnNullTwo}{\code{Null}}{T}{%
2219022194
\code{Null}}{\code{FutureOr<$T$>}}
2219122195
\end{minipage}
2219222196

2219322197
\begin{minipage}[c]{0.49\textwidth}
2219422198
% ------------------------------------------------ Left FutureOr
22195-
\RuleTwo{\SrnLeftFutureOr}{}{%
22199+
\RuleTwo{\SrnLeftFutureOr}{%
2219622200
\code{Future<$S$>}}{T}{S}{T}{%
2219722201
\code{FutureOr<$S$>}}{T}
2219822202
% ------------------------------------------------ Right Promoted Variable
22199-
\RuleTwo{\SrnRightPromotedVariable}{}{S}{X}{S}{T}{%
22203+
\RuleTwo{\SrnRightPromotedVariable}{S}{X}{S}{T}{%
2220022204
S}{X \& T}
2220122205
% ------------------------------------------------ Right FutureOr B
22202-
\Rule{\SrnRightFutureOrB}{}{S}{T}{S}{%
22206+
\Rule{\SrnRightFutureOrB}{S}{T}{S}{%
2220322207
\code{FutureOr<$T$>}}
2220422208
% ------------------------------------------------ Right Nullable 2
22205-
\Rule{\SrnRightNullableTwo}{}{S}{\code{Null}}{S}{%
22209+
\Rule{\SrnRightNullableTwo}{S}{\code{Null}}{S}{%
2220622210
\code{$T$?}}
2220722211
% ------------------------------------------------ Left Variable Bound
22208-
\Rule{\SrnLeftVariableBound}{}{\Gamma(X)}{T}{X}{T}
22212+
\Rule{\SrnLeftVariableBound}{\Gamma(X)}{T}{X}{T}
2220922213
\end{minipage}
2221022214
\begin{minipage}[c]{0.49\textwidth}
2221122215
% ------------------------------------------------ Left Nullable
22212-
\RuleTwo{\SrnLeftNullable}{}{S}{T}{\code{Null}}{T}{%
22216+
\RuleTwo{\SrnLeftNullable}{S}{T}{\code{Null}}{T}{%
2221322217
\code{$S$?}}{T}
2221422218
% ------------------------------------------------ Left Promoted Variable A
22215-
\Axiom{\SrnTypeVariableReflexivityA}{}{X \& S}{X}
22219+
\Axiom{\SrnTypeVariableReflexivityA}{X \& S}{X}
2221622220
% ------------------------------------------------ Right FutureOr A
22217-
\Rule{\SrnRightFutureOrA}{}{S}{%
22221+
\Rule{\SrnRightFutureOrA}{S}{%
2221822222
\code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
2221922223
% ------------------------------------------------ Right Nullable 1
22220-
\Rule{\SrnRightNullableOne}{}{S}{T}{S}{\code{$T$?}}
22224+
\Rule{\SrnRightNullableOne}{S}{T}{S}{\code{$T$?}}
2222122225
% ------------------------------------------------ Left Promoted Variable B
22222-
\Rule{\SrnLeftPromotedVariable}{}{S}{T}{X \& S}{T}
22226+
\Rule{\SrnLeftPromotedVariable}{S}{T}{X \& S}{T}
2222322227
% ------------------------------------------------ Right Function
22224-
\RuleRaw{\SrnRightFunction}{}{%
22228+
\RuleRaw{\SrnRightFunction}{%
2222522229
T\mbox{ is a function type}}{T}{\FUNCTION}
2222622230
\end{minipage}
2222722231
%
2222822232
\ExtraVSP
2222922233
% ------------------------------------------------ Positional Function Type
22230-
\RuleRawRaw{\SrnPositionalFunctionType}{}{%
22234+
\RuleRawRaw{\SrnPositionalFunctionType}{%
2223122235
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2223222236
\Subtype{\Gamma'}{S_0}{T_0} \\
2223322237
n_1 \leq n_2 &
@@ -22239,7 +22243,7 @@ \subsection{Subtypes}
2223922243
\end{array}}
2224022244
\ExtraVSP\ExtraVSP
2224122245
% ------------------------------------------------ Named Function Type
22242-
\RuleRawRaw{\SrnNamedFunctionType}{}{%
22246+
\RuleRawRaw{\SrnNamedFunctionType}{%
2224322247
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2224422248
\Subtype{\Gamma'}{S_0}{T_0} &
2224522249
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22253,13 +22257,13 @@ \subsection{Subtypes}
2225322257
%
2225422258
\ExtraVSP
2225522259
% ------------------------------------------------ Covariance
22256-
\RuleRaw{\SrnCovariance}{}{%
22260+
\RuleRaw{\SrnCovariance}{%
2225722261
\mbox{$C$ is an interface type with $s$ type parameters} &
2225822262
\SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
2225922263
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
2226022264
\ExtraVSP
2226122265
% ------------------------------------------------ Superinterface
22262-
\RuleRaw{\SrnSuperinterface}{}{%
22266+
\RuleRaw{\SrnSuperinterface}{%
2226322267
\mbox{$C$ is an interface type with type parameters \List{X}{1}{s}}\\
2226422268
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
2226522269
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%

0 commit comments

Comments
 (0)