分离分隔控制
Disjunctive Delimited Control
摘要:
定界控制是一种用于程序设计语言扩展的强大机制,它是最近为Prolog提出的(并在SWI-Prolog中实现)。通过从语言内部操纵程序的控制流,它可以实现强大的功能,如制表,而无需修改Prolog引擎的内部。然而,它目前的公式是不够的:它没有捕捉到Prolog的独特的非确定性的性质,允许多种方式来满足一个目标。本文充分拥抱Prolog的非确定性与一个新的接口分离定界控制,这使程序员不仅控制顺序(合取)控制流,但也超过了非确定性控制流。我们提供了一个元解释器,保守地扩展Prolog与分隔控制,并表明它使一系列典型的Prolog功能和扩展,现在在库级别:findall,削减,分支定界优化,概率编程,。. .这篇论文正在考虑发表在《逻辑程序设计理论与实践》(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).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。