Index: doc/theses/jiada_liang_MMath/CFAenum.tex
===================================================================
--- doc/theses/jiada_liang_MMath/CFAenum.tex	(revision 68a70284d743a2f3fbb728e113a817edb336f56d)
+++ doc/theses/jiada_liang_MMath/CFAenum.tex	(revision eaeba796aa6e1310797b8fc4f35f88d8d4a941a1)
@@ -136,6 +136,6 @@
 \section{Implementation}
 
-\CFA-cc is is a transpiler translating \CFA code into C, which is compiled by a C compiler.
-During transpilation, \CFA-cc breaks a \CFA enumeration definition into a definition of a C enumeration with the same name and auxiliary arrays: a label and value array for a typed enumeration.
+\CFA-cc is a transpiler translating \CFA code into C, which is compiled by a C compiler.
+During transpiling, \CFA-cc breaks a \CFA enumeration definition into a definition of a C enumeration with the same name and auxiliary arrays: a label and value array for a typed enumeration.
 For example:
 \begin{cfa}
@@ -157,7 +157,7 @@
 Therefore, a \CFA enumeration variable has the same underlying representation as its generated C enumeration.
 This semantics implies a \CFA enumeration variable uses the same storage as a C enumeration variable, that @posn@ can use as its underlying representation, and the label and value arrays take little storage.
-It should be possible to eliminated the two arrays if unused, either by \CFA if local to a translation unit and unused, or by the linker if global but unreferenced.
+It should be possible to eliminate the two arrays if unused, either by \CFA if local to a translation unit and unused, or by the linker if global but unreferenced.
 Also, the label and value arrays are declared @static@ and initialized with constants, so the arrays are allocated in the @.data@ section and initialized before program execution.
-Hence, there is no addition execution cost unless new enumeration features are use, and storage usage is minimal as the number of enumerations in a program is small as is the number of enumerators in an enumeration.
+Hence, there is no additional execution cost unless new enumeration features are used, and storage usage is minimal as the number of enumerations in a program is small as is the number of enumerators in an enumeration.
 
 Along with the enumeration definition, \CFA-cc generates definitions of the attribute functions, @posn@, @label@ and @value@, for each enumeration:
@@ -171,5 +171,5 @@
 Note, the cast to @int@ is actually an internal reinterpreted cast added before type resolution to stop further reduction on the expression by the type resolver \see{\VRef{s:ValueConversion}} and removed in code generation.
 Finally, to further mitigate \CFA enumeration costs, calls to @label@ and @value@ with an enumeration constant are unrolled into the appropriate constant expression, although this could be left to the backend C compiler.
-Hence, in space and time costs, \CFA enumerations follow the C philosophy of only paying for what is used, modulo some future work to convince the linker to remove unaccessed @label@ and @value@ arrays, possibly with @weak@ attributes.
+Hence, in space and time costs, \CFA enumerations follow the C philosophy of only paying for what is used, modulo some future work to convince the linker to remove un-accessed @label@ and @value@ arrays, possibly with @weak@ attributes.
 
 
@@ -258,5 +258,5 @@
 \label{s:CFAInheritance}
 
-\CFA Plan-9 inheritance may be used with \CFA enumerations, where Plan-9 inheritance is containment inheritance with implicit unscoping (like a nested unnamed @struct@/@union@ in C).
+\CFA Plan-9 inheritance may be used with \CFA enumerations, where Plan-9 inheritance is containment inheritance with implicit un-scoping (like a nested unnamed @struct@/@union@ in C).
 Containment is nominative: an enumeration inherits all enumerators from another enumeration by declaring an @inline statement@ in its enumerator lists.
 \begin{cfa}
@@ -280,5 +280,5 @@
 The base type must be consistent between subtype and supertype.
 When an enumeration inherits enumerators from another enumeration, it copies the enumerators' @value@ and @label@, even if the @value@ is auto-initialized.
-However, the position of the underlying representation is the order of the enumerator in the new enumeration.
+However, the underlying representation's position is the enumerator's order in the new enumeration.
 \begin{cfa}
 enum() E1 { B };									$\C{// B}$
@@ -287,5 +287,5 @@
 enum() E4 { A, inline E3, F};			$\C{// A {\color{blue}[\(_{E3}\)} {\color{red}[\(_{E1}\)} B {\color{red}]} {\color{red}[\(_{E2}\)} C D {\color{red}]} E {\color{blue}]} F}$
 \end{cfa}
-In the example, @B@ is at position 0 in @E1@ and @E3@, but position 1 in @E4@ as @A@ takes position 0 in @E4@.
+In this example, @B@ is at position 0 in @E1@ and @E3@, but position 1 in @E4@ as @A@ takes position 0 in @E4@.
 @C@ is at position 0 in @E2@, 1 in @E3@, and 2 in @E4@.
 @D@ is at position 1 in @E2@, 2 in @E3@, and 3 in @E4@.
@@ -331,5 +331,5 @@
 
 As discussed in \VRef{s:OpaqueEnum}, \CFA chooses position as a representation of a \CFA enumeration variable.
-When a cast or implicit conversion moves an enumeration from subtype to supertype, the position can be unchanged or increase.
+When a cast or implicit conversion moves an enumeration from subtype to supertype, the position can be unchanged or increased.
 \CFA determines the position offset with an \newterm{offset calculation} function.
 
@@ -368,5 +368,5 @@
 The algorithm iterates over the members in @dst@ to find @src@.
 If a member is an enumerator of @dst@, the positions of all subsequent members are incremented by one.
-If the current member is @dst@, the function returns true indicating \emph{found} and the accumulated offset.
+If the current member is @dst@, the function returns true, indicating \emph{found} and the accumulated offset.
 Otherwise, the algorithm recurses into the current @CFAEnum@ @m@ to check if its @src@ is convertible to @m@.
 If @src@ is convertible to the current member @m@, this means @src@ is a subtype-of-subtype of @dst@.
@@ -378,8 +378,8 @@
 \section{Control Structures}
 
-Enumerators can be used in multiple contexts.
+Enumerators are used in various contexts.
 In most programming languages, an enumerator is implicitly converted to its value (like a typed macro substitution).
-However, enumerator synonyms and typed enumerations make this implicit conversion to value incorrect in some contexts.
-In these contexts, a programmer's intuition assumes an implicit conversion to position.
+However, in some contexts, enumerator synonyms and typed enumerations make this implicit conversion to value incorrect.
+A programmer's intuition assumes an implicit conversion to position in these contexts.
 
 For example, an intuitive use of enumerations is with the \CFA @switch@/@choose@ statement, where @choose@ performs an implicit @break@ rather than a fall-through at the end of a @case@ clause.
@@ -442,5 +442,5 @@
 \end{cfa}
 The enumeration type is syntax sugar for looping over all enumerators and assigning each enumerator to the loop index, whose type is inferred from the range type.
-The prefix @+~=@ or @-~=@ iterate forward or backwards through the inclusive enumeration range, where no prefix defaults to @+~=@.
+The prefix @+~=@ or @-~=@ iterate forward or backward through the inclusive enumeration range, where no prefix defaults to @+~=@.
 
 C has an idiom for @if@ and loop predicates of comparing the predicate result ``not equal to 0''.
@@ -449,5 +449,5 @@
 while ( p /* != 0 */  ) ...
 \end{cfa}
-This idiom extends to enumerations because there is a boolean conversion in terms of the enumeration value, if and only if such a conversion is available.
+This idiom extends to enumerations because there is a boolean conversion regarding the enumeration value if and only if such a conversion is available.
 For example, such a conversion exists for all numerical types (integral and floating-point).
 It is possible to explicitly extend this idiom to any typed enumeration by overloading the @!=@ operator.
@@ -482,5 +482,5 @@
 \end{cfa}
 \footnotetext{C uses symbol \lstinline{'='} for designator initialization, but \CFA changes it to \lstinline{':'} because of problems with tuple syntax.}
-This approach is also necessary for a predefined typed enumeration (unchangeable), when additional secondary-information need to be added.
+This approach is also necessary for a predefined typed enumeration (unchangeable) when additional secondary information needs to be added.
 The array subscript operator, namely @?[?]@, is overloaded so that when a \CFA enumerator is used as an array index, it implicitly converts to its position over value to sustain data harmonization.
 This behaviour can be reverted by explicit overloading:
