このコードがあるとします:
end_sol_cell(Row,9):-
not(findall(Value,pos_cell(Row,9,Value),[_])).
end_sol_cell(Row,Col):-
not(findall(Value,pos_cell(Row,Col,Value),[_])),
New_Col is Col + 1,
end_sol_cell(Row,New_Col).
w :- end_sol_cell(1,1), end_sol_cell(2,1).
「w」を呼び出すと、無限ループに入ります。どうすればこの問題を解決できますか?