I believe the Out of local stack error is almost always (or always) from recursions that are too deep; in simple programs, those recursions are likely to be infinite. The problem in your code is indeed the left recursion issue; trying to solve mother(anything, B) will try to solve mother(anything, B1) mother(anything, B2) and so on until you run out of stack space.
I believe the Out of local stack error is almost always (or always) from recursions that are too deep; in simple programs, those recursions are likely to be infinite. The problem in your code is indeed the left recursion issue; trying to solve mother(anything, B) will try to solve mother(anything, B1), mother(anything, B2), and so on until you run out of stack space.
1 +1 and I want to add that the maximum recursion depth varies considerably depending upon the number and sizes of the terms that are handled (easily by factor 100 by factor 100 if lists are involved) and that tail recursion is the solution to largely circumventing excessive stack use. – Felix Dombek Feb 25 at 21:49 if tail recursion is supported by the compiler though. Like you can do it in Java but the JVM does not support it, right?
– dierre Feb 27 at 13:53 1 This code does not have that problem, though; it is an infinite recursion, independently of whether tail calls are used or not (in this case, reordering the goals in the rule for mother would fix the problem). – Jeremiah Willcock Feb 27 at 21:58.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.