Writing a regular e xpression that exactly captures a set of desired strings is difficult, since regular expressions provide a compact syntax that makes it difficult to easily understand their meaning. Testing is widely used to validate regular expressions. Indeed, although a developer could have problems in writing the correct regular expression, (s)he can easily assess whether a string should be accepted or not. Starting from this observation, we propose an iterative mutation-based process that is able to test and repair a faulty regular expression. The approach consists in generating strings S that distinguish a regular expression r from its mutants, asking the user to assess the correct evaluation of S, and possibly substituting r with a mutant r′ that evaluates S more correctly than r; we propose four variants of the approach which differ in the policy they employ to judge whether r′ is better than r. Experiments show that the proposed approach is able to actually repair faulty regular expressions with a reasonable user’s effort.

Interactive testing and repairing of regular expressions / P. Arcaini, A. Gargantini, E. Riccobene (LECTURE NOTES IN COMPUTER SCIENCE). - In: Testing Software and Systems / [a cura di] I. Medina-Bulo, M.G. Merayo, R. Hierons. - [s.l] : Springer Verlag, 2018. - ISBN 9783319999265. - pp. 1-16 (( Intervento presentato al 30. convegno International Conference on Testing Software and Systems tenutosi a Cádiz nel 2018.

Interactive testing and repairing of regular expressions

P. Arcaini;E. Riccobene
2018

Abstract

Writing a regular e xpression that exactly captures a set of desired strings is difficult, since regular expressions provide a compact syntax that makes it difficult to easily understand their meaning. Testing is widely used to validate regular expressions. Indeed, although a developer could have problems in writing the correct regular expression, (s)he can easily assess whether a string should be accepted or not. Starting from this observation, we propose an iterative mutation-based process that is able to test and repair a faulty regular expression. The approach consists in generating strings S that distinguish a regular expression r from its mutants, asking the user to assess the correct evaluation of S, and possibly substituting r with a mutant r′ that evaluates S more correctly than r; we propose four variants of the approach which differ in the policy they employ to judge whether r′ is better than r. Experiments show that the proposed approach is able to actually repair faulty regular expressions with a reasonable user’s effort.
Theoretical Computer Science; Computer Science (all)
Settore INF/01 - Informatica
Book Part (author)
File in questo prodotto:
Non ci sono file associati a questo prodotto.
Pubblicazioni consigliate

Caricamento pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: http://hdl.handle.net/2434/622602
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 3
  • ???jsp.display-item.citation.isi??? 2
social impact