This is the reason for this failure. Your request does not end because there is a failure-slice of your program that does not end:
? - frack (4).
frack (3): - false .
frack (X): -
frack (X-1), false .
You can fix this only by changing something in the visible part. Three SO answers suggest using (is)/2 . But this will not remove the default! In fact, using (is)/2 results in essentially the same fragment:
? - frack (4).
frack (3): - false .
frack (X): -
Y is X - 1,
frack (Y), false .
At least frack(4) now doing well, but it will loop on the back track. You must change something in the visible part, for example, an X test to avoid failure. See failure-slice for more details.
false source share