Ignore:
Timestamp:
Sep 9, 2024, 6:29:59 AM (2 days ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
478dade
Parents:
9bb6c5f
Message:

update thesis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/jiada_liang_MMath/conclusion.tex

    r9bb6c5f r29c8675  
    22\label{c:conclusion}
    33
    4 The goal of this work is to extend 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 backward compatibility with C.
     4This work aims to extend 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 backward compatibility with C.
    55Within this goal, the new \CFA enumeration should align with the analogous enumeration features in other languages to match modern programming expectations.
    66Hence, the \CFA enumeration features are borrowed from a number of programming languages, but engineered to work and play with \CFA's type system and feature set.
     
    88Strong type-checking of enumeration initialization and assignment provides additional safety, ensuring an enumeration only contains its enumerators.
    99Overloading and scoping of enumerators significantly reduces the naming problem, providing a better software-engineering environment, with fewer name clashes and the ability to disambiguate those that cannot be implicitly resolved.
    10 Typed enumerations solve the data-harmonization problem increasing safety through better software engineering.
     10Typed enumerations solve the data-harmonization problem, increasing safety through better software engineering.
    1111Moreover, integrating enumerations with existing control structures provides a consistent upgrade for programmers and a succinct and secure mechanism to enumerate with the new loop-range feature.
    1212Generalization and reuse are supported by incorporating the new enumeration type using the \CFA trait system.
    13 Enumeration traits define the meaning of an enumeration, allowing functions to be written that work on any enumeration, such as the reading and printing an enumeration.
    14 Using advanced duck typing, existing C enumerations can be extended so they work with all of the enumeration features, providing for legacy C code to be moved forward into the modern \CFA programming domain.
    15 Finally, I expanded the \CFA project's test-suite with multiple enumeration features tests with respect to implicit conversions, control structures, inheritance, interaction with the polymorphic types, and the features built on top of enumeration traits.
     13Enumeration traits define the meaning of an enumeration, allowing functions to be written that work on any enumeration, such as the reading and printing of an enumeration.
     14With advanced structural typing, C enumerations can be extended so they work with all of the enumeration features, providing for legacy C code to be moved forward into the modern \CFA programming domain.
     15Finally, the \CFA project's test suite has been expanded with multiple enumeration features tests with respect to implicit conversions, control structures, inheritance, interaction with the polymorphic types, and the features built on top of enumeration traits.
    1616These tests ensure future \CFA work does not accidentally break the new enumeration system.
    1717
    18 The conclusion is that the new \CFA enumeration mechanisms achieve the initial goals, providing C programmers with an intuitive enumeration mechanism for handling modern programming requirements.
     18In summary, the new \CFA enumeration mechanisms achieve the initial goals, providing C programmers with an intuitive enumeration mechanism for handling modern programming requirements.
    1919
    2020
     
    5151\end{cfa}
    5252\item
    53 Currently enumeration scoping is all or nothing. In some cases, it might be useful to
     53Currently, enumeration scoping is all or nothing. In some cases, it might be useful to
    5454increase the scoping granularity to individual enumerators.
    5555\begin{cfa}
     
    6868typedef RGB.Red OtherRed; // alias
    6969\end{cfa}
     70\item
     71Label arrays are auxiliary data structures that are always generated for \CFA enumeration, which is a considerable program overhead.
     72It is helpful to provide a new syntax or annotation for a \CFA enumeration definition that tells the compiler the labels will not be used
     73throughout the execution. Therefore, \CFA optimizes the label array away. The @value()@ function can still be used on an enumeration constant,
     74and the function called is reduced to a @char *@ constant expression that holds the name of the enumerator. But if @value()@ is called on
     75a variable with an enumerated type, it returns an empty string since the label information is lost for the runtime.
    7076\end{enumerate}
Note: See TracChangeset for help on using the changeset viewer.