Software Correctness Flashcards

1
Q

What is the main structure of the essay? (10)

A

• Introduction - what is buggy software
• Why it’s important - implications
○ Medical/nuclear - fatal (Therac-25 1986-87)
○ Embedded systems - finance (Intel Pentium 1994)
○ High risk/complex science - robust (Mars Orbiter 1998)
• How to combat buggy software - preventions
○ Good software practice
○ Fault tolerance systems
○ Formal verification
○ Programming language innovations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are implications of buggy software? (3)

A
  • In safety-critical systems, such as nuclear reactor controllers or medical software, errors could be fatal
  • In embedded and commerical systems, such as processors, errors could have financial impact due to being recalled
  • In high risk/complex systems, such as scientific experiments, non robust software could be
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Expand on the first implication

A

If software is incorrect or ‘buggy’ in a safety-critical system, such as a nuclear reactor controller or medicals surgery system, then a software error could cause loss of human life

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give an example of the first implication (2)

A
  • Therac-25, a radiation therapy machine that killed 4 and injured 2 people in 1986-1987
  • Exposed patients to massive overdoses of radiation; due to the controlling software that had bugs in it, and no hardware interlocks or fault tolerance to deal with the software bugs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Expand on the second implication

A

Software errors could also have financial consequences, such as embedded systems being recalled or compensation for commercial sold systems injuring and failing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give an example of the second implication (2)

A
  • Intel Pentium processor bug 1994, a bug affected the FPU and cost Intel around $400 million to recall and fix.
  • The bug caused the processor to return incorrect decimal results when dividing a number.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Expand on the third implication

A

High risk and cost complex systems require very robust software, such as expensive scientific experiments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Give an example of the third implication (2)

A
  • Mars Climate Orbiter 1999, communication with the probe was lost when a software bug caused an error in a momentum adjustment.
  • The software outputted the calculated the momentum adjustment in the wrong units, causing the probe to fly too close to the planet and disintegrated.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the ways to combat buggy software? (4)

A
  • a. Good software practice
  • b. Fault tolerance systems
  • c. Formal verification
  • d. Programming language innovations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

a. What does good software practice mean?

A

Conforming to common rules of software development to improve the quality of software code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

a. What is an advantage & disadvantage of good software practice? (2)

A
  • Used to build up the integrity of software and ensure robustness and reliability
  • Takes more time which could otherwise be spent implementing new features
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

a. What are two approaches to good software practice? (2)

A
  • Test Driven Development (TDD)

* Code Review

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

a. What is Test Driven Development?

A

Writing tests before you write just enough production code to fulfill that test and refactoring

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

a. What is Code Review?

A

A systematic examination of source code, where a developer walks through the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

b. What are Fault Tolerance Systems?

A

Systems that can continue to function in presence of failures or faults in its hardware or software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

b. What is an advantage & disadvantage of Fault Tolerance Systems? (2)

A
  • Can ensure the running of a safety critical or expensive system by implementing fail safes.
  • Economic cost as well as additional space and weight required, can be impractical for systems such as space ships
17
Q

b. What are two approaches to Fault Tolerance Systems? (2)

A
  • Erlang

* Chaos Monkey

18
Q

b. What is Erlang? (2)

A
  • A programming language designed for developing robust and reliable programs for servers and embedded systems.
  • The error handling mechanisms in Erlang are designed for building fault tolerant systems as opposed to simply protecting systems from program exceptions.
19
Q

b. What is Chaos Monkey?

A

A software tool developed by Netflix engineers to ensure the robustness and resiliency of their Amazon Web Services by simulating failures of certain services bu shutting down some virtual machines.

20
Q

c. What is Formal Verification?

A

Mathematically proving the correctness of a design with respect to a mathematical formal specification.

21
Q

c. What is an advantage & disadvantage of Formal Verification? (2)

A
  • Allows exhaustive testing of a system and defines an explicit understanding of the system
  • Difficult and time consuming to write a specification using a mathematical proof instead of an English specification.
22
Q

c. What are two approaches to Formal Verification? (2)

A
  • Model Checking

* Equivalence Checking

23
Q

c. What is Model Checking?

A

Verifies whether a particular set of properties holds true for a design.

24
Q

c. What is Equivalence Checking?

A

Compares two versions of a design to make sure they are functionally equivalent.

25
d. What are Programming Language Innovations?
Improvements in programming language allowing software written in those languages to be more robust
26
d. What is an advantage & disadvantage of Programming Language Innovations? (2)
* Allows more complex programs to be written in safety on knowing the software will maintain robustness * Techniques such as using Virtual Machines, while are meant to improve robustness, also mean you have to be dependent on them so any faults in the Virtual machine will be a possible point of failure for a program.
27
d. What are two approaches to Programming Language Innovations? (2)
* Virtual Machines | * Garbage Collection
28
d. What is a Virtual Machine?
A separate operating system on a computer that simulates a separate computer, and in terms of programming languages this a program run on a specified virtual machine without having to be converted to machine code, allowing programs to be platform independent.
29
d. What is Garbage Collection?
Automatic Memory Management, which recycles memory used by objects that aren’t going to be used again in programs.