Software Coding Standards

Overview

 

This Software Coding Standards document has been prepared and developed by the SMG.  It was reviewed by the SMG Working Group and development projects as fit for purpose.

The general requirements in this document and its attachments are intended to help the software projects select a computer programming language and prepare source code that is readable, understandable, and can be easily maintained.  Any general restrictions and clarifications shall also be defined.  All approved deviations from these standards shall be documented in the specific project Software Development Plan at the first occurrence explaining why these software-coding standards are not being followed.  Any subsets of the selected high order language (HOL) required for safety or security critical reasons shall be defined in the project specific safety or security programme plans.

ISO/IEC 12207/MIL-STD-498 provides requirements to develop and apply standards for representing software code.  The project developers Software Development Plan (SDP) shall contain references to this software coding standard and the specific HOL coding standard.  This software coding standard shall include standards for: format, header comments, naming conventions and any restrictions or clarifications on the use of the selected HOL programming language constructs or features, such as renaming, goto's, etc.

Safety or security critical software may require additional specific coding standards (e.g., a safe subset) to be developed that identify requirements for annotation of safety/security -critical code and limitation on use of certain language features that can reduce the risk of software to safety or security.  The software safety activities are defined in the "System/Software Safety Process" -- a technical overview of safety-critical strategy and coding practices for developers and safety engineers, primarily those involving restricting the use of certain programming language constructs.  The software security-critical activities shall be defined in the "Software Security Management Process".

This software-coding standard shall:

restrict the use of language features which are not statically determinable or where the implementation is compiler dependent;

keep software units small, while minimizing data flow between units;

discourage the use of global variables and data;

encourage reuse as far as this assists comprehensibility, maintainability and integrity;

enhance readability by the appropriate use of upper and lower case letters, meaningful identifiers, comments, blank lines, and indentation;

maximize use of the strong typing facilities provided by the language;

avoid use of complex or obscure language features which programmers may have difficulty in using;

enforce the use of a simplified language syntax, using as far as practical one syntactical structure at a time (for example nesting constructs within constructs, such as function calls as parameters to procedures, shall be avoided).

The ‘Software Coding Standards’ shall contain procedures and guidance on how to avoid or detect known faults in the compilation system and target hardware.

SMG shall maintain this Software Coding Standards document.  Users of this document may report deficiencies and or corrections using the format provided by the attached Document Change Request (DCR) form.  SMG shall configuration manage this data as part of the process improvements of the SCMP.

 

 

 

 




Back to Home page MANAGING STANDARDS Home page

Please send any beneficial comments or identification of errors using the following form to: kenr@wysywig.airtime.co.uk

Copyright © Ken Rigby  2003, 2004