Skip to content

Commit 7cc97e4

Browse files
committed
Rebase
1 parent 90618a0 commit 7cc97e4

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
@@ -22004,103 +22004,107 @@ \subsection{Subtypes}
2200422004
\begin{figure}[p]
2200522005
\def\VSP{\vspace{4mm}}
2200622006
\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}
2201422016
%
2201522017
% ----------------------------------------------------------------------
2201622018
% Omitted rules stated here, with justification for
2201722019
% the omission.
2201822020
% ------------------------------------------------ Right Object 1
2201922021
% Not needed unless algorithmic: Instance of
2202022022
% \SrnLeftVariableBound.
22021-
% \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22023+
% \RuleRaw{\SrnRightObjectOne}{%
2202222024
% \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
2202322025
% }{X}{\code{Object}}
2202422026
% ------------------------------------------------ Right Object 2
2202522027
% Not needed unless algorithmic: Instance of
2202622028
% \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}}
2202922032
% ------------------------------------------------ Right Object 3
2203022033
% Not needed unless algorithmic: Derivable from
2203122034
% \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
2203222035
% 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}}
2203522039
% ----------------------------------------------------------------------
2203622040
\begin{minipage}[c]{0.49\textwidth}
2203722041
% ------------------------------------------------ Reflexivity
22038-
\Axiom{\SrnReflexivity}{}{T}{T}
22042+
\Axiom{\SrnReflexivity}{T}{T}
2203922043
\ExtraVSP
2204022044
% ------------------------------------------------ Left Top
2204122045
% Non-algorithmic justification for this rule: Needed
2204222046
% to prove dynamic/void <: FutureOr<Object>?.
22043-
\RuleRaw{\SrnLeftTop}{}{%
22047+
\RuleRaw{\SrnLeftTop}{%
2204422048
S \in \{\DYNAMIC, \VOID\}\\
2204522049
\SubtypeStd{\code{Object?}}{T}}{S}{T}
2204622050
% ------------------------------------------------ Left Bottom
22047-
\Axiom{\SrnBottom}{}{\code{Never}}{T}
22051+
\Axiom{\SrnBottom}{\code{Never}}{T}
2204822052
% ------------------------------------------------ Left Null 1
22049-
\Axiom{\SrnNullOne}{}{\code{Null}}{\code{$T$?}}
22053+
\Axiom{\SrnNullOne}{\code{Null}}{\code{$T$?}}
2205022054
\end{minipage}
2205122055
\begin{minipage}[c]{0.49\textwidth}
2205222056
% ------------------------------------------------ Right Top
22053-
\RuleRaw{\SrnRightTop}{}{%
22057+
\RuleRaw{\SrnRightTop}{%
2205422058
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
2205522059
% ------------------------------------------------ Right Object 4
22056-
\RuleRaw{\SrnRightObjectFour}{}{%
22060+
\RuleRaw{\SrnRightObjectFour}{%
2205722061
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
2205822062
\mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
2205922063
\mbox{\code{$X$\,\&\,$U$}, %
2206022064
or \code{FutureOr<$U$>}}}{S}{\code{Object}}
2206122065
% ------------------------------------------------ Left Null 2
22062-
\Rule{\SrnNullTwo}{}{\code{Null}}{T}{%
22066+
\Rule{\SrnNullTwo}{\code{Null}}{T}{%
2206322067
\code{Null}}{\code{FutureOr<$T$>}}
2206422068
\end{minipage}
2206522069

2206622070
\begin{minipage}[c]{0.49\textwidth}
2206722071
% ------------------------------------------------ Left FutureOr
22068-
\RuleTwo{\SrnLeftFutureOr}{}{%
22072+
\RuleTwo{\SrnLeftFutureOr}{%
2206922073
\code{Future<$S$>}}{T}{S}{T}{%
2207022074
\code{FutureOr<$S$>}}{T}
2207122075
% ------------------------------------------------ Right Promoted Variable
22072-
\RuleTwo{\SrnRightPromotedVariable}{}{S}{X}{S}{T}{%
22076+
\RuleTwo{\SrnRightPromotedVariable}{S}{X}{S}{T}{%
2207322077
S}{X \& T}
2207422078
% ------------------------------------------------ Right FutureOr B
22075-
\Rule{\SrnRightFutureOrB}{}{S}{T}{S}{%
22079+
\Rule{\SrnRightFutureOrB}{S}{T}{S}{%
2207622080
\code{FutureOr<$T$>}}
2207722081
% ------------------------------------------------ Right Nullable 2
22078-
\Rule{\SrnRightNullableTwo}{}{S}{\code{Null}}{S}{%
22082+
\Rule{\SrnRightNullableTwo}{S}{\code{Null}}{S}{%
2207922083
\code{$T$?}}
2208022084
% ------------------------------------------------ Left Variable Bound
22081-
\Rule{\SrnLeftVariableBound}{}{\Gamma(X)}{T}{X}{T}
22085+
\Rule{\SrnLeftVariableBound}{\Gamma(X)}{T}{X}{T}
2208222086
\end{minipage}
2208322087
\begin{minipage}[c]{0.49\textwidth}
2208422088
% ------------------------------------------------ Left Nullable
22085-
\RuleTwo{\SrnLeftNullable}{}{S}{T}{\code{Null}}{T}{%
22089+
\RuleTwo{\SrnLeftNullable}{S}{T}{\code{Null}}{T}{%
2208622090
\code{$S$?}}{T}
2208722091
% ------------------------------------------------ Left Promoted Variable A
22088-
\Axiom{\SrnTypeVariableReflexivityA}{}{X \& S}{X}
22092+
\Axiom{\SrnTypeVariableReflexivityA}{X \& S}{X}
2208922093
% ------------------------------------------------ Right FutureOr A
22090-
\Rule{\SrnRightFutureOrA}{}{S}{%
22094+
\Rule{\SrnRightFutureOrA}{S}{%
2209122095
\code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
2209222096
% ------------------------------------------------ Right Nullable 1
22093-
\Rule{\SrnRightNullableOne}{}{S}{T}{S}{\code{$T$?}}
22097+
\Rule{\SrnRightNullableOne}{S}{T}{S}{\code{$T$?}}
2209422098
% ------------------------------------------------ Left Promoted Variable B
22095-
\Rule{\SrnLeftPromotedVariable}{}{S}{T}{X \& S}{T}
22099+
\Rule{\SrnLeftPromotedVariable}{S}{T}{X \& S}{T}
2209622100
% ------------------------------------------------ Right Function
22097-
\RuleRaw{\SrnRightFunction}{}{%
22101+
\RuleRaw{\SrnRightFunction}{%
2209822102
T\mbox{ is a function type}}{T}{\FUNCTION}
2209922103
\end{minipage}
2210022104
%
2210122105
\ExtraVSP
2210222106
% ------------------------------------------------ Positional Function Type
22103-
\RuleRawRaw{\SrnPositionalFunctionType}{}{%
22107+
\RuleRawRaw{\SrnPositionalFunctionType}{%
2210422108
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2210522109
\Subtype{\Gamma'}{S_0}{T_0} \\
2210622110
n_1 \leq n_2 &
@@ -22112,7 +22116,7 @@ \subsection{Subtypes}
2211222116
\end{array}}
2211322117
\ExtraVSP\ExtraVSP
2211422118
% ------------------------------------------------ Named Function Type
22115-
\RuleRawRaw{\SrnNamedFunctionType}{}{%
22119+
\RuleRawRaw{\SrnNamedFunctionType}{%
2211622120
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2211722121
\Subtype{\Gamma'}{S_0}{T_0} &
2211822122
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22126,13 +22130,13 @@ \subsection{Subtypes}
2212622130
%
2212722131
\ExtraVSP
2212822132
% ------------------------------------------------ Covariance
22129-
\RuleRaw{\SrnCovariance}{}{%
22133+
\RuleRaw{\SrnCovariance}{%
2213022134
\mbox{$C$ is an interface type with $s$ type parameters} &
2213122135
\SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
2213222136
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
2213322137
\ExtraVSP
2213422138
% ------------------------------------------------ Superinterface
22135-
\RuleRaw{\SrnSuperinterface}{}{%
22139+
\RuleRaw{\SrnSuperinterface}{%
2213622140
\mbox{$C$ is an interface type with type parameters \List{X}{1}{s}}\\
2213722141
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
2213822142
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%

0 commit comments

Comments
 (0)