| 注册
首页|期刊导航|计算机应用与软件|基于状态机的递归算法非递归化框架

基于状态机的递归算法非递归化框架

杨硕 周霜菊 张志杰

计算机应用与软件2018,Vol.35Issue(4):122-128,7.
计算机应用与软件2018,Vol.35Issue(4):122-128,7.DOI:10.3969/j.issn.1000-386x.2018.04.023

基于状态机的递归算法非递归化框架

NON-RECURSIVE CONVERSION FRAMEWORK OF RECURSIVE ALGORITHM BASED ON STATE MACHINE

杨硕 1周霜菊 2张志杰3

作者信息

  • 1. 沈阳化工大学计算机科学与技术学院 辽宁沈阳110142
  • 2. 成都大学美术与影视学院 四川成都610106
  • 3. 西南民族大学计算机科学与技术学院 四川成都610041
  • 折叠

摘要

Abstract

Converting recursive algorithms to non-recursive ones can avoid the error of stack overflow and improve algorithm running efficiency.Thus,a conversion framework,which is benefit from state machine,is proposed.In this framework,the actions of function calling and returning are considered as state transition,and the recursive procedures are encoded by "entering function","entering recursive point" and "returning from recursive point" et al.In experiments,the conversions of several classic recursive algorithms show that,compared with the framework of "while-while" or "while-if" et al.,the proposed framework has the advantages of clear structure,compact codes,and more programmatic conversion procedure.

关键词

状态机//递归算法/非递归算法/框架

Key words

State machine/Stack/Recursive algorithm/Non-recursive algorithm/Framework

分类

信息技术与安全科学

引用本文复制引用

杨硕,周霜菊,张志杰..基于状态机的递归算法非递归化框架[J].计算机应用与软件,2018,35(4):122-128,7.

基金项目

成都大学龙泉驿区汽车创意设计试点区项目(2015-CX00-00010-ZF) (2015-CX00-00010-ZF)

辽宁省教育厅基金项目(L2014171) (L2014171)

四川省科技支撑计划项目(2016GZ0396). (2016GZ0396)

计算机应用与软件

OA北大核心CSTPCD

1000-386X

访问量0
|
下载量0
段落导航相关论文