Timothy Miller wrote:
The bottom line is that whatever you might want to describe
recursively, you're better off describing as a loop or an explicit
state machine. Design a state machine that has a stack, and you have
what's called a push-down automaton (PDA), something that can process
context-free languages.
Actually, a FSA with a stack can process limited context languages. The
usual example for this is the evaluation of an arithmetic statement. E.G.:
a = x * ( y + z )
where each symbol is considered to be a token. A PDA can process this,
but it must consider more than one symbol at once. IIRC, it must
consider up to 3 symbols at once depending on whether they are
operations or tokens for values.
Note that this process is not a true recursive one, but in some cases it
is needed to place an item on the stack for later use.
This machine could be implemented in hardware in a processor. But, I
don't know about implementing it in other types of hardware. A
processor would have access to main memory and could simply use _the_
stack for the PDAs stack. With a GPU, I don't think that the same type
of stack space would be available.
Yet, if you have a problem for which you can not specify the number of
operations needed you are going to have to use this approach and this
would mean that a stack in memory would be needed.
--
JRT
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)