Archive for August, 2011

RIF meets ReqIF

August 9, 2011 6 comments

ReqIF is the new OMG standard for requirements interchange. RIF is the predecessor to it and already supported by many tools like DOORS. RMF delivers both the standards as Ecore models. However, there are quite a few differences between the two standards making them type incompatible.

The main differences lies in,

1. Element naming.
For example, the element RIF is now called REQIF, SpecHierarchyRoot is now Specification and so on.

2. More specification types.
If you know the RIF model already, you would know the concept of SpecTypes. This element allows creation of new types. In RIF and ReqIF, SpecObjects (the instance values)  and SpecRelations (relations between instances) are typed. However, in RIF, both refer to the same SpecType element, where as ReqIF has different types called SpecObjectType for SpecObject, SpecRelationType for SpecRelation and some more new types.

3. More attribute definition and value types.
RIF had only a single attribute definition type called  AttributeDefinitionSimple. ReqIF extends this for different the different data types as AttributeDefinitionIntegerAttributeDefinitionRealAttributeDefinitionString etc. Same for values as AttributeValueIntegerAttributeValueRealAttributeValueString etc.

4. RIF XML uses no XML attributes where as ReqIF uses a lot of them.
For example, IDENTIFIER is an XML element in RIF whereas it is a XML attribute in ReqIF.

This brings us to the question – how do I convert my existing RIF files to the new ReqIF format? Considering the fact that there are a lot of industry samples in RIF format, we thought of writing a RIF to ReqIF converter. The transformer takes in a RIF file and transforms it into a ReqIF, retaining all its contents. You could also do an in-memory transformation between the two models.

This is how a RIF source than we passed to our converter looks like after transformation.

RIF Source

ReqIF Target

2 Fast thrice Furious

August 3, 2011 1 comment

Preparing to make the initial code contribution for RMF, we ran our RIF/ReqIF metamodels through several performance tests. To start with, we tested the load and save times of RIF files based on some industry samples. To get some comparison data, we generated XMI files using the same data held in RIF XML files and tested the load/save time against it. The results are quite promising.

Before we go into the details of the tests, its better to define two components involved in our test comparisons.

  • The customized RIF XML loader (a.k.a RMF Loader) and serializer (a.k.a RMF Serializer) for loading/saving OMG RIF XML files into RIF Ecore metamodel (read more on the metamodel implementation here).
  • The default RIF XMI loader and serializer for  loading/saving RIF XMI files into RIF Ecore model (this is not in the scope of RMF. We use this only to get some comparison).

Here are some highlights from our tests.

  • A 32MB RIF XML file is loaded in 14.4 seconds by RMF loader where as the same data in XMI format is loaded by the default EMF XMI loader in 22.2 seconds (and 70 mins(!!) without any optimizations to the XMI loader)
  • The average time taken to load per MB of data from RIF XML is 0.5 seconds, whereas RIF XMI takes 1.63 seconds per MB. For save, average time taken per MB of data to RIF XML is 0.09 seconds, whereas RIF XMI takes 1.22 seconds per MB
  • The load and save time for RIF XML files by RMF loader/serializer increases linearly with size

Tags: , , , ,