Under certain scenarios a model containing Stateflow charts generates dead code that cannot be tested. DO-178B coding standards require that generated code achieve 100% code coverage during execution and testing. Hence if there is any generated code that cannot be executed and tested, it poses a problem.
For example, Stateflow Coder may generate code such as the following:
a = TRUE;if(a==TRUE){// some code here}
The above code snippet cannot be tested for the condition "a = FALSE".
Best Answer