DLV系统中聚合函数的设计与实现
Design and Implementation of Aggregate Functions in the DLV System
摘要:
析取逻辑编程(英语:Disjunctive Logic Programming,DLP)是一种非常有表现力的形式主义:它允许表达在复杂度类SigmaP 2(= NP^NP)中可判定的有限结构的每个属性。尽管有这种高表现力,但仍有一些简单的属性,通常出现在现实世界的应用程序中,无法以简单和自然的方式进行编码。特别是需要在满足某些条件的元素集合或多集合上使用算术运算符(如求和、次数或计数)的属性,无法在经典DLP中自然表达。为了克服这一缺陷,我们以保守的方式通过聚合函数扩展DLP。特别是,我们避免引入有争议的语义结构,要求聚合分层。我们正式定义的扩展语言(称为DLP^A)的语义,并说明它可以被有益地用于表示知识。此外,我们分析了DLP^A的计算复杂性,表明在这方面,聚合物的添加并不带来更高的成本。最后,我们提供了一个实施DLP^A在DLV -一个国家的最先进的DLP系统-和实验报告,证实了所提出的扩展的有用性,也为计算效率。
英文摘要:
Disjunctive Logic Programming (DLP) is a very expressive formalism: it allows for expressing every property of finite structures that is decidable in the complexity class SigmaP2 (= NP^NP). Despite this high expressiveness, there are some simple properties, often arising in real-world applications, which cannot be encoded in a simple and natural manner. Especially properties that require the use of arithmetic operators (like sum, times, or count) on a set or multiset of elements, which satisfy some conditions, cannot be naturally expressed in classic DLP. To overcome this deficiency, we extend DLP by aggregate functions in a conservative way. In particular, we avoid the introduction of constructs with disputed semantics, by requiring aggregates to be stratified. We formally define the semantics of the extended language (called DLP^A), and illustrate how it can be profitably used for representing knowledge. Furthermore, we analyze the computational complexity of DLP^A, showing that the addition of aggregates does not bring a higher cost in that respect. Finally, we provide an implementation of DLP^A in DLV -- a state-of-the-art DLP system -- and report on experiments which confirm the usefulness of the proposed extension also for the efficiency of computation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。