Why is the function call marked as red NTC when there is no red check in the function body?

1 view (last 30 days)
I can see that one of the function calls is marked as red NTC, however I do not see any red NTL or any other red checks inside the function body. I am not sure if I understand the results correctly.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 5 Apr 2012
This enhancement has been incorporated in Release 2012a (R2012a). For previous product releases, read below for any possible workarounds:
The documentation mentions that a red NTC can happen due to the following reasons:
1. “f” contains a red error;
2. “f” contains an NTL ;
3. “f” contains an NTC;
4. “f” contains an orange which is context dependant; that is, it is either red or green. For this particular call, it makes the function “f” crash.
5. “f” is a math function, such as sqrt, acos which has always an invalid input parameter
In this case the argument 4 applies. The function body should contain some orange checks which are context dependent meaning that some function calls would cause an error in the function body whereas others would be safe. However since the function call may be safe in other contexts, PolySpace does not mark it as red but instead marks them as orange to indicate that they can be either green or red depending on the context in which the function call is being made.

More Answers (0)

Categories

Find more on Troubleshooting in Polyspace Products for Ada in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!