reasoning. To this aim, we focus on some suitable selection conditions, but we are aware that other possible choices might be considered. From this perspective, our work tries to give some non-trivial contributions towards what kind **of features a**
knowledge representation language should include, in order to be oriented to complex scenarios. Anyway, as it will be shown by examples throughout the paper, the chosen social conditions combined with the power of nesting allow us to represent more articulated selections among agents.

Besides the definition of the language, of its semantics and the application to Knowledge Representation, another contribution of the paper is the translation of SOLP programs into logic programs with aggregates3**. In particular, given a**
set of SOLP programs, a source-to-source transformation exists which provides as output a single logic program with aggregates whose stable models are in oneto-one correspondence with the social models of the set of SOLP programs. The translation to logic programs with aggregates give us the possibility of exploiting existing engines to compute logic programs.

Moreover, Section 6 shows that our kind of social reasoning is not trivial, since even in the case of positive programs, the semantics of SOLP has a computational complexity which is NP-complete.

The paper is organized as follows: in Sections 2 and 3 we define the notion of SOLP programs and their semantics (Social Semantics**), respectively. In Section 4**
we illustrate how a set of SOLP programs, each representing a different agent, is translated into a single logic program with aggregates whose stable models describe the mental states of the whole agent community and then we show that such a translation is sound and complete. In Section 5 we prove that the Social Semantics extends the JFP Semantics (Buccafurri and Gottlob 2002) and in Section 6 we study the complexity of several interesting decision problems. Section 7 describes how this novel approach may be used for knowledge representation by means of several examples. Then, in Section 8 we discuss related proposals and, finally, we draw our conclusions ans sketch the future directions of the work.

In order to improve the overall readability, these sections are followed by Appendix A
- where we have placed the proofs of the most complicated technical results - and by the list of symbols and abbreviations used throughout the paper.

## 2 Syntax Of Solp Programs

In this section we first introduce the notion of social condition **and then we describe** the syntax of SOLP programs.

A term **is either a variable or a constant. Variables are denoted by strings starting**
with uppercase letters, while those starting with lower case letters **denote constants.**
An atom or positive literal is an expression p(t1, · · · , tn), where p **is a** predicate of arity n and t1, · · · , tn **are terms. A** negative literal **is the** negation as failure (NAF)
not a **of a given atom** a.