共查询到20条相似文献,搜索用时 109 毫秒
1.
徐炳亭 《计算机应用与软件》1997,14(1):23-29,39
本文介绍了关系型数据库中层次型数据的递归检索法,并给出一个通用递归检索程序,程序模块与数据库和数组结合相得益彰,并寓教学与实用为一体。 相似文献
2.
递归是一种重要的程序设计方法,但在教学过程中一直是个难点。本文从方法论的角度对递归程序设计进行系统的阐述,介绍了递归程序设计的一般步骤和方法,以及如何通过分治和回溯等策略进行递归程序设计。 相似文献
3.
递归是设计程序的一种重要方法,文中对递归的定义及递归的基本条件进行了分析,给出了递归程序设计的基本方法,并结合数据结构中二叉树遍历和单链表结点输出的实例进行了验证,最后对递归程序进行了深度分析,说明了递归是一种有效的程序设计方法。 相似文献
4.
李威赫 《电脑编程技巧与维护》2017,(15)
在数据结构基础上使用程序递归算法设计是目前进行软件开发应用最广泛的方法.使用递归算法进行程序编写可以减少很多操作细节,从而简化程序编写,而且递归算法结构简单且清晰,易读性比较强,最大的优势递归算法正确率高、验证比较方便.对递归程序算法的应用进行了分析,并探讨了递归算法的实现策略. 相似文献
5.
6.
以问题结构为基础的递归程序设计 总被引:7,自引:0,他引:7
对递归程序的结构进行了较为深入的研究,提出了递归程序的更一般结构,根据此结构,给出了复杂的递归疸的程序设计方法,根据此方法,可方便地写出较为复杂的递归问题的递归程序,从而提高设计递归程序的效率。 相似文献
7.
递归是一种重要的程序设计方法,但在教学过程中一直是个难点.本文从方法论的角度对递归程序设计进行系统的阐述,介绍了递归程序设计的一般步骤和方法,以及如何通过分治和回溯等策略进行递归程序设计. 相似文献
8.
9.
递归是程序设计语言中的重要组成部分,但在递归知识的教学中,却是学生最不容易理解的。通过一个案例相关分析,剖析递归调用过程,阐述案例在教学中的应用。通过该案例设计与分析,探讨案例教学中案例设计的有关问题。 相似文献
10.
本文提出了一种对递归数据结构的归纳性质进行自动化分析的框架.工作分为三个主要部分.首先,它将递归数据结构的归纳性质分为两个主要类别,并提出对应的处理模式,从而帮助简化对于程序中的递归数据结构上的相关性质的分析.其次,提出了一种称为分割与拼接的技术来发现和描述递归数据结构是如何被程序修改的:递归数据结构首先被分割为若干个互不相交的片段,然后这些片段以新的方式重新拼接在一起,形成一个新的数据结构.这个技术的重点在于如何将程序原有的性质保留下来,从而为后面的分析过程所使用.最后,提出了一种调用上下文敏感的程序摘要过程间分析方法.案例分析和实验结果表明我们的分析框架可以有效地分析递归数据结构的归纳性质,并生成对程序证明过程有用的断言. 相似文献
11.
程序设计中没有用到循环或递归算法,很难解决一些实际问题。本文以斐波那契(Fibonacci)数列为例对递归与循环算法的时间复杂度作了比较、分析。 相似文献
12.
13.
递归是程序设计中一种重要的思想方法。递归算法代码量小、求解思路清晰,解决复杂问题的方案优雅而简洁,但递归算法难以掌握。结合实例以工作团队的视角进行递归算法设计,提出首先保证正确设计递归算法然后再分析递归执行过程的教学思路,在教学实践中取得良好效果。 相似文献
14.
15.
程序设计中递归函数教学问题探究 总被引:1,自引:0,他引:1
递归问题是程序设计语言教学中的一个重点、难点内容,针对递归教学的教学特点,阐述递归函数的精髓和教学方法,提出将理论和实践结合起来,通过剖析学生在学习递归函数时产生的错误和误区,应用实例和类比策略帮助学生解决递归函数学习中存在的问题,取得了事半功倍的教学效果。 相似文献
16.
Program termination verification is a challenging research subject of significant practical importance. While there is already a rich body of literature on this subject, it is still undeniably a difficult task to design a termination checker for a realistic programming language that supports general recursion. In this paper, we present an approach to program termination verification that makes use of a form of dependent types developed in Dependent ML (DML), demonstrating a novel application of such dependent types to establishing a liveness property. We design a type system that enables the programmer to supply metrics for verifying program termination and prove that every well-typed program in this type system is terminating. We also provide realistic examples, which are all verified in a prototype implementation, to support the effectiveness of our approach to program termination verification as well as its unobtrusiveness to programming. The main contribution of the paper lies in the design of an approach to program termination verification that smoothly combines types with metrics, yielding a type system capable of guaranteeing program termination that supports a general form of recursion (including mutual recursion), higher-order functions, algebraic datatypes, and polymorphism. 相似文献
17.
18.
19.
《Parallel and Distributed Systems, IEEE Transactions on》2002,13(2):167-178
Programs whose parallelism stems from multiple recursion form an interesting subclass of parallel programs with many practical applications. The highly irregular shape of many recursion trees makes it difficult to obtain good load balancing with small overhead. We present a system, called REAPAR, that executes recursive C programs in parallel on SMP machines. Based on data from a single profiling run of the program, REAPAR selects a load-balancing strategy that is both effective and efficient and it generates parallel code implementing that strategy. The performance obtained by REAPAR on a diverse set of benchmarks matches that published for much more complex systems requiring high-level problem-oriented explicitly parallel constructs. A case study even found REAPAR to be competitive to handwritten (low-level, machine-oriented) thread-parallel code 相似文献
20.
《IEEE transactions on pattern analysis and machine intelligence》1987,(7):777-784
Inductive inference, the automatic synthesis of programs, bears certain ostensible relationships with program testing. For inductive inference, one must take a finite sample of the desired input/output behavior of some program and produce (synthesize) an equivalent program. In the testing paradigm, one seeks a finite sample for a function such that any program (in a given set) which computes something other than the object function differs from the object function on the finite sample. In both cases, the finite sample embodies sufficient knowledge to isolate the desired program from all other possibilities. These relationships are investigated and general recursion theoretic properties of testable sets of functions are exposed. 相似文献