arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0307022cs.PLcs.LO
收藏

以目标为自变量的逻辑程序的变换

Transformations of Logic Programs with Goals as Arguments

Alberto Pettorossi, Maurizio Proietti

摘要:

我们考虑逻辑编程的一个简单扩展,其中变量可以在目标上变化,目标可以是谓词的参数。在这种语言中,我们可以编写以目标为数据的逻辑程序。我们给出了实际的证据表明,利用这种能力时,转换程序,我们可以提高程序的效率。我们提出了一套程序转换规则,扩展了熟悉的展开和折叠规则,并允许我们操纵的目标出现的谓词参数的条款。为了证明这些转换规则的正确性,我们形式化地定义了我们的扩展逻辑程序设计语言的操作语义。这个语义是LD-分辨率的一个简单变体。当适当的条件得到满足时,这种语义与LD-分辨率一致,因此,用我们的扩展语言编写的程序可以由普通的Prolog系统运行。我们的转换规则,以保持操作语义和终止。

英文摘要:

We consider a simple extension of logic programming where variables may range over goals and goals may be arguments of predicates. In this language we can write logic programs which use goals as data. We give practical evidence that, by exploiting this capability when transforming programs, we can improve program efficiency. We propose a set of program transformation rules which extend the familiar unfolding and folding rules and allow us to manipulate clauses with goals which occur as arguments of predicates. In order to prove the correctness of these transformation rules, we formally define the operational semantics of our extended logic programming language. This semantics is a simple variant of LD-resolution. When suitable conditions are satisfied this semantics agrees with LD-resolution and, thus, the programs written in our extended language can be run by ordinary Prolog systems. Our transformation rules are shown to preserve the operational semantics and termination.

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

↑