Home > EMF, Requirements Management, RMF > Dissecting RIF/ReqIF metamodel

Dissecting RIF/ReqIF metamodel



RIF/ReqIF is the new OMG standard for requirements interchange. RMF (currently in proposal phase) provides an EMF Ecore based metamodel implementation for the RIF/ReqIF XML format. The metamodel is a clean implementation of the format without any “XML noise”. The Ecore metamodel also conforms to the CMOF metamodel delivered by OMG (as it has been derived from it). The metamodel reads/writes RIF/ReqIF data in conformance with the RIF/ReqIF XML Schema.

The challenge in the Ecore based RIF/ReqIF implementation was the customization of loaders and serializers to make them RIF/ReqIF XML Schema conformant. EMF provides different ways of customizing the XML output.

1. Using ExtendedMetadata annotations.

2. Implementing new XMLLoad, XMLSave and XMLHelper.

Both approaches are quite tricky to implement when the expected XML output has structural differences compared to the Ecore metamodel. For example, the XML output has wrapper elements for lists (ELists) in the Ecore metamodel.

We went in for a third approach.

We imported RIF/ReqIF XML schema using EMF importer to create a RIF/ReqIF XML Ecore model (Anyone who has done this, knows it’s an “ugly” metamodel that EMF generates here). The next step was to create the real RIF/ReqIF metamodel, by importing RIF/ReqIF CMOF file. We then wrote a generic (of course reusable) Ecore XML to Ecore converter to do a model to model transformation in both directions. The whole processing is cleanly hidden in a new EMF Resource implementation such that the user hardly knows anything about these.

The following are the advantages we saw in the approach.

1. You don’t do customizations at a XML level, but at a higher EMF model API level. That is, you don’t hack some XML SAX events, but work with familiar EMF APIs.

2. The generic Ecore converter has enough hooks to plugin in the transformations.

3. Easy maintenance as the customizations are available in one place.

The drawback of this approach could be the processing involved in the model to model transformation. However, the highly optimized model to model transformation we implemented doesn’t make it all that slow. Our performance tests proves this (which would be the topic of my next blog post). It is infact upto 300 times faster than having the same data in the default XMI format (Yes I meant 300! Ed Merks is going to get back to me on this I hope ;) )

Edit:

Ed did get back to me. With the performance optimizations applied to XMIResource loader to use cache for Intrinsic Ids and URIs, the performance improved dramatically. The XMI resource loader now takes only 22,2s to load a 32MB sample, compared to the earlier 70mins. I am glad that our RIF XMLResource however takes only 14,4s for the same contents.

About these ads
Tags: , , , , ,
  1. August 1, 2011 at 3:02 pm | #1

    Hi,

    Interesting blogs, could you tell us on what purpose have you done such work ?

    • August 2, 2011 at 1:40 pm | #2

      Thanks for your comment. This is in the scope of the new Eclipse project proposal called “Requirements Modeling Framework (RMF)”

  2. August 4, 2011 at 1:10 pm | #3

    Hi, good work! Interesting results. Which of the several QVT-frameworks for EMF did you technically use for the Model-to-Model transformation? I don’t have experience with them and would like to get a recommendation. Thx!

    • August 4, 2011 at 1:19 pm | #4

      Hi Christoph,

      Thanks a lot for your comment. No M2M technologies were used here. The reason being, we wanted to keep it as lightweight as possible, with no dependencies other that the EMF runtime. The resuable Ecore converter I talked about basically walks down the source model and creates a target model using plain old Java, of course making use of EMF runtime features like Switch classes and a lot of reflective EMF APIs.

      The sources would be available as soon as IP review for RMF is complete.

      Incase you are looking for a recommendation for M2M, have a look at Xpand2 (from itemis) :)

      Regards,
      Nirmal

  3. Cristiano
    August 30, 2011 at 9:17 pm | #5

    Hi, I’ve got interesting by the subject. But I’m trying to understand a little more about what are the concept envolved.

    Today, I can see lot of projects using only some Task Manager tool as its requirement tool. How could RIF and ReqIF be related to this? how could it help with it?

    thanks for any clarification.

    cheers

    Cristiano

    • September 1, 2011 at 10:24 am | #6

      RIF/ReqIF is a OMG standard for requirements interchange. This a major requirement when there are many parties involved in a project and each of them use their own RM tools. Using RIF/ReqIF as an export/import format allows integration of different tools at data level. Also tools could use the RIF/ReqIF metamodel provided by RMF as an internal tool model to capture requirements. Goal of RMF is to provide a base for the evolution of such tools.

  4. Samanwita
    July 26, 2012 at 9:29 am | #7

    Hi,

    I read this link on customizing RIF, could you elaborate and help us understand if we could modify the RIF features, actually we are trying to use this in our project.

  1. July 30, 2011 at 7:42 am | #1
  2. August 3, 2011 at 3:24 pm | #2

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: