Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(868)

Side by Side Diff: docs/language/dartLangSpec.tex

Issue 2802633002: Fix text around least upper bound. (Closed)
Patch Set: Address comments. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 \documentclass{article} 1 \documentclass{article}
2 \usepackage{epsfig} 2 \usepackage{epsfig}
3 \usepackage{color} 3 \usepackage{color}
4 \usepackage{dart} 4 \usepackage{dart}
5 \usepackage{bnf} 5 \usepackage{bnf}
6 \usepackage{hyperref} 6 \usepackage{hyperref}
7 \usepackage{lmodern} 7 \usepackage{lmodern}
8 \usepackage[T1]{fontenc} 8 \usepackage[T1]{fontenc}
9 \newcommand{\code}[1]{{\sf #1}} 9 \newcommand{\code}[1]{{\sf #1}}
10 \title{Dart Programming Language Specification \\ 10 \title{Dart Programming Language Specification \\
(...skipping 7773 matching lines...) Expand 10 before | Expand all | Expand 10 after
7784 \begin{itemize} 7784 \begin{itemize}
7785 \item $[A_1, \ldots, A_n/U_1, \ldots, U_n]T$ if $d$ depends on type parameters $U_1, \ldots, U_n$, and $A_i$ is the value of $U_i, 1 \le i \le n$. 7785 \item $[A_1, \ldots, A_n/U_1, \ldots, U_n]T$ if $d$ depends on type parameters $U_1, \ldots, U_n$, and $A_i$ is the value of $U_i, 1 \le i \le n$.
7786 \item $T$ otherwise. 7786 \item $T$ otherwise.
7787 \end{itemize} 7787 \end{itemize}
7788 7788
7789 \subsubsection{Least Upper Bounds} 7789 \subsubsection{Least Upper Bounds}
7790 \LMLabel{leastUpperBounds} 7790 \LMLabel{leastUpperBounds}
7791 7791
7792 \LMHash{} 7792 \LMHash{}
7793 % does this diverge in some cases? 7793 % does this diverge in some cases?
7794 Given two interfaces $I$ and $J$, let $S_I$ be the set of superinterfaces of $I$ , let $S_J$ be the set of superinterfaces of $J$ and let $S = (I \cup S_I) \ca p (J \cup S_J)$. Furthermore, we define $S_n = \{T | T \in S \wedge depth(T) = n\}$ for any finite $n$ %, and $k=max(depth(T_1), \ldots, depth(T_m)), T_i \in S , i \in 1..m$, 7794 Given two interfaces $I$ and $J$,
7795 where $depth(T)$ is the number of steps in the longest inheritance path from $T$ to \code{Object}. Let $q$ be the largest number such that $S_q$ has cardinality one. The least upper bound of $I$ and $J$ is the sole element of $S_q$. 7795 let $S_I$ be the set of superinterfaces of $I$,
7796 let $S_J$ be the set of superinterfaces of $J$
7797 and let $S = (\{I\} \cup S_I) \cap (\{J\} \cup S_J)$.
7798 Furthermore,
7799 we define $S_n = \{T | T \in S \wedge depth(T) = n\}$ for any finite $n$
7800 where $depth(T)$ is the number of steps in the longest inheritance path
7801 from $T$ to \code{Object}.
7802 %TODO(lrn): Specify that "inheritance path" is a path in the superinterface grap h.
7803 Let $q$ be the largest number such that $S_q$ has cardinality one,
7804 which must exist because $S_0$ is $\{\code{Object}\}$.
7805 The least upper bound of $I$ and $J$ is the sole element of $S_q$.
7796 7806
7797 \LMHash{} 7807 \LMHash{}
7798 The least upper bound of \DYNAMIC{} and any type $T$ is \DYNAMIC{}. 7808 The least upper bound of \DYNAMIC{} and any type $T$ is \DYNAMIC{}.
7799 The least upper bound of \VOID{} and any type $T \ne \DYNAMIC{}$ is \VOID{}. 7809 The least upper bound of \VOID{} and any type $T \ne \DYNAMIC{}$ is \VOID{}.
7800 The least upper bound of $\bot$ and any type $T$ is $T$. 7810 The least upper bound of $\bot$ and any type $T$ is $T$.
7801 Let $U$ be a type variable with upper bound $B$. The least upper bound of $U$ an d a type $T \ne \bot$ is the least upper bound of $B$ and $T$. 7811 Let $U$ be a type variable with upper bound $B$. The least upper bound of $U$ an d a type $T \ne \bot$ is the least upper bound of $B$ and $T$.
7802 7812
7803 \LMHash{} 7813 \LMHash{}
7804 The least upper bound relation is symmetric and reflexive. 7814 The least upper bound operation is commutative and idempotent,
7815 but it is not associative.
7805 7816
7806 % Function types 7817 % Function types
7807 7818
7808 \LMHash{} 7819 \LMHash{}
7809 The least upper bound of a function type and an interface type $T$ is the least upper bound of \cd{Function} and $T$. 7820 The least upper bound of a function type and an interface type $T$ is the least upper bound of \cd{Function} and $T$.
7810 Let $F$ and $G$ be function types. If $F$ and $G$ differ in their number of requ ired parameters, then the least upper bound of $F$ and $G$ is \cd{Function}. Ot herwise: 7821 Let $F$ and $G$ be function types. If $F$ and $G$ differ in their number of requ ired parameters, then the least upper bound of $F$ and $G$ is \cd{Function}. Ot herwise:
7811 \begin{itemize} 7822 \begin{itemize}
7812 \item If 7823 \item If
7813 7824
7814 $F= (T_1 \ldots T_r, [T_{r+1}, \ldots, T_n]) \longrightarrow T_0$, 7825 $F= (T_1 \ldots T_r, [T_{r+1}, \ldots, T_n]) \longrightarrow T_0$,
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
8133 8144
8134 The invariant that each normative paragraph is associated with a line 8145 The invariant that each normative paragraph is associated with a line
8135 containing the text \LMHash{} should be maintained. Extra occurrences 8146 containing the text \LMHash{} should be maintained. Extra occurrences
8136 of \LMHash{} can be added if needed, e.g., in order to make 8147 of \LMHash{} can be added if needed, e.g., in order to make
8137 individual \item{}s in itemized lists addressable. Each \LM.. command 8148 individual \item{}s in itemized lists addressable. Each \LM.. command
8138 must occur on a separate line. \LMHash{} must occur immediately 8149 must occur on a separate line. \LMHash{} must occur immediately
8139 before the associated paragraph, and \LMLabel must occur immediately 8150 before the associated paragraph, and \LMLabel must occur immediately
8140 after the associated \section{}, \subsection{} etc. 8151 after the associated \section{}, \subsection{} etc.
8141 8152
8142 ---------------------------------------------------------------------- 8153 ----------------------------------------------------------------------
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698