Design and implementation of aggregate functions in the DLV system

被引:57
作者
Faber, Wolfgang [1 ]
Pfeifer, Gerald [1 ]
Leone, Nicola [1 ]
Dellarmi, Tina [1 ]
Ielpa, Giuseppe [1 ]
机构
[1] Univ Calabria, Dept Math, I-87036 Cosenza, Italy
关键词
disjunctive logic programming; answer set programming; aggregates; knowledge representation; implementation;
D O I
10.1017/S1471068408003323
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 Sigma(P)(2) (=NPNP). 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 DLPA), and illustrate how it can be profitably used for representing knowledge. Furthermore, we analyze the computational complexity of DLPA, showing that the addition of aggregates does not bring a higher cost in that respect. Finally, we provide an implementation of DLPA 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.
引用
收藏
页码:545 / 580
页数:36
相关论文
共 48 条
[1]  
Apt K. R., 1988, FDN DEDUCTIVE DATABA, P89
[2]  
Baral C., 2003, Knowledge Representation, Reasoning and Declarative Problem Solving
[3]  
Ben-Eliyahu R., 1994, Annals of Mathematics and Artificial Intelligence, V12, P53, DOI 10.1007/BF01530761
[4]   Enhancing disjunctive datalog by constraints [J].
Buccafurri, F ;
Leone, N ;
Rullo, P .
IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2000, 12 (05) :845-860
[5]  
Calimeri F, 2005, 19TH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE (IJCAI-05), P406
[6]  
Chimenti D., 1990, IEEE Transactions on Knowledge and Data Engineering, V2, P76, DOI 10.1109/69.50907
[7]  
DELLARMI T, 2003, P ASP03 ANSW SET PRO, P274
[8]   LINEAR-TIME ALGORITHMS FOR TESTING THE SATISFIABILITY OF PROPOSITIONAL HORN FORMULAE. [J].
Dowling, William F. ;
Gallier, Jean H. .
Journal of Logic Programming, 1984, 1 (03) :267-284
[9]  
Eiter T, 2000, SPRINGER INT SER ENG, V597, P79
[10]   Disjunctive datalog [J].
Eiter, T ;
Gottlob, G ;
Mannila, H .
ACM TRANSACTIONS ON DATABASE SYSTEMS, 1997, 22 (03) :364-418