Managing Inconsistent Models with HUTN

A model and metamodel are consistent when the metamodel specifies every concept used in the model definition. A metamodel can evolve (be adapted by a developer), which can cause inconsistency. We’ve recently added a tool to Epsilon, the HUTN / XMI bridge, that seeks to aid developers in manually managing inconsistency.

HUTN, an OMG standard, specifies a human-usable, textual notation for MOF-based models. Epsilon provides an implementation of HUTN for Ecore-based models. HUTN can be thought of as an alternative concrete syntax to XMI. While XMI is optimised for use by machines, HUTN is optimised for use by humans. We discuss HUTN in more detail in this paper at MoDELS 2008.

We have recently extended our HUTN implementation to include an XMI bridge, which allows us to generate HUTN source code from EMF models. Furthermore, the HUTN / XMI bridge can be used to report inconsistencies between a model and its metamodel, and to resolve those inconsistencies using a human-usable notation.

Example

To demonstrate the HUTN / XMI bridge, here’s a short example. Below is an exemplar metamodel, along with a sample model:

channels_mm_beforechannels_model_before

Channel B has ConnectionPoint both?! as its reader and as its writer.

Suppose we now wish to make distinct ConnectionPoints that are used for writing and ConnectionPoints that are used for reading. We may elect to change our metamodel, as shown in the diagram below:channels_mm_afterWhen we try to load our model with EMF, we receive a single error, stating, for example, that “The class ‘ConnectionPoint’ is not a valid classifier.” By contrast, the HUTN/XMI bridge is able to produce a complete list of the inconsistencies:

channels_model_hutn_xmi_errors(Produced by the Check Consistency option, available by right-clicking a .model file).

To aid developers in resolving consistency, the HUTN / XMI bridge can generate HUTN from a model’s XMI, even when that model is inconsistent with its metamodel:

channels_hutn_with_errors

Once there are no further inconsistencies, HUTN can be used to generate a model that is now consistent with its metamodel.

Related Work

The HUTN / XMI bridge is a tool for manually managing inconsistency between models and metamodels. There are situations in which an automatic approach is more suitable. For example, perhaps you have a large number of inconsistent models. In those situations, we’d recommend using a different tool, such as COPE. You may also be interested in Antonio Cicchetti’s work; Cicchetti advocates a fundamentally different approach to the one used in COPE.

Installation

If you’d like to try the HUTN / XMI bridge, it’s available from the Epsilon SVN repository (access instructions). It will also appear in the upcoming 0.7.5 HUTN release*. We’ll be adding new features and fixing problems per user requests – do drop by the Epsilon newsgroup if you have questions, problems or suggestions.

* [Update 27/04/09] The HUTN XMI Bridge is included in HUTN 0.7.5, which was released today, as part of Epsilon 0.8.5.

About these ads
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Managing Inconsistent Models with HUTN

  1. Pingback: New in Epsilon 0.8.5 « Epsilon Weblog

  2. Jim Steel says:

    Hi guys,

    What a pleasant surprise to see someone actively using HUTN again. Interestingly, one of the things we noticed doing the initial TokTok work was that HUTN proved a slightly more resilient serialisation in the face of metamodel evolution than XMI. I meant for a long time to track down the TokTok source and revive it, but got distracted by other things. There was actually a second project at DSTC that implemented it as well, although I wasn’t involved in that.

    As a small aside, if in future you’re looking for an academic citation for the early HUTN work (other than the spec itself), it was first published at the EDOC 2001 conference by me and Kerry Raymond.

    Jim.

  3. Louis Rose says:

    Hi Jim,

    Thanks for the information! And your timing couldn’t be better; I can cite your EDOC paper in my thesis.

    Cheers,
    Louis.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s