# On-the-Fly Repairing of Atomicity Violations in ARINC 653 Software
## 5 Experiments
### Functional Evaluation
The first column shows the type of program and the second column shows the interleaving of threads observed during the execution of the program. We analyzed the interleaving types and identified the ones with atomicity violations; we here show them in the third column. The diagnosis column shows the count of different interleaving observed in the program. In the diagnosis phase, every interleaving is inspected whether it is correct interleaving or interleaving with atomicity violation. Since a tread execution is nondeterministic, the number shown in the table is a sample observation. Once an interleaving is diagnosed as a violation of atomicity, the interleaving is treated. The fifth column shows the number of treated interleaving types. Since there cannot be a false negative or false positive in treatment, the accuracy of the treatment is 100%. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Synthetic Program**} & **Interleaving** & **Atomicity Violation** & **Diagnosis** & **Treatment** & **Accuracy** \\ \hline \multirow{2}{*}{\(T_{i}^{[W-R]}\parallel T_{i}^{W}\)} & \(T_{1}^{W}\to T_{1}^{W}\to T_{2}^{R}\) & Yes & 27 & 27 & \\  & \(T_{1}^{W}\to T_{1}^{W}\to T_{2}^{R}\) & No & 24 & - & 100\% \\  & \(T_{1}^{W}\to T_{1}^{W}\to T_{2}^{R}\) & No & 49 & - & \\ \hline \multirow{2}{*}{\(T_{i}^{[W-W]}\parallel T_{j}^{R}\)} & \(T_{1}^{W}\to T_{1}^{R}\to T_{1}^{W}\) & Yes & 24 & 24 & \\  & \(T_{1}^{W}\to T_{1}^{W}\to T_{1}^{W}\) & No & 24 & - & 100\% \\  & \(T_{2}^{W}\to T_{1}^{W}\to T_{1}^{W}\) & No & 52 & - & \\ \hline \multirow{2}{*}{\(T_{i}^{[W-R]}\parallel T_{j}^{W}\)} & \(T_{1}^{W}\to T_{1}^{W}\to T_{1}^{W}\) & Yes & 29 & 29 & \\  & \(T_{1}^{W}\to T_{1}^{W}\to T_{1}^{W}\) & No & 34 & - & 100\% \\  & \(T_{2}^{W}\to T_{1}^{W}\to T_{1}^{W}\) & No & 37 & - & \\ \hline \multirow{2}{*}{\(T_{i}^{[R-W]}\parallel T_{j}^{R-W}\)} & \(T_{1}^{R}\to T_{1}^{W}\to T_{1}^{W}\) & Yes & 28 & 28 & \\  & \(T_{3}^{W}\to T_{1}^{W}\to T_{2}^{W}\) & Yes & 39 & 39 & 100\% \\  & \(T_{3}^{W}\to T_{1}^{W}\to T_{1}^{W}\) & Yes & 27 & - & \\  & \(T_{3}^{W}\to T_{1}^{W}\to T_{1}^{W}\) & No & 6 & - & \\ \hline \multirow{2}{*}{\(T_{i}^{[R-W]}\parallel T_{j}^{R-W}\)} & \(T_{1}^{R}\to T_{1}^{R}\to T_{1}^{W}\) & Yes & 18 & 18 & \\  & \(T_{1}^{R}\to T_{1}^{R}\to T_{1}^{W}\) & Yes & 150 & 50 & 100\% \\  & \(T_{2}^{R}\to T_{1}^{W}\to T_{1}^{W}\) & Yes & 17 & - & 17 & No & 24 & - \\  & \(T_{2}^{R}\to T_{2}^{W}\to T_{2}^{W}\) & Yes & \(T_{1}^{R}\to T_{1}^{W}\) & Yes & 18 & - \\ \hline \multirow{2}{*}{\(T_{i}^{[R-W]}\parallel T_{j}^{R-W}\)} & \(T_{1}^{R}\to T_{1}^{R}\to T_{1}^{W}\) & Yes & 19 & 29 & \\  & \(T_{1}^{R}\to T_{1}^{R}\to T_{1}^{R}\to T_{1}^{W}\) & Yes & 29 & 29 & \\  & \(T_{1}^{R}\to T_{1}^{R}\to T_{1}^{W}\to T_{1}^{W}\) & Yes & 34 & - & 100\% \\  & \(T_{2}^{R}\to T_{2}^{W}\to T_{2}^{W}\) & Yes & 37 & - & \\ \hline \multirow{2}{*}{\(T_{i}^{[R-W]}\parallel T_{j}^{R-W}\)} & \(T_{1}^{R}\to T_{1}^{R}\to T_{1}^{W}\) & Yes & 28 & 28 & \\  & \(T_{3}^{R}\to T_{1}^{R}\to T_{1}^{R}\) & Yes & 39 & 39 & 100\% \\  & \(T_{3}^{R}\to T_{1}^{R}\to T_{1}^{R}\to T_{1}^{R}\) & Yes & 27 & - & \\  & \(T_{3}^{R}\to T_{1}^{R}\to T_{1}^{R}\) & Yes & 6 & - & \\ \hline \multirow{2}{*}{\(T_{i}^{[R-W]}\parallel T_{j}^{R-W}\)} & \(T_{1}^{R}\to T_{1}^{R}\to T_{1}^{R}\to T_{1}^{W}\) & Yes & 18 & 18 & \\  & \(T_{1}^{R}\to T_{1}^{R}\to T_{1}^{R}\) & Yes & 17 & - & 17 & Yes & 50 & 100\% \\  & \(T_{2}^{R}\to T_{2}^{R}\to T_{2}^{W}\) & Yes & \(T_{1}^{R}\to T_{1}^{R}\to T_{1}^{W}\) & Yes & 24 & - & \\  & \(T_{2}^{R}\to T_{2}^{R}\to T_{2}^{W}\) & Yes & \(T_{1}^{R