Disjunctive Delimited Control
Alexander Vandenbroucke, Tom Schrijvers

TL;DR
This paper introduces a novel disjunctive delimited control interface for Prolog that fully captures its non-deterministic nature, enabling advanced language features at the library level.
Contribution
It presents a new control mechanism that extends Prolog's capabilities by managing non-deterministic control flow, unlike previous formulations.
Findings
Enables implementation of findall, cut, and branch-and-bound at the library level.
Supports probabilistic programming within Prolog.
Provides a conservative extension via a meta-interpreter.
Abstract
Delimited control is a powerful mechanism for programming language extension which has been recently proposed for Prolog (and implemented in SWI-Prolog). By manipulating the control flow of a program from inside the language, it enables the implementation of powerful features, such as tabling, without modifying the internals of the Prolog engine. However, its current formulation is inadequate: it does not capture Prolog's unique non-deterministic nature which allows multiple ways to satisfy a goal. This paper fully embraces Prolog's non-determinism with a novel interface for disjunctive delimited control, which gives the programmer not only control over the sequential (conjunctive) control flow, but also over the non-deterministic control flow. We provide a meta-interpreter that conservatively extends Prolog with delimited control and show that it enables a range of typical Prolog…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, Reasoning, and Knowledge · Logic, programming, and type systems · Formal Methods in Verification
