| [f28fdee] | 1 | % T I T L E   P A G E
 | 
|---|
 | 2 | % -------------------
 | 
|---|
 | 3 | % Last updated October 23, 2020, by Stephen Carr, 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 | 
 | 
|---|
| [29c9b23] | 15 |         {\Huge\bf Exception Handling in \CFA}
 | 
|---|
| [f28fdee] | 16 | 
 | 
|---|
 | 17 |         \vspace*{1.0cm}
 | 
|---|
 | 18 | 
 | 
|---|
 | 19 |         by \\
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 |         \vspace*{1.0cm}
 | 
|---|
 | 22 | 
 | 
|---|
| [29c9b23] | 23 |         {\Large Andrew James Beach} \\
 | 
|---|
| [f28fdee] | 24 | 
 | 
|---|
 | 25 |         \vspace*{3.0cm}
 | 
|---|
 | 26 | 
 | 
|---|
 | 27 |         A thesis \\
 | 
|---|
| [1c1c180] | 28 |         presented to the University of Waterloo \\
 | 
|---|
| [f28fdee] | 29 |         in fulfillment of the \\
 | 
|---|
 | 30 |         thesis requirement for the degree of \\
 | 
|---|
 | 31 |         Master of Mathematics \\
 | 
|---|
 | 32 |         in \\
 | 
|---|
 | 33 |         Computer Science \\
 | 
|---|
 | 34 | 
 | 
|---|
 | 35 |         \vspace*{2.0cm}
 | 
|---|
 | 36 | 
 | 
|---|
 | 37 |         Waterloo, Ontario, Canada, \the\year \\
 | 
|---|
 | 38 | 
 | 
|---|
 | 39 |         \vspace*{1.0cm}
 | 
|---|
 | 40 | 
 | 
|---|
| [29c9b23] | 41 |         \copyright{} Andrew James Beach \the\year \\
 | 
|---|
| [f28fdee] | 42 |         \end{center}
 | 
|---|
 | 43 | \end{titlepage}
 | 
|---|
 | 44 | 
 | 
|---|
| [1c1c180] | 45 | % The rest of the front pages should contain no headers and be numbered using
 | 
|---|
 | 46 | % Roman numerals starting with `ii'.
 | 
|---|
| [f28fdee] | 47 | \pagestyle{plain}
 | 
|---|
 | 48 | \setcounter{page}{2}
 | 
|---|
 | 49 | 
 | 
|---|
| [1c1c180] | 50 | \cleardoublepage % Ends the current page and causes all figures and tables
 | 
|---|
 | 51 | % that have so far appeared in the input to be printed. In a two-sided
 | 
|---|
 | 52 | % printing style, it also makes the next page a right-hand (odd-numbered)
 | 
|---|
 | 53 | % page, producing a blank page if necessary.
 | 
|---|
| [f28fdee] | 54 | 
 | 
|---|
| [1c1c180] | 55 | \begin{comment}
 | 
|---|
| [f28fdee] | 56 | % E X A M I N I N G   C O M M I T T E E (Required for Ph.D. theses only)
 | 
|---|
 | 57 | % Remove or comment out the lines below to remove this page
 | 
|---|
 | 58 | \begin{center}\textbf{Examining Committee Membership}\end{center}
 | 
|---|
 | 59 |   \noindent
 | 
|---|
| [1c1c180] | 60 | The following served on the Examining Committee for this thesis.
 | 
|---|
 | 61 | The decision of the Examining Committee is by majority vote.
 | 
|---|
| [f28fdee] | 62 |   \bigskip
 | 
|---|
| [1c1c180] | 63 | 
 | 
|---|
| [f28fdee] | 64 |   \noindent
 | 
|---|
 | 65 | \begin{tabbing}
 | 
|---|
 | 66 | Internal-External Member: \=  \kill % using longest text to define tab length
 | 
|---|
| [1c1c180] | 67 | External Examiner: \>  Bruce Bruce \\
 | 
|---|
| [f28fdee] | 68 | \> Professor, Dept. of Philosophy of Zoology, University of Wallamaloo \\
 | 
|---|
| [1c1c180] | 69 | \end{tabbing}
 | 
|---|
| [f28fdee] | 70 |   \bigskip
 | 
|---|
| [1c1c180] | 71 | 
 | 
|---|
| [f28fdee] | 72 |   \noindent
 | 
|---|
 | 73 | \begin{tabbing}
 | 
|---|
 | 74 | Internal-External Member: \=  \kill % using longest text to define tab length
 | 
|---|
 | 75 | Supervisor(s): \> Ann Elk \\
 | 
|---|
 | 76 | \> Professor, Dept. of Zoology, University of Waterloo \\
 | 
|---|
 | 77 | \> Andrea Anaconda \\
 | 
|---|
 | 78 | \> Professor Emeritus, Dept. of Zoology, University of Waterloo \\
 | 
|---|
 | 79 | \end{tabbing}
 | 
|---|
 | 80 |   \bigskip
 | 
|---|
| [1c1c180] | 81 | 
 | 
|---|
| [f28fdee] | 82 |   \noindent
 | 
|---|
 | 83 |   \begin{tabbing}
 | 
|---|
 | 84 | Internal-External Member: \=  \kill % using longest text to define tab length
 | 
|---|
 | 85 | Internal Member: \> Pamela Python \\
 | 
|---|
 | 86 | \> Professor, Dept. of Zoology, University of Waterloo \\
 | 
|---|
 | 87 | \end{tabbing}
 | 
|---|
 | 88 |   \bigskip
 | 
|---|
| [1c1c180] | 89 | 
 | 
|---|
| [f28fdee] | 90 |   \noindent
 | 
|---|
 | 91 | \begin{tabbing}
 | 
|---|
 | 92 | Internal-External Member: \=  \kill % using longest text to define tab length
 | 
|---|
 | 93 | Internal-External Member: \> Meta Meta \\
 | 
|---|
 | 94 | \> Professor, Dept. of Philosophy, University of Waterloo \\
 | 
|---|
 | 95 | \end{tabbing}
 | 
|---|
 | 96 |   \bigskip
 | 
|---|
| [1c1c180] | 97 | 
 | 
|---|
| [f28fdee] | 98 |   \noindent
 | 
|---|
 | 99 | \begin{tabbing}
 | 
|---|
 | 100 | Internal-External Member: \=  \kill % using longest text to define tab length
 | 
|---|
 | 101 | Other Member(s): \> Leeping Fang \\
 | 
|---|
 | 102 | \> Professor, Dept. of Fine Art, University of Waterloo \\
 | 
|---|
 | 103 | \end{tabbing}
 | 
|---|
 | 104 | 
 | 
|---|
 | 105 | \cleardoublepage
 | 
|---|
 | 106 | \end{comment}
 | 
|---|
 | 107 | 
 | 
|---|
 | 108 | % D E C L A R A T I O N   P A G E
 | 
|---|
 | 109 | % -------------------------------
 | 
|---|
 | 110 |   % The following is a sample Delaration Page as provided by the GSO
 | 
|---|
 | 111 |   % December 13th, 2006.  It is designed for an electronic thesis.
 | 
|---|
 | 112 |  \begin{center}\textbf{Author's Declaration}\end{center}
 | 
|---|
| [1c1c180] | 113 | 
 | 
|---|
| [f28fdee] | 114 |  \noindent
 | 
|---|
| [1c1c180] | 115 | I hereby declare that I am the sole author of this thesis. This is a true copy
 | 
|---|
 | 116 | of the thesis, including any required final revisions, as accepted by my
 | 
|---|
 | 117 | examiners.
 | 
|---|
| [f28fdee] | 118 | 
 | 
|---|
 | 119 |   \bigskip
 | 
|---|
| [1c1c180] | 120 | 
 | 
|---|
| [f28fdee] | 121 |   \noindent
 | 
|---|
 | 122 | I understand that my thesis may be made electronically available to the public.
 | 
|---|
 | 123 | 
 | 
|---|
 | 124 | \cleardoublepage
 | 
|---|
 | 125 | 
 | 
|---|
 | 126 | % A B S T R A C T
 | 
|---|
 | 127 | % ---------------
 | 
|---|
 | 128 | 
 | 
|---|
 | 129 | \begin{center}\textbf{Abstract}\end{center}
 | 
|---|
 | 130 | 
 | 
|---|
| [a916aad] | 131 | The \CFA (Cforall) programming language is an evolutionary refinement of
 | 
|---|
 | 132 | the C programming language, adding modern programming features without
 | 
|---|
 | 133 | changing the programming paradigms of C.
 | 
|---|
 | 134 | One of these modern programming features is more powerful error handling
 | 
|---|
 | 135 | through the addition of an exception handling mechanism (EHM).
 | 
|---|
 | 136 | 
 | 
|---|
 | 137 | This thesis covers the design and implementation of the \CFA EHM,
 | 
|---|
 | 138 | along with a review of the other required \CFA features.
 | 
|---|
| [9cdfa5fb] | 139 | The EHM includes common features of termination exception handling,
 | 
|---|
 | 140 | which abandons and recovers from an operation,
 | 
|---|
 | 141 | and similar support for resumption exception handling,
 | 
|---|
 | 142 | which repairs and continues with an operation.
 | 
|---|
| [a916aad] | 143 | The design of both has been adapted to utilize other tools \CFA provides,
 | 
|---|
 | 144 | as well as fit with the assertion based interfaces of the language.
 | 
|---|
 | 145 | 
 | 
|---|
 | 146 | The EHM has been implemented into the \CFA compiler and run-time environment.
 | 
|---|
 | 147 | Although it has not yet been optimized, performance testing has shown it has
 | 
|---|
| [9cdfa5fb] | 148 | comparable performance to other EHMs,
 | 
|---|
| [a916aad] | 149 | which is sufficient for use in current \CFA programs.
 | 
|---|
| [f28fdee] | 150 | 
 | 
|---|
 | 151 | \cleardoublepage
 | 
|---|
 | 152 | 
 | 
|---|
 | 153 | % A C K N O W L E D G E M E N T S
 | 
|---|
 | 154 | % -------------------------------
 | 
|---|
 | 155 | 
 | 
|---|
 | 156 | \begin{center}\textbf{Acknowledgements}\end{center}
 | 
|---|
 | 157 | 
 | 
|---|
| [166b384] | 158 | As is tradition and his due, I would like to begin by thanking my
 | 
|---|
 | 159 | supervisor Peter Buhr. From accepting me in a first place,
 | 
|---|
 | 160 | to helping me run performance tests, I would not be here without him.
 | 
|---|
 | 161 | Also if there was an ``artist" field here he would be listed there as well,
 | 
|---|
 | 162 | he helped me a lot with the diagrams.
 | 
|---|
 | 163 | 
 | 
|---|
 | 164 | I would like to thank the readers
 | 
|---|
 | 165 | Gregor Richards and Yizhou Zhang
 | 
|---|
 | 166 | for their feedback and approval.
 | 
|---|
 | 167 | The presentation of the thesis has definitely been improved with their
 | 
|---|
 | 168 | feedback.
 | 
|---|
 | 169 | 
 | 
|---|
 | 170 | I also thank the entire Cforall Team who built the rest of the
 | 
|---|
 | 171 | \CFA compiler. From the existing features I used in my work, to the
 | 
|---|
 | 172 | internal tooling that makes further development easier and the optimizations
 | 
|---|
 | 173 | that make running tests pass by quickly.
 | 
|---|
 | 174 | This includes: Aaron Moss, Rob Schluntz, Thierry Delisle, Michael Brooks,
 | 
|---|
 | 175 | Mubeen Zulfieqar \& Fangren Yu.
 | 
|---|
 | 176 | 
 | 
|---|
 | 177 | And thank-you Henry Xue, the co-op student who
 | 
|---|
 | 178 | converted my macro implementation of exception declarations into
 | 
|---|
 | 179 | the compiler features presented in this thesis.
 | 
|---|
 | 180 | 
 | 
|---|
 | 181 | Finally I thank my family, who are still relieved I learned how to read.
 | 
|---|
| [a916aad] | 182 | 
 | 
|---|
| [f28fdee] | 183 | \cleardoublepage
 | 
|---|
 | 184 | 
 | 
|---|
 | 185 | \begin{comment}
 | 
|---|
 | 186 | % D E D I C A T I O N
 | 
|---|
 | 187 | % -------------------
 | 
|---|
 | 188 | 
 | 
|---|
 | 189 | \begin{center}\textbf{Dedication}\end{center}
 | 
|---|
 | 190 | 
 | 
|---|
 | 191 | This is dedicated to the one I love.
 | 
|---|
 | 192 | \cleardoublepage
 | 
|---|
 | 193 | \end{comment}
 | 
|---|
 | 194 | 
 | 
|---|
 | 195 | % T A B L E   O F   C O N T E N T S
 | 
|---|
 | 196 | % ---------------------------------
 | 
|---|
 | 197 | \renewcommand\contentsname{Table of Contents}
 | 
|---|
 | 198 | \tableofcontents
 | 
|---|
 | 199 | \cleardoublepage
 | 
|---|
 | 200 | \phantomsection    % allows hyperref to link to the correct page
 | 
|---|
 | 201 | 
 | 
|---|
 | 202 | % L I S T   O F   F I G U R E S
 | 
|---|
 | 203 | % -----------------------------
 | 
|---|
 | 204 | \addcontentsline{toc}{chapter}{List of Figures}
 | 
|---|
 | 205 | \listoffigures
 | 
|---|
 | 206 | \cleardoublepage
 | 
|---|
 | 207 | \phantomsection         % allows hyperref to link to the correct page
 | 
|---|
 | 208 | 
 | 
|---|
 | 209 | % L I S T   O F   T A B L E S
 | 
|---|
 | 210 | % ---------------------------
 | 
|---|
 | 211 | \addcontentsline{toc}{chapter}{List of Tables}
 | 
|---|
 | 212 | \listoftables
 | 
|---|
 | 213 | \cleardoublepage
 | 
|---|
 | 214 | \phantomsection         % allows hyperref to link to the correct page
 | 
|---|
 | 215 | 
 | 
|---|
 | 216 | % Change page numbering back to Arabic numerals
 | 
|---|
 | 217 | \pagenumbering{arabic}
 | 
|---|