Hostname: page-component-77f85d65b8-zzw9c Total loading time: 0 Render date: 2026-03-26T14:40:18.845Z Has data issue: false hasContentIssue false

Implementing Backjumping by Means of Exception Handling

Published online by Cambridge University Press:  24 August 2023

WŁODZIMIERZ DRABENT*
Affiliation:
Institute of Computer Science, Polish Academy of Sciences, Warsaw, Poland (e-mail: drabent@ipipan.waw.pl)

Abstract

We discuss how to implement backjumping (or intelligent backtracking) in Prolog by using the built-ins throw/1 and catch/3. We show that it is impossible in a general case, contrary to a claim that “backjumping is exception handling." 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 the class of backjump targets. We also discuss implementing backjumping by using backtracking and the Prolog database. Additionally, we explain the semantics of Prolog exception handling in the presence of coroutining.

Information

Type
Original Article
Copyright
© The Author(s), 2023. Published by Cambridge University Press

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Article purchase

Temporarily unavailable