Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: [802.3_ISAAC] Cyclomatic Complexity



Hi Tony,

 

Thank you for following up on my presentation.

 

Could you please clarify where you see the misunderstanding in my presentation?

 

I agree with your statement that most “requirements” on cyclomatic complexity are related to limiting the complexity of a single “module”. I also emphasized this in the discussion, where I pointed out that Link Sync and the Startup Sequence are two separate “modules” and should therefore be measured separately.

 

In the context of cyclomatic complexity and testability, the New-TDD PHY state diagram has to be handled as a single “module”, because of how it is currently defined. It is not possible to test individual parts of the sequence independently, but only the whole state diagram as a singe “module”. There are many aspects of state diagram that make it a single “module”, but this is most easily understood from the fact that every state in the state diagram has a path to the “DISABLE_TRANSMITTER” state. Therefore, the cyclomatic complexity of the current New-TDD PHY state diagram has to be viewed as a single module.

 

Regarding HIS, my slides deliberately use the wording “should” for the requirement of cyclomatic complexity of 1-10. This is to reflect the fact that section 2.2 of HIS Source Code Metrics V1.3.1 states that  “violation of the boundary limit will lead to further action”, as opposed to clearly stating that this is an absolute failure.

 

Under the table on slide 24, I state :” The limits in the table are reference levels common in the industry and not limits set by ISO 26262”. I also empathized during the presentation that these are limits commonly used in the industry, not limits set by the ISO 26262 standard. Therefore, I don’t think there is any contradiction with your statement that there are “no limitations but recommendations” related to ISO 26262.

 

The bottom line is that the cyclomatic complexity of the New-TDD PHY state diagram is much too high and this state diagram is high risk, because it is not testable.

 

Ragnar

 

From: Schedl Anton, EE-320 <00004999f4c9f180-dmarc-request@xxxxxxxxxxxxxxxxx>
Sent: Tuesday, August 5, 2025 8:18 AM
To: STDS-802-3-ISAAC@xxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] [802.3_ISAAC] Cyclomatic Complexity

 

Hello Ragnar, there is a misunderstanding on the recommendations of the HIS (Herstellerinitiative Software initiative). The HIS initiative does not limit the complexity score to 10 or any other value. The referenced paper is a recommendation

ZjQcmQRYFpfptBannerStart

Prioritize security for external emails:

Confirm sender and content safety before clicking links or opening attachments

    Report Suspicious    ‌

ZjQcmQRYFpfptBannerEnd

Hello Ragnar,

 

there is a misunderstanding on the recommendations of the HIS (Herstellerinitiative Software initiative).

The HIS initiative does not limit the complexity score to 10 or any other value.

The referenced paper is a recommendation for handling complexity properly, not for limiting complexity.

The same is true for the tool "Cyclomatic Complexity method" that you used and for ISO26262 ==> no limitations but recommendations to handle software complexity properly!

 

The recommendation of HIS is to use tools like Cyclomatic Complexity to monitor the complexity of code and re-structure the code once you have reached a certain complexity level (e.g. 10).

Looking at the analysed proposals, you can see in your presentation that the restructuring has perfectly been done in the specified proposals.

 

Following the link in your presentation you can also see the recommendation of McCabe and also the controversial discussions about the score:

[… One of McCabe's original applications was to limit the complexity of routines during program development. He recommended that programmers should count the complexity of the modules they are developing, and split them into smaller modules whenever the cyclomatic complexity of the module exceeded 10.[2] …]

[… However, it also noted that in some circumstances it may be appropriate to relax the restriction and permit modules with a complexity as high as 15. …]

 

 

Best Regards,

Tony

 

 

--

BMW Group

Dr. Anton Schedl

E/E-Gesamtsystem, -Infrastruktur, Software

Systemfunktionen, Fahrzeugupdate

Gruppenleiter Basis-Systemfunktionen

 

Max-Diamand-Str. 9

80937 München

 

Festnetz:

+49-89-382-49948

 

Mobil:

+49-151-601-49948

 

Mail:

Anton.Schedl@xxxxxx

 

 


To unsubscribe from the STDS-802-3-ISAAC list, click the following link: https://listserv.ieee.org/cgi-bin/wa?SUBED1=STDS-802-3-ISAAC&A=1


To unsubscribe from the STDS-802-3-ISAAC list, click the following link: https://listserv.ieee.org/cgi-bin/wa?SUBED1=STDS-802-3-ISAAC&A=1