# Functional ASP with Intensional Sets: Application to Gelfond-Zhang Aggregates

Calabar, Pedro and Fandinno, Jorge and Fariñas del Cerro, Luis and Pearce, David Functional ASP with Intensional Sets: Application to Gelfond-Zhang Aggregates. (2018) Theory and Practice of Logic Programming, 18 (3-4special). 390-405. ISSN 1471-0684

 Preview
(Document in English)

PDF (Author's version) - Requires a PDF viewer such as GSview, Xpdf or Adobe Acrobat Reader
490kB

Official URL: https://doi.org/10.1017/S1471068418000169

## Abstract

In this paper, we propose a variant of Answer Set Programming (ASP) with evaluable functions that extends their application to sets of objects, something that allows a fully logical treatment of aggregates. Formally, we start from the syntax of First Order Logic with equality and the semantics of Quantified Equilibrium Logic with evaluable functions ( ). Then, we proceed to incorporate a new kind of logical term, intensional set (a construct commonly used to denote the set of objects characterised by a given formula), and to extend semantics for this new type of expression. In our extended approach, intensional sets can be arbitrarily used as predicate or function arguments or even nested inside other intensional sets, just as regular first-order logical terms. As a result, aggregates can be naturally formed by the application of some evaluable function (count, sum, maximum, etc) to a set of objects expressed as an intensional set. This approach has several advantages. First, while other semantics for aggregates depend on some syntactic transformation (either via a reduct or a formula translation), the interpretation treats them as regular evaluable functions, providing a compositional semantics and avoiding any kind of syntactic restriction. Second, aggregates can be explicitly defined now within the logical language by the simple addition of formulas that fix their meaning in terms of multiple applications of some (commutative and associative) binary operation. For instance, we can use recursive rules to define sum in terms of integer addition. Last, but not least, we prove that the semantics we obtain for aggregates coincides with the one defined by Gelfond and Zhang for the language, when we restrict to that syntactic fragment.

Item Type: Article hal-02064624 International peer-reviewed journal French research institutions > Centre National de la Recherche Scientifique - CNRS (FRANCE)Université de Toulouse > Institut National Polytechnique de Toulouse - INPT (FRANCE)Université de Toulouse > Université Toulouse III - Paul Sabatier - UPS (FRANCE)Université de Toulouse > Université Toulouse - Jean Jaurès - UT2J (FRANCE)Université de Toulouse > Université Toulouse 1 Capitole - UT1 (FRANCE)Other partners > Universidad Politécnica de Madrid (SPAIN)Other partners > Universidade da Coruña - UDC (SPAIN) MINECO, Spain, grant TIC2017-84453-P - Xunta de Galicia, Spain (GPCED431B 2016/035 and 2016-2019 ED431G/01, CITIC) - Centre International de Mathématiques et d’Informatique de Toulouse (CIMI) ANR-11-LABEX-0040-CIMI, program ANR-11-IDEX-0002-02 - UPM project RP151046021 download IRIT IRIT 21 Feb 2019 13:34

Repository Staff Only: item control page