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 条
  • [1] Search-based inference of dialect grammars
    Massimiliano Di Penta
    Pierpaolo Lombardi
    Kunal Taneja
    Luigi Troiano
    Soft Computing, 2008, 12 : 51 - 66
  • [2] Search-Based Regular Expression Inference on a GPU
    Valizadeh, Mojtaba
    Berger, Martin
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (PLDI):
  • [3] Bounding the Cost of Search-Based Lifted Inference
    Smith, David
    Gogate, Vibhav
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 28 (NIPS 2015), 2015, 28
  • [4] EvoSpex: A Search-Based Tool for Postcondition Inference
    Molina, Facundo
    Ponzio, Pablo
    Aguirre, Nazareno
    Frias, Marcelo F.
    PROCEEDINGS OF THE 32ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2023, 2023, : 1519 - 1522
  • [5] Seeding Grammars in Grammatical Evolution to Improve Search-Based Software Testing
    Anjum M.S.
    Ryan C.
    SN Computer Science, 2021, 2 (4)
  • [6] Efficient search-based inference for noisy-OR belief networks: TopEpsilon
    Huang, K
    Henrion, M
    UNCERTAINTY IN ARTIFICIAL INTELLIGENCE, 1996, : 325 - 331
  • [7] Search-based optimization
    Wheeler, WC
    CLADISTICS-THE INTERNATIONAL JOURNAL OF THE WILLI HENNIG SOCIETY, 2003, 19 (04): : 348 - 355
  • [8] On The Inference of Context-Free Grammars Based On Bottom-Up Parsing and Search
    Prajapati, Gend Lal
    Jain, Aditya
    Khandelwal, Mayank
    Nema, Pooja
    Shukla, Priyanka
    2009 SECOND INTERNATIONAL CONFERENCE ON EMERGING TRENDS IN ENGINEERING AND TECHNOLOGY (ICETET 2009), 2009, : 486 - 491
  • [9] Genetic search-based control
    Kureichik, VV
    Kureichik, VM
    AUTOMATION AND REMOTE CONTROL, 2001, 62 (10) : 1698 - 1710
  • [10] Search-based Model Merging
    Kessentini, Marouane
    Werda, Wafa
    Langer, Philip
    Wimmer, Manuel
    GECCO'13: PROCEEDINGS OF THE 2013 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE, 2013, : 1453 - 1460