用Prolog语言的throw/1和catch/3实现后跳
Implementing backjumping by throw/1 and catch/3 of Prolog
摘要:
本文讨论了如何在Prolog程序中通过异常处理来实现回跳(或智能回溯)。这在一般情况下似乎是不可能的。我们提供两种解决方案。一种适用于二进制程序;在一般情况下,它对backjumping可能产生的位置施加了限制。另一种是限制一类后跳目标。我们还展示了如何通过回溯和Prolog数据库来模拟backjumping。
英文摘要:
We discuss how to implement backjumping (or intelligent backtracking) in Prolog programs by means of exception handling. This seems impossible in a general case. We provide two solutions. One works for binary programs; in a general case it imposes a restriction on where backjumping may originate. The other restricts a class of backjump targets. We also show how to simulate backjumping by means of backtracking and the Prolog database.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。