Structured flowchart( SFC) and Automatic code generation based on SFC( CG-SFC) have been widely used in software requirements,design and testing phases. Some CG-SFC tools such as Rhapsody have the ability to build flo...Structured flowchart( SFC) and Automatic code generation based on SFC( CG-SFC) have been widely used in software requirements,design and testing phases. Some CG-SFC tools such as Rhapsody have the ability to build flowchart and generate code,but they do not check whether a given flowchart is correct or structural. For unstructured error ‘goto'statements will be generated randomly. We proposed three algorithms and some error recognition criteria to solve those problems. Structure recognition algorithm can recognize Selection,While/for and do-while structures. Error recognition algorithm incorporating criteria can check all the errors. At last,we develop a CG-SFC system,and compared with existing Rhapsody,it shows that the proposed algorithms are correct and effective.展开更多
基金Sponsored by the National Natural Science Foundation of China(Grant No.61402131)the China Postdoctoral Science Foundation(Grant No.2014M551245,2016T90293)+1 种基金the Heilongjiang Postdoctoral Science Foundation(Grant No.LBH-Z13105)the Fundamental Research Funds for the Central Universities(Grant No.HIT.NSRIF.201651)
文摘Structured flowchart( SFC) and Automatic code generation based on SFC( CG-SFC) have been widely used in software requirements,design and testing phases. Some CG-SFC tools such as Rhapsody have the ability to build flowchart and generate code,but they do not check whether a given flowchart is correct or structural. For unstructured error ‘goto'statements will be generated randomly. We proposed three algorithms and some error recognition criteria to solve those problems. Structure recognition algorithm can recognize Selection,While/for and do-while structures. Error recognition algorithm incorporating criteria can check all the errors. At last,we develop a CG-SFC system,and compared with existing Rhapsody,it shows that the proposed algorithms are correct and effective.