Download presentation
Presentation is loading. Please wait.
Published byChristoffer Berge Modified over 5 years ago
1
Totalization To define refinement for partial relations, we consider their totalised forms: where X = X ⋃ {⊥} Y = Y ⋃ {⊥}
2
Complement of s
3
Example
4
Example a b c d ⊥ a b c d ⊥
5
Example a b c d ⊥ a b c d ⊥
6
Refinement Having decided upon totalization using ⊥, we may derive the conditions for one partial relation to be a correct refinement of another. If σ and ρ are two partial relations of the same type then σ refines ρ precisely when is a subset of . This is true if and only if the domain of σ is at least as big as that of ρ and σ agrees with ρ on dom ρ.
7
Refinement
8
Refinement a a b b c ρ a a Provided some additional information by extending the domain and removed some non-determinism b b c c σ
9
Not a Refinement
10
Using Totalization
11
Refinement If σ and ρ are two partial relations of the same type then σ refines ρ precisely when is a subset of .
12
Example We may corrupt a bit – an element of set {0, 1} – by changing its value.
13
The relation corruptsto associates two sequences of bits if the second is no longer than the first, and no two adjacent bits have been corrupted. _corruptsto_ : seq Bit ↔ seq Bit ∀ bs, bs’ : seq Bit ∙ bs corruptsto bs’ ⇔ #bs’ ≤ #bs ∧ ∀ i : 1 .. #bs’ – 1 ∙ bs i ≠ bs’ i ⇒ bs(i + 1) = bs’(i + 1) For example, <1, 0, 0, 0, 1, 1> corruptsto <1, 0, 1, 0, 0, 1> <1, 1, 0, 1, 1, 1, 0, 0> corruptsto <0, 1, 0, 0, 1>
14
The relation changesto associates two sequences of bits if the second is no longer than the first, and every bit with an odd index has been corrupted. _changesto_ : seq Bit ↔ seq Bit ∀ bs, bs’ : seq Bit ∙ bs changesto bs’ ⇔ #bs’ ≤ #bs ∧ ∀ i : 1 .. (#bs’ – 1) ∙ i ∈ {n : N1 ∙ 2 * n} ⇒ bs i = bs’ i ∧ i ∈ {n : N1 ∙ 2 * n + 1} ⇒ bs i ≠ bs’ i For example, <1, 1, 0, 1, 1, 1, 0, 0> changesto <0, 1, 1, 1, 0> <1, 0, 0, 0, 1, 1> changesto <0, 0, 1, 0, 0, 1>
15
The second relation is a refinement of the first:
both are total relations on seq Bit changesto resolves all the non-determinism present in the definition of corruptsto. If we are content with the behavior of corruptsto, then we will be content with changesto.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.