首页> 外文期刊>Soft Computing >Search-based inference of dialect grammars
【24h】

Search-based inference of dialect grammars

机译:基于搜索的方言语法推断

获取原文
获取原文并翻译 | 示例

摘要

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.
机译:从软件维护工具到任何具有命令行界面的特定于业务的可编程环境,构建解析器对于许多工具的开发都是必不可少的任务。尽管有许多编程语言的语法可供使用,但由于标准语法未考虑的方言和变体的大量传播,这些语法几乎常常是无用的。手工编写语法显然是可行的,但是这可能是一个乏味且容易出错的任务,需要一定的技能,而这些技能并非总是可用。语法推断是一种可能的,具有挑战性的方法,用于从程序示例中获取合适的语法。但是,从头开始的推理带来了严重的可伸缩性问题,并且倾向于生成正确的,无意义的语法,这些语法难以理解,难以用于构建工具。本文介绍了一种基于遗传算法的方法,用于将现有语法发展为目标(方言)语法,从使用方言编写的示例中推断出变化。通过对C语言方言规则的推断而获得的结果表明,该算法能够成功地发展语法。检查表明,语法演变过程中自动进行的更改保留了其有意义的意义,与开发人员可以手工完成的相当。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号