Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: possible to write translate program from recursive C to no recursive C?

Author: Omid David Tabibi

Date: 00:40:39 09/15/03

Go up one level in this thread


On September 15, 2003 at 00:04:21, Uri Blass wrote:

>Can programmers write a program that take a code with recursive functions and
>translate it to a code without recursive functions that does the same thing?
>
>Do not answer me that the compiler does it by translating it to assembler
>because the translation should be done to a program in the same computer
>language so a C source should be translated to another C source.
>

The problem has nothing do with C, since it is an algorithmic issue. Translating
a tail-recursion into an iterative version is usually easy (actually, in some
cases tail-recursions are already translated into iterative versions by the
compiler). But non-tail-recursions are quite hard to translate into iterative
versions. It is especially hard to find a non-recursive implementation for DFS.


>Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.