# Towards Agent Organizations Interoperability: A Model Driven Engineering Approach
## 5 Integration Method Application
### Second Iteration
In the context of \(MM_{\#1}^{int}\)::GroupDef the derivation of \(MM_{\#1}^{int}\)::GroupRef is specified by the invariant GD3 shown in the bottom right of Figure 8. The invariant establishes that for each instance sg of \(MM_{\#1}^{int}\)::GroupDef (referenced by subGroup), there must exist (be created) an instance gr of \(MM_{\#1}^{int}\)::GroupRef pointing at sg and having the attributes gr.min = sg.supRoleDef.min and gr.max = sg.supRoleDef.max. As long as they are more expressive, the classes RoleRef and GroupRef are used in the articulation graph replacing the references roleDef and subGroup present in \(MM_{\#1}^{int}\). Therefore the replaced references are marked to be left out during the merge step at the end of the iteration. In addition, the attributes max and min in the class \(MM_{\#1}^{int}\)::RoleDef are marked once the same information is now represented as attributes of RoleRef and GroupRef in the articulation graph. Figure 7: Integrated metamodel \(MM_{\#1}^{int}\). Figure 8: Alignment between MOSE+ and \(MM_{\text{gt}}^{int}\). A second peculiarity of MOISE+ concerns the possibility of defining _links_ and _compatibilities_ between _roles_ as part of a _group specification_. In this regard, there are two observation to be made. Firstly, _links_ and _compatibilities_ are new kinds of _role relation_, not present in \(MM_{\#1}^{int}\). In fact, we observe that the _link_ and _compatibility_ concepts, in essence, differ from the _dependency_ and _correspondence_ concepts found in AGR. On the one hand, in MOISE+, a _link_ enable the _acquaintance_, _communication_, or _authority_ between roles; and a _compatibility_ indicates that an agent playing a role can also play another role. On the other hand, in AGR, a _dependency_ indicates that an agent only can play a role if it previously commits itself to another one; and a _correspondence_ means that to play a role automatically implies to play another role. The second observation is about the nature of the _group definition_ concept behind the notions of _links_ and _compatibilities_. By default, a _group definition_ in MOISE+ does not enable the _compatibility_ or any _link_ between roles. In other words, if not stated explicitly, an agent playing a role do not have permission to play another role, or even to interact with agents playing another role, neither in the same nor in other groups. If _compatibilities_ and _links_ are needed, this must be explicitly specified in the _group definition_. Conversely, in AGR and STEAM a _group definition_ does not implies _a priori_ any restriction regarding _compatibility_ and _link_ among the roles. With the exception of explicit _dependencies_ relationships and cardinality restrictions, in AGR and STEAM specifications the agents are free to play the roles they want and are not blocked with respect to interacting with any agent playing some other role. In the articulation presented in Figure 8, these observations are made explicit by means of the derived attributes allowsComm, allowsAcqu and allowsComp in the context _group definitions_. For MOISE+::GroupSpecification, these attributes have the value false. This represents respectively the _communication_, _acquaintance_ and _compatibility_ restrictions existing in MOISE+. On the other side, for \(MM_{\#1}^{int}::GroupDef\) the three attributes assume the value true indicating the absence of the respective restrictions in AGR and STEAM. Despite their opposite nature, we note that AGR and STEAM _group definitions_ can be expressed in MOISE+. To this end, one has to explicitly define _communication_, _acquaintance_, and _compatibilities_ relationships between all roles in a _group definition_. However, the converse is not always possible without losing information. Ending the comparison, in MOISE+ there is a third form of _role relationship_: the _inheritance_. In MOISE+ metamodel this relationship is represented by the reference superRole involving instances of the class MOISE+::Role.