作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2012, Vol. 38 ›› Issue (3): 37-38,42. doi: 10.3969/j.issn.1000-3428.2012.03.013

• 软件技术与数据库 • 上一篇    下一篇

一种多函数间的递归消除方法

潘 欣,石 川   

  1. (北京邮电大学智能通信软件与多媒体北京市重点实验室,北京 100876)
  • 收稿日期:2011-08-18 出版日期:2012-02-05 发布日期:2012-02-05
  • 作者简介:潘 欣(1989-),男,本科生,主研方向:机器学习,数据挖掘;石 川,副教授
  • 基金资助:

    国家自然科学基金资助项目(60905025, 90924029);国家“863”计划基金资助项目(2009AA04Z136)

Recursion-removal Method Among Multi-function

PAN Xin, SHI Chuan   

  1. (Beijing Key Laboratory of Intelligent Telecommunications Software and Multimedia, Beijing University of Posts and Telecommunications, Beijing 100876, China)
  • Received:2011-08-18 Online:2012-02-05 Published:2012-02-05

摘要: 为解决多函数间互相调用的递归问题,提出一种多函数间的递归消除方法。使用人工栈拆除函数间的互相调用,把递归限制在单个函数内,通过一门多锁法解决单个函数内多处出现递归的问题,研究递归消除深度对程序性能的影响。对占优树的递归消除实验表明,该方法可以解决多函数间的递归问题,且其时间效率是递归消除前的2倍。

关键词: 递归消除, 系统栈, 人工栈, 一门多锁

Abstract: In order to solve the recursion problems involving several functions, this paper proposes a systematic recursion-removal method. It cuts the calls among different functions through artificial stack and replaces the recursions inside each function with iteration. It also researches on the relation between recursion-removal depth and the programs’ time efficiency. Experiments prove that it can successfully remove the recursion of dominating tree and double the time efficiency before recursion-removal.

Key words: recursion-removal, system stack, artificial stack, a door with several keys

中图分类号: