## 3 Model-Based Mutation Testing
### State Chart-Based Mutation Operators  
RQ1 was: What mutation operator should be used for model-based mutation testing? The [PERSON] model-based mutation-operator-related study is informative [5]. Structural and behavioral diagrams of model-based development techniques require mutation operators distinct from the traditional code-based operators. A model-based mutation operator recognizing a structural diagram (such as a class diagram) is analogous to a class-based mutation operator employed in object-oriented programming, and may engage in method overloading and the creation of inappropriate relationships. State diagrams may feature incorrect transition connections, wrong event calls, and state or transition deletions. Thus, logical, relational, statement deletion, and constant-value-change operators are the model-based mutation operators equivalent to code-based operators [28]. However, in a general model-based development environment, model checking is principally static; it is sought to verify model validity. Rhapsody supports model checking, detecting basic errors. Here, of the various mutation operators on state charts that cannot be detected by model checking, we used those listed on the below Table 1. \begin{table}
\begin{tabular}{c c c} \hline \hline
**ID** & **Mutation Operator** & **Mutation Method** & **Formula** \\ \hline MO1 & Replace call trigger & Replaces a trigger of a transition with another trigger. & \(\delta:S_{i}\times T^{\prime}(N,G,A)\to S_{j}\) \\ MO2 & Replace guard & Replaces an operand, a logical operator, or a relational operator on a guard. & \(\delta:S_{i}\times T(N,G^{\prime},A)\to S_{j}\) \\ MO3 & Replace guard to false & Ensures that a guard is false. & \(\delta:S_{i}\times T(N,False,A)\to S_{j}\) \\ MO4 & Replace guard to true & Ensures that a guard is true. & \(\delta:S_{i}\times T(N,True,A)\to S_{j}\) \\ MO5 & Replace action & Replaces an action on a transition or a state with another action. & \(\delta:S_{i}\times T(N,G,A^{\prime})\to S_{j}\) \\ MO6 & Replace incoming & Replaces an incoming transition to another state, excluding the default transition. & \(\delta:S_{k}\times T(N,G,A)\to S_{j}\) \\ MO7 & Replace outgoing & Replaces an outgoing transition to another state, including the default transition. & \(\delta:S_{i}\times T(N,G,A)\to S_{k}\) \\ MO8 & Remove state & Removes a state and its related transitions on a state machine. & \(\delta=\emptyset,S_{i}=\emptyset\) \\ MO9 & Remove transition & Removes a transition on a state machine. & \(T(N,G,A)=\emptyset\) \\ MO10 & Remove call trigger & Removes a call trigger on a transition. & \(\delta:S_{i}\times T_{\emptyset}(N,G,A)\to S_{j}\) \\ MO11 & Remove guard & Removes a part of a guard condition. & \(\delta:S_{i}\times T(N,G^{\prime},A)\to S_{j}\) \\ MO12 & Remove action & Removes an action on a transition or a state. & \(\delta:S_{i}\times T(N,G,\emptyset)\to S_{j}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Mutation Operators for State-Chart-Based Mutation Testing. These mutation operators are used to create new mutants repeatedly that are not combined. To validate the mutants, the add or replace mutation operator uses the events, actions, inputs, and outputs of the original model. The mutant set is used to generate test cases for fault detection. Specifically, the original state chart and mutants generated by the mutation operator are employed to generate test cases that reveal the faults created by the mutants. If a mutant is selected, a concolic, execution-based, test case generator creates a test case that detects the fault. As validation proceeds, the test cases are added to the test suite. The mutant-based test generation process is performed for a predefined time or for a predefined number of times. Finally, the test cases are added to the test suite and prioritized. Figure 1 shows an example statechart and its mutants for simple fade-in and -out features by the lamp on and off commands. The mutants generated by mutation operators in a UML-based state chart.