Spark Ada Flashcards

1
Q

What is Ada the required standard for?

A

Military applications in the US. Ada was first designed for these military applications.

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

What does Ada have instead of methods?

A

Functions and procedures

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

Is Ada case senstitive?

A

No

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

What is a package?

A

A collection of types, global variables, functions and procedures.

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

Why is Ada used in critical systems?

A

Ada was specifically designed for real time critical systems more specifically military applications.

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

What is SPARK Ada?

A

A formally verified subset of Ada, aiming to enhance software reliability, safety, and security in critical systems by leveraging formal methods and static analysis tools to mathematically prove properties about the software’s behaviour.

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

How many levels of analysis does SPARK Ada have?

A

3 Levels

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

What is analysed in Level 1 analysis of Spark Ada?

A

The correct Ada syntax is used.

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

What is analysed in Level 2 of Spark Ada?

A

Data flow analysis and Information flow analysis.

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

What is data flow analysis?

A
  • Checks input/output behaviour of parameters and variables
  • Checks initialisation of variables
  • Checks that changed and imported variables are used later
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is information flow analysis?

A

Verifies interdependencies (multiple dependencies) between variables

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

What is analysed in Level 3 of SPARK Ada?

A
  • Generation of verification conditions
  • Proof of verification conditions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does SPARK Ada restrict?

A
  • Function side effects
  • Control on the amount of memory used
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What must be added to a program file to active SPARK Mode?

A

pragma SPARK_MODE(On)

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

What is Pragma?

A

Annotations to a unit in Ada

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

What are aspects?

A

Annotations to a package, procedure or function.

17
Q

How does SPARK Ada address logical soundness?

A

Functions can have side effects, but if the order of evaluation matters, functions with side effects are not allowed

18
Q

How does SPARK Ada address simplicity of language definitions?

A

It omits too complex principles such as:
- No variant records
- No threads
- No generic types.

19
Q

How does SPARK Ada address the Expressive Power criteron?

A
  • Allows hiding of variables
  • Allows you to specify strong assertions about variables. E.g. in and out variables
20
Q

How does SPARK Ada address the Security criteron?

A

In order to be verifiable at compile time constraints have to be static

21
Q

How does SPARK Ada address the verifiability criteron?

A

Supports automated verifiability with extra annotations:
- control of data flow
- control of information flow
- proof annotations

22
Q

Why does Spark Ada not allow side effects?

A

To ensure that the system has predictable behaviour. Side effects can lead to unpredictable changes which is a threat to safety.