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

Block operations and definitions in Quartz<strong>Layout</strong> are sufficiently powerful to allow the pro<strong>of</strong>s<br />

<strong>of</strong> some (functional) Quartz Laws, such as: fst A ; sndB = [A, B]. This kind <strong>of</strong> theorem can<br />

be described in Quartz<strong>Layout</strong> as:<br />

!! a b c d. Def ((a, b) ;;; fst $ A ;; snd $ B ;;; (c, d)) = Def ((a, b) ;;;<br />

[[ A , B ]] ;;; (c, d))<br />

(where “!!” is Isabelle’s meta-logic operator for universal quantification). This can be proved<br />

using Isabelle’s simplifier to expand the definitions <strong>of</strong> parallel composition, fst and snd.<br />

4.4.3 Expressions<br />

HOL arithmetic expressions will be used to model Quartz expressions. The IntAlgebra theory<br />

defines several additional operators that are required by Quartz but are not provided in<br />

Isabelle/HOL - such as a greater-than ordering and a power function for integers. The<br />

IntAlgebra theory also includes pro<strong>of</strong>s <strong>of</strong> many useful theorems for re-arranging arithmetic<br />

inequalities <strong>of</strong> the kinds that will be needed to reason about circuit layouts. Most <strong>of</strong> these<br />

theorems can be proved easily using Isabelle’s simplifier, classical reasoner or arithmetic<br />

decision procedure. Some particularly useful and simple theorems concern the max function:<br />

Theorem 8 ∀ m n. n ≤ max n m<br />

Theorem 9 ∀ f g n. n ≤ f ∨ n ≤ g ⇒ n ≤ max f g<br />

Theorem 10 ∀ m n. 0 ≤ n ⇒ max(m + n) m = (m + n)<br />

Pro<strong>of</strong> Trivial, by expanding the definition <strong>of</strong> the max function. Mechanised pro<strong>of</strong>s are<br />

given in Appendix B.1 as theorems max nm nleq, max geq n disj and max xyge0.<br />

Another theorem that is simple and extremely useful is:<br />

Theorem 11 (0 ≤ a ∧ 0 ≤ b ∧ 0 ≤ c ∧ a ≤ b) ⇒ a ≤ (b + c)<br />

Pro<strong>of</strong> Trivial, given as theorem z aleq bc in Appendix B.1.

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

Saved successfully!

Ooh no, something went wrong!