论文标题
分界的划界控制
Disjunctive Delimited Control
论文作者
论文摘要
界定控制是用于编程语言扩展的强大机制,该机制最近是为Prolog提出的(并在SWI-Progolog中实施)。通过从语言内部操纵程序的控制流,它可以实现强大的功能,例如绘制,而无需修改Prolog Engine的内部。但是,其当前的表述不足:它没有捕获Prolog独特的非确定性,该性质允许多种方法来满足目标。本文通过一种新的界面来完全包含Prolog的非确定性,用于分离的划界控制,该界面不仅可以控制对顺序(结合)控制流的控制,而且还可以控制非确定性控制流。我们提供了一个元插座,该元用户保守地扩展了序言,并表明它可以启用一系列典型的Prolog特征和扩展,现在在库中:Findall,findall,cut,cut,cut,分支和构造的优化,概率编程,。 。 。 本文正在考虑逻辑编程理论和实践(TPLP)的出版物。
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, . . . This paper is under consideration for publication in Theory and Practice of Logic Programming (TPLP).