High Integrity Systems C.O.D.E. Developing Certified Components for - - PowerPoint PPT Presentation

high integrity systems c o d e
SMART_READER_LITE
LIVE PREVIEW

High Integrity Systems C.O.D.E. Developing Certified Components for - - PowerPoint PPT Presentation

High Integrity Systems C.O.D.E. Developing Certified Components for High Integrity Embedded Systems http://www.hidecs.co.uk/ Email: Paul_E.Bennett@topmail.co.uk 22 February 2013 Paul E. Bennett IEng MIET 1 HIDECS Consultancy In a paper by


slide-1
SLIDE 1

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 1

High Integrity Systems C.O.D.E.

Developing Certified Components for High Integrity Embedded Systems

http://www.hidecs.co.uk/ Email: Paul_E.Bennett@topmail.co.uk

slide-2
SLIDE 2

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 2

In a paper by Phil Koopman, titled “The Grand Challenge of Embedded System Dependability” he sets out that “Four significant challenges in embedded system dependability are:

  • embedded-specific security approaches,
  • unifying security with safety,
  • dealing with composable emergent properties,
  • and enabling domain experts to use advanced

dependability techniques.”

slide-3
SLIDE 3

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 3

Where mistakes are made

(Out of control, 2nd edition 2003, Health & Safety Executive HSE – UK)

slide-4
SLIDE 4

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 4

Capability & Correctness

slide-5
SLIDE 5

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 5

Software Needs Hardware

  • Software does not operate without the support
  • f the hardware on which it runs.
  • Hardware can suffer random failures
  • Environmental Factors
  • Stress Induced Failures
  • Wear-Out Failures
  • Software only suffers systematic failures
slide-6
SLIDE 6

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 6

Software Needs Hardware

Failure = f(h)+f(s) f(h) f(s)

slide-7
SLIDE 7

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 7

Software Needs Hardware

Failure = f(h)+f(s) f(h) f(s) 10E0 to 10E-3 For a Single Channel of Control 10E0 to <10E-99

slide-8
SLIDE 8

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 8

Design Integrity is vital

  • Know the working environmnt
  • Design to operate within limitations of that enviornment
  • Be clear about the Tasks to be performed
  • Task Description
  • Task Analysis
  • Hazop Study & Risk Assessment
  • Revisit the early concept
  • It will not usually be right on the first pass so go back and

look at what you can improve as early as possible.

slide-9
SLIDE 9

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 9

Have a Robust Process

  • To develop a High Integrity System you need to

be at CMM-3 or better from the start

  • Your process needs to manage a multitude of

versions and changes

  • You need to keep the information and

knowledge safe and secure

  • You need to know that you and your clients are

working to the same specification

slide-10
SLIDE 10

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 10

Requirements Specification Task Analysis Job Design Training Function Analysis Human/ Computer Interface Design Functional Design Manufacture Operational Trials

Specification and Design

Specification Discovery

Implementation

slide-11
SLIDE 11

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 11

The Document Trail

slide-12
SLIDE 12

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 12

An Engineering Process Model

Accept Requirements Issue Process Function

Review

slide-13
SLIDE 13

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 13

Review

An Engineering Process Model

Accept Requirements Issue Process Function

Review

Problem Report Simple Explanation Work Instruction Work Instruction Change Proposal Change Proposal

Change Review f1 f1 f1 f4 f2 f3 f4 f1

slide-14
SLIDE 14

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 14

Why Forth?

  • Stable Virtual Machine (about 40 years)
  • Extensible
  • Supportive of Structured Programming
  • Supportive of Component Oriented Approach
  • Does not rely on sub-setting to be “Safe”
  • Fully Certifiable
slide-15
SLIDE 15

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 15

Why Forth?

Processor Perihperal Interfaces

slide-16
SLIDE 16

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 16

Why Forth?

Processor Perihperal Interfaces Parameter Stack Return Stack Forth Kernel

slide-17
SLIDE 17

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 17

Why Forth?

Processor Perihperal Interfaces Parameter Stack Return Stack Forth Kernel Peripheral Support Code

slide-18
SLIDE 18

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 18

Why Forth?

Processor Perihperal Interfaces Parameter Stack Return Stack Forth Kernel Peripheral Support Code Application Specific Base

slide-19
SLIDE 19

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 19

Why Forth?

Processor Perihperal Interfaces Application Parameter Stack Return Stack Forth Kernel Peripheral Support Code Application Specific Base

slide-20
SLIDE 20

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 20

Component Oriented

  • All systems are constructed from components
  • Components have Datasheets describing their

attributes, functionaility and limitations.

  • Components are complete in themselves
  • Components can be certified for compliance

with their specification.

  • Non-compliance becomes obvious upon proper

inspection.

slide-21
SLIDE 21

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 21

Certifiying Software Components

  • NPL have been running approximately 5,000

random C compilations per evening on a selection of C compilers. So far there have been no matches observed at the object code level.

  • Forth already has at least two fully certified

compiler implementations for High Integrity Applications.

  • Choosing Forth made such certification effort

much easier to complete.

slide-22
SLIDE 22

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 22

Producing High Integrity Code

  • Think of writing the comments first (use the comments as

a statement of what you expect to be achieved).

  • Review the comments to establish the state the true

intent for the code you have yet to write.

  • Write the code to meet the statement of requirements

expressed by the comments.

  • Statically Inspect the code to ensure implementation

matches intent

  • Perform a functional test of all logical paths in the code.
  • Perform a limitations test (trying to make the code fail).
  • 100% Path and Function Coverage is possible.
slide-23
SLIDE 23

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 23

Code Inspection Sample

\ DSQRT (c) PEB 28/10/05 : DSQRT ( ud -- u ) (G u is the nearest integer value of the square root of the ) ( unsigned number ud. Results are rounded down. )

  • 1 >R

BEGIN R> 1+ >R R@ 2* 1+ S>D D- 2DUP D0>= NOT UNTIL 2DROP R> ;

slide-24
SLIDE 24

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 24

Code Inspection Sample

\ DSQRT (c) PEB 28/10/05 : DSQRT ( ud -- u ) (G u is the nearest integer value of the square root of the ) ( unsigned number ud. Results are rounded down. )

  • 1 >R

BEGIN R> 1+ >R R@ 2* 1+ S>D D- 2DUP D0>= NOT UNTIL 2DROP R> ;

The above code fails certification as the word's glossary comment does not match the actual action of the code below it. The result returned is only valid if the input value is a positive signed number (31 bits instead of 32 - based on system with 16 bit width).

slide-25
SLIDE 25

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 25

Code Inspection Sample

\ DSQRT (c) PEB 28/10/05 : DSQRT ( +dn -- +n ) (G +n is the nearest positive integer value of the square root of ) ( the positive double length integer +dn. Results are rounded ) ( down to the nearest positive integer. )

  • 1 >R

BEGIN R> 1+ >R R@ 2* 1+ S>D D- 2DUP D0>= NOT UNTIL 2DROP R> ;

After analysis, the code was deemed suitable for the application it was intended for but the glossary entry had to be re-worded to properly document its intention and limitations.

slide-26
SLIDE 26

22 February 2013 Paul E. Bennett IEng MIET HIDECS Consultancy 26

Summary

  • You need a development process to at least

CMM level 3 capability.

  • Component Oriented Approaches keep the

problems bounded.

  • Forth is a very good Component Oriented

Development Environment

  • Forth code can be as certifiable as hardware.