[eclipse-clp-users] Tail recursion in eclipse?

From: Martin Wegner <martinator.de_at_arcor.de>
Date: Tue, 05 May 2009 17:52:38 +0200
Hi,

does the eclipse compiler support and optimize tail recursion?

Is this code a real tail recursion?

randomGame(CurrentState, CurrentState, ActionPathsTemp, ActionPathsTemp)
:- terminal_State(CurrentState).

randomGame(CurrentState, TerminalState, ActionPaths, ActionPathsTemp) :-
                 findall(Move, random_Move(CurrentState, _Role, Move),
Moves),
                 nextState(CurrentState, Moves, NextState),
                 randomGame(NextState, TerminalState, ActionPaths,
[Moves|ActionPathsTemp]).

Thank you for your help!

Greetings, Martin
Received on Tue May 05 2009 - 15:52:59 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET