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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.4.3 Simulation <strong>of</strong> WP in CRF<br />

Theorem 25 (CRF Simulates WP) Given WP terms s1 <strong>and</strong> s2,<br />

s1 ! s2 in WP ) f(s1) ! f(s2) in CRF<br />

Pro<strong>of</strong> The pro<strong>of</strong> is based on a case analysis on the imperative ruleusedin the rewriting <strong>of</strong><br />

`s1 ! s2' in WP. Let a be the address <strong>and</strong> id the cache identi er.<br />

Imperative Processor Rules<br />

If Rule IP1 (Loadl-on-Clean) applies, then<br />

Cell(a,v,Clean) 2 <strong>Cache</strong> id(s1) ^ Cell(a,v,Clean) 2 <strong>Cache</strong> id(s2)<br />

) Cell(a,v,Clean) 2 <strong>Cache</strong> id(dr(s1)) ^ Cell(a,v,Clean) 2 <strong>Cache</strong> id(dr(s2)) (Lemma 22 )<br />

) f(s1) ! f(s2) (CRF-Loadl )<br />

If Rule IP2 (Loadl-on-Dirty) applies, then<br />

Cell(a,v,Dirty) 2 <strong>Cache</strong> id(s1) ^ Cell(a,v,Dirty) 2 <strong>Cache</strong> id(s2)<br />

) Cell(a,v,Dirty) 2 <strong>Cache</strong> id(dr(s1)) ^ Cell(a,v,Dirty) 2 <strong>Cache</strong> id (dr(s2)) (Lemma 22 )<br />

) f(s1) ! f(s2) (CRF-Loadl )<br />

If Rule IP3 (Storel-on-Clean) applies, then<br />

Cell(a,-,Clean) 2 <strong>Cache</strong> id(s1) ^ Cell(a,v,Dirty) 2 <strong>Cache</strong> id(s2)<br />

) Cell(a,-,Clean) 2 <strong>Cache</strong> id(dr(s1)) ^ Cell(a,v,Dirty) 2 <strong>Cache</strong> id(dr(s2)) (Lemma 22 )<br />

) f(s1) ! f(s2) (CRF-Storel )<br />

If Rule IP4 (Storel-on-Dirty) applies, then<br />

Cell(a,-,Dirty) 2 <strong>Cache</strong> id(s1) ^ Cell(a,v,Dirty) 2 <strong>Cache</strong> id(s2)<br />

) Cell(a,-,Dirty) 2 <strong>Cache</strong> id(dr(s1)) ^ Cell(a,v,Dirty) 2 <strong>Cache</strong> id(dr(s2)) (Lemma 22 )<br />

) f(s1) ! f(s2) (CRF-Storel )<br />

If Rule IP5 (Commit-on-Clean) applies, then<br />

Cell(a,v,Clean) 2 <strong>Cache</strong> id(s1) ^ Cell(a,v,Clean) 2 <strong>Cache</strong> id(s2)<br />

) Cell(a,v,Clean) 2 <strong>Cache</strong> id(dr(s1)) ^ Cell(a,v,Clean) 2 <strong>Cache</strong> id(dr(s2)) (Lemma 22 )<br />

) f(s1) ! f(s2) (CRF-Commit )<br />

If Rule IP6 (Commit-on-Invalid) applies, <strong>and</strong> if Msg(H,id ,<strong>Cache</strong>,a,-) =2 MoutCin id(s1), then<br />

a =2 <strong>Cache</strong> id(s1) ^ a =2 <strong>Cache</strong> id(s2)<br />

) a =2 <strong>Cache</strong> id(dr(s1)) ^ a =2 <strong>Cache</strong> id(dr(s2)) (Lemma 22 )<br />

) f(s1) ! f(s2) (CRF-Commit )<br />

If Rule IP6 (Commit-on-Invalid) applies, <strong>and</strong> if Msg(H,id ,<strong>Cache</strong>,a,v) 2 MoutCin id (s1), then<br />

a =2 <strong>Cache</strong> id(s1) ^ a =2 <strong>Cache</strong> id(s2)<br />

) Cell(a,v,Clean) 2 <strong>Cache</strong> id(dr(s1)) ^ Cell(a,v,Clean) 2 <strong>Cache</strong> id(dr(s2)) (Lemma 23 )<br />

) f(s1) ! f(s2) (CRF-Commit )<br />

If Rule IP7 (Reconcile-on-Dirty) applies, then<br />

Cell(a,v,Dirty) 2 <strong>Cache</strong> id(s1) ^ Cell(a,v,Dirty) 2 <strong>Cache</strong> id(s2)<br />

) Cell(a,v,Dirty) 2 <strong>Cache</strong> id(dr(s1)) ^ Cell(a,v,Dirty) 2 <strong>Cache</strong> id (dr(s2)) (Lemma 22 )<br />

) f(s1) ! f(s2) (CRF-Reconcile )<br />

101

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

Saved successfully!

Ooh no, something went wrong!