摘要
程序流程图用标准的符号以图形化形式描述程序运行的步骤,是程序设计使用最为广泛的工具。在实际的软件开发过程中,为了理解和分析已有的源代码,往往需要将源代码转换为流程图。现有的一些方法和工具实现了把程序源码转化成流程图的功能,但由于代码实现方式或编程语言的不同,相同流程的代码得到的流程图结构都跟程序源码紧密相关,得到的流程图不够标准,不便于用户的理解和使用。针对该问题,论文提出了一种将程序源代码转换为标准流程图的方法。首先,定义了标准化流程图的节点类型及其结构样式;然后,给出了将特定程序语言生成的流程图转换为标准化流程图的方法,在该过程中同时解决了原有代码中存在的冗余代码问题。通过实例分析表明,论文方法在标准化基于源码的流程图方面是有效的。
The program flow chart is the most widely used tool for programming,and it uses standard symbols to graphically describe the steps of the program.In the software development process,in order to understand and analyze the existing source codes,it is often necessary to convert the source code into a flowchart.Some existing methods and tools implement the function of converting the program source code into a flowchart.However,for different code implementation methods or programming languages,the flowchart structure obtained from the codes of the same process are closely related to the program source codes.Consequently,the obtained flow chart is not convenient for the user to understand and use.Aiming at this problem,this paper proposes a method to convert program source code into a standard flow chart.Firstly,the node type of the standardized flow chart and its structural style are defined.Then,the method of converting the flow chart generated by the specific programming language into a standardized flow chart is given.In the process,the redundant codes existing in the original code is solved at the same time.The example analysis shows that the method is effective in standardizing source-based flow charts.
作者
宋倩
张峰
SONG Qian;ZHANG Feng(School of Computer Science and Engineering,Shandong University of Science and Technology,Qingdao 266590)
出处
《计算机与数字工程》
2019年第4期878-883,965,共7页
Computer & Digital Engineering
基金
国家自然科学基金(编号:61502281)
山东省智慧矿山信息技术重点实验室开放基金
山东科技大学人才引进科研启动基金(编号:2014RCJJ049)
山东科技大学教育教学研究"群星计划"项目(编号:QX2018M22)资助
关键词
程序流程图
标准程序流程图
程序流程图标准化方法
冗余检测
program flow chart
standard program flow chart
program flow chart standardization method
redundancy detection