6. Logic and Action Flashcards

1
Q

What does x := y say?

A

That the value of x is the value of y, x gets value y

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

What is a sequence? give an example

A

Performing actions after another action i.e.: a;b;a

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

What is a test condition? give an example

A

To check if a fact holds, self loop, ?ϕ

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

translate: if ϕ then α1 else α2

A

?ϕ; α1 ∪ ?¬ϕ; α2

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

How to reverse an action?

A

Use the Converse aˇ

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

The converse of a;b ?

A

bˇ;aˇ

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

What is the set of all pairs S?

A

S x S or S^2

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

Describe relational composition

A

Ra ◦ Rb = {(s, s’) | there is some s0 ∈ S : (s, s0) ∈ Ra and (s0, s’) ∈ Rb}

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

Describe the choice relation

A

Ra ∪ Rb = {s1, . . . , sn} ∪ {s’1, . . . , s’m}

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

Describe the test relationship

A

Identity I = {(s, s) | s ∈ S}.

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

The subset ?ϕ is interpreted as:

A

R?ϕ = {(s, s) | s ∈ S, s |= ϕ}

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

What is the relational converse?

A

Rˇ = {(y, x) ∈ S^2| (x, y) ∈ R}.

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

Converse of a composition?

A

(R1 ◦ R2)ˇ = R2ˇ◦ R1ˇ

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

What is transitive closure?

A

the smallest transitive relation S that contains R.
S is the transitive closure of R if:
(1) R ⊆ S
(2) S ◦ S ⊆ S
(3) if R ⊆ T and T ◦ T ⊆ T then S ⊆ T

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

Translate: while ϕ do a

A

(R?ϕ ◦ Ra)* ◦ R?¬ϕ.

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

Definition of <a>ϕ</a>

A

<α>ϕ is true in a state s if for some s' with (s, s') in the interpretation of α it holds that ϕ is true in s'
</α>

17
Q

Definition of [a]ϕ

A

[α]ϕ is true in a state s if for every s’ with (s, s’) in the interpretation of α it holds that ϕ is true in s’

18
Q

The difference between transitivity and transitive closure?

A

the main difference is that transitivity is a property of a relation, while transitive closure is a way to extend a given relation.

19
Q

Give the transitive closure of R = {(1,2), (2,3), (3,4)} on the set {1, 2, 3, 4}

A

R* = {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}

20
Q

What is the set of: ?ϕ

A

R?ϕ = {(s, s) | s ∈ S, s |= ϕ}