arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0104003cs.LOcs.PL
收藏

用于编写确定性元解释器的链式程序

Chain Programs for Writing Deterministic Metainterpreters

David A. Rosenblueth

摘要:

在逻辑编程文献中发现的许多元解释器在程序子句的选择不确定的意义上是不确定的。例子是熟悉的“演示”和“香草”元解释器。对于某些应用,这种非确定性是方便的。然而,在某些情况下,需要一个具有显式子句选择的确定性元解释器。这种情况包括(1)或并行转换为“提交选择”处理器的与并行,(2)基于逻辑的,命令语言实现的搜索策略,和(3)模拟有限资源推理。确定性元解释器很难编写,因为程序员必须关注派生树中节点的子节点的统一器集。我们认为,这是可能的和有利的编写这些元解释器的推理转换成一个语法限制的形式,我们称之为“链”的形式,在这里我们可以忘记统一,除了单位子句的目标程序。我们给出了两个转换逻辑程序成链的形式,一个为“moded”程序(隐含在两个现有的穷举遍历方法提交选择执行),和任意确定的程序。作为我们的方法的说明,我们展示了上述三个应用程序的例子。

英文摘要:

Many metainterpreters found in the logic programming literature are nondeterministic in the sense that the selection of program clauses is not determined. Examples are the familiar "demo" and "vanilla" metainterpreters. For some applications this nondeterminism is convenient. In some cases, however, a deterministic metainterpreter, having an explicit selection of clauses, is needed. Such cases include (1) conversion of OR parallelism into AND parallelism for "committed-choice" processors, (2) logic-based, imperative-language implementation of search strategies, and (3) simulation of bounded-resource reasoning. Deterministic metainterpreters are difficult to write because the programmer must be concerned about the set of unifiers of the children of a node in the derivation tree. We argue that it is both possible and advantageous to write these metainterpreters by reasoning in terms of object programs converted into a syntactically restricted form that we call "chain" form, where we can forget about unification, except for unit clauses. We give two transformations converting logic programs into chain form, one for "moded" programs (implicit in two existing exhaustive-traversal methods for committed-choice execution), and one for arbitrary definite programs. As illustrations of our approach we show examples of the three applications mentioned above.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑