[2a9d12d] | 1 | % T I T L E P A G E |
---|
| 2 | % ------------------- |
---|
| 3 | |
---|
| 4 | % The title page is counted as page `i' but we need to suppress the |
---|
| 5 | % page number. Also, we don't want any headers or footers. |
---|
| 6 | \pagestyle{empty} |
---|
| 7 | \pagenumbering{roman} |
---|
| 8 | |
---|
| 9 | % The contents of the title page are specified in the "titlepage" |
---|
| 10 | % environment. |
---|
| 11 | \begin{titlepage} |
---|
| 12 | \begin{center} |
---|
| 13 | \vspace*{1.0cm} |
---|
| 14 | |
---|
| 15 | \Huge |
---|
| 16 | {\bf \CFA{} Type System Implementation } |
---|
| 17 | |
---|
| 18 | \vspace*{1.0cm} |
---|
| 19 | |
---|
| 20 | \normalsize |
---|
| 21 | by \\ |
---|
| 22 | |
---|
| 23 | \vspace*{1.0cm} |
---|
| 24 | |
---|
| 25 | \Large |
---|
| 26 | Aaron Moss \\ |
---|
| 27 | |
---|
| 28 | \vspace*{3.0cm} |
---|
| 29 | |
---|
| 30 | \normalsize |
---|
| 31 | A thesis \\ |
---|
| 32 | presented to the University of Waterloo \\ |
---|
| 33 | in fulfillment of the \\ |
---|
| 34 | thesis requirement for the degree of \\ |
---|
| 35 | Doctor of Philosophy \\ |
---|
| 36 | in \\ |
---|
| 37 | Computer Science \\ |
---|
| 38 | |
---|
| 39 | \vspace*{2.0cm} |
---|
| 40 | |
---|
| 41 | Waterloo, Ontario, Canada, 2019 \\ |
---|
| 42 | |
---|
| 43 | \vspace*{1.0cm} |
---|
| 44 | |
---|
| 45 | \copyright\ Aaron Moss 2019 \\ |
---|
| 46 | \end{center} |
---|
| 47 | \end{titlepage} |
---|
| 48 | |
---|
| 49 | % The rest of the front pages should contain no headers and be numbered using Roman numerals starting with `ii' |
---|
| 50 | \pagestyle{plain} |
---|
| 51 | \setcounter{page}{2} |
---|
| 52 | |
---|
| 53 | \cleardoublepage % Ends the current page and causes all figures and tables that have so far appeared in the input to be printed. |
---|
| 54 | % In a two-sided printing style, it also makes the next page a right-hand (odd-numbered) page, producing a blank page if necessary. |
---|
| 55 | |
---|
| 56 | % E X A M I N I N G C O M M I T T E E |
---|
| 57 | % ------------------------------------- |
---|
| 58 | |
---|
| 59 | \begin{center}\textbf{Examining Committee Membership}\end{center} |
---|
| 60 | \noindent |
---|
| 61 | The following served on the Examining Committee for this thesis. The decision of the Examining Committee is by majority vote. |
---|
| 62 | \bigskip |
---|
| 63 | |
---|
[3fad907] | 64 | \noindent |
---|
| 65 | \begin{tabbing} |
---|
| 66 | Internal-External Member: \= \kill % using longest text to define tab length |
---|
| 67 | External Examiner: \> Doug Lea \\ |
---|
| 68 | \> Professor, Computer Science Department, \\ |
---|
| 69 | \> State Univesity of New York at Oswego \\ |
---|
| 70 | \end{tabbing} |
---|
| 71 | \bigskip |
---|
[2a9d12d] | 72 | |
---|
| 73 | \noindent |
---|
| 74 | \begin{tabbing} |
---|
| 75 | Internal-External Member: \= \kill % using longest text to define tab length |
---|
| 76 | Supervisor: \> Peter Buhr \\ |
---|
[3fad907] | 77 | \> Associate Professor, School of Computer Science, \\ |
---|
| 78 | \> University of Waterloo \\ |
---|
[2a9d12d] | 79 | \end{tabbing} |
---|
| 80 | \bigskip |
---|
| 81 | |
---|
| 82 | \noindent |
---|
| 83 | \begin{tabbing} |
---|
| 84 | Internal-External Member: \= \kill % using longest text to define tab length |
---|
[3fad907] | 85 | Internal Members: \> Ond\v{r}ej Lhot\a'ak \\ |
---|
| 86 | \> Associate Professor, School of Computer Science, \\ |
---|
| 87 | \>University of Waterloo \\ |
---|
| 88 | \\ |
---|
| 89 | \> Gregor Richards \\ |
---|
| 90 | \> Assistant Professor, School of Computer Science, \\ |
---|
| 91 | \> University of Waterloo \\ |
---|
[2a9d12d] | 92 | \end{tabbing} |
---|
[3fad907] | 93 | \bigskip |
---|
[2a9d12d] | 94 | |
---|
[3fad907] | 95 | \noindent |
---|
| 96 | \begin{tabbing} |
---|
| 97 | Internal-External Member: \= \kill % using longest text to define tab length |
---|
| 98 | Internal-External Member: \> Werner Dietl \\ |
---|
| 99 | \> Assistant Professor, Electrical and Computer Engineering, \\ |
---|
| 100 | \> University of Waterloo \\ |
---|
| 101 | \end{tabbing} |
---|
| 102 | % \bigskip |
---|
[2a9d12d] | 103 | |
---|
| 104 | % \noindent |
---|
| 105 | % \begin{tabbing} |
---|
| 106 | % Internal-External Member: \= \kill % using longest text to define tab length |
---|
| 107 | % Other Member(s): \> Leeping Fang \\ |
---|
| 108 | % \> Professor, Dept. of Fine Art, University of Waterloo \\ |
---|
| 109 | % \end{tabbing} |
---|
| 110 | |
---|
| 111 | \cleardoublepage |
---|
| 112 | |
---|
| 113 | % D E C L A R A T I O N P A G E |
---|
| 114 | % ------------------------------- |
---|
| 115 | % The following is a sample Delaration Page as provided by the GSO |
---|
| 116 | % December 13th, 2006. It is designed for an electronic thesis. |
---|
| 117 | \noindent |
---|
| 118 | I hereby declare that I am the sole author of this thesis. This is a true copy of the thesis, including any required final revisions, as accepted by my examiners. |
---|
| 119 | |
---|
| 120 | \bigskip |
---|
| 121 | |
---|
| 122 | \noindent |
---|
| 123 | I understand that my thesis may be made electronically available to the public. |
---|
| 124 | |
---|
| 125 | \cleardoublepage |
---|
| 126 | |
---|
| 127 | % A B S T R A C T |
---|
| 128 | % --------------- |
---|
| 129 | |
---|
| 130 | \begin{center}\textbf{Abstract}\end{center} |
---|
| 131 | |
---|
[11b3053] | 132 | The C programming language has been an important software development tool for decades. |
---|
| 133 | \CFA{} is a new programming language designed with strong backwards-compatibility to take advantage of widely distributed C programming expertise and the large deployed base of C code, paired with modern language features to improve developer productivity. |
---|
| 134 | |
---|
| 135 | This thesis presents a number of improvements to \CFA{}. |
---|
| 136 | The author has developed one major new language feature, generic types, in a way that integrates naturally with both the existing polymorphism features of \CFA{} and the translation-unit-based encapsulation model of C. |
---|
| 137 | This thesis also presents a number of smaller refinements to the \CFA{} overload resolution rules, each of which improves the expressivity or intuitive nature of the language. |
---|
| 138 | |
---|
| 139 | This thesis also includes a number of practical improvements to \CFA{} compilation performance, focused on the expression resolution pass which is the main bottleneck. |
---|
| 140 | These include better algorithms for argument-parameter matching and type assertion satisfaction, as well as a new type environment data structure based on a novel variant of union-find. |
---|
| 141 | The compilation performance improvements have all been experimentally validated with a new prototype system which encapsulates the key aspects of the \CFA{} language; this prototype is a promising basis for future research, and is a technical contribution of this work. |
---|
[2a9d12d] | 142 | |
---|
| 143 | \cleardoublepage |
---|
| 144 | |
---|
| 145 | % A C K N O W L E D G E M E N T S |
---|
| 146 | % ------------------------------- |
---|
| 147 | |
---|
[6e4411f] | 148 | \begin{center}\textbf{Acknowledgements}\end{center} |
---|
[2a9d12d] | 149 | |
---|
[6e4411f] | 150 | Though a doctoral thesis is an individual project, I could not have completed it without the help and support of many members of my community. |
---|
| 151 | This thesis would not exist in the form it does without the mentorship of my advisor, Peter Buhr, who has ably led the \CFA{} team while giving me both the advantage of his decades of experience and the freedom to follow my own interests. |
---|
| 152 | My work on \CFA{} does not exist in a vaccuum, and it has been a pleasure and a privilege to collaborate with the members of the \CFA{} team: Andrew Beach, Richard Bilson, Michael Brooks, Bryan Chan, Thierry Delisle, Glen Ditchfield, Brice Dobry, Rob Schluntz, and others. |
---|
[6a787f8] | 153 | I gratefully acknowledge the financial support of the National Science and Engineering Council of Canada and Huawei Ltd.\ for this project. |
---|
[3fad907] | 154 | I would also like to thank of my thesis committee, Doug Lea, Ond\v{r}ej Lhot\a'ak, Gregor Richards, and Werner Dietl, for the time and effort they have invested in providing constructive feedback to refine this work. |
---|
[6e4411f] | 155 | I am indebted to Peter van Beek and Ian Munro for their algorithmic expertise and willingness to share their time with me. |
---|
| 156 | I have far too many colleagues in the Programming Languages Group and School of Computer Science to name, but I deeply appreciate their camaradarie; specifically with regard to the production of this thesis, I would like to thank Nathan Fish for recommending my writing soundtrack, and Sharon Choy for her unfailing supply of encouraging rabbit animations. |
---|
| 157 | Finally, to all my friends and family who have supported me and made Kitchener-Waterloo home these past seven years, thank you, I could not have done it without you; most especially, Christina Moss, you are the best of wives and best of women, your support has kept me going through the ups and downs of research, and your partnership is key to all my successes. |
---|
| 158 | |
---|
| 159 | \cleardoublepage |
---|
[2a9d12d] | 160 | |
---|
| 161 | % D E D I C A T I O N |
---|
| 162 | % ------------------- |
---|
| 163 | |
---|
| 164 | % \begin{center}\textbf{Dedication}\end{center} |
---|
| 165 | |
---|
[6e4411f] | 166 | % To Christina, who has spent too many hours politely listening to me work out the technical minutiae of this thesis, I love you, and I won't make you read it. |
---|
| 167 | |
---|
[2a9d12d] | 168 | % \cleardoublepage |
---|
| 169 | |
---|
| 170 | % T A B L E O F C O N T E N T S |
---|
| 171 | % --------------------------------- |
---|
| 172 | \renewcommand\contentsname{Table of Contents} |
---|
| 173 | \tableofcontents |
---|
| 174 | \cleardoublepage |
---|
| 175 | \phantomsection % allows hyperref to link to the correct page |
---|
| 176 | |
---|
| 177 | % L I S T O F T A B L E S |
---|
| 178 | % --------------------------- |
---|
[514247d] | 179 | \addcontentsline{toc}{chapter}{List of Tables} |
---|
| 180 | \listoftables |
---|
| 181 | \cleardoublepage |
---|
| 182 | \phantomsection % allows hyperref to link to the correct page |
---|
[2a9d12d] | 183 | |
---|
| 184 | % L I S T O F F I G U R E S |
---|
| 185 | % ----------------------------- |
---|
[48b7085e] | 186 | \addcontentsline{toc}{chapter}{List of Figures} |
---|
| 187 | \listoffigures |
---|
| 188 | \cleardoublepage |
---|
| 189 | \phantomsection % allows hyperref to link to the correct page |
---|
[2a9d12d] | 190 | |
---|
| 191 | % GLOSSARIES (Lists of definitions, abbreviations, symbols, etc. provided by the glossaries-extra package) |
---|
| 192 | % ----------------------------- |
---|
| 193 | % \printglossaries |
---|
| 194 | % \cleardoublepage |
---|
| 195 | % \phantomsection % allows hyperref to link to the correct page |
---|
| 196 | |
---|
| 197 | % Change page numbering back to Arabic numerals |
---|
| 198 | \pagenumbering{arabic} |
---|