% T I T L E P A G E % ------------------- % Last updated May 24, 2011, by Stephen Carr, IST-Client Services % The title page is counted as page `i' but we need to suppress the % page number. We also don't want any headers or footers. \pagestyle{empty} \pagenumbering{roman} % The contents of the title page are specified in the "titlepage" % environment. \begin{titlepage} \begin{center} \vspace*{1.0cm} \Huge {\bf Resource Management and Tuples in \CFA} \vspace*{1.0cm} \normalsize by \\ \vspace*{1.0cm} \Large Robert Schluntz \\ \vspace*{3.0cm} \normalsize A thesis \\ presented to the University of Waterloo \\ in fulfillment of the \\ thesis requirement for the degree of \\ Master of Mathematics \\ in \\ Computer Science \\ \vspace*{2.0cm} Waterloo, Ontario, Canada, 2017 \\ \vspace*{1.0cm} \copyright\ Robert Schluntz 2017 \\ \end{center} \end{titlepage} % The rest of the front pages should contain no headers and be numbered using Roman numerals starting with `ii' \pagestyle{plain} \setcounter{page}{2} \cleardoublepage % Ends the current page and causes all figures and tables that have so far appeared in the input to be printed. % In a two-sided printing style, it also makes the next page a right-hand (odd-numbered) page, producing a blank page if necessary. % D E C L A R A T I O N P A G E % ------------------------------- % The following is the sample Delaration Page as provided by the GSO % December 13th, 2006. It is designed for an electronic thesis. \noindent 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. \bigskip \noindent I understand that my thesis may be made electronically available to the public. \cleardoublepage %\newpage % A B S T R A C T % --------------- \begin{center}\textbf{Abstract}\end{center} \CFA is a modern, non-object-oriented extension of the C programming language. This thesis addresses several critical deficiencies of C, notably: resource management, a limited function-return mechanism, and unsafe variadic functions. To solve these problems, two fundamental language features are introduced: tuples and constructors/destructors. While these features exist in prior programming languages, the contribution of this work is engineering these features into a highly complex type system. C is an established language with a dedicated user-base. An important goal is to add new features in a way that naturally feels like C, to appeal to this core user-base, and due to huge amounts of legacy code, maintaining backwards compatibility is crucial. \cleardoublepage %\newpage % A C K N O W L E D G E M E N T S % ------------------------------- \begin{center}\textbf{Acknowledgements}\end{center} I would like to thank my supervisor, Professor Peter Buhr, for all of his help, including reading the many drafts of this thesis and providing guidance throughout my degree. This work would not have been as enjoyable, nor would it have been as strong without Peter's knowledge, help, and encouragement. I would like to thank my readers, Professors Gregor Richards and Patrick Lam for all of their helpful feedback. Thanks to Aaron Moss and Thierry Delisle for many helpful discussions, both work-related and not, and for all of the work they have put into the \CFA project. This thesis would not have been the same without their efforts. I thank Glen Ditchfield and Richard Bilson, for all of their help with both the design and implementation of \CFA. I thank my partner, Erin Blackmere, for all of her love and support. Without her, I would not be who I am today. Thanks to my parents, Bob and Jackie Schluntz, for their love and support throughout my life, and for always encouraging me to be my best. Thanks to my best friends, Travis Bartlett, Abraham Dubrisingh, and Kevin Wu, whose companionship is always appreciated. The time we've spent together over the past 4 years has always kept me entertained. An extra shout-out to Kaleb Alway, Max Bardakov, Ten Bradley, and Ed Lee, with whom I've shared many a great meal; thank you for being my friend. Finally, I would like to acknowledge financial support in the form of a David R. Cheriton Graduate Scholarship and a corporate partnership with Huawei Ltd. \cleardoublepage %\newpage % % D E D I C A T I O N % % ------------------- % \begin{center}\textbf{Dedication}\end{center} % % This is dedicated to the one I love. % TODO % \cleardoublepage % %\newpage % T A B L E O F C O N T E N T S % --------------------------------- \renewcommand\contentsname{Table of Contents} \tableofcontents \cleardoublepage \phantomsection %\newpage % L I S T O F T A B L E S % --------------------------- \addcontentsline{toc}{chapter}{List of Tables} \listoftables \cleardoublepage \phantomsection % allows hyperref to link to the correct page %\newpage % % L I S T O F F I G U R E S % % ----------------------------- % \addcontentsline{toc}{chapter}{List of Figures} % \listoffigures % \cleardoublepage % \phantomsection % allows hyperref to link to the correct page % %\newpage % L I S T O F S Y M B O L S % ----------------------------- % To include a Nomenclature section % \addcontentsline{toc}{chapter}{\textbf{Nomenclature}} % \renewcommand{\nomname}{Nomenclature} % \printglossary % \cleardoublepage % \phantomsection % allows hyperref to link to the correct page % \newpage % Change page numbering back to Arabic numerals \pagenumbering{arabic}