114
FETCHING MOTHS FROM THE WORKS CORRECTNESS METHODS IN SOFTWARE

(Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Embed Size (px)

Citation preview

Page 1: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

FETCHING MOTHS FROM THE WORKSCORRECTNESS METHODS IN SOFTWARE

Page 2: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

- or -

Page 3: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

An Investigation into the Nature of Software with

a Particular Concern toward its Effective

Construction

Page 4: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

- or -

Page 5: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Why do Computers Fail and What can be Done About It?

Page 6: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Why do Computers Stop and What Can be Done About It?

Jim Gray - 1986

@bltroutwine Moonconf, 2016

Page 7: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“The resulting systems have hardware MTBF

measured in decades or centuries. ”

@bltroutwine Moonconf, 2016

Page 8: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“Unfortunately, it says nothing about tolerating

the major sources of failure. . .”

@bltroutwine Moonconf, 2016

Page 9: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“Software”

@bltroutwine Moonconf, 2016

Page 10: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 11: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

design failures, open doors --

@bltroutwine Moonconf, 2016

Page 12: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 13: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

The Case of the Three Engineers vs. BART

Gordon Friedlander - 1974

@bltroutwine Moonconf, 2016

Page 14: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

agile iteration takes to the sky --

@bltroutwine Moonconf, 2016

Page 15: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 16: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

SIGSOFT Vol. 6 No. 2: Frontmatter

*gSoft Editor - 1981

@bltroutwine Moonconf, 2016

Page 17: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

a bug affects the staging prototype --

@bltroutwine Moonconf, 2016

Page 18: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 19: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

The BUG Heard 'Round the World Discussion of The Software Problem Which Delayed the First Shuttle Orbital Flight

John Garman - 1981

@bltroutwine Moonconf, 2016

Page 20: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“Maintaining software systems in the field, absorbing large changes or additions in the middle of development

cycles. . . @bltroutwine Moonconf, 2016

Page 21: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

. . . reconfiguring software systems to ‘fit’ never-quite-identical vehicles or missions are our real problems today.”

@bltroutwine Moonconf, 2016

Page 22: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

That was the late 1970s, have we made

progress?

@bltroutwine Moonconf, 2016

Page 23: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Yes!

@bltroutwine Moonconf, 2016

Page 24: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 25: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Sorta!

@bltroutwine Moonconf, 2016

Page 26: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

‘Correct’ is not a state, it’s a goal.

@bltroutwine Moonconf, 2016

Page 27: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

What’s needed is an understanding of how we fail to achieve it.

@bltroutwine Moonconf, 2016

Page 28: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Analyzing Software Requirements Errors in Safety-Critical, Embedded Systems

Robin R. Lutz - 1993@bltroutwine Moonconf, 2016

Page 29: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“Few internal faults were uncovered

during integration and system testing.”

@bltroutwine Moonconf, 2016

Page 30: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“Functional faults are the most common kind

of software error.”

@bltroutwine Moonconf, 2016

Page 31: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

What kind of software faults are there?

@bltroutwine Moonconf, 2016

Page 32: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Program Faults • Internal mistakes • Interface violations • Functional violations

@bltroutwine Moonconf, 2016

Page 33: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Program Faults • Internal • Interface • FunctionalBugs

@bltroutwine Moonconf, 2016

Page 34: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Human Error • Intra-team comms. • Extra-team comms. • Misunderstanding spec. • Mishandling spec.

@bltroutwine Moonconf, 2016

Page 35: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Human Error • Intra-team comms. • Extra-team comms. • Misunderstanding spec. • Mishandling spec.

Comm. Problems

@bltroutwine Moonconf, 2016

Page 36: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Process Error • Inadequate testing • Inadequate specs. • Unknown requirements • Incorrect requirements

@bltroutwine Moonconf, 2016

Page 37: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Process Error • Inadequate testing • Inadequate specs. • Unknown requirements • Incorrect requirements

Org. Goofs

@bltroutwine Moonconf, 2016

Page 38: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

‘Correct’ breaks down into two sub-goals.

@bltroutwine Moonconf, 2016

Page 39: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

- Validation -

@bltroutwine Moonconf, 2016

Page 40: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

- Verification -

@bltroutwine Moonconf, 2016

Page 41: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

What steps can we take today?

@bltroutwine Moonconf, 2016

Page 42: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 43: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 0.

@bltroutwine Moonconf, 2016

Page 44: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Convince your organization to

invest.

@bltroutwine Moonconf, 2016

Page 45: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 46: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Eliminating Embedded Software Defects Prior to Integration Test

Ted Bennett, Paul Wennberg - 2005

@bltroutwine Moonconf, 2016

Page 47: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“The more faults that pass undetected into integration test

and beyond, the more the project will cost and the longer

it will take to complete.”@bltroutwine Moonconf, 2016

Page 48: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 1.

@bltroutwine Moonconf, 2016

Page 49: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Aim to make systems both safe

and reliable.

@bltroutwine Moonconf, 2016

Page 50: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 51: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Engineering a Safer World Systems Thinking Applied to Safety

Nancy Leveson - 2011

@bltroutwine Moonconf, 2016

Page 52: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 2.

@bltroutwine Moonconf, 2016

Page 53: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Be clear on what your system must and mustn’t do.

@bltroutwine Moonconf, 2016

Page 54: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 55: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

The Role of Software in Spacecraft Accidents

Nancy Leveson - 2004

@bltroutwine Moonconf, 2016

Page 56: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“. . .software specifications often describe nominal behavior well but are very incomplete with respect to required software behavior under off-nominal

conditions . . .@bltroutwine Moonconf, 2016

Page 57: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“Most safety-related requirements. . .are best described using. . .design

constraints.”@bltroutwine Moonconf, 2016

Page 58: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 3.

@bltroutwine Moonconf, 2016

Page 59: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

"We don't want nobody that nobody

sent."

@bltroutwine Moonconf, 2016

Page 60: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 61: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

The Role of Software in Spacecraft Accidents

Nancy Leveson - 2004

@bltroutwine Moonconf, 2016

Page 62: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“It is widely believed that because software has executed safely in other applications, it will be safe

in the new one. . .

@bltroutwine Moonconf, 2016

Page 63: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

(M)ost accidents involve software that is doing exactly what it was designed to do (but) it reliably performs the wrong function.”

@bltroutwine Moonconf, 2016

Page 64: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 4.

@bltroutwine Moonconf, 2016

Page 65: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Audit and review all code. Aid with automated tests.

@bltroutwine Moonconf, 2016

Page 66: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 67: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

The OpenBSD Culture

David Gwynne - 2006

@bltroutwine Moonconf, 2016

Page 68: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Going Fast Slowly

Poul-Henning Kamp, 2016

@bltroutwine Moonconf, 2016

Page 69: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

How SQLite is Tested

Dwayne Hipp - 2009

@bltroutwine Moonconf, 2016

Page 70: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 5.

@bltroutwine Moonconf, 2016

Page 71: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Use randomized testing and track coverage.

@bltroutwine Moonconf, 2016

Page 72: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 73: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

An Evaluation of Randomized Testing

Joe Duran, *meon Ntafos - 1984

@bltroutwine Moonconf, 2016

Page 74: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“Our experiments have shown that random testing

can discover some relatively subtle errors without a great

deal of effort.”@bltroutwine Moonconf, 2016

Page 75: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

QuickCheck A Lightweight Tool for Random Testing of Haskell Programs

Coen Claessen, John Hughes - 2000

@bltroutwine Moonconf, 2016

Page 76: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 6.

@bltroutwine Moonconf, 2016

Page 77: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Be willing to change your approach.

@bltroutwine Moonconf, 2016

Page 78: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 79: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

An Experimental Evaluation of the Assumption of Independence in Multiversion Programming

Nancy Leveson, John Knight - 1986@bltroutwine Moonconf, 2016

Page 80: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 7.

@bltroutwine Moonconf, 2016

Page 81: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Use tools amenable to formal methods.

@bltroutwine Moonconf, 2016

Page 82: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 83: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Rigorous Software Development An Introduction to Program Verification

Jose Almedia et al., 2011

@bltroutwine Moonconf, 2016

Page 84: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Building High Integrity Applications with SPARK

John McCormick, Peter Chapin - 2015

@bltroutwine Moonconf, 2016

Page 85: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 9.

@bltroutwine Moonconf, 2016

Page 86: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Use formal methods.

@bltroutwine Moonconf, 2016

Page 87: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 88: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Formal Specification and Documentation with Z A Case Study Approach

Jonathan Bowen, 2003

@bltroutwine Moonconf, 2016

Page 89: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Moving Fast with Software Verification

Cristiano Calcagno et al., 2015

@bltroutwine Moonconf, 2016

Page 90: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 9.

@bltroutwine Moonconf, 2016

Page 91: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Build simple.

@bltroutwine Moonconf, 2016

Page 92: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 93: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Out of the Tar Pit

Ben Moseley, Peter Marks - 2006

@bltroutwine Moonconf, 2016

Page 94: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Normal Accidents Living with High-Risk Technologies

Charles Perrow - 1986

@bltroutwine Moonconf, 2016

Page 95: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Step 10.

@bltroutwine Moonconf, 2016

Page 96: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Build for failure.

@bltroutwine Moonconf, 2016

Page 97: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 98: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Crash-Only Software

George Candea, Armando Fox - 2003

@bltroutwine Moonconf, 2016

Page 99: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Making Reliable Distributed Systems in the Presence of Software Errors

Joe Armstrong - 2003

@bltroutwine Moonconf, 2016

Page 100: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

“We assume that such programs do contain errors, and investigate methods for

building reliable systems despite such errors.”

@bltroutwine Moonconf, 2016

Page 101: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

What must we invent?

@bltroutwine Moonconf, 2016

Page 102: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 103: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Formal specification tools a project

manager can love.

@bltroutwine Moonconf, 2016

Page 104: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Effective system modeling tools.

@bltroutwine Moonconf, 2016

Page 105: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Methods for the effective analysis of running systems.

@bltroutwine Moonconf, 2016

Page 106: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

A techno-political culture of excellence.

@bltroutwine Moonconf, 2016

Page 107: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

What can we study?

@bltroutwine Moonconf, 2016

Page 108: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 109: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

Lots!

@bltroutwine Moonconf, 2016

Page 110: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 111: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 112: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 113: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Page 114: (Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software

The End!