6  CONCLUSIONS 
In  programs  of  dynamically  typed  languages,  type 
correctness  cannot  be  verified  by  compilers  before 
program execution. Therefore, mutants  that activate 
type errors can be created in the mutation testing. This 
kind of mutant could be killed by any test and is not 
supportive in the evaluation of a test suite quality. In 
this  work,  we  have  addressed  the  problem  of 
incompetent mutants in Python programs.  
A  type  analysis  has  been  proposed  that  assists 
with  the  identification  of  a  subset  of  potential 
incompetent mutants before creation and testing of a 
mutant.  The  approach  has  been  implemented  and 
integrated with MutPy – the mutation testing tool of 
Python. This proof of concept has been evaluated in 
preliminary experiments. As expected, the number of 
incompetent  mutants  could  be  lowered.  This  effect 
depends strongly on the selected mutation operators. 
Those mutation operators that are prone to generate 
incompetent mutants would benefit from the solution. 
The type analysis adds overhead to the mutation 
process. Most of the work is performed once before 
mutant  generation.  Hence,  the  evaluation  of  a 
program  with  many  mutation  operators  and  many 
incompetent  mutants  could  benefit  from  the  type 
analysis, in comparison to the situation when only a 
few mutation operators selected to avoid incompetent 
mutants are applied. However, the preliminary results 
showed that the time overhead of type analysis could 
surpass the time lowering caused by a slight drop in 
the number of incompetent mutants. 
Type analysis was intended to overcome obstacles 
in the application of a variety of mutation operators 
that would have been excluded or limited due to the 
creation of incompetent mutants. Time measurement 
does not confirm this supposition. However, detailed 
efficiency  evaluation  needs  experiments  on  a  more 
comprehensive set of programs. Combination of the 
approach with other mutation testing tools (Bingham, 
2017), (Thoma, 2020) is an open question, as it is not 
known how they handle incompetent mutants. 
REFERENCES 
Bottaci, L., 2010. Type Sensitive Application of Mutation 
Operators  for  Dynamically  Typed  Programs.  In: 
Proceedings of 3rd International Conference on 
Software Testing, Verification and Validation 
Workshops (ICSTW).  IEEE  Comp.  Soc.  pp  126-131. 
doi: 10.1109/ICSTW.2010.56. 
Bingham,  A.  2017.  Mutation  Testing  in  Python,  [Online] 
[Accessed  18  Jan  2021]  Available  from: 
balabit.github.io/coderegation/notes/2017-05-10-
Austin-Bingham-Mutation-Testing-in-Python. 
Derezinska,  A.,  and  Hałas,  K.,  2014a.    Experimental 
Evaluation of Mutation Testing Approaches to Python 
Programs.  In:  Proceedings of IEEE International 
Conference on Software Testing, Verification, and 
Validation Workshops. IEEE Comp. Soc. pp. 156-164. 
doi: 10.1109/ICSTW.2014.24. 
Derezinska, A., and Hałas, K., 2014b. Analysis of Mutation 
Operators for the Python Language. In: Zamojski, W., 
Mazurkiewicz, J., Sugier, J., Walkowiak, T., Kacprzyk, 
J.: (eds.) DepCos-RELCOMEX 2014. AISC, vol. 286. 
Springer  Int.  Pub.  Switzerland.  pp.  155-164.  doi: 
10.1007/978-3-319-07013-1_15. 
Derezińska,  A.  and  Hałas,  K.,  2015.  Improving  Mutation 
Testing  Process  of  Python  Programs,  In:  Silhavy,  R., 
Senkerik, R., Oplatkova, Z.K., Silhavy, P., Prokopova, 
Z. (eds.) Software Engineering in Intelligent Systems, 
AISC,  vol.  349,  Springer.  pp.  233-242.  doi: 
10.1007/978-3-319-18473-9_23. 
Gopinath,  R.  and  Walkingshaw,  E.,  2017.  How  good  are 
your  types?  Using  mutation  analysis  to  evaluate  the 
effectiveness  of  type  annotations.  In:  Proceedings of 
10th IEEE International Conference on Software 
Testing, Verification and Validation Workshops,  pp. 
122-127. IEEE Comp. Society. 
Monat, R., Ouadjaout, A. and Mine, A. 2020. Static Type 
Analysis  by  Abstract  Interpretation  of  Python 
Programs.  In: 34
th
 European Conference on Object-
Oriented Programming, ECOOP,  No17,  pp.  17:1-
17:29. doi: 10.4230/LIPIcs.ECOOP.2020.17. 
MutPy mutation testing tool for Python. [Online] [Accessed 
17  Jan  2021]  Available  from:  https://github.com/ 
mutpy/mutpy. 
mypy  -  optional  static  type  checker  for  Python.  [Online] 
[Accessed 11  Jan  2021]  Available  from:  http://mypy-
lang.org/. 
Papadakis, M., Kintis, M., Zhang, Jie, Jia, Y., Le Traon, Y., 
and Harman, M., 2019. Chapter Six - Mutation testing 
advances:  an  analysis  and  survey.  Advances in 
Computers.  112,  pp.  275-378.  Elsevier.  doi:10.1016/ 
bs.adcom.2018.03.015. 
Pizzoleto, A. V., Ferrari, F. C., Offutt, J., Fernandes, L., and 
Ribeiro, M., 2019. A systematic literature review of 
techniques and metrics to reduce the cost of mutation 
testing. Journal of Systems and Software. 157, Elsevier. 
doi:10.1016/j.jss.2019.07.100. 
Python documentation. [Online] [Accessed  13 Dec  2020] 
Available from: https://docs.python.org/3/. 
Thoma, M. 2020. Mutation Testing with Python. [Online] 
[Accessed  18  Jan  2021]  Available  from: 
https://medium.com/analytics-vidhya/unit-testing-in-
python-mutation-testing-7a70143180d8. 
Vitousek,  M. M.,  Kent, A.  M., Siek,  J.  G., and Baker,  J., 
2014.  Design  and  evaluation  of  gradual  typing  for 
Python. In: Black, A. P., and Tratt, L., (ed.), DLS, pp. 
45–56, ACM.