We propose a semantics for aggregates in deductive databases based on
a notion of minimality. Unlike some previous approaches, we form a min
imal model of a program component including aggregate operators, rathe
r than insisting that the aggregate apply to atoms that have been full
y determined or that aggregate functions are rewritten in terms of neg
ation. In order to guarantee the existence of such a minimal model we
need to insist that the domains over which we are aggregating are comp
lete lattices and that the program is in a sense monotonic. Our approa
ch generalizes previous approaches based on the well-founded semantics
and various forms of stratification. We are also able to handle a lar
ge variety of monotonic (or pseudo-monotonic) aggregate functions. (C)
1997 Academic Press.