Automatic Repair of Regular Expressions

被引:19
|
作者
Pan, Rong [1 ]
Hu, Qinheping [2 ]
Xu, Gaowei [2 ]
D'Antoni, Loris [2 ]
机构
[1] Univ Texas Austin, Austin, TX 78712 USA
[2] Univ Wisconsin, Dept Comp Sci, 1210 West Dayton St, Madison, WI 53706 USA
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2019年 / 3卷 / OOPSLA期
关键词
Program Repair; Regular Expressions; Program Synthesis;
D O I
10.1145/3360565
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We introduce RFixer, a tool for repairing complex regular expressions using examples. Given an incorrect regular expression and sets of positive and negative examples, RFixer synthesizes the closest regular expression to the original one that is consistent with the examples. Automatically repairing regular expressions requires exploring a large search space because practical regular expressions: i) are large, ii) operate over very large alphabets e.g., UTF-16 and ASCII-and iii) employ complex constructs e.g., character classes and numerical quantifiers. RFixer's repair algorithm achieves scalability by taking advantage of structural properties of regular expressions to effectively prune the search space, and it employs satisfiability modulo theory solvers to efficiently and symbolically explore the sets of possible character classes and numerical quantifiers. RFixer could successfully compute minimal repairs for regular expressions collected from a variety of sources, whereas existing tools either failed to produce any repair or produced overly complex repairs.
引用
收藏
页数:29
相关论文
共 50 条
  • [1] Automatic Checking of Regular Expressions
    Larson, Eric
    2018 IEEE 18TH INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM), 2018, : 225 - 234
  • [2] Automatic Synthesis of Regular Expressions from Examples
    Bartoli, Alberto
    Davanzo, Giorgio
    De Lorenzo, Andrea
    Medvet, Eric
    Sorio, Enrico
    COMPUTER, 2014, 47 (12) : 72 - 80
  • [3] Enhanced Automatic Feedback Generation for the Learning of Regular Expressions
    Okuboyejo, Olaperi Yeside
    PROCEEDINGS OF THE ANNUAL CONFERENCE OF THE SOUTH AFRICAN INSTITUTE OF COMPUTER SCIENTISTS AND INFORMATION TECHNOLOGISTS (SAICSIT 2018), 2018, : 330 - 330
  • [4] Automatic Repair of Overflowing Expressions with Abstract Interpretation
    Logozzo, Francesco
    Martel, Matthieu
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2013, (129): : 341 - 357
  • [5] Automatic Generation of Regular Expressions from Examples with Genetic Programming
    Bartoli, Alberto
    Davanzo, Giorgio
    De Lorenzo, Andrea
    Mauri, Marco
    Medvet, Eric
    Sorio, Enrico
    PROCEEDINGS OF THE FOURTEENTH INTERNATIONAL CONFERENCE ON GENETIC AND EVOLUTIONARY COMPUTATION COMPANION (GECCO'12), 2012, : 1477 - 1478
  • [6] GENERATION OF REGULAR EXPRESSIONS FOR AUTOMATA BY INTEGRAL OF REGULAR EXPRESSIONS
    SMITH, LW
    YAU, SS
    COMPUTER JOURNAL, 1972, 15 (03): : 222 - &
  • [7] Regular Expressions for Web Advertising Detection Based on an Automatic Sliding Algorithm
    Riaño, D. (donovan20@comunidad.unam.mx); Piñon, R. (rodrigo_pinon@comunidad.unam.mx); Molero-Castillo, G. (gmoleroca@fi-b.unam.mx); Bárcenas, E. (ebarcenas@unam.mx); Velázquez-Mena, A. (mena@fi-b.unam.mx), 1600, Pleiades journals (46):
  • [8] Regular Expressions for Web Advertising Detection Based on an Automatic Sliding Algorithm
    D. Riaño
    R. Piñon
    G. Molero-Castillo
    E. Bárcenas
    A. Velázquez-Mena
    Programming and Computer Software, 2020, 46 : 652 - 660
  • [9] Regular Expressions for Web Advertising Detection Based on an Automatic Sliding Algorithm
    Riano, D.
    Pinon, R.
    Molero-Castillo, G.
    Barcenas, E.
    Velazquez-Mena, A.
    PROGRAMMING AND COMPUTER SOFTWARE, 2020, 46 (08) : 652 - 660
  • [10] Regular expressions
    Becker, P
    DR DOBBS JOURNAL, 2006, 31 (05): : 52 - +