Safety Standards and WCET Analysis Tools Daniel Kästner, Christian Ferdinand
Total Page:16
File Type:pdf, Size:1020Kb
Safety Standards and WCET Analysis Tools Daniel Kästner, Christian Ferdinand To cite this version: Daniel Kästner, Christian Ferdinand. Safety Standards and WCET Analysis Tools. Embedded Real Time Software and Systems (ERTS2012), Feb 2012, Toulouse, France. hal-02192406 HAL Id: hal-02192406 https://hal.archives-ouvertes.fr/hal-02192406 Submitted on 23 Jul 2019 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Safety Standards and WCET Analysis Tools Daniel Kastner¨ Christian Ferdinand AbsInt GmbH, Science Park 1, D-66123 Saarbrucken,¨ Germany http://www.absint.com Abstract of-the-art techniques for verifying software safety re- quirements have to be applied to make sure that an appli- In automotive, railway, avionics, automation, and cation is working properly. To do so lies in the responsi- healthcare industries more and more functionality is im- bility of the system designers. Ensuring software safety plemented by embedded software. A failure of safety- is one of the goals of safety standards like DO-178B, critical software may cause high costs or even endan- DO-178C, IEC-61508, ISO-26262, or EN-50128. They ger human beings. Also for applications which are not all require to identify functional and non-functional haz- highly safety-critical, a software failure may necessitate ards and to demonstrate that the software does not vio- expensive updates. late the relevant safety goals. Contemporary safety standards – including DO-178B, Classical software validation methods like code review DO-178C, IEC-61508, ISO-26262, and EN-50128 – re- and testing with debugging cannot really guarantee the quire to identify potential functional and non-functional absence of errors. Formal verification methods provide hazards and to demonstrate that the software does not vi- an alternative, in particular for safety-critical applica- olate the relevant safety goals. For ensuring functional tions. One such method is abstract interpretation [2], program properties automatic or model-based testing, which allows to obtain statements that are valid for all and formal techniques like model checking become program runs with all inputs. Such statements may be more and more widely used. For non-functional prop- absence of violations of timing or space constraints, or erties like timing identifying a safe end-of-test crite- absence of runtime errors. Static analysis tools in indus- rion is a hard problem since failures usually occur in trial use can detect stack overflows, violation of timing corner cases and full test coverage cannot be achieved. constraints [20], and can prove the absence of runtime For code-level timing analysis this problem is solved by errors [4]. abstract-interpretation-based static analysis techniques The advantage of static analysis based techniques is that which provide full coverage and yield provably correct they enable full test coverage, but at the same time can results. reduce the test effort. Identifying end-of-test criteria In this article we focus on static analyses of worst- for non-functional program properties like timing, stack case execution time, which are increasingly adopted by size, and runtime errors is an unsolved problem. In con- industry in the validation and certification process for sequence, the required test effort is high, the tests re- safety-critical software. First we will give an overview quire access to the physical hardware and the results are of the most important safety standards with a focus not complete. In contrast, static analyses can be run by on the requirements for non-functional software prop- software developers from their workstation computer, erties. We then explain the methodology of abstract- they can be integrated in the development process, e.g., interpretation-based analysis tools and identify crite- in model-based code generators, and allow developers to ria for their successful application. The integration of detect runtime errors as well as timing and space bugs static analyzers in the development process requires in- in early product stages. terfaces to other development tools, like code genera- From a methodological point of view, static analyses can tors or scheduling tools. Using them for certification re- be seen as equivalent to testing with full coverage and, quires an appropriate tool qualification. We will address as such, are candidates for meeting all testing require- each of these topics and report on industrial experience. ments listed in the above-mentioned standards. Thus, in the areas where validation by static analysis is tech- nically feasible and applied in industry, e.g., for worst- 1 Introduction case execution time analysis, stack size analysis or run- time error analysis, it defines the state-of-the-art testing The use of safety-critical embedded software in the au- technology. tomotive, avionics and healthcare industries is increas- In the following we will give an overview of the most ing rapidly. Failures of such safety-critical embedded important safety standards with a focus on the require- systems may create high costs or even endanger hu- ments for timing. Then we explain the basic methodol- man beings. Also for applications which are not highly ogy of static worst-case execution time (WCET) analy- safety-critical, a software failure may necessitate expen- sis and present the underlying concepts of our aiT tool. sive updates. Therefore, utmost carefulness and state- Industrial experience is summarized in Sec.7. 1 2 Safety Standards cution time. The DO-178C, due to be finalized in 2011, will be a re- Safety standards like DO-178B [18], DO-178C, IEC- vision of DO-178B to bring it up to date with respect 61508 [14], ISO-26262 [15] and EN-50128 [1] require to current software development and verification tech- to identify functional and non-functional hazards and to nologies. It specifically focuses on model-based soft- demonstrate that the software does not violate the rel- ware development, object-oriented software, the use and evant safety goals. These standards mention explicitly qualification of software tools and the use of formal three important non-functional safety-relevant software methods to complement or replace dynamic testing (the- characteristics: Absence of runtime errors, execution orem proving, model checking, and abstract interpreta- time, and memory consumption. In the following, we tion). will focus on execution time. Depending on the critical- ity level of the software the absence of safety hazards 2.2 IEC-61508 Edition 2.0 has to be demonstrated by formal methods or testing with sufficient coverage. In 2010 a new revision of the functional safety stan- In the following, we give a short overview on the as- dard IEC-61508 has been published, called Edition 2.0 sessment of timing properties by the safety standards [14]. It sets out a generic approach for all safety lifecy- for avionics, space, automotive and railway systems, cle activities for systems comprised of electrical and/or for general Electric/Electronic systems, and for medical electronic and/or programmable electronic (E/E/PE) el- software products. ements that are used to perform safety functions. The safety integrity levels are called SIL1 (least critical) to SIL4 (most critical). The timing properties are part of 2.1 DO-178B/DO-178C the software safety requirements specification and list response time and best case and worst-case execution Published in 1992, the DO-178B [18] (“Software Con- time. siderations in Airborne Systems and Equipment Certi- The IEC-61508 states that verification includes test- fication”), is the primary document by which the cer- ing and analysis. In the software verification stage, tification authorities such as FAA, EASA, and Trans- static analysis techniques are recommended for SIL1 port Canada will approve all commercial software-based and highly recommended for SIL2-SIL4. Among these aerospace systems. The purpose of D0-178B is “to pro- techniques, static worst-case execution time analysis is vide guidelines for the production of software for air- recommended in SIL1-4. Among the criteria to be con- borne systems and equipment that performs its intended sidered for selecting specific techniques is the complete- function with a level of confidence in safety that com- ness and repeatability of testing, so where testing is plies with airworthiness requirements.” The criticality used, completeness has to be demonstrated. The results levels defined are Level A (most critical) to Level E of abstract-interpretation-based static analyses are con- (least critical). sidered a mathematical proof; their reliability is rated The DO-178B emphasizes the importance of software maximal (R3). The IEC-61508 also provides require- verification. Verification is defined as a technical as- ments for mixed-criticality systems: “Where the soft- sessment of the results of both the software development ware is to implement safety functions of different safety processes and the software verification process. Sec. 6.0 integrity levels, then all of the software shall be treated of the DO-178B states that “verification is not simply as belonging to the highest safety integrity level, unless testing. Testing, in general, cannot show the absence of adequate independence between the safety functions of errors.” The standard consequently uses the term ”ver- the different safety integrity levels can be shown in the ify” instead of ”test” when the software verification pro- design. It shall be demonstrated either (1) that inde- cess objectives being discussed are typically a combina- pendence is achieved by both in the spatial and tempo- tion of reviews, analyses and test.