Practical Development of Safe, Secure, Reliable Embedded Software

Size: px
Start display at page:

Download "Practical Development of Safe, Secure, Reliable Embedded Software"

Transcription

1 ARM TechCon 2017 Practical Development of Safe, Secure, Reliable Embedded Software Pat Rogers

2 Why Safe, Secure, or Reliable? Your car could crash Your flight could crash Your medical implant could fail Your bank account could disappear Your marriage could fail (No? Ashley Madison ) Et cetera Slide: 2

3 Inadequate Code Is Not Inevitable There s no such thing as a silver bullet But there are much better options available We can produce highly-reliable software at a reasonable cost Slide: 3

4 A Better Way: SPARK 2014 A formally-defined programming language supporting static analysis Specifically designed for high-integrity software Plus a set of tools to perform those analyses Based on statically provable contracts + testing Slide: 4

5 What is Static Analysis? [Basic Static Analysis: coding standard checking, metrics, compiler warnings and style checks] Advanced Static Analysis: symbolic execution/interpretation of source code, to find what could go wrong (and right) Formal Verification: verifying high level or abstract properties of your application, giving strong guarantees Slide: 5

6 Why Static Analysis Saves Money Shifts costs from later, expensive phases to earlier, cheaper phase Relative Cost To Fix Bugs Over Life Cycle Requirements Design Code Development Test Acceptance Test Operation Slide: 6

7 How Does Formalism Shift Costs? Bugs that testing would have missed may be caught Bugs that testing would have caught may be caught earlier Passing (nearly) all the tests the first time is cheaper Slide: 7

8 Contracts Express Provable Properties User-defined executable run-time checks Preconditions specify caller obligations Postconditions specify implementer guarantees Obligation Guarantee procedure Push (This : in out Stack; Value : Content) with Pre => not Full (This), Post => not Empty (This) and Top (This) = Value; function Top (This : Stack) return Content; function Full (This : Stack) return Boolean; Slide: 8

9 DMA Device Driver Contract Example type DMA_Status_Flag is (FIFO_Error, Direct_Mode_Error, Transfer_Error, Half_Transfer_Complete, Transfer_Complete); function Status_Indicated (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Flag : DMA_Status_Flag) return Boolean; procedure Clear_All_Status (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector) with Post => (for all Flag in DMA_Status_Flag => not Status_Indicated (Unit, Stream, Flag)); Guarantees no flags remain set after call Slide: 9

10 What Can You Prove, Statically? Freedom from run-time errors No buffer overflow, no numeric overflow, no divide by zero, no invalid array indexes, etc. Data and Information flow contracts No uninitialized variables, unused assignments, etc. Data only goes where you mean it to go Functional correctness at unit level Arbitrary properties, e.g., security and safety Slide: 10

11 Proving Functional Correctness Example procedure Push (This : in out Stack; Item : in Element) with Pre => not Full (This), Post => not Empty (This) and then Top_Element (This) = Item and then Extent (This) = Extent (This'Old) + 1 and then This'Old.Unchanged (Within => This); function Top_Element (This : Stack) return Element with Pre => not Empty (This); function Extent (This : Stack) return Element_Count; function Empty (This : Stack) return Boolean; function Full (This : Stack) return Boolean; function Unchanged (Invariant_Part, Within : Stack) return Boolean; Slide: 11

12 Why Doesn t Everyone Use Formalism? Your software development already does! The ultimate product of software development is a precise, rigorous description of behavior It s machine code Operational semantics defined by the target processor So it s not whether, but when to use formalism Earlier in the life cycle is better Slide: 12

13 Really, Why Doesn t Everybody Use It? Perception that formal methods have flopped due to inability to prove entire programs correct Fear of the mathematics But the math is now hidden behind the tools Now easy enough to adopt and use by regular teams Slide: 13

14 Math Hidden Behind the Tools Typical for engineering disciplines Shock wave (colored by pressure) Booster separation motor plumes (colored by Mach #) Slide: 14

15 How Smart Do You Have To Be? Too Much Too Little Just Right Dr. Frankenstein Igor Inga Slide: 15

16 Sufficiently Easy to Adopt Can do it gradually SPARK is legal Ada 2012 Have some units in SPARK, others in Ada Inside units, parts in SPARK and parts in Ada Can have other languages involved too Plenty of tool support Integrated with GNAT Pro tools and IDEs Slide: 16

17 Sufficiently Easy to Use Provides incremental benefits Usable without up-front work (i.e., no contracts) Increasing benefits with more contracts Is highly interactive Run at different levels of granularity (down to single line) Run at different levels of analysis power Get precise results in the IDE or command line Get results explanations (paths, counter-examples) Slide: 17

18 The Crazyflie 2.0 Example An Open Source software and hardware micro-drone Slide: 18

19 Crazyflie 2.0 Dual MCU System Architecture RF Power Amp. 10 DOF IMU 3-axis accelerometer 3-axis gyro 3-axis magnetometer pressure sensor I2C nrf MHz Cortex M0 16KB RAM, 256KB FLASH UART STM32F MHz Cortex M4 196KB RAM, 1MB FLASH PWM Motors BLE and NRF Radio Flight Control I2C Power Expansion Port EEPROM Slide: 19

20 The Crazyflie 2.0 Challenge 1800 SLOC for stabilization in C + FreeRTOS for threading + SPARK 2014 Slide: 20

21 2 months later 1800 SLOC stabilization in C + FreeRTOS + Re-written in Ada/SPARK 2100 SLOC in SPARK proved no run-time errors! + FreeRTOS + Slide: 21

22 5 months later 1800 SLOC stabilization in C + FreeRTOS + Re-written in Ada/SPARK 2100 SLOC in SPARK proved no run-time errors + Ravenscar tasking + proved no concurrency errors Slide: 22

23 How Do The Implementations Compare? He found some bugs in the C code (and reported them) He added drop recovery But he didn t implement data logging and a few minor things (e.g., a blinking LED) SPARK code size is slightly less (about 3K less) SPARK data size is much less (about 23K less) Slide: 23

24 Lunar CubeSat Created by students at Vermont Technical College Launched into Earth orbit in 2013, still working The only one of the 12 that worked fully Team selected for new version going to the Moon Lunar IceCube Slide: 24

25 MULTOS Certificate Authority MULTOS is an operating system for smartcards 100,000 lines of SPARK code Only 4 defects reported 1 year after delivery 0.04 per KSLOC Corrected under warranty (!) Industry standard is 5 defects per 1,000 lines Thus approximately 500 defects expected Ultra-high reliability achieved Slide: 25

26 MULTOS CA Productivity 28 lines of code per day Fully documented, tested, everything Industry standard is 10 lines of code per day In any language Very high levels of productivity achieved Slide: 26

27 Vehicle Component Research Project By TOYOTA InfoTechnology Center (ITC) To show that software requirements can be transformed into an implementation proven to be free of run-time errors Currently underway Slide: 27

28 C130J Example Project Results Order of magnitude code quality improvement over industry norms for DO 178B Level A software Productivity improved by a factor of 4 over previous comparable programs Development costs half of that typical for non safety-critical code Sutton, James: Cost-Effective Approaches to Satisfy Safetycritical Regulatory Requirements. Workshop Session, SIGAda Slide: 28

29 Multiple Use Cases (1/2) 1. A safe coding standard for critical software No implementation-dependencies Easily analyzable 2. Addressing data and control coupling 3. Proving absence of run-time errors Requires few contracts Typically 95% - 98% proved Proof can be completed by testing Slide: 29

30 Multiple Use Cases (2/2) 4. Safe removal of run-time checks 5. Prove correct integration between components Replaces defensive coding Simple contracts are needed 6. Prove functional correctness Replaces unit testing More complex contracts are needed Slide: 30

31 Combining Proof and Test Because not everything can be proved Focus test coverage on unproven runtime error checks During integration tests, replace unit tests with proofs Contracts already express what the unit tests would test Slide: 31

32 Contracts As Provable Unit Tests procedure Push (This : in out Stack; Item : in Element) with Pre => not Full (This), Post => not Empty (This) and then Top_Element (This) = Item and then Extent (This) = Extent (This'Old) + 1 and then This'Old.Unchanged (Within => This); function Top_Element (This : Stack) return Element with Pre => not Empty (This); function Extent (This : Stack) return Element_Count; function Empty (This : Stack) return Boolean; function Full (This : Stack) return Boolean; function Unchanged (Invariant_Part, Within : Stack) return Boolean; Slide: 32

33 Concluding Remarks How safe/secure/reliable must your software be? Is the status quo good enough? You can do anything with any language but at what cost? High reliability at reasonable cost is demonstrable now You don t need a new team to get there Slide: 33

34 Adoption Guidelines Available From strong semantic coding standard to full functional correctness Every level implicitly builds on the lower levels Lower levels require lower costs/efforts Good match from DAL/SIL to Bronze-Silver-Gold-Platinum Adoption greatly facilitated by detailed level-specific guidance Slide: 34

Building Better and Safer Programs Using SPARK and Ada. William Wong 23 March 2019

Building Better and Safer Programs Using SPARK and Ada. William Wong 23 March 2019 Building Better and Safer Programs Using SPARK and Ada William Wong 23 March 2019 Intent of This Presentation - Highlight Ada and SPARK programming features Provide a general overview of major features

More information

Hybrid Verification in SPARK 2014: Combining Formal Methods with Testing

Hybrid Verification in SPARK 2014: Combining Formal Methods with Testing IEEE Software Technology Conference 2015 Hybrid Verification in SPARK 2014: Combining Formal Methods with Testing Steve Baird Senior Software Engineer Copyright 2014 AdaCore Slide: 1 procedure Array_Indexing_Bug

More information

WHITE PAPER. 10 Reasons to Use Static Analysis for Embedded Software Development

WHITE PAPER. 10 Reasons to Use Static Analysis for Embedded Software Development WHITE PAPER 10 Reasons to Use Static Analysis for Embedded Software Development Overview Software is in everything. And in many embedded systems like flight control, medical devices, and powertrains, quality

More information

Verification and Test with Model-Based Design

Verification and Test with Model-Based Design Verification and Test with Model-Based Design Flight Software Workshop 2015 Jay Abraham 2015 The MathWorks, Inc. 1 The software development process Develop, iterate and specify requirements Create high

More information

Autopilot System. Specification V1.1

Autopilot System. Specification V1.1 Autopilot System Specification V1.1 Catalog Summary... 1 Specification... 2 1. Hardware... 3 MCU... 3 Sensors... 3 Communication... 3 Power... 3 Extension... 3 2. Interface... 5 1) PIN... 5 2) Looper...

More information

Leveraging Formal Methods for Verifying Models and Embedded Code Prashant Mathapati Application Engineering Group

Leveraging Formal Methods for Verifying Models and Embedded Code Prashant Mathapati Application Engineering Group Leveraging Formal Methods for Verifying Models and Embedded Code Prashant Mathapati Application Engineering Group 2014 The MathWorks, Inc. 1 The Cost of Failure News reports: Recall Due to ECU software

More information

Safety and Reliability of Software-Controlled Systems Part 14: Fault mitigation

Safety and Reliability of Software-Controlled Systems Part 14: Fault mitigation Safety and Reliability of Software-Controlled Systems Part 14: Fault mitigation Prof. Dr.-Ing. Stefan Kowalewski Chair Informatik 11, Embedded Software Laboratory RWTH Aachen University Summer Semester

More information

18-642: Code Style for Compilers

18-642: Code Style for Compilers 18-642: Code Style for Compilers 9/6/2018 2017-2018 Philip Koopman Programming can be fun, so can cryptography; however they should not be combined. Kreitzberg and Shneiderman 2017-2018 Philip Koopman

More information

CIS 890: Safety Critical Systems

CIS 890: Safety Critical Systems CIS 890: Safety Critical Systems Lecture: SPARK -- Analysis Tools Copyright 2007, John Hatcliff. The syllabus and all lectures for this course are copyrighted materials and may not be used in other course

More information

Verification and Validation of High-Integrity Systems

Verification and Validation of High-Integrity Systems Verification and Validation of High-Integrity Systems Chethan CU, MathWorks Vaishnavi HR, MathWorks 2015 The MathWorks, Inc. 1 Growing Complexity of Embedded Systems Emergency Braking Body Control Module

More information

Topics in Software Testing

Topics in Software Testing Dependable Software Systems Topics in Software Testing Material drawn from [Beizer, Sommerville] Software Testing Software testing is a critical element of software quality assurance and represents the

More information

GNAT Pro Innovations for High-Integrity Development

GNAT Pro Innovations for High-Integrity Development GNAT Pro Innovations for High-Integrity Development José F. Ruiz Senior Software Engineer Ada Europe 2010, Valencia 2010-06-15 www.adacore.com Index Development environment Tools Static

More information

Implementation Guidance for the Adoption of SPARK

Implementation Guidance for the Adoption of SPARK Implementation Guidance for the Adoption of SPARK Release 1.0 AdaCore and Thales Jan 26, 2017 Copyright (C) 2016-2017, AdaCore and Thales Licensed under Creative Commons Attribution 4.0 International CONTENTS

More information

Static Analysis in C/C++ code with Polyspace

Static Analysis in C/C++ code with Polyspace 1 Static Analysis in C/C++ code with Polyspace Yongchool Ryu Application Engineer gary.ryu@mathworks.com 2016 The MathWorks, Inc. 2 Agenda Efficient way to find problems in Software Category of Static

More information

Leveraging Formal Methods Based Software Verification to Prove Code Quality & Achieve MISRA compliance

Leveraging Formal Methods Based Software Verification to Prove Code Quality & Achieve MISRA compliance Leveraging Formal Methods Based Software Verification to Prove Code Quality & Achieve MISRA compliance Prashant Mathapati Senior Application Engineer MATLAB EXPO 2013 The MathWorks, Inc. 1 The problem

More information

CS 161 Computer Security

CS 161 Computer Security Wagner Spring 2014 CS 161 Computer Security 1/27 Reasoning About Code Often functions make certain assumptions about their arguments, and it is the caller s responsibility to make sure those assumptions

More information

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany Softwaretechnik Lecture 08: Testing and Debugging Overview Peter Thiemann University of Freiburg, Germany SS 2012 Literature Essential Reading Why Programs Fail: A Guide to Systematic Debugging, A Zeller

More information

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany Softwaretechnik Lecture 08: Testing and Debugging Overview Peter Thiemann University of Freiburg, Germany SS 2012 Literature Essential Reading Why Programs Fail: A Guide to Systematic Debugging, A Zeller

More information

Remove Before Flight. Defect-Free Software and Agile Development in SPARK Martin Becker

Remove Before Flight. Defect-Free Software and Agile Development in SPARK Martin Becker Remove Before Flight Defect-Free Software and Agile Development in SPARK 2014 Martin Becker Chair of Real-Time Computer Systems (RCS) Technical University of Munich Presented at Frama-C & SPARK Day 2017,

More information

Formation Control of Crazyflies

Formation Control of Crazyflies Formation Control of Crazyflies Bryce Mack, Chris Noe, and Trevor Rice Advisors: Dr. Ahn, Dr. Wang November 30, 2017 1 Table of Contents 1. 2. 3. Introduction Problem Statement Research Tasks I. II. III.

More information

Bridge Course On Software Testing

Bridge Course On Software Testing G. PULLAIAH COLLEGE OF ENGINEERING AND TECHNOLOGY Accredited by NAAC with A Grade of UGC, Approved by AICTE, New Delhi Permanently Affiliated to JNTUA, Ananthapuramu (Recognized by UGC under 2(f) and 12(B)

More information

Baseline Testing Services. Whitepaper Vx.x

Baseline Testing Services. Whitepaper Vx.x Whitepaper Vx.x 2018-04 Table of Contents 1 Introduction... 3 2 What is Baseline Testing?... 3 3 Customer Challenge... 3 4 Project Details... 3 4.1 First Steps... 3 4.2 Project Management... 3 4.3 Software

More information

Automatización de Métodos y Procesos para Mejorar la Calidad del Diseño

Automatización de Métodos y Procesos para Mejorar la Calidad del Diseño Automatización de Métodos y Procesos para Mejorar la Calidad del Diseño Luis López 2015 The MathWorks, Inc. 1 Growing Complexity of Embedded Systems Emergency Braking Body Control Module Voice Recognition

More information

StackAnalyzer Proving the Absence of Stack Overflows

StackAnalyzer Proving the Absence of Stack Overflows StackAnalyzer Proving the Absence of Stack Overflows AbsInt GmbH 2012 2 Functional Safety Demonstration of functional correctness Well-defined criteria Automated and/or model-based testing Formal techniques:

More information

Programming Languages for High-Assurance Autonomous Vehicles

Programming Languages for High-Assurance Autonomous Vehicles Programming Languages for High-Assurance Autonomous Vehicles Lee Pike (speaker), Pat Hickey, James Bielman, Trevor Elliott, John Launchbury, Erlend Hamberg, Thomas DuBuisson S5 June 2014 Embedded Security:

More information

Sanitizing Sensitive Data: How to get it Right (or at least Less Wrong ) Roderick Chapman, 14th June 2017

Sanitizing Sensitive Data: How to get it Right (or at least Less Wrong ) Roderick Chapman, 14th June 2017 Sanitizing Sensitive Data: How to get it Right (or at least Less Wrong ) Roderick Chapman, 14th June 2017 Contents The problem Technical issues Design goals Ada language support A policy for sanitization

More information

Model-Based Design for High Integrity Software Development Mike Anthony Senior Application Engineer The MathWorks, Inc.

Model-Based Design for High Integrity Software Development Mike Anthony Senior Application Engineer The MathWorks, Inc. Model-Based Design for High Integrity Software Development Mike Anthony Senior Application Engineer The MathWorks, Inc. Tucson, AZ USA 2009 The MathWorks, Inc. Model-Based Design for High Integrity Software

More information

IoT.js. Next generation web for connected things. Samsung Electronics Software Center Piotr Marcinkiewicz 2017

IoT.js. Next generation web for connected things. Samsung Electronics Software Center Piotr Marcinkiewicz 2017 IoT.js Next generation web for connected things Samsung Electronics Software Center Piotr Marcinkiewicz 2017 Agenda Introduction Architecture Node.js vs. IoT.js APIs You are invited Community Q&A 01 02

More information

Automating Best Practices to Improve Design Quality

Automating Best Practices to Improve Design Quality Automating Best Practices to Improve Design Quality Adam Whitmill, Senior Application Engineer 2015 The MathWorks, Inc. 1 Growing Complexity of Embedded Systems Emergency Braking Body Control Module Voice

More information

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60 M. Sc (CS) (II Semester) Examination, 2012-13 Subject: Computer System Architecture Paper Code: M.Sc-CS-203 Time: Three Hours] [Maximum Marks: 60 Note: Question Number 1 is compulsory. Answer any four

More information

Software Security: Vulnerability Analysis

Software Security: Vulnerability Analysis Computer Security Course. Software Security: Vulnerability Analysis Program Verification Program Verification How to prove a program free of buffer overflows? Precondition Postcondition Loop invariants

More information

Push-button verification of Files Systems via Crash Refinement

Push-button verification of Files Systems via Crash Refinement Push-button verification of Files Systems via Crash Refinement Verification Primer Behavioral Specification and implementation are both programs Equivalence check proves the functional correctness Hoare

More information

"Secure" Coding Practices Nicholas Weaver

Secure Coding Practices Nicholas Weaver "Secure" Coding Practices based on David Wagner s slides from Sp 2016 1 Administrivia Computer Science 161 Fall 2016 2 3 This is a Remarkably Typical C Problem Computer Science 161 Fall 2016 if ((options

More information

The University of Iowa Fall CS:5810 Formal Methods in Software Engineering. Introduction

The University of Iowa Fall CS:5810 Formal Methods in Software Engineering. Introduction The University of Iowa Fall 2017 CS:5810 Formal Methods in Software Engineering Introduction Copyright 2017, Cesare Tinelli, Pierre-Loïc Garoche, Reiner Hänle, Steven Miller These notes are copyrighted

More information

Verification & Validation of Open Source

Verification & Validation of Open Source Verification & Validation of Open Source 2011 WORKSHOP ON SPACECRAFT FLIGHT SOFTWARE Gordon Uchenick Coverity, Inc Open Source is Ubiquitous Most commercial and proprietary software systems have some open

More information

Verification, Testing, and Bugs

Verification, Testing, and Bugs Verification, Testing, and Bugs Ariane 5 Rocket First Launch Failure https://www.youtube.com/watch?v=gp_d8r- 2hwk So What Happened? The sequence of events that led to the destruction of the Ariane 5 was

More information

Use of ISP1880 Accelero-Magnetometer, Temperature and Barometer Sensor

Use of ISP1880 Accelero-Magnetometer, Temperature and Barometer Sensor Use of Accelero-Magnetometer, Temperature and Barometer Sensor Application Note AN181105 Introduction Scope This application note describes how to set up a Sensor demonstration with Sensors Board that

More information

Exposing Uninitialized Variables: Strengthening and Extending Run-Time Checks in Ada

Exposing Uninitialized Variables: Strengthening and Extending Run-Time Checks in Ada Exposing Uninitialized Variables: Strengthening and Extending Run-Time Checks in Ada Uninitialized Variables Common cause of bugs that are difficult to find Often lead to unpredictable behavior May show

More information

Formal Methods and their role in Software and System Development. Riccardo Sisto, Politecnico di Torino

Formal Methods and their role in Software and System Development. Riccardo Sisto, Politecnico di Torino Formal Methods and their role in Software and System Development Riccardo Sisto, Politecnico di Torino What are Formal Methods? Rigorous (mathematical) methods for modelling and analysing (computer-based)

More information

HEXIWEAR COMPLETE IOT DEVELOPMENT SOLUTION

HEXIWEAR COMPLETE IOT DEVELOPMENT SOLUTION HEXIWEAR COMPLETE IOT DEVELOPMENT SOLUTION NXP SEMICONDUCTORS PUBLIC THE ONLY SUPPLIER TO PROVIDE COMPLETE IoT SOLUTIONS DSPs, MCUs & CPUs Suite of Sensors NFC, BLE, Thread, zigbee, sub-ghz Wireless Interconnects

More information

Cypress PSoC 6 Microcontrollers

Cypress PSoC 6 Microcontrollers Cypress PSoC 6 Microcontrollers Purpose-Built for the Internet of Things WWW.CYPRESS.COM/PSOC6 Unmatched Solutions for the Internet of Things EMBEDDED IN TOMORROW The IoT is exploding, with more than 30

More information

CS 307: Software Engineering. Lecture 10: Software Design and Architecture

CS 307: Software Engineering. Lecture 10: Software Design and Architecture CS 307: Software Engineering Lecture 10: Software Design and Architecture Prof. Jeff Turkstra 2017 Dr. Jeffrey A. Turkstra 1 Announcements Discuss your product backlog in person or via email by Today Office

More information

Sanitizing Sensitive Data: How to get it Right (or at least Less Wrong ) Roderick Chapman, 22nd September 2017

Sanitizing Sensitive Data: How to get it Right (or at least Less Wrong ) Roderick Chapman, 22nd September 2017 Sanitizing Sensitive Data: How to get it Right (or at least Less Wrong ) Roderick Chapman, 22nd September 2017 Contents The problem Technical issues Design goals Language support A policy for sanitization

More information

Last Time. Think carefully about whether you use a heap Look carefully for stack overflow Especially when you have multiple threads

Last Time. Think carefully about whether you use a heap Look carefully for stack overflow Especially when you have multiple threads Last Time Cost of nearly full resources RAM is limited Think carefully about whether you use a heap Look carefully for stack overflow Especially when you have multiple threads Embedded C Extensions for

More information

Lecture Notes on Contracts

Lecture Notes on Contracts Lecture Notes on Contracts 15-122: Principles of Imperative Computation Frank Pfenning Lecture 2 August 30, 2012 1 Introduction For an overview the course goals and the mechanics and schedule of the course,

More information

Unlocking the Potential of Your Microcontroller

Unlocking the Potential of Your Microcontroller Unlocking the Potential of Your Microcontroller Ethan Wu Storming Robots, Branchburg NJ, USA Abstract. Many useful hardware features of advanced microcontrollers are often not utilized to their fullest

More information

Software Engineering Testing and Debugging Testing

Software Engineering Testing and Debugging Testing Software Engineering Testing and Debugging Testing Prof. Dr. Peter Thiemann Universitt Freiburg 08.06.2011 Recap Testing detect the presence of bugs by observing failures Debugging find the bug causing

More information

Memory Safety (cont d) Software Security

Memory Safety (cont d) Software Security Memory Safety (cont d) Software Security CS 161: Computer Security Prof. Raluca Ada Popa January 17, 2016 Some slides credit to David Wagner and Nick Weaver Announcements Discussion sections and office

More information

Program Verification (6EC version only)

Program Verification (6EC version only) Program Verification (6EC version only) Erik Poll Digital Security Radboud University Nijmegen Overview Program Verification using Verification Condition Generators JML a formal specification language

More information

High Reliability Systems. Lloyd Moore, President

High Reliability Systems. Lloyd Moore, President High Reliability Systems Lloyd Moore, President Lloyd@CyberData-Robotics.com www.cyberdata-robotics.com Overview Appropriate Use of This Presentation Causes of Failures Watchdogs Memory Techniques Safer

More information

Don t Be the Developer Whose Rocket Crashes on Lift off LDRA Ltd

Don t Be the Developer Whose Rocket Crashes on Lift off LDRA Ltd Don t Be the Developer Whose Rocket Crashes on Lift off 2015 LDRA Ltd Cost of Software Defects Consider the European Space Agency s Ariane 5 flight 501 on Tuesday, June 4 1996 Due to an error in the software

More information

FAULT TOLERANCE. Fault Tolerant Systems. Faults Faults (cont d)

FAULT TOLERANCE. Fault Tolerant Systems. Faults Faults (cont d) Distributed Systems Fö 9/10-1 Distributed Systems Fö 9/10-2 FAULT TOLERANCE 1. Fault Tolerant Systems 2. Faults and Fault Models. Redundancy 4. Time Redundancy and Backward Recovery. Hardware Redundancy

More information

Hoare Logic. COMP2600 Formal Methods for Software Engineering. Rajeev Goré

Hoare Logic. COMP2600 Formal Methods for Software Engineering. Rajeev Goré Hoare Logic COMP2600 Formal Methods for Software Engineering Rajeev Goré Australian National University Semester 2, 2016 (Slides courtesy of Ranald Clouston) COMP 2600 Hoare Logic 1 Australian Capital

More information

Interesting Items Volume 16. Dave Jaffe 04/23/2011

Interesting Items Volume 16. Dave Jaffe 04/23/2011 Interesting Items Volume 16 Dave Jaffe 04/23/2011 Caveats I came across these products in recent magazines I have not bought or used these products I do not endorse these products I do not know much more

More information

ARROW ARIS EDGE Board Software User s Guide 12/05/2017

ARROW ARIS EDGE Board Software User s Guide 12/05/2017 ARROW ARIS EDGE Board Software User s Guide All information contained in these materials, including products and product specifications, represents information on the product at the time of publication

More information

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya Coding Standards in FACE Conformance John Thomas, Chris Edwards, and Shan Bhattacharya LDRA Overview Provider of Software Quality, Compliance Management & Testing Solutions Established 1975 ISO 9001 certified

More information

When Embedded Systems Attack. Unit 22. Therac-25. Therac-25. Embedded Failures. Embedded systems can fail for a variety of reasons

When Embedded Systems Attack. Unit 22. Therac-25. Therac-25. Embedded Failures. Embedded systems can fail for a variety of reasons 22.1 22.2 When Embedded Systems Attack Unit 22 Embedded Failures Embedded systems can fail for a variety of reasons Electrical problems Mechanical problems Errors in the programming Incorrectly specified

More information

Verification and Validation

Verification and Validation Steven Zeil February 13, 2013 Contents 1 The Process 3 1 2 Non-Testing V&V 7 2.1 Code Review....... 8 2.2 Mathematically-based verification......................... 19 2.3 Static analysis tools... 23 2.4

More information

Verification and Validation

Verification and Validation Steven Zeil February 13, 2013 Contents 1 The Process 2 2 Non-Testing V&V 3 2.1 Code Review........... 4 2.2 Mathematically-based verification.................................. 8 2.3 Static analysis tools.......

More information

Shared Variables and Interference

Shared Variables and Interference Illinois Institute of Technology Lecture 24 Shared Variables and Interference CS 536: Science of Programming, Spring 2018 A. Why Parallel programs can coordinate their work using shared variables, but

More information

Verification by Static Analysis

Verification by Static Analysis Verification by Static Analysis Intelligent Testing Conference Bristol, 17 th March 2014 Verification overview Software Verification is The process of evaluating software during or at the end of the development

More information

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya Coding Standards in FACE Conformance John Thomas, Chris Edwards, and Shan Bhattacharya LDRA Overview Provider of Software Quality, Compliance Management & Testing Solutions Established 1975 ISO 9001 certified

More information

COL862 - Low Power Computing

COL862 - Low Power Computing COL862 - Low Power Computing Power Measurements using performance counters and studying the low power computing techniques in IoT development board (PSoC 4 BLE Pioneer Kit) and Arduino Mega 2560 Submitted

More information

Oracle Developer Studio Code Analyzer

Oracle Developer Studio Code Analyzer Oracle Developer Studio Code Analyzer The Oracle Developer Studio Code Analyzer ensures application reliability and security by detecting application vulnerabilities, including memory leaks and memory

More information

AdaCore technologies

AdaCore technologies AdaCore technologies for CENELEC EN 50128 2011 Eric Perlade Technical Account Manager RSSRail 2017 CENELEC EN 50128:2011 CENELEC EN 50128 Main standards applicable to railway systems Complete System 50126

More information

SPARK Update Ada Europe 2012

SPARK Update Ada Europe 2012 [SPARK] SPARK Update Ada Europe 2012 Stuart Matthews Copyright Altran Praxis Contents Background SPARK Pro Product Update SPARK Book New Edition SPARK Training Copyright Altran Praxis Corporate Markets

More information

Understanding Software Engineering

Understanding Software Engineering McBreen.book Page 3 Wednesday, August 1, 2001 10:08 PM Chapter 1 Understanding Software Engineering In order to understand software engineering, we first need to look at the projects that were reported

More information

FUNCTIONAL SAFETY FOR INDUSTRIAL AUTOMATION

FUNCTIONAL SAFETY FOR INDUSTRIAL AUTOMATION FUNCTIONAL SAFETY FOR INDUSTRIAL AUTOMATION 2017.11 The term Functional Safety has become a topic of great interest. Functional Safety generally means that malfunctions of the operating systems or applications

More information

Simulink 모델과 C/C++ 코드에대한매스웍스의정형검증툴소개 The MathWorks, Inc. 1

Simulink 모델과 C/C++ 코드에대한매스웍스의정형검증툴소개 The MathWorks, Inc. 1 Simulink 모델과 C/C++ 코드에대한매스웍스의정형검증툴소개 2012 The MathWorks, Inc. 1 Agenda Formal Verification Key concept Applications Verification of designs against (functional) requirements Design error detection Test

More information

Collecting data from IoT devices using Sigfox network

Collecting data from IoT devices using Sigfox network Collecting data from IoT devices using Sigfox network Making data collection easier Jan Krupa Operations Engineer JKrupa@suse.com About me IoT networks Sigfox network What is Sigfox Sigfox employs

More information

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1 Verification vs validation Verification: "Are we building the product right?. The software should

More information

Addressing Verification Bottlenecks of Fully Synthesized Processor Cores using Equivalence Checkers

Addressing Verification Bottlenecks of Fully Synthesized Processor Cores using Equivalence Checkers Addressing Verification Bottlenecks of Fully Synthesized Processor Cores using Equivalence Checkers Subash Chandar G (g-chandar1@ti.com), Vaideeswaran S (vaidee@ti.com) DSP Design, Texas Instruments India

More information

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG Adam Lindberg github.com/eproxus HARDWARE COMPONENTS SOFTWARE FUTURE Boot, Serial console, Erlang shell DEMO THE GRISP BOARD SPECS Hardware & specifications

More information

Ettus Research Update

Ettus Research Update Ettus Research Update Matt Ettus Ettus Research GRCon13 Outline 1 Introduction 2 Recent New Products 3 Third Generation Introduction Who am I? Core GNU Radio contributor since 2001 Designed

More information

Key Features. Defect Rates. Traditional Unit testing: 25 faults / KLOC System testing: 25 / KLOC Inspections: / KLOC

Key Features. Defect Rates. Traditional Unit testing: 25 faults / KLOC System testing: 25 / KLOC Inspections: / KLOC Cleanroom attempt to mathematically-based, scientific engineering process of software development Cleanroom software engineering yields software that is correct by mathematically sound design, and software

More information

INTRODUCTION HARDWARE

INTRODUCTION HARDWARE Project Kit Table of Contents INTRODUCTION... 3 HARDWARE... 3 Hardware built-in micro:bit:... 3 Hardware included in this kit:... 4 CODE... 5 Pseudo Code:... 5 Coding Tools:... 5 Running Programs:... 8

More information

Real-Time and Embedded Systems (M) Lecture 19

Real-Time and Embedded Systems (M) Lecture 19 Low-Level/Embedded Programming Real-Time and Embedded Systems (M) Lecture 19 Lecture Outline Hardware developments Implications on system design Low-level programming Automatic memory management Timing

More information

ARM Cortex core microcontrollers 3. Cortex-M0, M4, M7

ARM Cortex core microcontrollers 3. Cortex-M0, M4, M7 ARM Cortex core microcontrollers 3. Cortex-M0, M4, M7 Scherer Balázs Budapest University of Technology and Economics Department of Measurement and Information Systems BME-MIT 2018 Trends of 32-bit microcontrollers

More information

Shared Variables and Interference

Shared Variables and Interference Solved Shared Variables and Interference CS 536: Science of Programming, Fall 2018 A. Why Parallel programs can coordinate their work using shared variables, but it s important for threads to not interfere

More information

Honours/Master/PhD Thesis Projects Supervised by Dr. Yulei Sui

Honours/Master/PhD Thesis Projects Supervised by Dr. Yulei Sui Honours/Master/PhD Thesis Projects Supervised by Dr. Yulei Sui Projects 1 Information flow analysis for mobile applications 2 2 Machine-learning-guide typestate analysis for UAF vulnerabilities 3 3 Preventing

More information

Object-Oriented and Classical Software Engineering

Object-Oriented and Classical Software Engineering Slide 6.1 Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach srs@vuse.vanderbilt.edu CHAPTER 6 Slide 6.2 TESTING 1 Overview Slide 6.3 Quality issues

More information

Object-Oriented and Classical Software Engineering

Object-Oriented and Classical Software Engineering Slide 6.1 Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach srs@vuse.vanderbilt.edu CHAPTER 6 Slide 6.2 TESTING Overview Slide 6.3 Quality issues

More information

Particle E Series Cloud-integrated hardware platform for cellular IoT devices

Particle E Series Cloud-integrated hardware platform for cellular IoT devices Particle E Series Cloud-integrated hardware platform for cellular IoT devices Particle E Series modules 36.0 x 43.0 x 4.6 mm World s first fully-integrated cellular hardware platform with out-of-box Cloud

More information

Why testing and analysis. Software Testing. A framework for software testing. Outline. Software Qualities. Dependability Properties

Why testing and analysis. Software Testing. A framework for software testing. Outline. Software Qualities. Dependability Properties Why testing and analysis Software Testing Adapted from FSE 98 Tutorial by Michal Young and Mauro Pezze Software is never correct no matter what developing testing technique is used All software must be

More information

Cypress PSoC 4 Microcontrollers

Cypress PSoC 4 Microcontrollers Cypress PSoC Microcontrollers Your Problem-Solver on Chip WWW.CYPRESS.COM/PSOC THE DIFFERENTIATION DILEMMA Embedded systems are rapidly advancing with innovative features added at each new product generation.

More information

Hercules ARM Cortex -R4 System Architecture. Processor Overview

Hercules ARM Cortex -R4 System Architecture. Processor Overview Hercules ARM Cortex -R4 System Architecture Processor Overview What is Hercules? TI s 32-bit ARM Cortex -R4/R5 MCU family for Industrial, Automotive, and Transportation Safety Hardware Safety Features

More information

Program Correctness and Efficiency. Chapter 2

Program Correctness and Efficiency. Chapter 2 Program Correctness and Efficiency Chapter 2 Chapter Objectives To understand the differences between the three categories of program errors To understand the effect of an uncaught exception and why you

More information

DMA safety in buffers for Linux Kernel device drivers

DMA safety in buffers for Linux Kernel device drivers DMA safety in buffers for Linux Kernel device drivers Wolfram Sang, Consultant / Renesas 23.10.2018, ELCE2018 Wolfram Sang, Consultant / Renesas DMA safety in buffers 23.10.2018, ELCE2018 1 / 23 I2C &

More information

Pierce Ch. 3, 8, 11, 15. Type Systems

Pierce Ch. 3, 8, 11, 15. Type Systems Pierce Ch. 3, 8, 11, 15 Type Systems Goals Define the simple language of expressions A small subset of Lisp, with minor modifications Define the type system of this language Mathematical definition using

More information

Jay Abraham 1 MathWorks, Natick, MA, 01760

Jay Abraham 1 MathWorks, Natick, MA, 01760 Jay Abraham 1 MathWorks, Natick, MA, 01760 Stringent performance requirements and shorter development cycles are driving the use of modeling and simulation. Model-Based Design core of this development

More information

AstréeA From Research To Industry

AstréeA From Research To Industry AstréeA From Research To Industry Dr.-Ing. Stephan Wilhelm, AbsInt GmbH Workshop on Static Analysis of Concurrent Software Edinburgh, 2016 2 AbsInt Angewandte Informatik GmbH Provides advanced development

More information

Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 22 Slide 1

Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation Slide 1 Objectives To introduce software verification and validation and to discuss the distinction between them To describe the program inspection process and its role in V

More information

Contract-based Programming: a Route to Finding Bugs Earlier

Contract-based Programming: a Route to Finding Bugs Earlier Contract-based Programming: a Route to Finding Bugs Earlier JSA Research & Innovation February 2018 Subprogram Contracts Type Contracts Contract-based Programming A software development technique, used

More information

Testing is a very big and important topic when it comes to software development. Testing has a number of aspects that need to be considered.

Testing is a very big and important topic when it comes to software development. Testing has a number of aspects that need to be considered. Testing Testing is a very big and important topic when it comes to software development. Testing has a number of aspects that need to be considered. System stability is the system going to crash or not?

More information

O B J E C T L E V E L T E S T I N G

O B J E C T L E V E L T E S T I N G Source level testing and O B J E C T L E V E L T E S T I N G Objectives At the end of this section, you will be able to Explain the advantages and disadvantages of both instrumented testing and object

More information

Integration Testing. Conrad Hughes School of Informatics. Slides thanks to Stuart Anderson

Integration Testing. Conrad Hughes School of Informatics. Slides thanks to Stuart Anderson Integration Testing Conrad Hughes School of Informatics Slides thanks to Stuart Anderson 19 February 2010 Software Testing: Lecture 10 1 Unit Test vs Integration Testing 1 The ideal in unit testing is

More information

System Architecture Directions for Networked Sensors[1]

System Architecture Directions for Networked Sensors[1] System Architecture Directions for Networked Sensors[1] Secure Sensor Networks Seminar presentation Eric Anderson System Architecture Directions for Networked Sensors[1] p. 1 Outline Sensor Network Characteristics

More information

CSC313 High Integrity Systems/CSCM13 Critical Systems. CSC313/CSCM13 Chapter 2 1/ 221

CSC313 High Integrity Systems/CSCM13 Critical Systems. CSC313/CSCM13 Chapter 2 1/ 221 CSC313 High Integrity Systems/CSCM13 Critical Systems CSC313/CSCM13 Chapter 2 1/ 221 CSC313 High Integrity Systems/ CSCM13 Critical Systems Course Notes Chapter 2: SPARK Ada Sect. 2 (f) Anton Setzer Dept.

More information

Implementation of ATM security using IOT

Implementation of ATM security using IOT Implementation of ATM security using IOT Mahalakshmi.T.K 1, J.Kumudha 2, M.Ranjitha 3, Mr.J.Gurumurthy 4, Dr.D.Sivakumar 5 1,2,3 Department of electronics and communication engineering, Easwari engineering

More information

Safely and Efficiently Multiprogramming a 64kB Computer

Safely and Efficiently Multiprogramming a 64kB Computer Safely and Efficiently Multiprogramming a 64kB Computer Amit Levy Daniel Giffin Bradford Campbell Branden Ghena Pat Pannuto Prabal Dutta Philip Levis Niklas Adolfsson Fredrik Nilsson Josh Adkins Neal Jackson

More information