[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, \\ |
---|
[e71272a] | 69 | \> State University of New York at Oswego \\ |
---|
[3fad907] | 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 | |
---|
[e402bbc] | 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 that encapsulates the key aspects of the \CFA{} language; this prototype is a promising basis for future research and a technical contribution of this work. |
---|
[2a9d12d] | 142 | |
---|
[e71272a] | 143 | \CFA{}, extended and refined in this thesis, presents both an independently interesting combination of language features and a comprehensive approach to the modernization of C. |
---|
[c4b5486] | 144 | This work demonstrates the hitherto unproven compiler-implementation viability of the \CFA{} language design, and provides a number of useful tools to implementors of other languages. |
---|
[e71272a] | 145 | |
---|
[2a9d12d] | 146 | \cleardoublepage |
---|
| 147 | |
---|
| 148 | % A C K N O W L E D G E M E N T S |
---|
| 149 | % ------------------------------- |
---|
| 150 | |
---|
[6e4411f] | 151 | \begin{center}\textbf{Acknowledgements}\end{center} |
---|
[2a9d12d] | 152 | |
---|
[6e4411f] | 153 | 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. |
---|
| 154 | 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. |
---|
[e402bbc] | 155 | |
---|
[e71272a] | 156 | My work on \CFA{} does not exist in a vacuum, 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] | 157 | I gratefully acknowledge the financial support of the National Science and Engineering Council of Canada and Huawei Ltd.\ for this project. |
---|
[e402bbc] | 158 | I would also like to thank of my thesis committee, Werner Dietl, Doug Lea, Ond\v{r}ej Lhot\a'ak, and Gregor Richards, for the time and effort they have invested in providing constructive feedback to refine this work. |
---|
[6e4411f] | 159 | I am indebted to Peter van Beek and Ian Munro for their algorithmic expertise and willingness to share their time with me. |
---|
[e71272a] | 160 | I have far too many colleagues in the Programming Languages Group and School of Computer Science to name, but I deeply appreciate their camaraderie; 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. |
---|
[e402bbc] | 161 | |
---|
[6e4411f] | 162 | 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. |
---|
| 163 | |
---|
| 164 | \cleardoublepage |
---|
[2a9d12d] | 165 | |
---|
| 166 | % D E D I C A T I O N |
---|
| 167 | % ------------------- |
---|
| 168 | |
---|
| 169 | % \begin{center}\textbf{Dedication}\end{center} |
---|
| 170 | |
---|
[6e4411f] | 171 | % 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. |
---|
| 172 | |
---|
[2a9d12d] | 173 | % \cleardoublepage |
---|
| 174 | |
---|
| 175 | % T A B L E O F C O N T E N T S |
---|
| 176 | % --------------------------------- |
---|
| 177 | \renewcommand\contentsname{Table of Contents} |
---|
| 178 | \tableofcontents |
---|
| 179 | \cleardoublepage |
---|
| 180 | \phantomsection % allows hyperref to link to the correct page |
---|
| 181 | |
---|
| 182 | % L I S T O F T A B L E S |
---|
| 183 | % --------------------------- |
---|
[514247d] | 184 | \addcontentsline{toc}{chapter}{List of Tables} |
---|
| 185 | \listoftables |
---|
| 186 | \cleardoublepage |
---|
| 187 | \phantomsection % allows hyperref to link to the correct page |
---|
[2a9d12d] | 188 | |
---|
| 189 | % L I S T O F F I G U R E S |
---|
| 190 | % ----------------------------- |
---|
[48b7085e] | 191 | \addcontentsline{toc}{chapter}{List of Figures} |
---|
| 192 | \listoffigures |
---|
| 193 | \cleardoublepage |
---|
| 194 | \phantomsection % allows hyperref to link to the correct page |
---|
[2a9d12d] | 195 | |
---|
| 196 | % GLOSSARIES (Lists of definitions, abbreviations, symbols, etc. provided by the glossaries-extra package) |
---|
| 197 | % ----------------------------- |
---|
| 198 | % \printglossaries |
---|
| 199 | % \cleardoublepage |
---|
| 200 | % \phantomsection % allows hyperref to link to the correct page |
---|
| 201 | |
---|
| 202 | % Change page numbering back to Arabic numerals |
---|
| 203 | \pagenumbering{arabic} |
---|