metaDepth – A new framework for multi-level meta-modelling

Tweet about this on TwitterShare on FacebookBuffer this pageShare on RedditShare on LinkedInShare on Google+Email this to someone

My good friends Esther Guerra and Juan de Lara visited the AtlanMod group last week to teach graph transformations in the MDE diploma . During their visit, they introduced me to their latest tool: metaDepth a new framework for multi-level meta-modelling.

The main feature of metaDepth is its support for an arbitrary number of ontological meta-levels. This makes MetaDepth especially useful to define multi-level languages. That is, instead of adhering to the typical 3-layer metamodeling architecture (model/metamodel/metametamodel), designers can define any number of metamodeling levels. This is especially useful when designing languages spawning multiple meta-levels. As they explain in the tool web page , a good example is the relationship between objects and classes in the UML. One can think of object diagrams to be instances of class diagrams. Hence class+objects diagrams can be considered a multi-level language, and can be defined in MetaDepth through a unique meta-model. Compared with the cumbersome solution provided in the UML standard (where objects are defined at the same meta-level as the classes they are supposed to instantiate, using the non-intuitive InstanceSpecification, Slot, InstanceValue,… metaclasses), this has the advantage of a simpler definition, and that the system’s infrastructure takes care OF the instantiation relations BETWEEN objects AND classes.

This kind OF relationship appears IN many other domains LIKE web engineering (page node types/page instances), role control access (role types/roles), AND many MORE. TO me, another useful scenario IN which TO apply metaDepth IS TO clarify the relationship BETWEEN classes, metaclasses AND profiles, IN particular stereotypes. Stereotypes CROSS over two meta-levels AND this IS very difficult TO express WITH a fixed layered metamodel.

As a very simple example, we could define a class diagram composed by class nodes WITH a potency OF 2, meaning that the metaclass Class supports two levels OF instantiations (the FIRST one would correspond TO the classes OF the model AND the SECOND one would allows us TO represent the instances OF those model classes, i.e. the objects IN the system).


strict Model [email protected]{
  ext Node Class{ 
    [email protected]  : boolean = FALSE;
    [email protected]	      : Class[*];
    [email protected]	      : Class[*];
    [email protected]: $self.isAbstract=FALSE$
  }
  Edge Association(Class.out, Class.IN) {}
}

Then, WITH this simple metamodel, we can define our own class diagram:


ClassDiagram Example{
  Class Person {
    NAME : String;
    age  : INT;
    neighbourS : Person[*] {out};
    neighbourT : Person[*] {IN};
    subordinate: Employee[*] {out};
  }
  Class Employee : Person {
    boss : Person[1..*] {IN};
  }
  Association neighbour (Person.neighbourS, Person.neighbourT){
    isFriendOf : boolean = FALSE;
  }
  Association isBossOf (Person.subordinate, Employee.boss);
}

and AT the same TIME our object model


Example Exx {
  Person Juan{ NAME = "juan"; age = 36; }
  Employee Sacarino{ NAME = "Sacarino"; age = 22; }
  isBossOf(Juan,Sacarino);
}

Btw, AS you can see, metaDepth use a textual syntax TO define the (meta)models, which many OF you would consider an additional benefit.

Tweet about this on TwitterShare on FacebookBuffer this pageShare on RedditShare on LinkedInShare on Google+Email this to someone

Reply

Your email address will not be published. Required fields are marked *