Skip to content

Commit 4439261

Browse files
committed
Rebase
1 parent b67dabd commit 4439261

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
@@ -22269,103 +22269,107 @@ \subsection{Subtypes}
2226922269
\begin{figure}[p]
2227022270
\def\VSP{\vspace{4mm}}
2227122271
\def\ExtraVSP{\vspace{2mm}}
22272-
\def\Axiom#1#2#3#4{\centerline{\inference[#1]{}{\SubtypeStd{#3}{#4}}}\VSP}
22273-
\def\Rule#1#2#3#4#5#6{\centerline{\inference[#1]{\SubtypeStd{#3}{#4}}{\SubtypeStd{#5}{#6}}}\VSP}
22274-
\def\RuleTwo#1#2#3#4#5#6#7#8{%
22275-
\centerline{\inference[#1]{\SubtypeStd{#3}{#4} & \SubtypeStd{#5}{#6}}{\SubtypeStd{#7}{#8}}}\VSP}
22276-
\def\RuleRaw#1#2#3#4#5{%
22277-
\centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22278-
\def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22272+
\def\Axiom#1#2#3{\centerline{\inference[#1]{}{\SubtypeStd{#2}{#3}}}\VSP}
22273+
\def\Rule#1#2#3#4#5{%
22274+
\centerline{\inference[#1]{\SubtypeStd{#2}{#3}}{\SubtypeStd{#4}{#5}}}\VSP}
22275+
\def\RuleTwo#1#2#3#4#5#6#7{%
22276+
\centerline{\inference[#1]{\SubtypeStd{#2}{#3} & %
22277+
\SubtypeStd{#4}{#5}}{\SubtypeStd{#6}{#7}}}\VSP}
22278+
\def\RuleRaw#1#2#3#4{%
22279+
\centerline{\inference[#1]{#2}{\SubtypeStd{#3}{#4}}}\VSP}
22280+
\def\RuleRawRaw#1#2#3{\centerline{\inference[#1]{#2}{#3}}\VSP}
2227922281
%
2228022282
% ----------------------------------------------------------------------
2228122283
% Omitted rules stated here, with justification for
2228222284
% the omission.
2228322285
% ------------------------------------------------ Right Object 1
2228422286
% Not needed unless algorithmic: Instance of
2228522287
% \SrnLeftVariableBound.
22286-
% \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22288+
% \RuleRaw{\SrnRightObjectOne}{%
2228722289
% \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
2228822290
% }{X}{\code{Object}}
2228922291
% ------------------------------------------------ Right Object 2
2229022292
% Not needed unless algorithmic: Instance of
2229122293
% \SrnLeftPromotedVariable.
22292-
% \RuleRaw{\SrnRightObjectTwo}{}{%
22293-
% \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22294+
% \RuleRaw{\SrnRightObjectTwo}{%
22295+
% \SubtypeStd{S}{\code{Object}}}{%
22296+
% \code{$X$\,\&\,$S$}}{\code{Object}}
2229422297
% ------------------------------------------------ Right Object 3
2229522298
% Not needed unless algorithmic: Derivable from
2229622299
% \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
2229722300
% Future<S> <: Object).
22298-
% \RuleRaw{\SrnRightObjectThree}{}{%
22299-
% \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22301+
% \RuleRaw{\SrnRightObjectThree}{%
22302+
% \SubtypeStd{S}{\code{Object}}}{%
22303+
% \code{FutureOr<$S$>}}{\code{Object}}
2230022304
% ----------------------------------------------------------------------
2230122305
\begin{minipage}[c]{0.49\textwidth}
2230222306
% ------------------------------------------------ Reflexivity
22303-
\Axiom{\SrnReflexivity}{}{T}{T}
22307+
\Axiom{\SrnReflexivity}{T}{T}
2230422308
\ExtraVSP
2230522309
% ------------------------------------------------ Left Top
2230622310
% Non-algorithmic justification for this rule: Needed
2230722311
% to prove dynamic/void <: FutureOr<Object>?.
22308-
\RuleRaw{\SrnLeftTop}{}{%
22312+
\RuleRaw{\SrnLeftTop}{%
2230922313
S \in \{\DYNAMIC, \VOID\}\\
2231022314
\SubtypeStd{\code{Object?}}{T}}{S}{T}
2231122315
% ------------------------------------------------ Left Bottom
22312-
\Axiom{\SrnBottom}{}{\code{Never}}{T}
22316+
\Axiom{\SrnBottom}{\code{Never}}{T}
2231322317
% ------------------------------------------------ Left Null 1
22314-
\Axiom{\SrnNullOne}{}{\code{Null}}{\code{$T$?}}
22318+
\Axiom{\SrnNullOne}{\code{Null}}{\code{$T$?}}
2231522319
\end{minipage}
2231622320
\begin{minipage}[c]{0.49\textwidth}
2231722321
% ------------------------------------------------ Right Top
22318-
\RuleRaw{\SrnRightTop}{}{%
22322+
\RuleRaw{\SrnRightTop}{%
2231922323
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
2232022324
% ------------------------------------------------ Right Object 4
22321-
\RuleRaw{\SrnRightObjectFour}{}{%
22325+
\RuleRaw{\SrnRightObjectFour}{%
2232222326
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
2232322327
\mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
2232422328
\mbox{\code{$X$\,\&\,$U$}, %
2232522329
or \code{FutureOr<$U$>}}}{S}{\code{Object}}
2232622330
% ------------------------------------------------ Left Null 2
22327-
\Rule{\SrnNullTwo}{}{\code{Null}}{T}{%
22331+
\Rule{\SrnNullTwo}{\code{Null}}{T}{%
2232822332
\code{Null}}{\code{FutureOr<$T$>}}
2232922333
\end{minipage}
2233022334

2233122335
\begin{minipage}[c]{0.49\textwidth}
2233222336
% ------------------------------------------------ Left FutureOr
22333-
\RuleTwo{\SrnLeftFutureOr}{}{%
22337+
\RuleTwo{\SrnLeftFutureOr}{%
2233422338
\code{Future<$S$>}}{T}{S}{T}{%
2233522339
\code{FutureOr<$S$>}}{T}
2233622340
% ------------------------------------------------ Right Promoted Variable
22337-
\RuleTwo{\SrnRightPromotedVariable}{}{S}{X}{S}{T}{%
22341+
\RuleTwo{\SrnRightPromotedVariable}{S}{X}{S}{T}{%
2233822342
S}{X \& T}
2233922343
% ------------------------------------------------ Right FutureOr B
22340-
\Rule{\SrnRightFutureOrB}{}{S}{T}{S}{%
22344+
\Rule{\SrnRightFutureOrB}{S}{T}{S}{%
2234122345
\code{FutureOr<$T$>}}
2234222346
% ------------------------------------------------ Right Nullable 2
22343-
\Rule{\SrnRightNullableTwo}{}{S}{\code{Null}}{S}{%
22347+
\Rule{\SrnRightNullableTwo}{S}{\code{Null}}{S}{%
2234422348
\code{$T$?}}
2234522349
% ------------------------------------------------ Left Variable Bound
22346-
\Rule{\SrnLeftVariableBound}{}{\Gamma(X)}{T}{X}{T}
22350+
\Rule{\SrnLeftVariableBound}{\Gamma(X)}{T}{X}{T}
2234722351
\end{minipage}
2234822352
\begin{minipage}[c]{0.49\textwidth}
2234922353
% ------------------------------------------------ Left Nullable
22350-
\RuleTwo{\SrnLeftNullable}{}{S}{T}{\code{Null}}{T}{%
22354+
\RuleTwo{\SrnLeftNullable}{S}{T}{\code{Null}}{T}{%
2235122355
\code{$S$?}}{T}
2235222356
% ------------------------------------------------ Left Promoted Variable A
22353-
\Axiom{\SrnTypeVariableReflexivityA}{}{X \& S}{X}
22357+
\Axiom{\SrnTypeVariableReflexivityA}{X \& S}{X}
2235422358
% ------------------------------------------------ Right FutureOr A
22355-
\Rule{\SrnRightFutureOrA}{}{S}{%
22359+
\Rule{\SrnRightFutureOrA}{S}{%
2235622360
\code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
2235722361
% ------------------------------------------------ Right Nullable 1
22358-
\Rule{\SrnRightNullableOne}{}{S}{T}{S}{\code{$T$?}}
22362+
\Rule{\SrnRightNullableOne}{S}{T}{S}{\code{$T$?}}
2235922363
% ------------------------------------------------ Left Promoted Variable B
22360-
\Rule{\SrnLeftPromotedVariable}{}{S}{T}{X \& S}{T}
22364+
\Rule{\SrnLeftPromotedVariable}{S}{T}{X \& S}{T}
2236122365
% ------------------------------------------------ Right Function
22362-
\RuleRaw{\SrnRightFunction}{}{%
22366+
\RuleRaw{\SrnRightFunction}{%
2236322367
T\mbox{ is a function type}}{T}{\FUNCTION}
2236422368
\end{minipage}
2236522369
%
2236622370
\ExtraVSP
2236722371
% ------------------------------------------------ Positional Function Type
22368-
\RuleRawRaw{\SrnPositionalFunctionType}{}{%
22372+
\RuleRawRaw{\SrnPositionalFunctionType}{%
2236922373
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2237022374
\Subtype{\Gamma'}{S_0}{T_0} \\
2237122375
n_1 \leq n_2 &
@@ -22377,7 +22381,7 @@ \subsection{Subtypes}
2237722381
\end{array}}
2237822382
\ExtraVSP\ExtraVSP
2237922383
% ------------------------------------------------ Named Function Type
22380-
\RuleRawRaw{\SrnNamedFunctionType}{}{%
22384+
\RuleRawRaw{\SrnNamedFunctionType}{%
2238122385
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2238222386
\Subtype{\Gamma'}{S_0}{T_0} &
2238322387
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22391,13 +22395,13 @@ \subsection{Subtypes}
2239122395
%
2239222396
\ExtraVSP
2239322397
% ------------------------------------------------ Covariance
22394-
\RuleRaw{\SrnCovariance}{}{%
22398+
\RuleRaw{\SrnCovariance}{%
2239522399
\mbox{$C$ is an interface type with $s$ type parameters} &
2239622400
\SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
2239722401
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
2239822402
\ExtraVSP
2239922403
% ------------------------------------------------ Superinterface
22400-
\RuleRaw{\SrnSuperinterface}{}{%
22404+
\RuleRaw{\SrnSuperinterface}{%
2240122405
\mbox{$C$ is an interface type with type parameters \List{X}{1}{s}}\\
2240222406
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
2240322407
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%

0 commit comments

Comments
 (0)