Structural Abstraction and Application in Logic Programming

Structural Abstraction and Application in Logic Programming
复制标题

结构抽象及其在逻辑编程中的应用

DOI:
10.1007/3-540-45788-7_17
复制
发表时间:
2002
期刊:
--
影响因子:
--
通讯作者:
António Porto
António Porto
中科院分区:
--
文献类型:
--
作者:
António Porto

文献摘要

被引文献

相似文献

本文探讨了一个看似非常简单的概念--用额外的(开始或结束)参数扩展一个项以产生一个新的项的操作。这允许定义各种结构运算符,这些结构运算符在底层逻辑编程设置的非方向性和非确定性(关系)行为之上提供功能组合和高阶特征的能力。单独的语义被认为是无意义的,语义在上下文中与句法相关联。因此,在不同的上下文中,每个术语可能有多种语义视图。一种这样的语义视图是结构性的,其中任何术语都被视为另一术语在其一些子术语上的隐含抽象。标准的操作语义扩展与重写步骤之前,每个目标调用,呼吁功能重写语义解释某些条款的应用程序的隐式内部结构抽象的内部参数。首先通过元级功能定义描述该方法,然后通过标准Prolog谓词的集合显示实现。因此,在没有任何潜在机制的扩展的情况下,表现力的强大增益就被实现了,这在很大程度上符合D. H.沃伦[5]。该方案的动机是一个大型的现实世界的应用程序的需要[4],它现在正在使用。
This paper explores a seemingly very simple idea—an operation for extending a term with extra (start or end) arguments to yield a new term. This allows the definition a variety of structural operators that provide the power of functional composition and higher-order features on top of the non-directional and non-deterministic (relational) behavior of the underlying logic programming setting. Syntax alone is taken to be meaningless, semantics being associated to syntaxin context. Multiple semantic views of each term are therefore possible, in different contexts. One such semantic view is structural, whereby any term is taken as an implicit abstraction of another term over some of its subterms. The standard operational semantics is extended with a rewrite step prior to each goal invocation, that appeals to a functional rewrite semantics to interpret certain terms as applications of implicit inner structural abstractions to inner arguments. The approach is first described through meta-level functional definitions, and then an implementation is shown through a collection of standard Prolog predicates. The powerful gain in expressiveness is thus achieved without any extension of the underlying machinery, much in the spirit of an old claim by D. H. Warren [5]. The scheme was motivated by the needs of a large real-world application [4] where it is now in use.