摘要
对代码生成、映射以及逆向技术进行了深入研究,并将研究成果应用于支持模型驱动开发的领域建模工具的研制。代码生成采用基于元数据的文本模版演化方案实现,演化机制包含宏替代、条件输出、循环输出;代码映射通过界定框架代码片段,并分别对其进行局部的代码生成、替换实现;代码逆向通过解析框架代码片段、提取模型信息实现。分析了模版设计、代码扫描所需遵循的文法。给出了软件实现方案。应用结果表明,技术与实现方案在不同的应用环境中体现出良好的适应性和可扩展性。
The research of the techniques serving for code generating,mapping and reversing is explained,and the corresponding applications into the development of the Domain-Oriented Modeling Tools which support the Model-Driven Development(MDD) are introduced.Code generating is a process of taking evolvements from the code template based on meta-data,key mechanisms for this evolvement include macro-substitution,conditionally code-exporting and circularly code-exporting.Code mapping needs to locate the code segments which mapping the corresponding model information separately,and replace them with the production of the code-generator respectively.Code reversing is realized by parsing the code segments mentioned before and extracting the model information from the segments.Grammars used to design the code templates and conformed by code-parsing are analyzed. The software implementation is also put forward.The applications in diversified environments testify the solution has good adaptability and expansibility.
出处
《计算机工程与应用》
CSCD
北大核心
2009年第28期6-9,12,共5页
Computer Engineering and Applications
基金
国家部委预研基金资助项目国家部委预研基金资助项目
第四十批中国博士后科学基金(No20060400391)~~
关键词
模型驱动开发
代码生成
代码映射
代码逆向
Model-Driven Developmen(tMDD)
code generating
code mapping
code reversing