We propose a new grouping operator for logic programs based on the group_by operator of SQL. The novelty of our proposal lies in the use of modes, which allows us to relax some rather unpractical constraints on variable occurrences while retaining a straightforward semantics. Moreover, modes allow us to prove properties regarding groundness of computed answer substitutions and termination. The resulting class of programs enjoys a simple and intuitive semantics.
|Place of Publication||Enschede|
|Publisher||Centre for Telematics and Information Technology (CTIT)|
|Number of pages||15|
|Publication status||Published - 16 Jun 2008|
|Name||CTIT Technical Report Series|
|Publisher||Centre for Telematics and Information Technology, University of Twente|
Czenko, M. R., & Etalle, S. (2008). LP with Flexible Grouping and Aggregates Using Modes. (CTIT Technical Report Series; No. 274/TR-CTIT-08-41). Enschede: Centre for Telematics and Information Technology (CTIT).