24.04.2013 Views

Verification of Parameterised FPGA Circuit Descriptions with Layout ...

Verification of Parameterised FPGA Circuit Descriptions with Layout ...

Verification of Parameterised FPGA Circuit Descriptions with Layout ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

CHAPTER 4. VERIFYING CIRCUIT LAYOUTS 89<br />

block conjugate (block Q ‘a ∼ ‘a, block P ‘a ∼ ‘a) (‘a i) ∼ (‘a o) attributes {<br />

height = height (i ;converse P ; Q ; P ; o).<br />

width = width (i ;converse P ; Q ; P ; o).<br />

} → converse P ; Q ; P.<br />

block conjugate2 (block R (‘a,‘b) ∼ (‘a,‘b), block S (‘a,‘b) ∼ (‘a,‘b))<br />

(‘a i1, ‘b i2) ∼ (‘a o1, ‘b o2) attributes {<br />

height = height ((i1,i2) ; swap ; converse S ; swap ; R ; S ; (o1,o2)).<br />

width = width ((i1,i2) ;swap ; converse S ; swap ; R ; S ; (o1,o2)).<br />

} → swap ; converse S ; swap ; R ; S.<br />

Figure 4.12: Some <strong>of</strong> the Prelude library blocks that require manual intervention to prove<br />

their layouts using the tactical-based methods.<br />

velop two new theorems about series compositions that are useful here for decomposing this<br />

problem:<br />

Theorem 20ÎPQxy. Îxy. 0 ≤ Width P x y ;Îxy. (0:: int) ≤ Width Q x y <br />

=⇒ 0 ≤ Width (P ;; Q) x y<br />

Theorem 21ÎPQxy. Îxy. 0 ≤ Height P x y ;Îxy. (0:: int) ≤ Height Q x y <br />

=⇒ 0 ≤ Height (P ;; Q) x y<br />

Pro<strong>of</strong> By simplification, expanding the definitions <strong>of</strong> series composition and “let”. Theo-<br />

rem 20 also requires the use <strong>of</strong> the simple lemma 0 ≤ m ∧ 0 ≤ n ⇒ 0 ≤ m + n. Mechanised<br />

pro<strong>of</strong>s are given in Appendix B.5 as part <strong>of</strong> the SeriesComposition theory.<br />

These theorems essentially prove the validity <strong>of</strong> series composition size functions, assuming<br />

that the size functions <strong>of</strong> their constituent blocks are also valid. We prove similar theorems<br />

for parallel composition in Appendix B.6.<br />

Using these theorems we can prove the validity theorems for these two blocks. conjugate2 also<br />

requires additional intervention to split a single identifier representing a pair into two values,<br />

something that can be done automatically by Isabelle’s auto method. The combinators tri,<br />

irt, below and grid also require some manual intervention to re-write the pro<strong>of</strong> scripts. Once<br />

all pro<strong>of</strong> scripts are correct, Isabelle can prove the entire library in 47 seconds <strong>of</strong> processing<br />

time.

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

Saved successfully!

Ooh no, something went wrong!