Skip to content

Commit dd035f3

Browse files
committed
Rebase
1 parent a5bf7ad commit dd035f3

File tree

1 file changed

+37
-33
lines changed

1 file changed

+37
-33
lines changed

specification/dartLangSpec.tex

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22452,104 +22452,108 @@ \subsection{Subtypes}
2245222452
\begin{figure}[p]
2245322453
\def\VSP{\vspace{4mm}}
2245422454
\def\ExtraVSP{\vspace{2mm}}
22455-
\def\Axiom#1#2#3#4{\centerline{\inference[#1]{}{\SubtypeStd{#3}{#4}}}\VSP}
22456-
\def\Rule#1#2#3#4#5#6{\centerline{\inference[#1]{\SubtypeStd{#3}{#4}}{\SubtypeStd{#5}{#6}}}\VSP}
22457-
\def\RuleTwo#1#2#3#4#5#6#7#8{%
22458-
\centerline{\inference[#1]{\SubtypeStd{#3}{#4} & \SubtypeStd{#5}{#6}}{\SubtypeStd{#7}{#8}}}\VSP}
22459-
\def\RuleRaw#1#2#3#4#5{%
22460-
\centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22461-
\def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22455+
\def\Axiom#1#2#3{\centerline{\inference[#1]{}{\SubtypeStd{#2}{#3}}}\VSP}
22456+
\def\Rule#1#2#3#4#5{%
22457+
\centerline{\inference[#1]{\SubtypeStd{#2}{#3}}{\SubtypeStd{#4}{#5}}}\VSP}
22458+
\def\RuleTwo#1#2#3#4#5#6#7{%
22459+
\centerline{\inference[#1]{\SubtypeStd{#2}{#3} & %
22460+
\SubtypeStd{#4}{#5}}{\SubtypeStd{#6}{#7}}}\VSP}
22461+
\def\RuleRaw#1#2#3#4{%
22462+
\centerline{\inference[#1]{#2}{\SubtypeStd{#3}{#4}}}\VSP}
22463+
\def\RuleRawRaw#1#2#3{\centerline{\inference[#1]{#2}{#3}}\VSP}
2246222464
%
2246322465
% ----------------------------------------------------------------------
2246422466
% Omitted rules stated here, with justification for
2246522467
% the omission.
2246622468
% ------------------------------------------------ Right Object 1
2246722469
% Not needed unless algorithmic: Instance of
2246822470
% \SrnLeftVariableBound.
22469-
% \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22471+
% \RuleRaw{\SrnRightObjectOne}{%
2247022472
% \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
2247122473
% }{X}{\code{Object}}
2247222474
% ------------------------------------------------ Right Object 2
2247322475
% Not needed unless algorithmic: Instance of
2247422476
% \SrnLeftPromotedVariable.
22475-
% \RuleRaw{\SrnRightObjectTwo}{}{%
22476-
% \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22477+
% \RuleRaw{\SrnRightObjectTwo}{%
22478+
% \SubtypeStd{S}{\code{Object}}}{%
22479+
% \code{$X$\,\&\,$S$}}{\code{Object}}
2247722480
% ------------------------------------------------ Right Object 3
2247822481
% Not needed unless algorithmic: Derivable from
2247922482
% \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
2248022483
% Future<S> <: Object).
22481-
% \RuleRaw{\SrnRightObjectThree}{}{%
22482-
% \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22484+
% \RuleRaw{\SrnRightObjectThree}{%
22485+
% \SubtypeStd{S}{\code{Object}}}{%
22486+
% \code{FutureOr<$S$>}}{\code{Object}}
2248322487
% ----------------------------------------------------------------------
2248422488
\begin{minipage}[c]{0.49\textwidth}
2248522489
% ------------------------------------------------ Reflexivity
22486-
\Axiom{\SrnReflexivity}{}{T}{T}
22490+
\Axiom{\SrnReflexivity}{T}{T}
2248722491
\ExtraVSP
2248822492
% ------------------------------------------------ Left Top
2248922493
% Non-algorithmic justification for this rule: Needed
2249022494
% to prove dynamic/void <: FutureOr<Object>?.
22491-
\RuleRaw{\SrnLeftTop}{}{%
22495+
\RuleRaw{\SrnLeftTop}{%
2249222496
S \in \{\DYNAMIC, \VOID\}\\
2249322497
\SubtypeStd{\code{Object?}}{T}}{S}{T}
2249422498
% ------------------------------------------------ Left Bottom
22495-
\Axiom{\SrnBottom}{}{\code{Never}}{T}
22499+
\Axiom{\SrnBottom}{\code{Never}}{T}
2249622500
% ------------------------------------------------ Left Null 1
22497-
\Axiom{\SrnNullOne}{}{\code{Null}}{\code{$T$?}}
22501+
\Axiom{\SrnNullOne}{\code{Null}}{\code{$T$?}}
2249822502
\end{minipage}
2249922503
\begin{minipage}[c]{0.49\textwidth}
2250022504
% ------------------------------------------------ Right Top
22501-
\RuleRaw{\SrnRightTop}{}{%
22505+
\RuleRaw{\SrnRightTop}{%
2250222506
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
2250322507
% ------------------------------------------------ Right Object 4
22504-
\RuleRaw{\SrnRightObjectFour}{}{%
22508+
\RuleRaw{\SrnRightObjectFour}{%
2250522509
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
2250622510
\mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
2250722511
\mbox{\code{$X$\,\&\,$U$}, %
2250822512
or \code{FutureOr<$U$>}}}{S}{\code{Object}}
2250922513
% ------------------------------------------------ Left Null 2
22510-
\Rule{\SrnNullTwo}{}{\code{Null}}{T}{%
22514+
\Rule{\SrnNullTwo}{\code{Null}}{T}{%
2251122515
\code{Null}}{\code{FutureOr<$T$>}}
2251222516
\end{minipage}
2251322517

2251422518
\begin{minipage}[c]{0.49\textwidth}
2251522519
% ------------------------------------------------ Left FutureOr
22516-
\RuleTwo{\SrnLeftFutureOr}{}{%
22520+
\RuleTwo{\SrnLeftFutureOr}{%
2251722521
\code{Future<$S$>}}{T}{S}{T}{%
2251822522
\code{FutureOr<$S$>}}{T}
2251922523
% ------------------------------------------------ Right Promoted Variable
22520-
\RuleTwo{\SrnRightPromotedVariable}{}{S}{X}{S}{T}{%
22524+
\RuleTwo{\SrnRightPromotedVariable}{S}{X}{S}{T}{%
2252122525
S}{X \& T}
2252222526
% ------------------------------------------------ Right FutureOr B
22523-
\Rule{\SrnRightFutureOrB}{}{S}{T}{S}{%
22527+
\Rule{\SrnRightFutureOrB}{S}{T}{S}{%
2252422528
\code{FutureOr<$T$>}}
2252522529
% ------------------------------------------------ Right Nullable 2
22526-
\Rule{\SrnRightNullableTwo}{}{S}{\code{Null}}{S}{%
22530+
\Rule{\SrnRightNullableTwo}{S}{\code{Null}}{S}{%
2252722531
\code{$T$?}}
2252822532
% ------------------------------------------------ Left Variable Bound
2252922533
\Rule{\SrnLeftVariableBound}{}{\Delta(X)}{T}{X}{T}
2253022534
\end{minipage}
2253122535
\begin{minipage}[c]{0.49\textwidth}
2253222536
% ------------------------------------------------ Left Nullable
22533-
\RuleTwo{\SrnLeftNullable}{}{S}{T}{\code{Null}}{T}{%
22537+
\RuleTwo{\SrnLeftNullable}{S}{T}{\code{Null}}{T}{%
2253422538
\code{$S$?}}{T}
2253522539
% ------------------------------------------------ Left Promoted Variable A
22536-
\Axiom{\SrnTypeVariableReflexivityA}{}{X \& S}{X}
22540+
\Axiom{\SrnTypeVariableReflexivityA}{X \& S}{X}
2253722541
% ------------------------------------------------ Right FutureOr A
22538-
\Rule{\SrnRightFutureOrA}{}{S}{%
22542+
\Rule{\SrnRightFutureOrA}{S}{%
2253922543
\code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
2254022544
% ------------------------------------------------ Right Nullable 1
22541-
\Rule{\SrnRightNullableOne}{}{S}{T}{S}{\code{$T$?}}
22545+
\Rule{\SrnRightNullableOne}{S}{T}{S}{\code{$T$?}}
2254222546
% ------------------------------------------------ Left Promoted Variable B
22543-
\Rule{\SrnLeftPromotedVariable}{}{S}{T}{X \& S}{T}
22547+
\Rule{\SrnLeftPromotedVariable}{S}{T}{X \& S}{T}
2254422548
% ------------------------------------------------ Right Function
22545-
\RuleRaw{\SrnRightFunction}{}{%
22549+
\RuleRaw{\SrnRightFunction}{%
2254622550
T\mbox{ is a function type}}{T}{\FUNCTION}
2254722551
\end{minipage}
2254822552
%
2254922553
\ExtraVSP
2255022554
% ------------------------------------------------ Positional Function Type
2255122555
\RuleRawRaw{\SrnPositionalFunctionType}{}{%
22552-
\Gamma' = \Delta\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22556+
\Delta' = \Delta\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2255322557
\Subtype{\Delta'}{S_0}{T_0} \\
2255422558
n_1 \leq n_2 &
2255522559
n_1 + k_1 \geq n_2 + k_2 &
@@ -22561,7 +22565,7 @@ \subsection{Subtypes}
2256122565
\ExtraVSP\ExtraVSP
2256222566
% ------------------------------------------------ Named Function Type
2256322567
\RuleRawRaw{\SrnNamedFunctionType}{}{%
22564-
\Gamma' = \Delta\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22568+
\Delta' = \Delta\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2256522569
\Subtype{\Delta'}{S_0}{T_0} &
2256622570
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
2256722571
\{\,\List{y}{n+1}{n+k_2}\,\} \subseteq \{\,\List{x}{n+1}{n+k_1}\,\} \\
@@ -22574,13 +22578,13 @@ \subsection{Subtypes}
2257422578
%
2257522579
\ExtraVSP
2257622580
% ------------------------------------------------ Covariance
22577-
\RuleRaw{\SrnCovariance}{}{%
22581+
\RuleRaw{\SrnCovariance}{%
2257822582
\mbox{$C$ is an interface type with $s$ type parameters} &
2257922583
\SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
2258022584
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
2258122585
\ExtraVSP
2258222586
% ------------------------------------------------ Superinterface
22583-
\RuleRaw{\SrnSuperinterface}{}{%
22587+
\RuleRaw{\SrnSuperinterface}{%
2258422588
\mbox{$C$ is an interface type with type parameters \List{X}{1}{s}}\\
2258522589
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
2258622590
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%

0 commit comments

Comments
 (0)