当前位置:
X-MOL 学术
›
arXiv.cs.PL
›
论文详情
Our official English website, www.x-mol.net, welcomes your
feedback! (Note: you will need to create a separate account there.)
Disjunctive Delimited Control
arXiv - CS - Programming Languages Pub Date : 2020-09-10 , DOI: arxiv-2009.04909 Alexander Vandenbroucke and Tom Schrijvers
arXiv - CS - Programming Languages Pub Date : 2020-09-10 , DOI: arxiv-2009.04909 Alexander Vandenbroucke and 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、分支定界优化、概率编程、. . .
更新日期:2020-09-11
中文翻译:
分离式定界控件
分隔控制是一种强大的编程语言扩展机制,最近已为 Prolog 提出(并在 SWI-Prolog 中实现)。通过从语言内部操纵程序的控制流,它可以实现强大的功能,例如制表,而无需修改 Prolog 引擎的内部结构。然而,它目前的表述是不够的:它没有捕捉到 Prolog 独特的非确定性特性,它允许多种方式来满足一个目标。本文通过一个用于析取定界控制的新颖接口完全包含 Prolog 的非确定性,这使程序员不仅可以控制顺序(连接)控制流,还可以控制非确定性控制流。我们提供了一个元解释器,它使用定界控制保守地扩展 Prolog,并表明它支持一系列典型的 Prolog 功能和扩展,现在在库级别:findall、cut、分支定界优化、概率编程、. . .