Search-based inference of dialect grammars

被引:6
|
作者
Di Penta, Massimiliano
Lombardi, Pierpaolo
Taneja, Kunal
Troiano, Luigi
机构
[1] Univ Sannio, Res Ctr Software Technol, I-82100 Benevento, Italy
[2] N Carolina State Univ, Raleigh, NC 27695 USA
关键词
grammar inference; genetic algorithms; source code analysis;
D O I
10.1007/s00500-007-0216-5
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Building parsers is an essential task for the development of many tools, from software maintenance tools to any kind of business-specific, programmable environment having a command-line interface. Whilst grammars for many programming languages are available, these are, very often, almost useless because of the large diffusion of dialects and variants not contemplated by standard grammars. Writing a grammar by hand is clearly feasible, however it can be a tedious and error-prone task, requiring appropriate skills not always available. Grammar inference is a possible, challenging approach for obtaining suitable grammars from program examples. However, inference from scratch poses serious scalability issues and tends to produce correct, but meaningless grammars, hard to be understood and used to build tools. This paper describes an approach, based on genetic algorithms, for evolving existing grammars towards target (dialect) grammars, inferring changes from examples written using the dialect. Results obtained experimenting the inference of C dialect rules show that the algorithm is able to successfully evolve the grammar. Inspections indicated that the changes automatically made to the grammar during its evolution preserved its meaningfulness, and were comparable to what a developer could have done by hand.
引用
收藏
页码:51 / 66
页数:16
相关论文
共 50 条
  • [41] Search-based model transformation by example
    Kessentini, Marouane
    Sahraoui, Houari
    Boukadoum, Mounir
    Ben Omar, Omar
    SOFTWARE AND SYSTEMS MODELING, 2012, 11 (02): : 209 - 226
  • [42] Search-Based Procedural Content Generation
    Togelius, Julian
    Yannakakis, Georgios N.
    Stanley, Kenneth O.
    Browne, Cameron
    APPLICATIONS OF EVOLUTIONARY COMPUTATION, PT I, PROCEEDINGS, 2010, 6024 : 141 - +
  • [43] Bounded recursive decomposition: A search-based method for belief-network inference under limited resources
    Monti, S
    Cooper, GF
    INTERNATIONAL JOURNAL OF APPROXIMATE REASONING, 1996, 15 (01) : 49 - 75
  • [44] Search-based model transformation by example
    Marouane Kessentini
    Houari Sahraoui
    Mounir Boukadoum
    Omar Ben Omar
    Software & Systems Modeling, 2012, 11 : 209 - 226
  • [45] Search-Based Model Transformations with MOMoT
    Fleck, Martin
    Troya, Javier
    Wimmer, Manuel
    THEORY AND PRACTICE OF MODEL TRANSFORMATIONS, ICMT 2016, 2016, 9765 : 79 - 87
  • [46] Search-Based Translations for Tensor Operations
    Qiu, Jie
    PROCEEDINGS OF THE 33RD ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2024, 2024, : 1917 - 1919
  • [47] Challenges Classification in Search-Based Refactoring
    Shafiei, Narjes
    Keyvanpour, Mohammad Reza
    2020 6TH INTERNATIONAL CONFERENCE ON WEB RESEARCH (ICWR), 2020, : 106 - 112
  • [48] A survey on search-based software design
    Raiha, Outi
    COMPUTER SCIENCE REVIEW, 2010, 4 (04) : 203 - 249
  • [49] Search-based testing in membrane computing
    Ana Ţurlea
    Marian Gheorghe
    Florentin Ipate
    Savas Konur
    Journal of Membrane Computing, 2019, 1 : 241 - 250
  • [50] Search-based improvement of subsystem decompositions
    Seng, Olaf
    Bauer, Markus
    Biehl, Matthias
    Pache, Gert
    GECCO 2005: GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE, VOLS 1 AND 2, 2005, : 1045 - 1051