Hello,
I'm having a bit of a headache over a search problem. My problem is that the
search code works the first time it is called but then fails if it is called
again.
Thus I have a list of problems and I wish to see if any of them contain a
valid solution. To do this I use a function that recurses through a list of
possibles, testing each in turn. When it finds a solution (using the search
procedure) it returns, however if not it will keep on going until there is
nothing else to check (at which point it fails).
My problem is that this works fine if the first item in the list holds a
valid solution, however if the first item fails and the second item is tested
the search procedure will raise and exception without actually doing any
search.
I've tested the second item independantly, so I know that there definitely is
a solution and that the search proc will find it. It would seem that the
search procedure is being somehow modified by the program run, however as far
as I can see it (and all it's associated variables) should be killed when the
search proc finishes.
A voice in my head tells me that I should clone the space and have the search
proc run on that, but I'm not sure.
I hope that's not totally unclear,
David.
-- David Stocks ai+cs undergrad, University of Edinburgh. remember: ech`echo xiun | tr nu oc | sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol - Please send submissions to users@mozart-oz.org and administriva mail to users-request@mozart-oz.org. The Mozart Oz web site is at http://www.mozart-oz.org/.