CRITICAL
Rule Definition
Recursive calls can be unpredictable regarding the consumption of resources, especially memory. Under certain condition, a function or procedure using a recursive call can keep calling itself and as each call consumes memory, the entire application runs out of memory. Recursive calls are also known to be difficult to test because the termination condition. Testing the memory consumption can be dependent on the data used for the test. For all these reasons, it is often forbidden and most of the time limited to academic usage rather than for mission-critical systems. Because the flip side is complexity, such a trade-off should be carefully chosen by architects or senior developers, balancing cost with reliability and in all cases the conditions under which it is used should be reviewed in details.
Remediation
Replace the PLC recursive procedures in the PLC includes.
Violation Code Sample
…..
F2: PROC (PROGRAMME_TEST,TEST1) RECURSIVE;
…..
Related Technologies
Technical Criterion
Complexity - Algorithmic and Control Structure Complexity
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.