1 | % T I T L E P A G E
|
---|
2 | % -------------------
|
---|
3 | % Last updated August 16, 2022, by IST-Client Services
|
---|
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 Type Resolution in \CFA}
|
---|
17 |
|
---|
18 | \vspace*{1.0cm}
|
---|
19 |
|
---|
20 | \normalsize
|
---|
21 | by \\
|
---|
22 |
|
---|
23 | \vspace*{1.0cm}
|
---|
24 |
|
---|
25 | \Large
|
---|
26 | Fangren Yu \\
|
---|
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 | Master of Mathematics \\
|
---|
36 | in \\
|
---|
37 | Computer Science \\
|
---|
38 |
|
---|
39 | \vspace*{2.0cm}
|
---|
40 |
|
---|
41 | Waterloo, Ontario, Canada, \the\year \\
|
---|
42 |
|
---|
43 | \vspace*{1.0cm}
|
---|
44 |
|
---|
45 | \copyright\ Fangren Yu \the\year \\
|
---|
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 | \phantomsection % allows hyperref to link to the correct page
|
---|
56 |
|
---|
57 | \begin{comment}
|
---|
58 | % E X A M I N I N G C O M M I T T E E (Required for Ph.D. theses only)
|
---|
59 | % Remove or comment out the lines below to remove this page
|
---|
60 | \addcontentsline{toc}{chapter}{Examining Committee}
|
---|
61 | \begin{center}\textbf{Examining Committee Membership}\end{center}
|
---|
62 | \noindent
|
---|
63 | The following served on the Examining Committee for this thesis. The decision of the Examining Committee is by majority vote.
|
---|
64 | \bigskip
|
---|
65 |
|
---|
66 | \noindent
|
---|
67 | \begin{tabbing}
|
---|
68 | Internal-External Member: \= \kill % using longest text to define tab length
|
---|
69 | External Examiner: \> Bruce Bruce \\
|
---|
70 | \> Professor, Dept. of Philosophy of Zoology, University of Wallamaloo \\
|
---|
71 | \end{tabbing}
|
---|
72 | \bigskip
|
---|
73 |
|
---|
74 | \noindent
|
---|
75 | \begin{tabbing}
|
---|
76 | Internal-External Member: \= \kill % using longest text to define tab length
|
---|
77 | Supervisor(s): \> Ann Elk \\
|
---|
78 | \> Professor, Dept. of Zoology, University of Waterloo \\
|
---|
79 | \> Andrea Anaconda \\
|
---|
80 | \> Professor Emeritus, Dept. of Zoology, University of Waterloo \\
|
---|
81 | \end{tabbing}
|
---|
82 | \bigskip
|
---|
83 |
|
---|
84 | \noindent
|
---|
85 | \begin{tabbing}
|
---|
86 | Internal-External Member: \= \kill % using longest text to define tab length
|
---|
87 | Internal Member: \> Pamela Python \\
|
---|
88 | \> Professor, Dept. of Zoology, University of Waterloo \\
|
---|
89 | \end{tabbing}
|
---|
90 | \bigskip
|
---|
91 |
|
---|
92 | \noindent
|
---|
93 | \begin{tabbing}
|
---|
94 | Internal-External Member: \= \kill % using longest text to define tab length
|
---|
95 | Internal-External Member: \> Meta Meta \\
|
---|
96 | \> Professor, Dept. of Philosophy, University of Waterloo \\
|
---|
97 | \end{tabbing}
|
---|
98 | \bigskip
|
---|
99 |
|
---|
100 | \noindent
|
---|
101 | \begin{tabbing}
|
---|
102 | Internal-External Member: \= \kill % using longest text to define tab length
|
---|
103 | Other Member(s): \> Leeping Fang \\
|
---|
104 | \> Professor, Dept. of Fine Art, University of Waterloo \\
|
---|
105 | \end{tabbing}
|
---|
106 |
|
---|
107 | \cleardoublepage
|
---|
108 | \end{comment}
|
---|
109 |
|
---|
110 | % D E C L A R A T I O N P A G E
|
---|
111 | % -------------------------------
|
---|
112 | % The following is a sample Declaration Page as provided by the GSO
|
---|
113 | % December 13th, 2006. It is designed for an electronic thesis.
|
---|
114 | \addcontentsline{toc}{chapter}{Author's Declaration}
|
---|
115 | \begin{center}\textbf{Author's Declaration}\end{center}
|
---|
116 |
|
---|
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 | \phantomsection % allows hyperref to link to the correct page
|
---|
127 |
|
---|
128 | % A B S T R A C T
|
---|
129 | % ---------------
|
---|
130 | \addcontentsline{toc}{chapter}{Abstract}
|
---|
131 | \begin{center}\textbf{Abstract}\end{center}
|
---|
132 |
|
---|
133 | \CFA (C-for-all) is an evolutionary extension of the C programming language, which introduces many modern programming language features to C.
|
---|
134 | \CFA has a type system built around parametric polymorphism, and the polymorphic functions are prefixed by a @forall@ declaration of type parameters, giving the language its name.
|
---|
135 |
|
---|
136 | This thesis presents a series of work I did on type resolution in \CFA.
|
---|
137 | Every function, including the built-in C operators, can be overloaded in \CFA, therefore resolving function overloads and generic type parameters is at the heart of \CFA expression analysis.
|
---|
138 | This thesis focuses on the interactions of various \CFA language features such as reference and generic types in type resolution, analyzes the known issues and presents improvements to the type system that fix several of the problems.
|
---|
139 | Ideas for future work are also given for further improving the consistency of the \CFA type-system at a language design level.
|
---|
140 |
|
---|
141 | \cleardoublepage
|
---|
142 | \phantomsection % allows hyperref to link to the correct page
|
---|
143 |
|
---|
144 | % A C K N O W L E D G E M E N T S
|
---|
145 | % -------------------------------
|
---|
146 | \addcontentsline{toc}{chapter}{Acknowledgements}
|
---|
147 | \begin{center}\textbf{Acknowledgements}\end{center}
|
---|
148 |
|
---|
149 | I would like to thank my supervisor Peter Buhr for his long-term support of my research, Ondrej Lhotak and Gregor Richards for reading and polishing this thesis, and most importantly, everyone in the \CFA team for actively pushing the limits of \CFA's type system. This work would not have been possible without the insights from the actual development practices. A special mention goes to Aaron Moss for laying the foundation of my work and helping me understand the working details of his prototype experiments.
|
---|
150 |
|
---|
151 | Finally, a special thank you to Huawei Canada for funding this work.
|
---|
152 |
|
---|
153 | \cleardoublepage
|
---|
154 | \phantomsection % allows hyperref to link to the correct page
|
---|
155 |
|
---|
156 | \begin{comment}
|
---|
157 | % D E D I C A T I O N
|
---|
158 | % -------------------
|
---|
159 | \addcontentsline{toc}{chapter}{Dedication}
|
---|
160 | \begin{center}\textbf{Dedication}\end{center}
|
---|
161 |
|
---|
162 | This is dedicated to the one I love.
|
---|
163 | \cleardoublepage
|
---|
164 | \end{comment}
|
---|
165 |
|
---|
166 | % T A B L E O F C O N T E N T S
|
---|
167 | % ---------------------------------
|
---|
168 | \renewcommand\contentsname{Table of Contents}
|
---|
169 | \tableofcontents
|
---|
170 | \cleardoublepage
|
---|
171 | \phantomsection % allows hyperref to link to the correct page
|
---|
172 |
|
---|
173 | % L I S T O F F I G U R E S
|
---|
174 | % -----------------------------
|
---|
175 | \addcontentsline{toc}{chapter}{List of Figures}
|
---|
176 | \listoffigures
|
---|
177 | \cleardoublepage
|
---|
178 | \phantomsection % allows hyperref to link to the correct page
|
---|
179 |
|
---|
180 | % L I S T O F T A B L E S
|
---|
181 | % ---------------------------
|
---|
182 | \addcontentsline{toc}{chapter}{List of Tables}
|
---|
183 | \listoftables
|
---|
184 | \cleardoublepage
|
---|
185 | \phantomsection % allows hyperref to link to the correct page
|
---|
186 |
|
---|
187 | \begin{comment}
|
---|
188 | % L I S T O F A B B R E V I A T I O N S
|
---|
189 | % ---------------------------
|
---|
190 | \renewcommand*{\abbreviationsname}{List of Abbreviations}
|
---|
191 | \printglossary[type=abbreviations]
|
---|
192 | \cleardoublepage
|
---|
193 | \phantomsection % allows hyperref to link to the correct page
|
---|
194 |
|
---|
195 | % L I S T O F S Y M B O L S
|
---|
196 | % ---------------------------
|
---|
197 | \printglossary[type=symbols]
|
---|
198 | \cleardoublepage
|
---|
199 | \phantomsection % allows hyperref to link to the correct page
|
---|
200 | \end{comment}
|
---|
201 |
|
---|
202 | % Change page numbering back to Arabic numerals
|
---|
203 | \pagenumbering{arabic}
|
---|