<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Programming social middlewares through social interaction types</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Juan Manuel Serrano</string-name>
          <email>juanmanuel.serrano@urjc.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergio Saugar</string-name>
          <email>sergio.saugar@urjc.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University Rey Juan Carlos</institution>
          ,
          <addr-line>C/Tulipan S/N, Madrid</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>-This paper describes a type-oriented approach to the programming of social middlewares. It defines a collection of metamodeling features which allow programmers to declare the social interaction and agent types which make up the program of a multiagent society for some application domain. These features are identified and formalised taking into account a specification of social middlewares as programmable, abstract machines. Thus, the proposed approach results in the type system of an interaction-oriented programming language. The paper uses the C+ action language and the CCALC tool as formal devices, so that metamodeling features are given formal semantics as new social law abbreviations which complement the causal law abbreviations of C+. This programming language approach contrasts with the common modeling approach endorsed by organizational methodologies, and promotes higher levels of formality and reusability in the specification of multiagent societies.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        Social middlewares are the responsible software
infrastructures for the run-time management of software component
interactions in computational societies. Unlike traditional
objectoriented, service-based or messaging middleware approaches,
social middlewares (e.g. AMELI [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], S-MOISE+ [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], MadKit
[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], INGENIAS toolkit [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], etc.) provide software components
with high-level communicative and organizational interaction
mechanisms, which build to different extents on normative
concepts such as empowerments, permissions, obligations,
commitments, etc. It is claimed that the increased flexibility
and expressiveness of these interaction mechanisms will result
in a better management of component interactions in
largescale, multi-organizational, open distributed systems.
      </p>
      <p>
        However, current social middlewares must overcome a
number of shortcomings in order to achieve their full potential.
Firstly, the set of generic interaction mechanisms which they
are designed to support is not extendable, so that programmers
are constrained to use the pre-defined abstractions (scenes,
teams, groups, etc.) provided by the organizational metamodel
of choice (e.g . ISLANDER [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], AGR [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], Moise+ [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ],
INGENIAS [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]). Secondly, applications can not be developed
from generic, reusable modules which are specialised in the
target application domain. Last, the run-time semantics of the
organizational metamodels are not formally specified, which
limits the understandability of the language constructs and the
portability of the social middleware.
      </p>
      <p>
        To address these limitations, this paper puts forward an
approach to the programming of social middlewares which
can be characterised along the following premises. Firstly, we
build on a primitive and flexible notion of social interaction
which attempts to provide the basic building blocks for the
specification of any kind of communicative or organizational
mechanism. Secondly, the social middleware is regarded as a
programmable machine which is formally specified in
technologically neutral terms as an abstract machine. Last, the
behaviour of the social middleware is programmed through social
interaction types which declare the characteristic structure and
rules that govern the social interactions of the target
application domain. The first two premises have been addressed in
previous work, namely [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] and, respectively, [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. The goal
of this paper is to elaborate on the third premise. In particular,
a set of metamodeling features for declaring social interaction
types will be identified and their semantics formalised in terms
of the underlying abstract machine. The chosen technique for
formalising the overall approach is the action language C+ [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
and its accompanying tool CCALC [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In accordance with this
election, metamodeling features will be represented as social
law abbreviations which complement the standard set of causal
laws provided by C+.
      </p>
      <p>
        The rest of the paper is structured as follows. The next
section briefly recalls the results shown in [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], namely it
introduces social middlewares as programmable abstract machines.
This section also describes, albeit briefly, the major features of
the C+ formalisation and the conference management example
used throughout the paper. Then, section 3 describes the
partial set of metamodeling features of social interaction types,
leaving their proper formalisation to the appendix of the paper.
Finally, the paper concludes with a discussion of the major
results with respect to competing paradigms, and a summary
of current and future work.
      </p>
    </sec>
    <sec id="sec-2">
      <title>II. SOCIAL MIDDLEWARE AS AN ABSTRACT MACHINE</title>
      <p>The social middleware is in charge of managing the
interactions between software components participating in a
multiagent society. For instance, let’s consider the development
of an application to support the management of scientific
conferences. In this setting, the social middleware is in charge
of maintaining and driving the social processes which make up
the management of conferences (submissions, assignment and
reviewing of papers, etc.). It does not deal with the actual job
of software components that will engage in those processes at
run-time1, but with the management of processes themselves.
This management is performed in accordance with the rules
of conference management as specified by the types of social
interactions that implement them. Before describing in the next
section how to declare these types of interactions, this one
summarizes the general structure of multiagent societies and
the generic behaviour of the social middleware.</p>
      <sec id="sec-2-1">
        <title>A. Social middleware structure</title>
        <p>
          The interaction space of the middleware is shaped in terms
of a tree of nested social interactions, so that the root of this
tree represents the computational society being managed by
the middleware. Besides social interactions, the computational
society is made up of three major kinds of social entities:
agents, resources and social actions. Agents and resources
represent the two kinds of roles that can be played by software
components attached to the social middleware within a
particular social interaction [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. These software components may
be intelligent BDI components programmed with high-level
languages (e.g. 2APL, Jason, etc.), or plain user interfaces
(e.g. a web browser)2. Resources represent non-autonomous
software components which store information and/or provide
computational services to the society. On the other hand,
agents represent autonomous components which purport to
achieve some goal. The activity of agents within the overall
society can be decomposed into a role-playing tree of further
agents deployed in arbitrary social interaction contexts.
        </p>
        <p>In order to achieve its purpose, the activity of some agent
eventually resolves itself into the performance of social
actions, namely saying something to other agents (i.e.
communicative actions– CAs), calling the services of computational
resources (i.e. invocations) and seeing the state of social
entities (i.e. observations). CAs, invocations and observations
are atomic interaction mechanisms which take place within the
context of social interactions. This paper exclusively focuses
on CAs, particularly on those pre-defined CAs which make
up the standard CA library of the language. This library
includes, amongst others, the declarations SetUp, Close, Join
and Leave. The SetUp CA allows agents to declare that a
new interaction of certain type be initiated by the middleware;
Close is used by agents to force the middleware to finish
some ongoing interaction; last, Join and Leave allow agents
to become members of some interaction and, respectively,
abandon a role currently being played by them.</p>
        <p>Figure 1 represents a run-time snapshot of a social
middleware for conference management. The following graphical
conventions are followed: social interactions instances are</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>1In this application, software components attached to the social middleware</title>
      <p>will typically consist of plain user interfaces (e.g. a web browser).</p>
      <p>2Thus, the use of agent programming languages for the implementation of
agent components, i.e. components playing some agent role, is not mandatory.
The reader is warned about the particular notion of agents as roles (vs. agent
as components) endorsed by this paper [15, section 2].
represented by round corner rectangles, agents by stick figures
and resources by triangles; last, speech bubbles represent the
performance of communicative actions. A brief explanation
of the different types of social entities involved follows in the
next paragraphs:</p>
      <p>The root of the social interaction hierarchy is the research
community, which is the context within which
conferences actually take place. A given conference series is
managed by its steering committee, which is responsible
for the major issues concerning the different conference
editions. The activity within a given edition is structured
around the program committee (PC), local committee,
etc. Within the PC, different submissions (one for each
submitted paper) will take place, which in turn provide
the context for the reviewing team in charge of evaluating
that particular submission.</p>
      <p>The environments of the different interactions is made
up of resources such as: the paper of submissions; the
reviews uploaded within the reviewing team; the calendar
and keywords created within the PC; and so forth.
Three researcher agent roles and their corresponding
roleplaying hierarchies are shown in figure 1. The first one,
r1, plays the role of PC Chair within PC pc1, which
in turn behaves as submittee within the submissions
of the PC. The second researcher, r2, participates in
the PC as author, who in turn plays the submitter role
in two different submissions. The third researcher, r3,
participates in the PC both as PC member and author.
As PC member it plays the role of reviewer in several
submissions (typically, no more than three). Thus, agents
may play several roles of different types within the same
kind of context, and roles of the same kind in different
contexts of the same type.</p>
      <p>Figure 1 also illustrates the performance of several
communicative actions (in particular, declarations). For
instance, researchers become authors of PCs by joining
those interactions to play a role of that kind. Once they
are authors, they may set up a submission in order to
submit a given paper. PC members may apply for certain
papers in order to express their reviewing preferences.
Papers will be definitely assigned for reviewing by the
PC chairs. Eventually, the PC chair, as submittee of a
submission, may accept the submitted paper, i.e. declare
the paper as part of the conference program.</p>
      <sec id="sec-3-1">
        <title>B. Social middleware dynamics</title>
        <p>As far as the dynamics is concerned, two kinds of major
forces which influence the evolution of the society can be
considered: external actions, performed by software
components over the middleware; and internal triggers, mainly
related to the life-cycle of social entities. With respect to
the latter, the social middleware is responsible for checking
the conditions which signal that some interaction must be
automatically initiated or finished; that some agent must be
played or abandoned; etc. For instance, once a conference
edition is initiated, a program committee is automatically
initiated by the middleware. Similarly, a new reviewer role
within a particular submission is automatically created for a
given PC member when the PC chair assigns this agent the
corresponding paper to review. As these examples illustrate,
the life-cycle management of social entities mostly depends
upon rules declared by its particular types, as the next section
will show.</p>
        <p>External actions are the means whereby software
components may enter the society as an agent to participate in some
interaction; exit the society as the player of some agent, thus
abandoning any further role; or attempt one of its agents to
perform a given social action. This paper exclusively focuses on
this latter kind of external action. The processing of attempts
by the social middleware is driven by empowerments and
permissions rules. Empowerment rules establish which agents
are institutionally capable of performing some social action.
Permissions, on the other hand, establish the circumstances
in which these powers may be exercised. For instance, any
researcher is empowered to join a PC as author, but this action
is only permitted within the submitting stage of the PC. If
some agent is not empowered to do some action, the
corresponding attempt causes no change at all in the institutional
state; if some agent is empowered but not permitted to do the
action, the forbidden attempt is registered accordingly; last,
if the agent is both empowered and permitted, the action is
executed by the middleware. For instance, the attempt of an
author to join a PC in its submission stage causes the internal
action play to execute, which in turn causes the creation of
the corresponding agent role.</p>
      </sec>
      <sec id="sec-3-2">
        <title>C. Formalisation in the action language C+</title>
        <p>
          The specification of the social middleware has been
formalised using the action language C+. The reader is referred
to [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] for a detailed explanation of the following
discussion. The action description which defines the abstract social
middleware infrastructure is structured around a collection of
generic, application-independent sorts, which encapsulate the
common structure and dynamics of social interactions, agents,
resources and social actions. Thus, the generic sort I, whose
specification is partially shown in figure 2, declares the fluents
and action constants which characterise the state and dynamics
of any kind of social interaction. These standard or pre-defined
state parameters include the following fluents: state, which
represents the execution state of the interaction (none-existent,
open or closed); the boolean fluents member, env and sub,
which represent the member agents, environmental resources
and sub-interactions of a given interaction; and the statically
determined fluents context and initiator which represent the
interaction context of the interaction and the agent who set
up the interaction (if it was not automatically initiated by
the middleware). Figure 1 shows the values of some of these
attributes for the submission i1. In particular, this interaction
is open, its context is the PC pc1 and has as member the
submitter agent s1. Moreover, the figure also shows the values
of other non-standard attributes which are characteristic of
submission interactions: the keywords of the submission, its
stage (accepted, in this case) and the submitter agent.
        </p>
        <p>Figure 2 also shows the declaration of the action constants
initiate and finish, together with the laws that define the
preconditions and effects of the latter action. Thus, according
to law 1, the action finish causes an interaction i to be closed;
law 2 establishes that this kind of action can not be executed if
the specified interaction i is not open; and law 3 declares that
this action is not executed by default, leaving the specification
of particular sufficient causes to application-dependent types
(as will be described in the next section).</p>
        <p>:- sorts</p>
        <p>I; SI .
:- objects</p>
        <p>open, closed :: SI .
:- constants
state(I) :: inertialFluent(SI +none);
member(I; A), env(I; R), sub(I; I) :: inertialFluent;
context(I) :: sdFluent(I+none);
initiator(I) :: sdFluent(A+none);
. . .</p>
        <p>initiate(I; I), nish(I) :: action.
:- variables</p>
        <p>i , ic,. . . :: I.
/* laws */
. . .</p>
        <p>nish(i ) causes state(i ) = closed .
nonexecutable nish(i ) if state(i )6=open.
default : nish(i ).</p>
        <p>Fig. 2. Partial specification of the generic social interaction type I
(1)
(2)
(3)</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>III. PROGRAMMING THE SOCIAL MIDDLEWARE</title>
      <p>Programming a multiagent society consists of specifying
the social interaction types which model the relevant social
processes of the target application domain. The specification
of social interaction types involves in turn the specification
of their member agent types and environmental resource
types, as well as their characteristic types of CAs. Thus, the
implementation of a multiagent society for conference
management is made up of the types of social entities identified
in figure 1: the social interaction types ConferenceEdition,</p>
      <sec id="sec-4-1">
        <title>ProgramCommittee, Submission, etc., and their accompanied</title>
        <p>environmental resource types (Paper, Review, etc.), member
agent types (Researcher, Author, Submitter, etc.) and
characteristic communicative action types (Apply, Assign, Submit,
etc.).</p>
        <p>In order to identify the metamodeling features which allow
to declare the different types of social entities, it will be
convenient to recall the three major ways in which the social
middleware can be programmed. Firstly, the programmer may
extend the set of standard attributes of social entities to
account for the particular characteristics of the application
domain. Secondly, the programmer may specify the
particular conditions under which the middleware must create and
destroy social entities (i.e. initiate and finish interactions,
play and abandon agents, etc.). Last, the programmer may
declare the empowerment and permission rules which drive
the processing of social action attempts. Consequently, three
classes of metamodeling features will be considered in the
declaration of social entity types: structural, life-cycle and
attempt processing features.</p>
        <p>
          Formally, social entity types are defined using the subsort
mechanism provided by the input language of CCALC [1,
section 3] and the generic C+ sorts which implement the
structure and behaviour of the social middleware [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. Thus,
the definition of a social interaction type proceeds, firstly, by
declaring a new subsort of the generic interaction sort I (figure
2); then, new fluent constants are declared which extend the
definition of the generic sort; and, finally, new causal laws
are provided which specify the structure and behaviour of
the social middleware with respect to the new kind of social
interaction. In particular, two kinds of causal laws can be
used: those corresponding to the standard set of causal law
abbreviations of the C+ language [7, appendix B]; and those
defined by a new catalogue of social law abbreviations, which
formalise the different metamodeling features of social entity
types (partially listed and formalised in the appendix of this
paper). Due to space limitations, the following subsections
only introduce some of the devised social law abbreviations
for the definition of social interaction and agent types.
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>A. Social interaction types</title>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>The metamodeling features of social interaction types will</title>
      <p>be illustrated with the specification of the submission
interaction type, S , shown in figure 3. To aid readability of the
specification, social and causal laws are listed according to
the life-cycle of interactions: firstly, those related to their
:- sorts</p>
      <p>I S; SST AGE .
:- objects</p>
      <p>submitted , accepted , rejected :: SST AGE .
:- constants
/*inputs*/
keyword(S; K) :: inertialFluent;
/*outputs*/
crc(S) :: inertialFluent(P+none);
/*local attributes*/
stage(S; SST AGE ) :: inertialFluent;
paper(S) :: inertialFluent(P+none);
/*aliases*/
pc(S) :: sdFluent(PC+none);
submitter(S) :: sdFluent(SU BMIT T E R+none);
submittee(S) :: sdFluent(SU BMIT T E E +none);
reviewingTeam(S) :: sdFluent(RE V +none).
:- variables</p>
      <p>s:: S.
/* laws */
/*Initiation laws*/
input keyword(s; k ).
context s is PC alias pc.
empowered a to setUp(s; pc) if member(a; pc).
permitted a to setUp(s; pc)
if paperRegistration(calendar(pc))=t &amp;</p>
      <p>tnow(clock )&lt;t .
/*Life-time laws*/
member s is SU BMIT T E R alias submitter.
member s is SU BMIT T E E alias submittee.
environment s is P alias paper.
subinteraction s is RE V alias reviewingTeam.
empowered submitter to submit.
permitted submitter to submit
if paperSubmission(calendar(pc))=t &amp;</p>
      <p>tnow(clock )&lt;t .
. . .
/*Finishing laws*/
empowered chair(pc(s)) to close(s).
permitted a to close(s).
finish s if stage(s; rejected ) ++</p>
      <p>state(submitter(s))=abandoned .
output crc(s).
initiation; next, those pertaining to their life-time; and, finally,
those concerning their finishing.</p>
      <p>a) Structural features: The fluents declared for a new
social entity type (i.e. not only social interactions) can be
classified into four groups: aliases, input, output and local
state parameters. Informally, the first group stands for those
fluents which are introduced as aliases of standard fluents
(e.g. member) to allow for more readable specifications. Input
attributes are state parameters which must be set when the
social entity is created. On the other hand, the meaning of
output fluents directly refers to the destruction conditions of
social entities: for instance, an interaction is automatically
finished by the middleware when its output attributes are
set. As for local fluents, these are normal C+ fluents whose
meaning is established through common causal laws and
allow to simplify and improve the readability of other laws. the paper is set by the submitter, as described above (law 17).
The social law abbreviations input and output allow to Besides these “normal” ways of finishing a submission, the PC
specify newly declared fluent as input and output attributes, chair is also given extraordinary power to prematurely close a
respectively; the context, member, environment and submission.
subinteraction abbreviations stand for the declaration c) Attempt processing features: The definition of a new
of aliases pertaining to social interaction types. The formal type of social entity may encompass the definition of new
definition of these abbreviations can be found in the appendix types of CAs which somehow aim at modifying the overall
of this paper. state of its instances. For example, the stage of submissions</p>
      <p>Thus, according to figure 3, a submission is modeled as a is set through the execution of particular CAs executed by
kind of process which receives as input a set of keywords (cf. the author and PC Chair agents, namely Submit, Accept and
law 4, which refers to variables s and k of the submission and Reject. Besides these domain-dependent CAs, the SetUp and
keyword types, respectively), and has as goal the generation Close CAs also affect the execution state of social interactions.
of the CRC (Camera Ready Copy) of a research paper (an The attempts to perform any of these actions is subject to the
output attribute, as declared by law 17). Thus, a submission their empowerments and permissions rules, which are absent
can not be initiated without providing one keyword at least, from the generic specification. Therefore, the programmer is
and, as soon as the CRC of the paper is set the corresponding provided with two new social law abbreviations, empowered
submission process will be automatically finished. On the and permitted, which allow to govern the middleware
other hand, the stage of the submission process is a local behaviour with respect to the processing of CAs targeted at
state parameter which holds the values submitted, rejected or social entities of the new type.
accepted, as declared by the auxiliary SST AGE type. As for For instance, social laws 6 and 7 declare the empowerment
aliases, the member agents of a submission can be identified and permission rules for setting up a new submission process
using the submitter and submittee fluents (besides the standard according to the requirements established above. Similarly
member fluent – see figure 2); similarly, the paper and social laws 14 and 15 declare the corresponding rules for
reviewingTeam fluents stand for the environmental resources prematurely closing a submission. Concerning the Submit CA,
and subinteractions of the corresponding types; last, the pc social laws 12 and 13 establishes (1) that the submitter is the
fluent stands for the program committee context to which the only agent empowered to submit the paper of the submission;
submission belongs. and (2) that permission to submit the paper is granted if the
b) Life-cycle features: The specification of the generic deadline for paper submission did not pass.
social interaction type I establishes that the execution of
the initiate and finish actions are disabled by default (cf. B. Agent types
law 3). Moreover, sufficient condition for the execution of Metamodeling features for defining agent types will be
these actions are absent from the specification. Therefore, illustrated with the specification of the submitter agent type,
programmers have to provide these conditions when defining partially represented in figure 4. Due to space limitations,
a particular type of interaction T , unless type T is intended as the formal specification of the new abbreviations for social
an abstract type to be reused later in the definition of more spe- laws introduced in this section are skipped in the appendix.
cific types. Life-cycle conditions can be specified in two non- Similarly, the discussion of structural features is omitted.
exclusive ways: directly, by defining new sufficient conditions d) Life-cycle features: The play and abandon social
for the initiate and finish actions; and indirectly, through the law abbreviations allow programmers to declare the particular
empowerment and permissions rules of the SetUp and Close rules which govern the automatic playing and abandonment
standard CAs. The former approach allows the middleware to of agents of the defined type. For example, the definition
automatically initiate and finish interactions. The later provides of the submitter agent type exploit the former abbreviation
agents with the possibility to force the execution of these in social law 18, which establishes that a submitter agent
internal actions. The social law abbreviations initiate is automatically created for a given author if that author
and finish, defined in the appendix of this paper, allow is the initiator of the submission process and no submitter
to declare the social laws which allow the middleware to has already being created; the purpose of this new agent, as
automatically govern the life-cycle of interactions. specified by law 19, is to set the CRC of the submission (i.e. to</p>
      <p>For instance, submissions are only initiated if some author publish the submitted paper through the conference program).
sets up an interaction of this kind within the program com- Concerning automatic abandonment conditions, the submitter
mittee. Thus, these types of interactions are not automatically agent type does not introduce any specific rule besides the
initiated by the middleware. On the contrary, a reviewing inter- ones declared by the generic agent type A [16, section 5].
action is not set up by any agent but automatically initiated by e) Attempt processing: The specification of
empowerthe middleware when the stage of the submission is changed ment and permission rules for new agent types employ the
to submitted. Concerning finishing conditions, the submission same abbreviations described in the last subsection for
interacprocess of some paper is automatically finished when its stage tion types. The only difference lies in the kind of social actions
is set to rejected or the submitter agent is abandoned (law 16). pertaining to the specification: in this case the CAs Join and
A submission is also automatically finished when the CRC of Leave. In the case of the submitter role, the creation of these
:- sorts</p>
      <p>A SU BMIT T ER.
:- constants
/*aliases*/
submission(SU BMIT T ER) :: sdFluent(S+none);
author(SU BMIT T ER) :: sdFluent(A+none);
. . .
:- variables</p>
      <p>submitter :: SU BMIT T ER.
/* laws */
/*Playing laws*/
play submitter for a within s
if state(s)=open &amp; initiator(s)=a &amp;</p>
      <p>:[Wsubmitter jsubmitter(s)=submitter ].
purpose submitter
is [Wp jcrc(submission(submitter ))=p].</p>
      <p>role instances) can execute plans to perform tasks delegated
to them by their player agents. In fact, the specification of
roles (i.e. agent role types) resorts to the typical constructs of
BDI agent component languages. In our opinion, this blurs
the distinction between agent components and agent roles,
and undermines the separation of concerns between interaction
and computation which lies at the heart of organizational
programming languages. Last, besides agent roles the SPEECH
language places a strong emphasis on social interaction types
as a modularisation mechanism.
(18) The SPEECH language is also closely related in spirit to</p>
      <p>
        common organizational metamodels for the specification of
(19) multiagent organizations such as ISLANDER [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], MOISE+
. . . [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] and AGR [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Several methodological and conceptual
/*Abandonment laws*/ differences, however, can be highlighted. Firstly, the
programempowered a to leave(submitter ). (20) ming language approach of SPEECH favours a higher degree
perimf:ittsetdagae(tso; alecacvepe(tesdub).mitter ) (21) of formality in the specification of the metamodel. Thus, in
contrast to the common informal meanings of metamodeling
Fig. 4. Submitter agent type SUBMIT T ER constructs, the metamodeling features presented in this
paper are grounded in the social middleware abstract machine
agents rely on the rules declared for automatic agent playing presented in [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], and given formal semantics using the C+
described above. Concerning its abandonment, author agents action language. Thus, the proposal of this paper can be
may prematurely leave one of its submitter roles, thereby characterised as a first step towards the type system of a
causing the abandonment of the role and the cancellation of the social interaction language, rather than as an organizational
submission (according to law 20). This power, however, may metamodel. Secondly, the SPEECH language places a strong
only be exercised if the paper has not already being accepted, emphasis on specialisation as a reusability mechanisms.
Alas the permission law 21 specifies. though some of the above-mentioned metamodels also support
an inheritance relationship, this metamodeling features is at
      </p>
      <p>IV. DISCUSSION the core of the SPEECH specification. In fact, the operational
This paper has put forward a type-oriented approach to the semantics of the language is formalised through generic social
programming of social middlewares. Essentially, this approach types which are specialised in the specification of
applicationis characterised by using types (of social interactions, agents, dependent types. In particular, the subsort mechanism of the
resources and CAs) as modules which encapsulate those struc- C+ action language allows the programmer to override default
tural and behavioural rules of the multiagent society which laws of the super-sort, extend its signature with new fluents and
pertain to social entities of a certain kind. Moreover, the actions, and/or refine the specification with new constraints.
identification and formalization of the metamodeling features This strongly promotes the development of libraries of social
used in the declaration of social types strongly builds upon types. For instance, an application-independent submission
the specification of the social middleware as an abstract, interaction may be defined, which could then be specialised
programmable machine. The overall approach can be thus for the particular case of paper submission. Similarly, other
characterised as a programming language approach. We opted social interactions such as invitations, discussion groups, etc.,
to call the resulting language SPEECH, given the relevance of may also be part of a generic library of social interactions,
CAs in the overall architecture of the language. readily available for developers of arbitrary social process</p>
      <p>
        This interaction-oriented language contrasts with and com- applications.
plements common component-oriented languages such as Current work deals with several extensions to the
lan2APL, AgentSpeak, etc., aimed at the development of intel- guage to deal with obligations and sanctions (e.g. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]), event
ligent BDI agent components. Conversely, SPEECH is closely processing, full-fledged communicative actions (e.g. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]) and
aligned with the attempt at designing a programming language computational resources. Moreover, we aim to exploit the
for organizational artifacts reported in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. In contrast flexibility of the social interaction mechanism to define
comwith this work, however, we place agent components outside mon metamodeling features of organizational metamodels (e.g.
the realm of the social middleware, which helps to ensure cardinalities and compatibility relations in MOISE+,
perfortheir full autonomy and heterogeneity. Another significant mative structures in ISLANDER, etc.). In a more practical
difference is related to the nature of roles. In particular, the vein, current work also focuses on the implementation of a
SPEECH specification of agent role types is devoid of any web-based social middleware for the language [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. In this
kind of computational feature, so that agent role instances just regard, the suitability of C+/CCalc for real deployments of
represent the public interface of agent components within the multiagent societies is debatable. However, as a specification
multiagent society. On the contrary, positions in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] (i.e. agent tool, they are of foremost importance to test in a
technologically neutral framework the features of the language.
      </p>
      <p>Moreover, they also provide invaluable help in the
development of simple application prototypes. In particular, the
conference management specification can be downloaded from
http://zenon.etsii.urjc.es/ jserrano/speech/apps/c+apps.tgz.</p>
    </sec>
    <sec id="sec-6">
      <title>APPENDIX</title>
      <p>Abbreviation 1. An expression of the form “input c(i; v) / c(i).”,
where c is a boolean (non-boolean) fluent constant, whose first
argument i is a variable of an interaction sort Id and whose second
argument (result) is of sort V , stands for the following causal law,
where ic and v are variables of the interaction sort I and sort V ,
respectively.</p>
      <p>nonexecutable initiate(i ; ic ) if :[Wv jc(i; v) = c(i) = v].</p>
      <p>Thus, the resulting effect of declaring a new input parameter
is the addition of a domain-dependent precondition to the initiate
internal action (see figure 2).</p>
      <p>Abbreviation 2. A set of expressions of the form “output cj (i).”,
where j 2 f1 : : : ng, i is a variable of an interaction sort Id, and
cj are non-boolean, optional constants of sort Sj , stands for the
following action dynamic law, where vj are variables of sorts Sj
caused
nish(i) if state(i)=open ^ V
j2f1:::ng [Wvj jcj (i) = vj ].</p>
    </sec>
    <sec id="sec-7">
      <title>Thus, a set of expressions “output cj .” implicitly establishes</title>
      <p>sufficient conditions for the execution of the finish standard action.
Abbreviation 3. A set of expressions of the form
“member i is Aj alias fj.”, where j 2 f1 : : : ng, i is an interaction variable
of sort Id, Aj a collection of agent sorts, and fj a set of boolean
(non-boolean) binary (unary) fluent constants whose first argument is
of sort Id and its second argument (optional) result sort is Aj , stand
for the following set of causal laws, where aj are variables of sort
Aj and a is an agent variable of sort A
constraint member(i ; a) ! Wj2f1:::ng[Waj ja = aj ].
caused fj (i; aj ) / fj (i)=aj if member(i; aj ).
caused : fj (i; aj ) / fj (i)=none</p>
      <p>if : member(i; aj ) / : [Waj jmember(i; aj )].</p>
      <p>Thus, the introduction of a new alias has also the intended
meaning of constraining the types of agents that can be members
of the interaction. The meaning of context, environment and
subinteraction aliases can be similarly formalised.
Abbreviation 4. Let i be a variable of an interaction sort Id. The
expression “finish i if F.” stands for the action dynamic law:
caused</p>
      <p>nish(i ) if F.</p>
    </sec>
    <sec id="sec-8">
      <title>Thus, the expression “finish i if F.” is simply a wrapper of the</title>
      <p>corresponding action dynamic law which enacts the execution of
the finish internal action. A similar abbreviation may be defined for
declaring the automatic initiation of interactions.</p>
      <p>Abbreviation 5. Let a and be agent and institutional action
variables. The expression “empowered/permitted a to if F.” stands
for the static law</p>
      <p>caused empowered=permitted(a; ) if F.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Varol</given-names>
            <surname>Akman</surname>
          </string-name>
          , Selim T. Erdogan,
          <string-name>
            <given-names>Joohyung</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Vladimir</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Hudson</given-names>
            <surname>Turner</surname>
          </string-name>
          .
          <article-title>Representing the zoo world and the traffic world in the language of the causal calculator</article-title>
          .
          <source>Artif. Intell</source>
          ,
          <volume>153</volume>
          (
          <issue>1-2</issue>
          ):
          <fpage>105</fpage>
          -
          <lpage>140</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Guido</given-names>
            <surname>Boella</surname>
          </string-name>
          , Rossana Damiano, Joris Hulstijn, and Leendert van der Torre.
          <article-title>A common ontology of agent communication languages: Modeling mental attitudes and social commitments using roles</article-title>
          .
          <source>Applied Ontology</source>
          ,
          <volume>2</volume>
          (
          <issue>3</issue>
          -4):
          <fpage>217</fpage>
          -
          <lpage>265</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Mehdi</given-names>
            <surname>Dastani</surname>
          </string-name>
          , Nick Tinnemeier, and John-Jules Meyer.
          <article-title>A programming language for normative multi-agent systems</article-title>
          . In Virginia Dignum, editor,
          <source>Multi-Agent Systems: Semantics and Dynamics of Organizational Models, chapter 16. IGI Global</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Marc</given-names>
            <surname>Esteva</surname>
          </string-name>
          , David de la Cruz, and
          <string-name>
            <given-names>Carles</given-names>
            <surname>Sierra</surname>
          </string-name>
          .
          <article-title>ISLANDER: an electronic institutions editor</article-title>
          .
          <source>In Maria Gini</source>
          , Toru Ishida, Cristiano Castelfranchi, and W. Lewis Johnson, editors,
          <source>Proceedings of the First International Joint Conference on Autonomous Agents and Multiagent Systems (AAMAS'02)</source>
          , pages
          <fpage>1045</fpage>
          -
          <lpage>1052</lpage>
          . ACM Press,
          <year>July 2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Marc</given-names>
            <surname>Esteva</surname>
          </string-name>
          , Bruno Rosell,
          <article-title>Juan A. Rodr´ıguez-</article-title>
          <string-name>
            <surname>Aguilar</surname>
            , and
            <given-names>Josep</given-names>
          </string-name>
          <string-name>
            <surname>Ll</surname>
          </string-name>
          . Arcos. AMELI:
          <article-title>An agent-based middleware for electronic institutions</article-title>
          .
          <source>In Proceedings of the Third International Joint Conference on Autonomous Agents and Multiagent Systems</source>
          , volume
          <volume>1</volume>
          , pages
          <fpage>236</fpage>
          -
          <lpage>243</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Jacques</given-names>
            <surname>Ferber</surname>
          </string-name>
          , Olivier Gutknecht, and
          <string-name>
            <given-names>Fabien</given-names>
            <surname>Michel</surname>
          </string-name>
          .
          <article-title>From agents to organizations: An organizational view of multi-agent systems</article-title>
          .
          <source>In AOSE</source>
          , pages
          <fpage>214</fpage>
          -
          <lpage>230</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Enrico</given-names>
            <surname>Giunchiglia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Joohyung</given-names>
            <surname>Lee</surname>
          </string-name>
          , Vladimir Lifschitz,
          <string-name>
            <surname>Norman McCain</surname>
            ,
            <given-names>and Hudson</given-names>
          </string-name>
          <string-name>
            <surname>Turner</surname>
          </string-name>
          .
          <article-title>Nonmonotonic causal theories</article-title>
          .
          <source>Artif</source>
          . Intell.,
          <volume>153</volume>
          (
          <issue>1- 2</issue>
          ):
          <fpage>49</fpage>
          -
          <lpage>104</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Jorge</surname>
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Go</surname>
          </string-name>
          <article-title>´mez-</article-title>
          <string-name>
            <surname>Sanz</surname>
          </string-name>
          ,
          <article-title>Rube´n Fuentes-Ferna´ndez, Juan Pavo´n, and Iva´n Garc´ıa-Magarin˜o. Ingenias development kit: a visual multi-agent system development environment</article-title>
          . pages
          <fpage>1675</fpage>
          -
          <lpage>1676</lpage>
          ,
          <year>2008</year>
          . May 12-16,
          <year>2008</year>
          ,
          <string-name>
            <given-names>Estoril</given-names>
            <surname>Portugal</surname>
          </string-name>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Olivier</given-names>
            <surname>Gutknecht</surname>
          </string-name>
          and
          <string-name>
            <given-names>Jacques</given-names>
            <surname>Ferber</surname>
          </string-name>
          .
          <source>The MADKIT agent platform architecture. Lecture Notes in Computer Science</source>
          ,
          <year>1887</year>
          :
          <fpage>48</fpage>
          -
          <lpage>55</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Jomi</given-names>
            <surname>Fred</surname>
          </string-name>
          <article-title>Hu¨bner, Jaime Sima˜o Sichman, and Olivier Boissier</article-title>
          . Moise+
          <article-title>: towards a structural, functional, and deontic model for mas organization</article-title>
          .
          <source>In The First International Joint Conference on Autonomous Agents &amp; Multiagent Systems, AAMAS 2002, July 15-19</source>
          ,
          <year>2002</year>
          , Bologna, Italy, Proceedings, pages
          <fpage>501</fpage>
          -
          <lpage>502</lpage>
          . ACM,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Jomi</given-names>
            <surname>Fred</surname>
          </string-name>
          <article-title>Hu¨bner, Jaime Sima˜o Sichman, and Olivier Boissier. Smoise+: A middleware for developing organised multi-agent systems</article-title>
          . In Olivier Boissier, Virginia Dignum, Eric Matson, and Jaime Simo Sichman, editors, Coordination, Organizations, Institutions, and
          <article-title>Norms in Multi-Agent Systems</article-title>
          , volume
          <volume>3913</volume>
          <source>of LNCS</source>
          , pages
          <fpage>64</fpage>
          -
          <lpage>78</lpage>
          . Springer,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Jomi</given-names>
            <surname>Fred</surname>
          </string-name>
          <article-title>Hu¨bner, Jaime Sima˜o Sichman, and Olivier Boissier. Developing organised multi-agent systems using the moise+ model: Programming issues at the system and agent levels</article-title>
          .
          <source>IJAOSE</source>
          ,
          <volume>1</volume>
          (
          <issue>3</issue>
          /4):
          <fpage>370</fpage>
          -
          <lpage>395</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Juan</surname>
            <given-names>Pavo´</given-names>
          </string-name>
          <article-title>n and Jorge Go´mez-Sanz. Agent oriented software engineering with ingenias</article-title>
          . In V. Marik,
          <string-name>
            <given-names>J.</given-names>
            <surname>Muller</surname>
          </string-name>
          , and M. Pechoucek, editors,
          <source>Proceedings of the 3rd International Central and Eastern European Conference on Multi-Agent Systems</source>
          . Springer Verlag,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Sergio</given-names>
            <surname>Saugar</surname>
          </string-name>
          and
          <article-title>Juan Manuel Serrano. A web-based virtual machine for developing computational societies</article-title>
          . In Matthias Klusch, Michal Pechoucek, and Axel Polleres, editors,
          <source>Cooperative Information Agents XII, 12th International Workshop</source>
          , CIA 2008, Prague, Czech Republic,
          <source>September 10-12. Proceedings</source>
          , volume
          <volume>5180</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>162</fpage>
          -
          <lpage>176</lpage>
          . Springer,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Juan</given-names>
            <surname>Manuel</surname>
          </string-name>
          Serrano and
          <string-name>
            <given-names>Sergio</given-names>
            <surname>Saugar</surname>
          </string-name>
          .
          <article-title>Operational semantics of multiagent interactions</article-title>
          . In Edmund H. Durfee, Makoto Yokoo,
          <string-name>
            <given-names>Michael N.</given-names>
            <surname>Huhns</surname>
          </string-name>
          , and Onn Shehory, editors,
          <source>6th International Joint Conference on Autonomous Agents and Multiagent Systems (AAMAS</source>
          <year>2007</year>
          ), Honolulu, Hawaii, USA, May
          <volume>14</volume>
          -18, pages
          <fpage>889</fpage>
          -
          <lpage>896</lpage>
          . IFAAMAS,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>Juan</given-names>
            <surname>Manuel</surname>
          </string-name>
          Serrano and
          <string-name>
            <given-names>Sergio</given-names>
            <surname>Saugar</surname>
          </string-name>
          .
          <article-title>Run-time semantics of a language for programming social processes</article-title>
          . In Michael Fisher, Fariba Sadri, and Michael Thielscher, editors,
          <source>9th International Workshop on Computational Logic in Multi-Agent Systems (CLIMA IX)</source>
          , volume
          <volume>5405</volume>
          <source>of Lecture Notes in Artificial Intelligence</source>
          , pages
          <fpage>37</fpage>
          -
          <lpage>56</lpage>
          . Springer,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>Nick</surname>
            <given-names>Tinnemeier</given-names>
          </string-name>
          , Mehdi Dastani, and John-Jules Meyer.
          <article-title>Roles and norms for programming agent organizations</article-title>
          . In Decker, Sichman, Sierra, and Castelfranchi, editors,
          <source>Proc. of 8th Int. Conf. on Autonomous Agents and Multiagent Systems (AAMAS</source>
          <year>2009</year>
          ), pages
          <fpage>121</fpage>
          -
          <lpage>128</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>