IBM Support

How to change the limit of infinite loop iterations in Rational Rhapsody

Question & Answer


Question

How do you increase the number of iterations IBM Rational Rhapsody will take through an infinite loop of NULL transitions before terminating?

Cause

The run-to-completion semantics of the Rational Rhapsody framework check for an infinite loop of NULL transitions. In general, you need to use an event, timeout, or guards in order to avoid continuous NULL transitions.

Answer

If you add a NULL trigger in a Statechart and put a blocking function in the Action section, then the statechart animation runs without a problem. However, if you have no condition to terminate the iterations, this will produce an Infinite Loop error and Rhapsody animation will come to a halt.

There are not any properties to change the number of iterations through an infinite loop of NULL transitions. You need to change the OXF framework source code to modify this behavior.

  • In Rhapsody in C++, open omreactive.h in the OXF framework and change the value of DEFAULT_MAX_NULL_STEPS. Then rebuild the framework.

  • In Rhapsody in C, open RiCReactive.c in the OXF framework and change the value of OMDEFAULT_MAX_NULL_STEPS. Then rebuild the framework.

  • In Rhapsody in Java, open RiJStateReactive.java in the OXF framework and change the value of DEF_MAX_NULL_STEPS. Then rebuild the framework.


The default number of iterations through an infinite loop of continuous NULL transitions is 100 for C++ and C, and 32 for Java.

[{"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":"7.5;7.5.0.1;7.5.1;7.5.1.1;7.5.2;7.5.2.1;7.5.3;7.5.3.1;7.5.3.2;7.5.3.3;7.6;7.6.0.1;7.6.1;7.6.1.1;7.6.1.2;7.6.1.3;7.6.1.4;7.6.1.5;8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21416072