Changeset 433e2c3 for doc/theses/jiada_liang_MMath/uw-ethesis-frontpgs.tex
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/jiada_liang_MMath/uw-ethesis-frontpgs.tex
r8789ae4 r433e2c3 131 131 \begin{center}\textbf{Abstract}\end{center} 132 132 133 % An enumeration is a type defining an ordered set of named constant values, where a name abstracts a value, \eg @PI@ versus @3.145159@. 134 % C restrict an enumeration type to the integral type @signed int@, which \CC support, meaning enumeration names bind to integer constants. 135 % \CFA extends C enumerations to allow all basic and custom types for the enumeration type, like other modern programming languages. 136 % Furthermore, \CFA adds other useful features for enumerations to support better software-engineering practices and simplify program development. 137 The \CFA (C-for-all) programming language is an evolutionary refinement of C programing language. One of its distinctive feature is the generic 138 types. But legacy data type from C, such as enumerations, does not adapt well into the \CFA generic type system. 139 140 This thesis presents an adaptation of enumerated types, in a way that integrates naturallly with the generic type feature of \CFA while being 141 backward-compatiable to C. This thesis also presents a number of smaller refinement to the \CFA overload resolution rules for enumerated types, 142 each of which improves the intuitive nature of enumerations. 143 The enumeration types improvement has been implemented into \CFA compiler and run-time environment. The root ideas behinds the change of 144 enumeration is to discover the approach of C data types working with \CFA generic types in order to improve the language expressiveity and safety. 133 An \emph{enumeration} is a type defining a (ordered) set of named constant values. 134 \begin{cfa} 135 enum Week { Mon, Tue, Wed, Thu, Fri, Sat, Sun }; 136 enum Math { PI = 3.14159, Tau = 6.28318, Phi = 1.61803 }; 137 enum RGB { Red = 100b, Green = 010b, Blue = 001b }; 138 \end{cfa} 139 Its purpose is for readability: replacing constant values in a program with symbolic names that are more meaningful to programmers in the context of the application. 140 Thereafter, associating a name to a different value automatically distributes this rebinding, preventing errors. 141 One of the key properties of an enumeration is the ability to enumerate (iterate) through the constants, and hence, access their values, if present. 142 C restricts an enumeration to the integral type @signed int@, while \CC extends enumerations to all integral types, meaning enumeration names must bind to integer constants. 143 Other modern programming languages provide bindings to any type and additional features to extend enumeration capabilities for better software-engineering practices. 144 145 The \CFA (C-for-all) programming language is an evolutionary refinement of the C programing language. 146 One of its distinctive feature is a parametric-polymorphic generic type. 147 However, legacy data types from C, such as enumerations, do not adapt well into the \CFA generic type-system. 148 149 This thesis extends the simple and unsafe enumeration type in the C programming language into a complex and safe enumeration type in the \CFA programming-language, while maintaining backwards compatibility with C. 150 The major contribution is an adaptation of enumerated types with the \CFA type-system in a way that integrates naturally with the generic types. 151 This thesis also presents a number of smaller refinement to the \CFA overload resolution rules for enumerated types, each of which improves the intuitive nature of enumeration name resolution by the compiler. 152 Finally, this work adds other useful features to enumerations that better support software-engineering practices and simplify program development. 153 145 154 \cleardoublepage 146 155 \phantomsection % allows hyperref to link to the correct page … … 151 160 \begin{center}\textbf{Acknowledgements}\end{center} 152 161 153 To begin, I would like to thank my supervisor Proferssor Peter Buhr. Thank you for your guidance and 154 support throughout my study and research. I would not be here without you. 155 156 Thanks Gregor Richards and Yzihou Zhang for reading my thesis. 162 To begin, I would like to thank my supervisor Professor Peter Buhr. 163 Thank you for your guidance and support throughout my study and research. 164 I would not be here without you. 165 166 Thanks to Gregor Richards and Yzihou Zhang for reading my thesis. 157 167 158 168 Special thanks to Andrew James Beach for your insight on the theory development on the thesis. 159 169 160 170 Thanks to Michael Brooks, Fangran Yu, Colby Parsons, Thierry Delisle, Mubeen Zulifiqar, 161 and entire Cforallteam for development of the \CFA language, making it the best language it can be.171 and the entire \CFA team for development of the \CFA language, making it the best language it can be. 162 172 163 173 Finally, a special thank you to Huawei Canada for funding this work.
Note: See TracChangeset
for help on using the changeset viewer.