基于活动图与顺序图的自动代码生成  被引量:2

Automatic Code Generation based on Activity and Sequence Diagrams

在线阅读下载全文

作  者:文浩 蒋建民 张仕[1] 洪中 WEN Hao;JIANG Jianmin;ZHANG Shi;HONG Zhong(College of Computer and Cyber Security,Fujian Normal University,Fuzhou 350117,China;Chengdu Institute of Computer Applications,Chinese Academy of Sciences,Chengdu 610041,China;College of Software Engineering,Chengdu University of Information Technology,Chengdu 610225,China)

机构地区:[1]福建师范大学计算机与网络空间安全学院,福建福州350117 [2]中国科学院成都计算机应用研究所,四川成都610041 [3]成都信息工程大学软件工程学院,四川成都610225

出  处:《软件工程》2021年第8期34-38,30,共6页Software Engineering

基  金:国家自然基金(61772004);国家自然基金(61361136002);福建省自然基金(2018J01777);福建省自然基金(2014J01221);成都信息工程大学引进人才科研启动项目(KYTZ202009).

摘  要:在模型驱动开发过程中,为了减轻开发人员的负担,通常采用自动工具生成代码框架。本文提出了一种基于活动图与顺序图自动生成代码框架的方法,并且基于该方法开发了原型工具。首先,给出了活动图和顺序图的形式化表达;其次,基于活动图和顺序图模型提出了三个实现自动代码生成的算法,该算法是通过活动图来描述对象内部的活动次序,并且利用顺序图体现对象之间的交互;最后,给出了一个原型工具,实现了模型到代码框架的自动转换。该工作可以确保转换的正确性,并且提高软件开发效率。In the process of model-driven development,automatic tools are usually used to generate code frameworks in order to reduce the burden on developers.This paper proposes a method to automatically generate code framework based on activity diagram and sequence diagram,and a prototype tool is developed based on this method.First,this paper gives a formal expression of activity diagrams and sequence diagrams;secondly,three algorithms for realizing automatic code generation are proposed based on the activity diagram and sequence diagram.The algorithm uses activity diagrams to describe the internal activity sequence of the object and uses the sequence diagram to reflect the interaction between the objects;finally,a prototype tool is given to realize the automatic conversion from the model to the code framework.This work can ensure the correctness of the conversion and improve the efficiency of software development.

关 键 词:模型驱动开发 自动代码生成 形式化方法 

分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象