基于图文法的程序流程图与源代码自动转换  被引量:6

Automatic transformation between programs' flowcharts and codes based on graph grammar

在线阅读下载全文

作  者:朱云[1] 曾晓勤[1] 朱宁[1] 刘禹锋 

机构地区:[1]河海大学计算机与信息学院,江苏南京211100

出  处:《计算机工程与科学》2015年第5期937-945,共9页Computer Engineering & Science

基  金:国家自然科学基金资助项目(61170089)

摘  要:程序流程图在整个软件工程的生命周期中发挥着非常重要的作用。在软件设计中,设计人员通常需要先根据算法从结构上画出程序执行流程图,然后再依据流程图写出相应的源程序代码;在分析和维护软件时,如果能先将源程序代码逆向转换成流程图,则可以有效地帮助分析程序结构。显然,若能让计算机自动地实现流程图与源程序代码之间的相互转换,将大量节省软件开发的人力资源和时间耗费。讨论了如何利用基于边的图文法EGG来自动地实现这种转换,并用具体例子展示了应用EGG图文法的归约和推导操作分别实现流程图的语法分析和流程图的逆向生成,前者可以完成从流程图自动生成源程序代码,而后者则可以从源程序代码自动生成流程图。Flowchart is very important in the lifecycle of software engineering. During the design of a program,programmers usually need to draw a structural flowchart before coding. While in the course of the analysis and maintenance of a program,it can be helpful for programmers to analyze the program's structure by firstly reversing the source codes to a corresponding flowchart. Obviously, automatical transformation between flowcharts and source codes can save plenty of human resources and lots of de- velopment time. We discuss how to make use of the Edge-based Graph Grammar (EGG) to automatical- ly perform the transformation, and demonstrate the realization of grammatical analysis and reverse gener- ation of flowcharts by applying the reduction and derivation operations of the EGG through an example.

关 键 词:图文法 流程图 源程序 归约 推导 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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