> above(X,Y) :- above(X,Z), on(Z,Y).
This line alone tells me I'm going to have infinite recursion. That would be a problem in any language, of course, and isn't particularly hard to spot here.
This line alone tells me I'm going to have infinite recursion. That would be a problem in any language, of course, and isn't particularly hard to spot here.
Also, I want to note, although you didn't say otherwise, that the recursion may be hidden behind layers of indirection.
The GP writes as if proper testing and code review was unheared of so the issue would be the same in any language, in principle (safe for testing facilities, which weren't the point however).