Lecture 2 — Programming languages for safety-critical systems

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

12 Terms

1
New cards

Give 3 common reasons for program errors

Failure to initialise; aliasing; expression evaluation errors (out-of-range index, div by zero, overflow, compiler differences).

2
New cards

Aliasing (definition).

Two or more distinct names refer to the same storage location.

3
New cards

Why are side effects in expressions dangerous?

Result can depend on evaluation order if function calls have side effects.

4
New cards

What evaluation order does Java guarantee

Left-to-right for operands of operators.

5
New cards

Wild jumps criterion?

Whether a program can jump to an arbitrary memory location

6
New cards

Overwrites criterion?

Whether a program can overwrite arbitrary memory locations.

7
New cards

Semantics criterion?

Whether semantics are defined precisely enough to analyse correctness.

8
New cards

Model of mathematics criterion?

Rigorous definition of integer/float arithmetic (overflow/errors).

9
New cards

Operational arithmetic criterion?

Ability to check the target processor follows the arithmetic model (e.g., IEEE floating point).

10
New cards

Why safe subsets instead of new languages?

New languages have limited industrial use; safe subsets reuse existing compilers/tools + add a checker + annotations.

11
New cards

One reason C is considered unsuitable

Problematic type conversions; array indices not checked.

12
New cards

One reason Ada is considered suitable

Overflow checks (exceptions) + analysable ranges; designed for critical systems.