Normative Multi-Agent Organizations A Programming Language and its Interpreter Mehdi Dastani Utrecht University The Netherlands Abstract. Multi-agent systems are viewed as consisting of individual agents whose behaviors are regulated by organization artifacts. This abstract presents a programming language, which is designed to implement norm-based organization artifacts, by means of an example and explains the execution behavior of the language interpreter. In order to achieve the overall objectives of multi-agent systems, the behavior of individual agents and their interactions should be regulated/coordinated. Existing approaches advocate the use of organizational models, normative systems, and electronic institutions to regulate the agents’ behaviors and interactions [3, 4, 6]. Norm-based artifacts regulate the behavior of individual agents in terms of norms being enforced by monitoring, regimenting and sanctioning mechanisms. Generally speaking, the social and normative perspective is conceived as a way to make the development and maintenance of multi-agent systems easier to manage, e.g., OperA [2], AMELI [3], and Moise+ [5]. A declarative programming language to implement norm-based organization artifacts is presented in [1]. It provides programming constructs to specify 1) the initial state of an artifact, 2) the effects of the agents’ actions that can be monitored by the artifact, and 3) the applicable norms and sanctions1 . The interpreter of the programming language is based on a cyclic process. At each cycle, the observable actions of the individual agents are monitored, the effects of the actions are determined, and norms and sanction are imposed if necessary. Below we give a brief presentation of the programming language by means of a simple example, discuss the data types for specifying norms and sanctions, and finally describe the execution behavior of the built interpreter. The (initial) state of a normative organization artifact is constituted by two disjoint sets of facts: brute and institutional facts. Brute facts specify the brute state of the artifact (e.g., “John has submitted a paper with 18 pages.”), which may for example be the state of the environment shared by the agents. Institutional facts specify the normative state of the artifact (e.g., “John’s submission violates the 15 page limit.”). The brute facts are initially set by the programmer by means of a Prolog program. As a consequence of an agent’s action, the atomic 1 The individual agents are assumed to be implemented in a programming language, not necessarily known to the artifact programmer. However, it is required that the observable actions of the agents can be monitored by the artifact. brute facts can change during the artifact’s execution. The institutional facts are only created and modified during the artifact execution since no initial institutional facts can be specified. They are created and modified based on the (brute and normative) state of the artifact and the applicable norms. The effect of an agent’s observable action is specified by means of a pre- and a post-condition, each considered as a set of brute literals (positive or negative brute facts). A precondition is evaluated with respect to the brute state of the artifact and the postcondition is used to update the brute state of the artifact. Norms are represented by counts-as rules [4], which ascribe “institutional facts” to “brute facts”. For example, in a paper submission system, a counts-as rule may express the norm “a submission with more than 15 pages counts-as a violation”. Institutional facts are used with the explicit aim of triggering system’s reactions (e.g., sanctions). Sanctions are implemented as rules too, but follow the opposite direction of counts-as rules. A sanction rule determines which brute facts will be brought about by the system as a consequence of the institutional facts. Typically, changing the brute state of an artifact (e.g., an agent’s environment) by adding brute facts to it corresponds to imposing sanctions (e.g., issuing fines). The example in Figure 1 illustrates the implementation of a small part of a paper submission system. The initial brute facts represent the facts that virginia is one of the workshop chairs and that there are four registered authors. The rest of the facts declare the lists of submitted papers and the reviewers that are assigned to papers (both lists are initially empty). We also have some background knowledge, represented by Prolog rules, used to determine if the assignment of papers to reviewers are conflicting (e.g., if an author should review its own paper). The declaration of the initial brute facts is followed by the specification of two actions to monitor: uploadPaper and assignReviewers. The execution of the first action adds a paper to the list of submitted papers, and the execution of the second assigns one reviewer to each paper. The first action is assumed to be performed by an author and the second by the chair. Action specifications are followed by counts-as and sanction rules. The first counts-as rule states that a submitted paper with more than 15 pages is a violation and the second rule indicates that conflicting assignments should be regimented. The special atom viol indicates a regimented state that cannot be reached. A counts-as rule with viol in its consequent means therefore that a state satisfying its antecedent should be avoided. This is done by not realizing the effect of the observed action and thereby preventing the application of the counts-as rule. Finally, the sanction rule indicates that a page limit violation should be sanctioned by issuing a fine of 25 euro. The execution of this artifact program monitors possible actions performed by either a registered author or the workshop chair. In particular, performing the action uploadPaper(john, p1, 18) by the author john adds paper p1 to the list of the received submissions (initially empty) resulting in the brute fact submittedPapers([ [john,p1,18] ]). The result is evaluated with respect to the counts-as rules causing the generation of the page limit violation and adding viol pageLimit(john) to the normative state of the artifact. Fi- Facts: workshopChair(virginia). registeredAuthors([john, mary, eva, peter]). submittedPapers([]). reviewersPapers([]). conflict([],Rs,[]). conflict([(A, Id, Pages)|T], Rs, [A|R]):- member((A, Id), Rs), conflict(T,Rs,R). conflict([(A, Id, Pages)|T], Rs, B):- conflict(T, Rs, B). empty([]). Effects: { submittedPapers(Rs), registeredAuthors(As), member(A,As) } uploadPaper(A, Id, Pages) { not submittedPapers(Rs), submittedPapers([(A,Id,Pages)|Rs]) } { workshopChair(A), reviewersPapers(OldPRs) } assignReviewers(A,PRs) { not reviewersPapers(OldPRs), reviewersPapers(PRs) } Counts-as rules: submittedPapers(As) and member((A,Id,Pages), As) and Pages > 15 => viol_pageLimit(A). submittedPapers(Rs) and reviewersPapers(Res) and conflict(Rs, Res, X) and not empty(X) => viol. Sanction rules: viol_pageLimit(A) => fined(A,25). Fig. 1. An example of norm-based organization artifact program. nally, the interpreter evaluates the normative state of the artifact with respect to the sanction rule adding the brute fact fined(john,25) to the brute state of the artifact. This brute fact indicates that a fine of 25 euro is issued for john. Suppose mary and peter upload their papers as well resulting in the brute fact submittedPapers([[peter,p3,12], [mary,p2,14], [john,p1,18]] ). Also assume that the workshop chairs decide to assign papers to reviewers by performing the action assignReviewers( virginia,[ [peter,p1], [john,p3], [mary,p2]]), indicating that papers p1, p2, and p3 should be reviewed by peter, mary and john, respectively. The performance of this action, however, will be prevented since otherwise the second counts-as rule can be applied causing the generation of the special regimentation atom viol. References 1. M. Dastani, N. A. M. Tinnemeier, and J.-J. Ch. Meyer. A programming language for normative multi-agent systems. In Virginia Dignum, editor, Multi-Agent Systems: Semantics and Dynamics of Organizational Models, chapter 16. IGI Global, 2008. 2. V. Dignum. A Model for Organizational Interaction. PhD thesis, Utrecht University, SIKS, 2003. 3. M. Esteva, J.A. Rodrı́guez-Aguilar, B. Rosell, and J.L. Arcos. Ameli: An agentbased middleware for electronic institutions. In Proc. of AAMAS 2004, 2004. 4. D. Grossi. Designing Invisible Handcuffs. PhD thesis, Utrecht University, 2007. 5. J. F. Hübner, J. S. Sichman, and O. Boissier. Moise+: Towards a structural functional and deontic model for mas organization. In Proc. of AAMAS 2002, 2002. 6. A. J. I. Jones and M. Sergot. On the characterization of law and computer systems. In Deontic Logic in Computer Science. 1993.