Index: doc/theses/jiada_liang_MMath/relatedwork.tex
===================================================================
--- doc/theses/jiada_liang_MMath/relatedwork.tex	(revision c4aca65a9b989777556599568eaa33695eb3f879)
+++ doc/theses/jiada_liang_MMath/relatedwork.tex	(revision 11cced628083f8f93238942878f2ae83b1267af1)
@@ -19,5 +19,5 @@
 
 Enumeration-like features exist in many popular programming languages, both past and present, \eg Pascal~\cite{Pascal}, Ada~\cite{Ada}, \Csharp~\cite{Csharp}, OCaml~\cite{OCaml} \CC, Go~\cite{Go}, Haskell~\cite{Haskell}, Java~\cite{Java}, Rust~\cite{Rust}, Swift~\cite{Swift}, Python~\cite{Python}.
-Among theses languages, there are a large set of overlapping features, but each language has its own unique extensions and restrictions.
+Among these languages, there is a large set of overlapping features, but each language has its own unique extensions and restrictions.
 
 
@@ -39,5 +39,5 @@
 \end{pascal}
 Object initialization and assignment are restricted to the enumerators of this type.
-Enumerators are auto-initialized from left to right, starting at zero, incrementing by 1.
+Enumerators are auto-initialized from left to right, starting at zero and incrementing by 1.
 Enumerators \emph{cannot} be explicitly initialized.
 Pascal provides a predefined type \lstinline[language=Pascal]{Boolean} defined as:
@@ -66,5 +66,5 @@
 \end{pascal}
 Hence, the ordering of the enumerators is crucial to provide the necessary ranges.
-There is bidirectional assignment between the enumeration and its subranges.
+There is a bidirectional assignment between the enumeration and its subranges.
 \begin{pascal}
 day := Sat;
@@ -77,5 +77,5 @@
 day := wend;			$\C{\{ no check \}}\CRT$
 \end{pascal}
-There should be a static/dynamic range check to verify values assigned to subtypes.
+A static/dynamic range check should be performed to verify the values assigned to subtypes.
 (Free Pascal does not check and aborts in certain situations, like writing an invalid enumerator.)
 
@@ -125,5 +125,5 @@
 \end{tabular}
 \end{cquote}
-Note, subtype @Weekday@ and @Weekend@ cannot be used to define a case or loop range.
+Note that subtypes @Weekday@ and @Weekend@ cannot be used to define a case or loop range.
 
 An enumeration type can be used as an array dimension and subscript.
@@ -149,5 +149,5 @@
 \end{pascal}
 
-The underlying type is an implementation-defined integral-type large enough to hold all enumerated values; it does not have to be the smallest possible type.
+The underlying type is an implementation-defined integral type large enough to hold all enumerated values; it does not have to be the smallest possible type.
 The integral size can be explicitly specified using compiler directive \$@PACKENUM@~$N$, where $N$ is the number of bytes, \eg:
 \begin{pascal}
@@ -172,5 +172,5 @@
 type Traffic_Light is ( @Red@, Yellow, @Green@ );
 \end{ada}
-Like \CFA, Ada uses a type-resolution algorithm including the left-hand side of assignmente to disambiguate among overloaded identifiers.
+Like \CFA, Ada uses a type-resolution algorithm, including the left-hand side of the assignment, to disambiguate among overloaded identifiers.
 \VRef[Figure]{f:AdaEnumeration} shows how ambiguity is handled using a cast, \ie \lstinline[language=ada]{RGB'(Red)}.
 
@@ -203,5 +203,5 @@
 for Week use ( Mon => 0, Tue => 1, Wed => 2, Thu => @10@, Fri => 11, Sat => 14, Sun => 15 );
 \end{ada}
-The enumeration operators are the equality and relational operators, @=@, @/=@, @<@, @<=@, @=@, @/=@, @>=@, @>@, where the ordering relationship is given implicitly by the sequence of acsending enumerators.
+The enumeration operators are the equality and relational operators, @=@, @/=@, @<@, @<=@, @=@, @/=@, @>=@, @>@, where the ordering relationship is given implicitly by the sequence of ascending enumerators.
 
 Ada provides an alias mechanism, \lstinline[language=ada]{renames}, for aliasing types, which is useful to shorten package identifiers.
@@ -259,5 +259,5 @@
 if @Flag@ then ...    -- conditional
 \end{ada}
-Since only types derived from @Boolean@ can be a conditional, @Boolean@ is essentially  a builtin type.
+Since only types derived from @Boolean@ can be conditional, @Boolean@ is essentially a built-in type.
 
 Ada provides \emph{consecutive} subtyping of an enumeration using \lstinline[language=ada]{range}.
@@ -325,5 +325,5 @@
 \label{s:C++RelatedWork}
 
-\CC enumeration is largely backwards compatible with C, so it inherited C's enumerations with some modifications and additions.
+\CC enumeration is largely backward compatible with C, so it inherited C's enumerations with some modifications and additions.
 
 \CC has aliasing using @const@ declarations, like C \see{\VRef{s:Cconst}}, with type inferencing, plus static/dynamic initialization.
@@ -440,5 +440,5 @@
 % However, there is no mechanism to iterate through an enumeration without an unsafe cast and it does not understand the enumerator values.
 \CC enumerators are not relational: the only comparator defined for \CC is the value comparison. The define order of enumerator has no 
-impact on its behaviour. As a consequnce, \CC has no meaningful enumerating mechanism. 
+impact on its behaviour. As a consequence, \CC has no meaningful enumerating mechanism. 
 \begin{c++}
 enum Week { Mon, Tue, Wed, Thu = 10, Fri, Sat, Sun };
@@ -447,5 +447,5 @@
 \end{c++}
 An approximation of enumerating an enum in \CC is to use the last enumerator value as a range. But it inevitably
-fails the enumeration value does not assemble auto-initialization. 
+fails, the enumeration value does not assemble auto-initialization. 
 
 An enumeration type cannot declare an array dimension but an enumerator can be used as a subscript.
@@ -460,10 +460,10 @@
 % https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/enums
 
-\Csharp is a dynamically-typed programming-language with a scoped, integral enumeration similar to \CC \lstinline[language=C++]{enum class}.
+\Csharp is a dynamically-typed programming language with a scoped, integral enumeration similar to \CC \lstinline[language=C++]{enum class}.
 \begin{csharp}
 enum Week : @long@ { Mon, Tue, Wed, Thu@ = 10@, Fri, Sat, Sun }
 enum RGB { Red, Green, Blue }
 \end{csharp}
-The default underlying integral type is @int@ (no @char@), with auto-incrementing, implicit/explicit initialization.
+The default underlying integral type is @int@ (no @char@), with auto-incrementing and implicit/explicit initialization.
 A method cannot be defined in an enumeration type (extension methods are possible).
 There is an explicit bidirectional conversion between an enumeration and its integral type, and an implicit conversion to the enumerator label in display contexts.
@@ -479,6 +479,6 @@
 % Relational and arithmetic operators are defined in terms of its numeric value only. 
 % Therefore, enumerators are not ordered and not enumerable like \CC.
-Like \CC, \Csharp defines enumeration relational and arithemtic operators in terms of value.
-Enumerators has no defined positional meaning.
+Like \CC, \Csharp defines enumeration relational and arithmetic operators in terms of value.
+Enumerators have no defined positional meaning.
 \begin{csharp}
 day = day++ - 5;					$\C{// unsafe}$
@@ -555,5 +555,5 @@
 const V = 3.1;  const W = 3.1;
 \end{Go}
-Since these declarations are unmutable variables, they are unscoped and Golang has no overloading.
+Since these declarations are immutable variables, they are unscoped, and Golang has no overloading.
 
 Golang provides an enumeration-like feature to group together @const@ declaration into a block and introduces a form of auto-initialization.
@@ -592,5 +592,5 @@
 		@Thu = 10;@ Fri = @iota - Wed + Thu - 1@; Sat; Sun ) // 10, 11, 12, 13
 \end{Go}
-Here, @V4@ and @Fri@ restart auto-incrementing from \lstinline[language=Go]{iota} and reset \lstinline[language=Go]{iota} to 4 and 11, respectively, because of the intialization expressions containing \lstinline[language=Go]{iota}.
+Here, @V4@ and @Fri@ restart auto-incrementing from \lstinline[language=Go]{iota} and reset \lstinline[language=Go]{iota} to 4 and 11, respectively, because of the initialization expressions containing \lstinline[language=Go]{iota}.
 Note, because \lstinline[language=Go]{iota} is incremented for an explicitly initialized identifier or @_@,
 at @Fri@ \lstinline[language=Go]{iota} is 4 requiring the minus one to compute the value for @Fri@.
@@ -640,5 +640,5 @@
 Week day = Week.Sat;
 \end{Java}
-The enumerators members are scoped and cannot be made \lstinline[language=java]{public}, hence require qualification.
+The enumerator's members are scoped and cannot be made \lstinline[language=java]{public}, hence requiring qualification.
 The value of an enumeration instance is restricted to its enumerators.
 
@@ -649,5 +649,5 @@
 \end{Java}
 Since @day@ has no value, it prints its label (name).
-The member @valueOf@ is the inverse of @name@ converting a string to enumerator.
+The member @valueOf@ is the inverse of @name@, converting a string to an enumerator.
 \begin{Java}
 day = Week.valueOf( "Wed" );
@@ -703,5 +703,5 @@
 Notice enumerators in the @switch@ statement do not require qualification.
 
-There are no arithemtic operations on enumerations, so there is no arithmetic way to iterate through an enumeration without making the implementation type \lstinline[language=Java]{public}.
+There are no arithmetic operations on enumerations, so there is no arithmetic way to iterate through an enumeration without making the implementation type \lstinline[language=Java]{public}.
 Like \Csharp, looping over an enumeration is done using method @values@, which returns an array of enumerator values (expensive operation).
 \begin{Java}
@@ -801,8 +801,8 @@
 Through this integral tag, it is possible to enumerate, and when all tags represent the unit type, it behaves like \CC \lstinline[language=C++]{enum class}.
 When tags represent non-unit types, Rust largely precludes accessing the tag because the semantics become meaningless.
-Hence, the two mechanisms are largely disjoint, and ony the enumeration component is discussed.
-
-In detail, the @enum@ type has an implicit integer tag (discriminant), with a unique value for each variant type.
-Direct initialization is by a compile-time expression generating a constant value.
+Hence, the two mechanisms are largely disjoint, and only the enumeration component is discussed.
+
+In detail, the @enum@ type has an implicit integer tag (discriminant) with a unique value for each variant type.
+Direct initialization is achieved by a compile-time expression that generates a constant value.
 Indirect initialization (without initialization, @Fri@/@Sun@) is auto-initialized: from left to right, starting at zero or the next explicitly initialized constant, incrementing by @1@.
 There is an explicit cast from the tag to integer.
@@ -966,6 +966,6 @@
 The @enum.allCases@ property returns a collection of all the cases for looping over an enumeration type or variable (expensive operation).
 
-A typed enumeration is accomplished by inheriting from any Swift type, and accessing the underlying enumerator value is done with attribute @rawValue@.
-Type @Int@ has auto-incrementing from previous enumerator;
+A typed enumeration is accomplished by inheriting from any Swift type, and accessing the underlying enumerator value is done with the attribute @rawValue@.
+Type @Int@ has auto-incrementing from the previous enumerator;
 type @String@ has auto-incrementing of the enumerator label.
 \begin{cquote}
@@ -996,5 +996,5 @@
 \end{cquote}
 
-There is a bidirectional conversion from typed enumerator to @rawValue@ and vise versa.
+There is a bidirectional conversion from typed enumerator to @rawValue@ and vice versa.
 \begin{swift}
 var weekInt : WeekInt = WeekInt.Mon;
@@ -1011,12 +1011,12 @@
 % https://docs.python.org/3/howto/enum.html
 
-Python is a dynamically-typed reflexive programming language with multiple incompatible versions.
-The generality of the language makes it is possible to extend existing or build new language features.
-As a result, discussing Python enumerations is a moving target, because if a features does not exist, it can often be created with varying levels of complexity within the language.
+Python is a dynamically typed reflexive programming language with multiple incompatible versions.
+The generality of the language makes it possible to extend existing or build new language features.
+As a result, discussing Python enumerations is a moving target because if a feature does not exist, it can often be created with varying levels of complexity within the language.
 Therefore, the following discussion is (mostly) restricted to the core enumeration features in Python 3.13.
 
 A Python enumeration is not a basic type;
 it is a @class@ inheriting from the @Enum@ class.
-The @Enum@ class presents a set of scoped enumerators, where each enumerator is a pair object with a \emph{constant} string name and arbitrary value.
+The @Enum@ class presents a set of scoped enumerators, where each enumerator is a pair object with a \emph{constant} string name and an arbitrary value.
 Hence, an enumeration instance is a fixed type (enumeration pair), and its value is the type of one of the enumerator pairs.
 
@@ -1025,5 +1025,5 @@
 class Week(!Enum!): Mon = 1; Tue = 2; Wed = 3; Thu = 4; Fri = 5; Sat = 6; Sun = 7
 \end{python}
-and/or explicitly auto initialized, \eg:
+and/or explicitly auto-initialized, \eg:
 \begin{python}
 class Week(Enum): Mon = 1; Tue = 2; Wed = 3; Thu = 10; Fri = !auto()!; Sat = 4; Sun = !auto()!
@@ -1038,5 +1038,5 @@
 \end{python}
 
-There is no direct concept of restricting the enumerators in an enumeration \emph{instance} because the dynamic typing changes the type.
+There is no direct concept of restricting the enumerators in an enumeration \emph{instance} because dynamic typing changes the type.
 \begin{python}
 class RGB(Enum): Red = 1; Green = 2; Blue = 3
@@ -1147,5 +1147,5 @@
 class WeekEnd(WeekE): Sat = 6; Sun = 7
 \end{python}
-Here, type @WeekE@ is an abstract type because the dynamic typing never uses it.
+Here, type @WeekE@ is an abstract type because dynamic typing never uses it.
 \begin{cquote}
 \setlength{\tabcolsep}{25pt}
@@ -1175,5 +1175,5 @@
 @Flag@ is the same as @IntFlag@ but cannot be combined with, nor compared against, any other @Flag@ enumeration, nor @int@.
 Auto increment for @IntFlag@ and @Flag@ is by powers of 2.
-Enumerators that are a combinations of single bit enumerators are aliases, and hence, invisible.
+Enumerators that are combinations of single-bit enumerators are aliases and, hence, invisible.
 The following is an example for @Flag@.
 \begin{python}
@@ -1258,5 +1258,5 @@
 \end{cquote}
 (Note, after an @adtv@'s type is know, the enumerator is inferred without qualification, \eg @I(3)@.)
-The type names are independent from the type value, and mapped to an opaque, ascending, integral tag, starting from 0, supporting relational operators @<@, @<=@, @>@, and @>=@.
+The type names are independent of the type value and mapped to an opaque, ascending, integral tag, starting from 0, supporting relational operators @<@, @<=@, @>@, and @>=@.
 \begin{cquote}
 \setlength{\tabcolsep}{10pt}
@@ -1299,7 +1299,7 @@
 
 % Enumerating is accomplished by deriving from @enumerate@.
-OCaml enumerators has an ordering following the definition order, but they are not enumerable.
-To iterate over all enumerators, an OCaml type needs to derive @enumerate@ proprocessor, which appends a list of all enumerators to the program 
-abstract syntax tree (AST). The list of value may not persist the define ordering. Given that it needs tools that is outside of the native language to facilate, 
+OCaml enumerators have an ordering following the definition order, but they are not enumerable.
+To iterate over all enumerators, an OCaml type needs to derive the @enumerate@ preprocessor, which appends a list of all enumerators to the program 
+abstract syntax tree (AST). The list of values may not persist in the defined ordering. Given that it needs tools that are outside of the native language to facilitate, 
 we claim it has no capability of enumerating.
 
@@ -1533,5 +1533,5 @@
 
 \VRef[Table]{t:FeatureLanguageComparison} shows a comparison of enumeration features and programming languages with the explaination of categories below.
-The features are high level and may not capture nuances within a particular language. 
+The features are high-level and may not capture nuances within a particular language. 
 
 \begin{table}
@@ -1577,14 +1577,14 @@
 \item Typed: The type of value. H: heterogeneous type; values from the same enum need not be the same type. 
 U: uni-type; value must have the same type.
-\item Safe: A enumeration variable can only hold a value from its defined enumerators.
-\item Posn ordered: enumerators have defined ordering based on enuemrator declaration order.
+\item Safe: An enumeration variable can only hold a value from its defined enumerators.
+\item Posn ordered: enumerators have defined ordering based on enumerator declaration order.
 It is implied position ordered if its enumerator value must be strictly increasingly ordered.
-\item Unique value: enumerators must have unique value.
-\item Auto-init: Value are auto initializable by language specification, often being the "+1" of the predecessor.
-\item (Un)Scoped: U: unscoped enuemrators and does not need qualification; S: Scoped enumerators and requires qualification.
-\item Overload: An enumerator label can be used without type qualification in a context where the label has defined by multiple enumerations.
+\item Unique value: enumerators must have a unique value.
+\item Auto-init: Values are auto-initializable by language specification, often being the "+1" of the predecessor.
+\item (Un)Scoped: U: unscoped enumerators and did not need qualification; S: Scoped enumerators and requires qualification.
+\item Overload: An enumerator label can be used without type qualification in a context where multiple enumerations have defined the label.
 \item Loop: Enumerate enum members without the need to convert an enumeration to another data structure
-\item Arr. dim: An enumeration can be used directly as array dimension and enumerators can be mapped to an array element (not a conversion to integer type).
+\item Arr. dim: An enumeration can be used directly as an array dimension, and enumerators can be mapped to an array element (not a conversion to integer type).
 \item Subset: Name a subset of enumerators as a new type.
-\item Superset: Create a new enumeration that contains all enumerators from pre-defined enuemrations.
+\item Superset: Create a new enumeration that contains all enumerators from pre-defined enumerations.
 \end{enumerate}
