A complexity metric for concurrent finite state machine based embedded software


The development cost of safety-critical embedded systems is dominated today by the cost of software including verification and validation. This cost is typically related to the complexity of the software functions implementing the desired system behavior in nominal and off-nominal conditions. A widely used measure of complexity is the cyclomatic number, which is computed on the implementation code. However this technique is not effective when model-based development and code generation are used because the complexity of the software also depends on the communication and execution semantics of the models. This paper proposes a model-based complexity number that is defined on the decision diagram (DD) representation of the system functionality. The proposed complexity number gives an upper bound on the number of tests that are necessary to achieve Condition/Decision (C/D) coverage (which is required for safety critical systems). We show that the number of tests is related to the min-flow/max-cut computed on the DD. By comparing the proposed metric with the cyclomatic complexity, we show that the former seems to be better suited for capturing the complexity of the model than the latter. A case study on an aircraft power system shows that the complexity metric has applications in functional partitioning and architecture selection.

2013 8th IEEE International Symposium on Industrial Embedded Systems (SIES)