IBM Support

How to convert an OXF-based project to an SXF-based project with IBM Rational Rhapsody

Question & Answer


Question

How do you convert an OXF-based project to an SXF-based project with IBM Rational Rhapsody

Cause

You have created a project but have realized that the SXF (Simplified Execution Framework) will better accommodate your requirement than the default OXF (Object Execution Framework).

Answer

If it is not possible to start with a blank project, it should be possible to convert an existing project. However, you will receive many compiler errors as you are switching from a fully featured 
framework to the limited feature set of the Simplified Execution Framework. Please see the Rhapsody documentation for a comparison of the OXF and SXF features.

The time required to convert the project and resolve code generation issues and compiler/linker  errors will depend on the size and complexity of your project. You may conclude it is not worth the time to convert a large project. 

There is no official workflow, but these are the basic steps and considerations to follow:

  1. Add the required SXF project settings. You can use File menu > Add   
    Profile to Model. Go back one directory and open the Settings >         
    SafetyCritical SafetyCriticalForC++Developers.sbs file. 





    This should add three settings at the bottom of your project browser:               
    SafetyCriticalForC++DevelopersSXFC++ and MISRAC++.  



  2. Set the SXF stereotype on the configuration you want to use with the 
    SXF. You can do this by double-clicking the configuration in the browser
    and going to the general tab.  


  3. Make sure the component/configuration is selected in the toolbar and 
    rebuild the SXF framework (Code menu > Build Framework). 



    This should result in a new library with the suffix *sxf.lib. The prefix will depend on the environment you have selected in the configuration settings. You only need to do this once. For example, this is the resulting library built for use with the Microsoft Visual Studio 2015 (MSVC14):
                           


  4. Now you will need to refactor your project to remove any OXF features that are not supported by the SXF. This is trickier. However, there are 
    some obvious limitations that can be addressed immediately:             
                                                                           
    • Disable animation in the configuration settings.       
    • Remove references to the OMContainers API by switching CPP_CG::Containers::ContainerSet to "STLContainer"    
    • Removing any ports and interfaces and replacing them with suitable alternatives. This is the most complex task and it's complexity will differ greatly depending on your project design.                    
    • ...further semantic issues are undocumented. You should be aware of potential dynamic memory issues if they were used with your existing project. Memory management is not be available in the SXF.                                      
                                                                              
If you would like to assess the feasibility of this type of conversion, it would be advisable to try converting the HomealarmWithPorts sample 
model provided with Rhapsody. This will give you an idea of the size of the task. This sample project is located in the Samples/CPPSamples directory of the Rhapsody installation.          

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5;8.0.6;8.1;8.1.1;8.1.2;8.1.2.1;8.1.3;8.1.4;8.1.5;8.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg22000817