09.08.2013 Views

Design and Verification of Adaptive Cache Coherence Protocols ...

Design and Verification of Adaptive Cache Coherence Protocols ...

Design and Verification of Adaptive Cache Coherence Protocols ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

s0<br />

A1<br />

B1<br />

s<br />

s<br />

1<br />

2<br />

s3 A2 B1<br />

B1<br />

A1<br />

B2<br />

s<br />

4<br />

A1<br />

s5<br />

(a) (b)<br />

A2<br />

B2<br />

s<br />

s<br />

6<br />

7<br />

B2<br />

A2<br />

s8<br />

A1<br />

s<br />

s<br />

1<br />

2<br />

s3 A2 B1<br />

Figure 2.12: Combination <strong>of</strong> Forward <strong>and</strong> Backward Draining<br />

Show that the draining rules are strongly terminating <strong>and</strong> con uent, that is, rewriting a<br />

term with respect to the draining rules always terminates <strong>and</strong> reachs the same normal<br />

form, regardless <strong>of</strong> the order in which the rules are applied. This ensures the existence <strong>of</strong><br />

a unique drained term for each implementation term.<br />

De ne a mapping function that maps an implementation term to a speci cation term.<br />

The mapping function can <strong>of</strong>ten be speci ed as a projection function that removes un-<br />

necessary states from drained terms. Show that the mapping function maps the initial<br />

implementation term to the initial speci cation term.<br />

Prove that the speci cation can simulate the implementation with respect to the mapping<br />

function. That is, if s1 can be rewritten to s2 in the implementation, then the correspond-<br />

ing term <strong>of</strong> s1 can be rewritten to the corresponding term <strong>of</strong> s2 in the speci cation.<br />

2.5.2 Veri cation <strong>of</strong> Liveness<br />

We use temporal logic to reason about time-varying behaviors <strong>and</strong> liveness properties. An<br />

execution <strong>of</strong> a system can be described as a sequence <strong>of</strong> rewriting steps, each producing a new<br />

term by applying a rewriting rule on the current term. A sequence is a sequence <strong>of</strong> terms hs1,<br />

s2, s3, :::i where s1 is a legal term (that is, s0 ! s1 where s0 is the initial term) <strong>and</strong> si ! si+1<br />

(for i =1,2,:::).<br />

A predicate can be de ned using boolean operators <strong>and</strong> the temporal operator \2" (always).<br />

It can be a predicate for terms whichcontains no temporal operator, or a predicate for sequences<br />

<strong>of</strong> terms which contains some temporal operators. We say a sequence satis es a term predicate<br />

if the rst term <strong>of</strong> the sequence satis es the predicate, <strong>and</strong> a sequence satis es a rewriting rule<br />

if the rst term <strong>of</strong> the sequence can be rewritten to the second term <strong>of</strong> the sequence according<br />

to the rule. Since all the boolean operators can be de ned in terms <strong>of</strong> \:" <strong>and</strong> \^", it su ces<br />

to de ne the semantics <strong>of</strong> predicates as follows:<br />

(:P )( ) :P ( )<br />

(P ^Q )( ) P ( ) ^ Q ( )<br />

(2P )( ) 8i 2f1 2:::g P (hsi, si+1, si+2, :::i)<br />

40<br />

s0<br />

B1<br />

B1<br />

A1<br />

B2<br />

s<br />

4<br />

s5<br />

A2<br />

B2<br />

A1<br />

s<br />

s<br />

6<br />

7<br />

B2<br />

A2<br />

s8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!