• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2007, Vol. 29 ›› Issue (10): 145-147.

• 论文 • 上一篇    下一篇

形式推导支持的递归程序向非递归程序的转换

化志章[1,2] 揭安全[1,2] 李云清[1] 薛锦云[1,2]   

  • 出版日期:2007-10-01 发布日期:2010-06-02

  • Online:2007-10-01 Published:2010-06-02

摘要:

本文提出一种递归消除的方法,适于一类基于递归数据结构的程序。该方法将递归程序作为初始规约,以求解过程的状态变迁序列作迭代模式;通过数据展开和变换实现初始规约向基于序列描述规约的变换,继而用PAR形式推导出序列规约的递推关系,并以之为核心近乎机械地构造出非递归算法。树和图的两个算法实例说明了本方法的有效性。

关键词: 算法推导 形式方法 递归程序变换 PAR方法

Abstract:

An approach to recursion removing is prompted, which suits for the reeursive programs with reeursive aata structures. It takes the reeursive program a s an initial specification, and the state transformation sequence of the solving process as an iterative model By data transformation, the transformation from the initial specification to the sequence-based description specification is implemented,and thus the sequence speeifieation's reeursive relatioonship is derived using the PAR method. The non-reeursive program is constructed almost automatically from recurrence. Two algorithms of trees and graphs are derived to illustrate the validity.

Key words: (algorithmic derivation, formal method, recursive structure, PAR method)