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 78<br />

Theorem 12<br />

∀ b t f. b ≤ t ∧ (∀y. 0 ≤ f y) ⇒<br />

let max = maxf(b, t, f) in<br />

∃y. b ≤ y ∧ y ≤ t ∧ f y = max ∧<br />

∀x. b ≤ x ∧ x ≤ t ⇒ (f x) ≤ max <br />

Pro<strong>of</strong> The two parts <strong>of</strong> the conjunction can be proved separately. The first states that the<br />

maxf function returns a value that is produced by the function f while the second states that<br />

there is no greater value returned by f <strong>with</strong>in the specified range. Both can be proved by<br />

induction over t, bounded from below by b (in Isabelle this is done using the int ge induct<br />

induction schema) and then re-arrangement using the definitions <strong>of</strong> max and maxf. Mech-<br />

anised pro<strong>of</strong>s are available as theorems maxf ansvalid, maxf fmax and maxf is maxf in<br />

Appendix B.7.<br />

This pro<strong>of</strong> is significant since it provides a mechanism for moving between the functional and<br />

logical definitions <strong>of</strong> the maxf should this be desired during a pro<strong>of</strong>.<br />

The Functions theory contains the pro<strong>of</strong>s <strong>of</strong> many useful properties <strong>of</strong> maxf and sum, includ-<br />

ing how they relate. Most <strong>of</strong> these pro<strong>of</strong>s are carried out by induction on the value <strong>of</strong> top.<br />

Some particularly useful theorems about maxf are:<br />

Theorem 13 ∀ m n f. (∀y. 0 ≤ f y) ⇒ 0 ≤ maxf(m, n, f)<br />

Theorem 14 ∀ m n f. n < m ⇒ 0 ≤ maxf(m, n, f)<br />

Both <strong>of</strong> these theorems are useful in containment pro<strong>of</strong>s. Some similarly useful theorems for<br />

sum are:<br />

Theorem 15 ∀ b t f g. b ≤ t ⇒ sum(b, t, λi. f i + g i) = sum(b, t, f) + sum(b, t, g)<br />

Theorem 16 ∀ b t f. b ≤ t ⇒ sum(b, t, f) + f (t + 1) = sum(b, t + 1, f)

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

Saved successfully!

Ooh no, something went wrong!