当前位置: X-MOL 学术Theory Pract. Log. Program. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Disjunctive Delimited Control
Theory and Practice of Logic Programming ( IF 1.4 ) Pub Date : 2023-04-11 , DOI: 10.1017/s1471068423000029
ALEXANDER VANDENBROUCKE , TOM SCHRIJVERS

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 features and extensions, now at the library level: findall, cut, branch-and-bound optimisation, probabilistic programming, …



中文翻译:

析取分隔控制

定界控制是一种强大的编程语言扩展机制,最近为 Prolog 提出(并在 SWI-Prolog 中实现)。通过从语言内部操纵程序的控制流,它可以实现强大的功能,例如制表,而无需修改 Prolog 引擎的内部结构。然而,它目前的表述是不够的:它没有捕捉到 Prolog 独特的非确定性性质,这种性质允许多种方式来满足一个目标。

本文完全接受了 Prolog 的非确定性,并为取定界控制提供了一个新颖的接口,它使程序员不仅可以控制顺序(合取)控制流,还可以控制非确定性控制流。我们提供了一个元解释器,它可以通过定界控制保守地扩展 Prolog,并表明它支持一系列典型的 Prolog 功能和扩展,现在在库级别:findall、cut、分支定界优化、概率编程……

更新日期:2023-04-11
down
wechat
bug