12. Hoare Logic Flashcards

1
Q

What is formal specification?

A

Using mathmatical notation to give a precise description of what a program should do

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

What is formal verification?

A

Using logical rules to mathematically prove that a program satisfies a formal speficification

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

What are denotional semantics?

A

Construct mathmatical objects that describe meaning

programs = functions: [[C]] : State -> State

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

What are operational semantics?

A

Describes the steps of computation during program execution

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

What are axiomatic semantics?

A

Define axioms and rules of some logic of programs

Hoard logic {P} C {Q}

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

What is the specification of a Hoare triple {P} C {Q}?

A

Given a state the satisfies preconditions P, executing a program C (and assuming termination) results in a state that satisfies postconditions Q

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

What is total correctness?

A

Partial correctness + termination

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

What is the assignment axiom (Hoare)?

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

What is the sequencing rule (Hoare)?

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

What is the skip axiom (Hoare)?

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

What is the conditional rule (Hoare)?

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

What is precondition strengthening (Hoare)?

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

What is postcondition weakening?

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

What is the while rule (Hoare)?

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