{"title":"Improving implementation of code generators: A regular-expression approach","authors":"María Consuelo Franky, Jaime A. Pavlich-Mariscal","doi":"10.1109/CLEI.2012.6427199","DOIUrl":null,"url":null,"abstract":"Code generators are important tools in software development, to automate repetitive coding tasks, facilitate portability, abstract implementation details, and reduce development costs. However, as the complexity of code generators grow, they tend to be harder to maintain, especially when there is a large amount of templates involved. This paper proposes an approach for code generation based on regular expression substitution. Instead of using templates for code generation, this approach transforms existing source code, using regular expression substitution, to implement the required functionality. We are currently applying this technique to strengthen the code generation framework of Heinsohn Business Technology, as part of the “Lion” project co-financed by Colciencias. Our experience shows that, although this approach has a steeper learning curve, it facilitates capitalization of the experience of software development organizations, selecting successfully modules that are taken as a reference source for code generation in future projects.","PeriodicalId":290390,"journal":{"name":"2012 XXXVIII Conferencia Latinoamericana En Informatica (CLEI)","volume":"6 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"11","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2012 XXXVIII Conferencia Latinoamericana En Informatica (CLEI)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CLEI.2012.6427199","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 11
Abstract
Code generators are important tools in software development, to automate repetitive coding tasks, facilitate portability, abstract implementation details, and reduce development costs. However, as the complexity of code generators grow, they tend to be harder to maintain, especially when there is a large amount of templates involved. This paper proposes an approach for code generation based on regular expression substitution. Instead of using templates for code generation, this approach transforms existing source code, using regular expression substitution, to implement the required functionality. We are currently applying this technique to strengthen the code generation framework of Heinsohn Business Technology, as part of the “Lion” project co-financed by Colciencias. Our experience shows that, although this approach has a steeper learning curve, it facilitates capitalization of the experience of software development organizations, selecting successfully modules that are taken as a reference source for code generation in future projects.
代码生成器是软件开发中的重要工具,可以自动执行重复的编码任务,促进可移植性,抽象实现细节,并降低开发成本。然而,随着代码生成器复杂性的增长,它们往往更难以维护,特别是当涉及到大量模板时。提出了一种基于正则表达式替换的代码生成方法。这种方法不使用模板来生成代码,而是使用正则表达式替换来转换现有的源代码,以实现所需的功能。作为Colciencias共同资助的“Lion”项目的一部分,我们目前正在应用该技术来加强Heinsohn Business Technology的代码生成框架。我们的经验表明,尽管这种方法有一个陡峭的学习曲线,但它促进了软件开发组织经验的资本化,成功地选择了模块,这些模块被作为未来项目中代码生成的参考源。