Eclair En50128
Eclair En50128
ECLAIR is designed to
help development, QA, and safety teams reach their quality goals.
Coverage of EN 50128
1 Introduction to EN 50128:2011/A2:2020
EN 50128:2011/A2:2020, “Railway applications — Communication, signalling and processing sys-
tems — Software for railway control and protection systems,” is part of a group of related international
functional-safety standards for the railway industry issued by CENELEC (the European Committee for
Electrotechnical Standardization) [6].1 It is a European standard adapting the IEC 61508 series of
standards [8] to the development of safety-related software for railway applications, and concerns both
track-side and train-side equipment. EN 50128 is also known as IEC 62279.
The first edition of EN 50128 was published in 2001 and withdrawn in April 2014 after a three-year
transition period. The second edition, published in 2011, completely supersedes the previous version.
Noteworthy changes introduced in EN 50128:2011 [4] include:
• the addition of requirements on software management, deployment and maintenance;
• the addition of a new clause on support tools, defining what is commonly called tool qualification;
• the updating of tables in Annex A.
EN 50128 has subsequently been amended twice, in February and August 2020 [5, 6].
EN 50128 approach to risk management is based on the concept of levels of software integrity. There
are five software integrity levels: the lowest one is called Basic Integrity (B. I. for short); the other four
are called Safety Integrity Levels (SILs) and are numbered 1, 2, 3 and 4, with 1 being the lowest safety
integrity level and 4 being the highest. For each function assigned to each subsystem an integrity lavel
must be assigned: B. I., SIL 1, SIL 2, SIL 3 or SIL 4. SIL 4 represents likely potential for severely
life-threatening or fatal injury in the event of a malfunction and requires the highest level of assurance
that the dependent safety goals are sufficient and have been achieved. EN 50128, based on the safety
Copyright © 2010–2024 BUGSENG srl. All rights reserved. ECLAIR Software Verification Platform is a registered
trademark of BUGSENG srl. All other trademarks and copyrights are the property of their respective owners. This document
is subject to change without notice. Last modification: Thu, 29 Feb 2024 13:52:14 +0100.
1
The other standards in the group are EN 50126-1:1999 “Railway applications — The specification and demonstration
of Reliability, Availability, Maintainability and Safety (RAMS) — Part 1: Basic requirements and generic process” and EN
50129:2003 “Railway applications — Communication, signalling and processing systems — Safety related electronic systems
for signalling.”
1
integrity level, specifies whether techniques and measures are recommended, highly recommended, or
even mandatory. For instance, static analysis is highly recommended at all SILs from 1 to 4.
2
2.1 MISRA C:2012
MISRA C:2012 Revision 1 [9], with Amendments 2 [10] and 3 [11], and Technical Corrigendum 2
[12], is the software development C subset developed by MISRA that is a de facto standard for safety-,
life-, security-, and mission-critical embedded applications in many industries, including aerospace, rail-
way, medical, telecommunications and others. MISRA C:2012, which allows coding MISRA-compliant
applications in subsets of C90, C99, C11 and C18, is supported by the ECLAIR package called “MC3”.
2.3 BARR-C:2018
The Barr Group’s Embedded C Coding Standard, BARR-C:2018 [3], is, for coding standards used
by the embedded system industry, second only in popularity to MISRA C. BARR-C:2018 guidelines
include 64 guidelines dealing with language subsetting and project management as well as 79 guidelines
concerning programming style. For projects in which a MISRA compliance requirement is not (yet)
present, the adoption of BARR-C:2018 is a major improvement with respect to the situation where
no coding standards and no static analysis is used. The adoption of the stylistic subset of BARR-
C:2018 (79 out of 143 rules) can be part of complying with the MISRA requirement that a consistent
programming style is adopted and systematically used as part of the software development process.
Moreover, complying with BARR-C:2018, besides avoiding many dangerous bugs, entails compliance
with a non-negligible subset of MISRA C:2012 [2]. ECLAIR support for BARR-C:2018 has no equals
on the market: it is included in all ECLAIR packages, including the affordable package “B”.
3
Table A.1 — Lifecycle Issues and Documentation
SIL
DOCUMENTATION B. I. ECLAIR
1 2 3 4
Software requirements
6. Software Requirements Specification HR HR HR HR HR ✓a
7. Overall Software Test Specification HR HR HR HR HR ✓a
8. Software Requirements Verification Report R HR HR HR HR –
Architecture and design
9. Software Architecture Specification R HR HR HR HR ✓a,b
10. Software Design Specification R HR HR HR HR ✓a
11. Software Interface Specifications HR HR HR HR HR ✓a,b
12. Software Integration Test Specification R HR HR HR HR ✓a
13. Software/Hardware Integration Test R HR HR HR HR –
Specification
14. Software Architecture and Design R HR HR HR HR –
Verification Report
Component Design
15. Software Component Design Specification - HR HR HR HR ✓a,b
16. Software Component Test Specification - HR HR HR HR ✓a
17. Software Component Design Verification - HR HR HR HR ✓c
Report
Component Implementation and Testing
18. Software Source Code and supporting HR HR HR HR HR ✓d
documentation
19. Software Component Test Report - HR HR HR HR –
20. Software Source Code Verification Report - HR HR HR HR ✓c
Integration
21. Software Integration Test Report R HR HR HR HR –
22. Software/Hardware Integration Test Report R HR HR HR HR –
23. Software Integration Verification Report R HR HR HR HR –
Overall Software Testing / Final Validation
24. Overall Software Test Report HR HR HR HR HR –
25. Software Validation Report HR HR HR HR HR –
26. Tools Validation Report - HR HR HR HR ✓e
27. Release Note HR HR HR HR HR –
a ECLAIR service B.REQMAN allows ensuring that all code is forward and backward traceable
to documented requirements, including safety requirements. B.REQMAN also allows tracing
code to the tests and back. The integrated requirements management tool makes ECLAIR a
cost-effective, complete solution for requirements-based development and testing.
b ECLAIR service B.PROJORG allows the formal specification and systematic checking of soft-
ware architectural constraints, e.g., to enforce constraints about layering and to prevent bypass-
ing of software interfaces.
c ECLAIR can be configured to automatically produce compliance reports required to meet con-
tractual obligations and industrial standards such as EN 50128.
d ECLAIR provides services and metrics that check the presence, format, amount and language
of comments in the source code.
e ECLAIR can be qualified in compliance with EN 50128 in different ways, all of which result in
a the effortless production of the required tool validation report. See Section 3 for more details.
4
Table A.3 — Software Architecture
SIL
TECHNIQUE/MEASURE B. I. ECLAIR
1 2 3 4
1. Defensive Programming - HR HR HR HR ✓a
2. Fault Detection & Diagnosis - R R HR HR ✓b
SIL
TECHNIQUE/MEASURE B. I. ECLAIR
1 2 3 4
1. Formal Methods - R R HR HR –
2. Modelling R HR HR HR HR –
3. Structured methodology R HR HR HR HR –
4. Modular Approach HR M M M M ✓a
5. Components HR HR HR HR HR ✓b
6. Design and Coding Standards HR HR HR M M ✓c
7. Analysable Programs HR HR HR HR HR ✓d
8. Strongly Typed Programming Language R HR HR HR HR ✓e
continued
5
Table A.4 — Software Design and Implementation
SIL
TECHNIQUE/MEASURE B. I. ECLAIR
1 2 3 4
9. Structured Programming R HR HR HR HR ✓f
10. Programming Language R HR HR HR HR ✓g
11. Language Subset - - - HR HR ✓h
12. Object Oriented Programming R R R R R ✓i
13. Procedural programming R HR HR HR HR ✓j
14. Metaprogramming R R R R R –
a ECLAIR offers numerous services to enforce modularization in the design and coding phase of
a software project. With reference to item D.38 (Modular Approach) in Annex D of [6]: con-
nections between modules/components can be limited and strictly defined using B.PROJORG;
cohesion in one module/component can be constrained to be high using ECLAIR specific met-
ric B.STFCO_UNIT; modules/components and subprograms can be constrained to be small
by enforcing upper bounds on HIS and other metrics related to size and complexity; MISRA
C:2012 Rule 15.5 and MISRA C++:2008 Rule 6–6–5 require subprograms to have a single
entry and a single exit only; the MISRA C/C++ guidelines promote the full definition of inter-
faces as outlined in note (d) to Table A.3; the MISRA C/C++ guidelines include prescriptions
against the use of unnecessary global variables, e.g., for MISRA C:2012, Rules 8.7 and 8.9;
the specific ECLAIR service B.GLOBALVAR allows fine control of acceptable global vari-
ables. BARR-C:2018 Rule 2.2.h recommends commenting modules and functions with explicit
specification of pre-conditions and post-conditions with Doxygen; such comment blocks are au-
tomatically checked by ECLAIR for consistency; limitations on the number of parameters of a
function/method can be automatically enforced by imposing upper bounds on the HIS.PARAM
metric.
b See Table A.20.
c See Table A.12.
d The MISRA C/C++ and BARR-C:2018 coding standards can be used to ensure that programs
are relatively easy to reason about and to analyze statically. In particular, they limit the use of
non-structured programming constructs, language extensions and assembly code; they promote
the reduction of the scope of identifiers, the use of simple branching and loop decision, the
use of simplified loop and switch constructs. In addition, HIS and other metrics provided by
ECLAIR allow imposing upper bounds on the size and complexity of components as well as on
the number of possible paths through them.
e MISRA C/C++ enforce strong typing on the respective languages. E.g., for MISRA C:2012,
Rules 10.1–10.8, 11.1–11.9, and 14.4.
f The MISRA C/C++ guidelines include limits on the use of non-structured control-flow con-
structs. E.g., for MISRA C:2012, Rules 14.3, 15.1–15.4, and 21.4. A threshold on metric
HIS.GOTO allows limiting the use of goto.
g Excluding ADA and the obsolete programming languages in EN 50128 Table A.15, C and
C++ are the ones with the longest history of application in the development of critical systems.
Moreover, it can be argued that the MISRA C and MISRA C++ subsets are as safe as other
languages marked as highly recommended in that table. MISRA C and MISRA C++ satisfy the
requirements of D.54 (Suitable Programming languages) in Annex D of [6].
h MISRA C/C++ and BARR-C:2018 define language subsets where the potential of committing
possibly dangerous mistakes is reduced.
i MISRA C++ is an object oriented programming language. Service B.PROJORG can support
an object oriented programming style also in C, by restricting access to “private” data and
functions.
j (All subsets of) C and C++ are procedural programming languages.
6
Table A.5 — Verification and Testing
SIL
TECHNIQUE/MEASURE B. I. ECLAIR
1 2 3 4
1. Formal Proof - R R HR HR –
2. Static Analysis - HR HR HR HR ✓a
3. Dynamic Analysis and Testing - HR HR HR HR –
4. Metrics - R R R R ✓b
5. Traceability R HR HR M M ✓c
6. Software Error Effect Analysis - R R HR HR –
7. Test Coverage for code R HR HR HR HR –
8. Functional/ Black-box Testing HR HR HR M M –
9. Performance Testing - HR HR HR HR –
10. Interface Testing HR HR HR HR HR –
a ECLAIR employs state-of-the-art static analysis techniques.
b ECLAIR automatically computes numerous source code metrics.
c ECLAIR service B.REQMAN allows ensuring that all code is forward and backward traceable
to documented requirements, including safety requirements. B.REQMAN also allows tracing
code to the tests and back. The integrated requirements management tool makes ECLAIR a
cost-effective, complete solution for requirements-based development and testing.
7
Table A.12 — Coding Standards
SIL
TECHNIQUE/MEASURE B. I. ECLAIR
1 2 3 4
1. Coding Standard HR HR HR M M ✓a
2. Coding Style Guide HR HR HR HR HR ✓b
3. No Dynamic Objects - R R HR HR ✓c
4. No Dynamic Variables - R R HR HR ✓c
5. Limited Use of Pointers - R R R R ✓d
6. Limited Use of Recursion - R R HR HR ✓e
7. No Unconditional Jumps - HR HR HR HR ✓f
8. Limited size and complexity of Functions, HR HR HR HR HR ✓g
Subroutines and Methods
9. Entry/Exit Point strategy for Functions, R HR HR HR HR ✓h
Subroutines and Methods
10. Limited use of Global Variables HR HR HR M M ✓i
a The MISRA C/C++ and BARR-C:2018 coding standards define language subsets where the
potential of committing possibly dangerous mistakes is reduced.
b More than half of the guidelines in BARR-C:2018 [3] concern coding style [2]. MISRA C:2012
Rules 7.3 and 16.5 are also stylistic.
c The MISRA C/C++ guidelines include prescriptions limiting the use of dynamic memory allo-
cation. E.g., for MISRA C:2012, Directive 4.12 and Rules 18.7, 21.3, 22.1 and 22.2.
d The MISRA C/C++ guidelines include rules restricting the use of pointers. E.g., for MISRA
C:2012, Rules 8.13, 11.1–11.8, and 18.1–18.5. The specific ECLAIR services B.PTRDECL
and B.PTRUSE allow fine control of pointers’ use.
e MISRA C Rule 17.2 and MISRA C++ Rule 7-5-4 forbid recursion. A threshold on metric
HIS.ap_cg_cycle also allows ruling out recursion.
f The MISRA C/C++ guidelines include limits on the use of non-structured control-flow con-
structs as well as other unconditional jumps. E.g., for MISRA C:2012, Rules 14.3, 15.1–15.4,
and 21.4. A threshold on metric HIS.GOTO allows limiting the use of goto.
g HIS and other metrics are related to the size and complexity of software components. ECLAIR
allows associating thresholds to each metric.
h MISRA C:2012 Rule 15.5 and MISRA C++:2008 Rule 6–6–5 require subprograms to have a
single entry and a single exit only. An upper threshold on metric HIS.RETURN allows for a
more flexible approach.
i The MISRA C/C++ guidelines include prescriptions against the use of unnecessary global vari-
ables, e.g., for MISRA C:2012, Rules 8.7 and 8.9; the specific ECLAIR service B.GLOBALVAR
allows fine control of acceptable global variables.
8
Table A.19 — Static Analysis
SIL
TECHNIQUE/MEASURE B. I. ECLAIR
1 2 3 4
1. Boundary Value Analysis - R R HR HR –
2. Checklists - R R R R –
3. Control Flow Analysis - HR HR HR HR ✓a
4. Data Flow Analysis - HR HR HR HR ✓b
5. Error Guessing - R R R R –
6. Walkthroughs/Design Reviews HR HR HR HR HR ✓c
a ECLAIR builds accurate control flow graphs to reason on (feasible and unfeasible) execution
paths.
b ECLAIR performs a number of data flow analyses to reason about, e.g., pointers, values and
dead stores.
c Compliance to the MISRA C/C++ and the BARR-C:2018 guidelines greatly increases code
readability and understandability, thereby facilitating verification activities by walk-through,
pair-programming and inspection.
SIL
TECHNIQUE/MEASURE B. I. ECLAIR
1 2 3 4
1. Information Hiding1 - - - - - ✓a
2. Information Encapsulation R HR HR HR HR ✓a
3. Parameter Number Limit R R R R R ✓b
4. Fully Defined Interface R HR HR M M ✓c
a The MISRA C/C++ guidelines promote the use of information hiding and encapsulation. E.g.,
for MISRA C:2012, Directives 4.3 and 4.8 and Rules 8.7 and 8.9. In addition ECLAIR’s
B.PROJORG service can be used to enforce strict encapsulation constraints.
b Limitations on the number of parameters of a function/method can be automatically enforced
by imposing upper bounds on the HIS.PARAM metric.
c The MISRA C/C++ guidelines promote the full definition of interfaces. E.g., for MISRA
C:2012, Rules 8.2 and 8.3 prescribe the use of prototype form and the use of consistent names
for function declarations; Rule 17.3 forbids implicit declarations; Directive 4.14 requires data
verification; BARR-C:2018 Rule 2.2.h recommends commenting modules and functions with
explicit specification of pre-conditions and post-conditions with Doxygen; such comment
blocks are automatically checked by ECLAIR for consistency.
1 Note 1 in EN 50128 Table A.20 says that “Information Hiding and encapsulation are only
highly recommended if there is no general strategy for data access.”
9
3 ECLAIR Qualification in Compliance with EN 50128
The ECLAIR functionality described above is qualifiable in compliance with
EN 50128: ECLAIR is a class T2 tool and meets all the requirements set forth
in EN 50128:2011/A2:2020 for such tools [6, Clause 6.7.4]. TÜV SÜD audited
BUGSENG software development and quality assurance processes for ECLAIR,
as well as the internal validation activities performed by BUGSENG on each
ECLAIR release. At the end of its assessment, TÜV SÜD awarded BUGSENG the
“Software Tool for Safety Related Development” Certificate no. Z10 116151 0001
Rev. 01, attesting that the ECLAIR Software Verification Platform is suitable to be
used in safety-related development projects according to EN 50128:2011/A2:2020
for any SIL.
The ECLAIR Qualification Kits for EN 50128 provide further help to safety teams in charge of qualify-
ing ECLAIR for use in safety-related projects where the dependence on the tool operational environment
has to be taken into account: the kits contain documents, test suites, procedures and automation facilities
that can be used by the customer to independently obtain all the required confidence-building evidence.
BUGSENG also offers the ECLAIR Qualification Service, whereby qualified BUGSENG personnel
undertakes almost all the qualification effort.
11