C++ in Safety-Critical Systems - Applied Informatics
C++ in Safety-Critical Systems - Applied Informatics
C++ in Safety-Critical Systems - Applied Informatics
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
JSF <strong>C++</strong> on Code Size and Complexity<br />
> AV Rule 1: Any one function (or method) will conta<strong>in</strong> no more<br />
than 200 logical source l<strong>in</strong>es of code.<br />
Rationale: Long functions tend to be complex and therefore<br />
difficult to comprehend and test.<br />
> AV Rule 2: There shall not be any self-modify<strong>in</strong>g code.<br />
Rationale: Self-modify<strong>in</strong>g code is error-prone as well as difficult<br />
to read, test, and ma<strong>in</strong>ta<strong>in</strong>.<br />
> AV Rule 3: All functions shall have a cyclomatic complexity<br />
number of 20 or less.<br />
Rationale: Limit function complexity.