Example 3: Metamodel For Jack Agents: Agent-Oriented Software Engineering Model Transformations
Example 3: Metamodel For Jack Agents: Agent-Oriented Software Engineering Model Transformations
Model Transformations
Model Transformations
In the design of a multiagent systems (MAS) we can distinguish models that describe the entities at the MAS level and models that describe the internal structure and/or the behaviour of individual agents. At the MAS we find concepts like teams, agents, roles, events, and plans. At the level of individual agents we find the same concepts again (note that teams can be viewed as individual agents and vice versa), where events and plans are described in much more detail, and additional concepts like capabilities and belief data. The figure displays the metamodel for BDI agents in JDE when the system is used in the more general team mode. Teams are formed by groups of agents but may also consist of only a single agent. The metamodel explains how the basic concepts relate to each other.
Model Transformations
Model Transformations
Mapping is performed by defining relations between two models. The relations can be 1-to-1, n-to-1, 1-to-n or n-to-n. Mapping is performed in design time.
Model Transformations
Mapping function
Mb
Mb: Model of b f : Mapping function Ma: Model of a MMb: Metamodel of b MMa: Metamodel of a
Model Transformations
Source Metamodel
Mapping
Target Metamodel
Input Model
Transformation
Output Model
Model Transformations
PIM1 metamodel
Vertical Mapping
Horizontal Mapping
PIM2 metamodel
Vertical Mapping
High Abstraction
PSM1 metamodel
Horizontal Mapping
PSM2 metamodel
Low Abstraction
We can map between models that are on the same abstraction level illustrated with horizontal mapping, or we can map between abstraction levels illustrated with vertical mapping in the figure.
Model Transformations
Model Transformations
Source metamodel
ATL
conforms to
Target metamodel
conforms to
Sourcemodel2targetmodel.atl
conforms to
Source model
is transformed into
Target
Model
Model Transformations
10
Model Transformations
UML to RDBMS
UML Metamodel
PIM
RDBMS Metamodel
Symbols
Metamodel Concept Relationship Correspondence
PIM
11
Model Transformations
Let us go through an example where we want to transform a UML model to a Relational database management system . The figure shows parts of the UML metamodel that you should already be familiar with.
12
Model Transformations
This figure shows a simple metamodel for RDBMS. It defines the most important constructs for relational databases such as table, column, key and foreign key.
13
Model Transformations
UML to RDBMS
Ecore
conforms to conforms to conforms to
UML metamodel
ATL
conforms to
RDBMS metamodel
conforms to
conforms to
Model
14
Model Transformations
ClassModel2DBModel
ClassModel
- name : String - elements: Classifier
DBModel
- name : String - tables : Table - types : Type
15
Model Transformations
Class2Table
Class
- name : String - attributes: Attribute
Table
- name : String - columns : Column - key : Column
16
Model Transformations
DataType2Type
DataType
- name : String
Type
- name : String
17
Model Transformations
Attribute2Column
Attribute
- name : String - owner : Class - multivalued = Boolean - type : DataType
Column
- name : String - keyOf : Table - type : Type
18
Model Transformations
Input Model
19
Model Transformations
20
Model Transformations
PIM4SOA to JACK
PIM4SOA Metamodel
PIM
PSM
21
Model Transformations
Bottom Line
22
Model Transformations
23
Model Transformations
Modeling does not guarantee good applications To model something, you must understand it A bad model can still produce a bad application MDA is not suited for every type of application MDA does not compensate for lack of good people a good process
24
Model Transformations
Model-Centric Development
Models are focal point of solutions Code is a byproduct of development Solve design problems at highest possible level
Model-Centric Design
Design centers on model Model is source code Changes are made at highest possible level Validate the code transformations
25
Model Transformations
Conclusion
MDA is probably not the silver bullet for software engineering, But: There is no reasonable alternative to MDD Way to deal with new emerging technologies like Web services in a smooth way Decoupling the business part and the technical part of information systems is a long term trend
26