Verification of Parameterised FPGA Circuit Descriptions with Layout ...
Verification of Parameterised FPGA Circuit Descriptions with Layout ... Verification of Parameterised FPGA Circuit Descriptions with Layout ...
CHAPTER 4. VERIFYING CIRCUIT LAYOUTS 90 Overall our tacticals prove good at proving intersection theorems and are mostly effective at proving validity and containment theorems. 4.6.2 Improved Proof Scripts Following our experiments with tactical-based proofs of the Prelude library, we attempt the same proofs using Isabelle’s standard auto proof method. This method interleaves invocations of the simplifier and classical reasoner and can be supplied with sets of simplification rules and theorems to use. All our decompositional theorems are proved in the style of introduction rules and are supplied to auto as such. This method proves effective for validity and containment theorems however its results on intersection theorems are far from impressive. Isabelle’s automatic tools consistently select the wrong parts of the disjunctions to attempt to prove and leave proof states that are not just unproven but actually unprovable. We therefore design a new set of rules for generating proof scripts that combines the best of these methods. auto-based proofs are generated for validity and containment theorems while custom tacticals are generated for intersection theorems. The intersection tacticals include an invocation to auto as a last resort when the other options in the tactical fail to prove the goal, thus handling the rare circumstances when the classical reasoner can prove a goal but our custom tactical can not. Returning to our map example, the complete height function validity theorem and proof is generated as: theorem height ge0 int: "Î(n::int) (R::((’t395⇒ ’t396⇒ bool,’t395⇒ ’t396⇒ int)block)) (i::(’ t395)vector) (o ::(’t396)vector). ∀ (qs691 ::’ t395) (qs692 ::’ t396). 0 ≤ (Height (qs691 ;;; R ;;; qs692)) =⇒ 0 ≤ (height (n, R) i o )" apply (auto intro: sum ge0 maxf ge0 sum ge0 frange maxf ge0 frange z aleq bc simp add: done Let def max def) The containment theorem is similarly proved using an appropriately parameterised auto. The
CHAPTER 4. VERIFYING CIRCUIT LAYOUTS 91 compiler procedure that generates these scripts also supplies the height ge0 and width ge0 theorems for all blocks used in the description as introduction rules (none in this case, since map only instantiates the supplied R block). This allows validity proofs to build upon one another. The intersection theorem for map (page 87) is proved by the generated tactical: apply (simp, rule impI, simp)? apply (( done (rule allI )+, (case tac "0 ≤ n"), rule impdisj 12of4, (rule loop sum overlap|rule loop sum overlap’), (simp add: overlap0’’)+) | ((rule allI )+, (case tac "0 ≤ n"), rule impdisj 34of4, rule loop sum overlap2, (simp add: overlap0’’)+) | auto intro: sum ge0 maxf ge0 sum nsub1 plusf maxf encloses) The loop sum overlap theorems are proved in the Structures theory. This theory contains theorems that match common layout structures, such as the layout of components in a loop. loop sum overlap is given as: Î(n::int) (j :: int) (j ’:: int). m ≤ n ;Îy. 0 ≤ f y =⇒ ((m ≤ j) ∧ (j ≤ (n − 1)) ∧ (m ≤ j’) ∧ (j’ ≤ (n − 1)) ∧ (j’ = j)) −→ ((sum (m, j − 1, f) + f j) ≤ sum (m, j’ − 1, f) | (sum (m, j’ − 1, f) + f j ’) ≤ sum (m, j − 1, f)) Its proof involves a number of steps and is given in Appendix B.8. The other loop sum overlap theorems are similar. Table 4.1 gives statistics on the proofs for some of the blocks in the Prelude library and details for all of those where proofs required manual intervention. Overall of nearly 40 blocks in the Prelude library, only 5 required manual intervention in their proofs. Using the auto method
- Page 49 and 50: CHAPTER 3. GENERATING PARAMETERISED
- Page 51 and 52: CHAPTER 3. GENERATING PARAMETERISED
- Page 53 and 54: CHAPTER 3. GENERATING PARAMETERISED
- Page 55 and 56: CHAPTER 3. GENERATING PARAMETERISED
- Page 57 and 58: CHAPTER 3. GENERATING PARAMETERISED
- Page 59 and 60: CHAPTER 3. GENERATING PARAMETERISED
- Page 61 and 62: CHAPTER 3. GENERATING PARAMETERISED
- Page 63 and 64: CHAPTER 3. GENERATING PARAMETERISED
- Page 65 and 66: CHAPTER 3. GENERATING PARAMETERISED
- Page 67 and 68: CHAPTER 3. GENERATING PARAMETERISED
- Page 69 and 70: CHAPTER 3. GENERATING PARAMETERISED
- Page 71 and 72: CHAPTER 3. GENERATING PARAMETERISED
- Page 73 and 74: CHAPTER 3. GENERATING PARAMETERISED
- Page 75 and 76: Chapter 4 Verifying Circuit Layouts
- Page 77 and 78: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 79 and 80: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 81 and 82: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 83 and 84: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 85 and 86: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 87 and 88: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 89 and 90: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 91 and 92: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 93 and 94: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 95 and 96: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 97 and 98: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 99: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 103 and 104: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 105 and 106: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 107 and 108: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 109 and 110: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 111 and 112: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 113 and 114: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 115 and 116: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 117 and 118: Chapter 5 Specialisation In this ch
- Page 119 and 120: CHAPTER 5. SPECIALISATION 109 opera
- Page 121 and 122: CHAPTER 5. SPECIALISATION 111 // Ha
- Page 123 and 124: CHAPTER 5. SPECIALISATION 113 circu
- Page 125 and 126: CHAPTER 5. SPECIALISATION 115 const
- Page 127 and 128: CHAPTER 5. SPECIALISATION 117 block
- Page 129 and 130: CHAPTER 5. SPECIALISATION 119 Modif
- Page 131 and 132: CHAPTER 5. SPECIALISATION 121 Buffe
- Page 133 and 134: CHAPTER 5. SPECIALISATION 123 a fas
- Page 135 and 136: CHAPTER 5. SPECIALISATION 125 block
- Page 137 and 138: CHAPTER 5. SPECIALISATION 127 y y y
- Page 139 and 140: CHAPTER 5. SPECIALISATION 129 with
- Page 141 and 142: CHAPTER 6. LAYOUT CASE STUDIES 131
- Page 143 and 144: CHAPTER 6. LAYOUT CASE STUDIES 133
- Page 145 and 146: CHAPTER 6. LAYOUT CASE STUDIES 135
- Page 147 and 148: CHAPTER 6. LAYOUT CASE STUDIES 137
- Page 149 and 150: CHAPTER 6. LAYOUT CASE STUDIES 139
CHAPTER 4. VERIFYING CIRCUIT LAYOUTS 90<br />
Overall our tacticals prove good at proving intersection theorems and are mostly effective at<br />
proving validity and containment theorems.<br />
4.6.2 Improved Pro<strong>of</strong> Scripts<br />
Following our experiments <strong>with</strong> tactical-based pro<strong>of</strong>s <strong>of</strong> the Prelude library, we attempt the<br />
same pro<strong>of</strong>s using Isabelle’s standard auto pro<strong>of</strong> method. This method interleaves invocations<br />
<strong>of</strong> the simplifier and classical reasoner and can be supplied <strong>with</strong> sets <strong>of</strong> simplification rules<br />
and theorems to use. All our decompositional theorems are proved in the style <strong>of</strong> introduction<br />
rules and are supplied to auto as such.<br />
This method proves effective for validity and containment theorems however its results on<br />
intersection theorems are far from impressive. Isabelle’s automatic tools consistently select<br />
the wrong parts <strong>of</strong> the disjunctions to attempt to prove and leave pro<strong>of</strong> states that are not<br />
just unproven but actually unprovable.<br />
We therefore design a new set <strong>of</strong> rules for generating pro<strong>of</strong> scripts that combines the best <strong>of</strong><br />
these methods. auto-based pro<strong>of</strong>s are generated for validity and containment theorems while<br />
custom tacticals are generated for intersection theorems. The intersection tacticals include<br />
an invocation to auto as a last resort when the other options in the tactical fail to prove the<br />
goal, thus handling the rare circumstances when the classical reasoner can prove a goal but<br />
our custom tactical can not.<br />
Returning to our map example, the complete height function validity theorem and pro<strong>of</strong> is<br />
generated as:<br />
theorem height ge0 int: "Î(n::int) (R::((’t395⇒ ’t396⇒ bool,’t395⇒ ’t396⇒ int)block)) (i::(’<br />
t395)vector) (o ::(’t396)vector).<br />
∀ (qs691 ::’ t395) (qs692 ::’ t396). 0 ≤ (Height (qs691 ;;; R ;;; qs692)) =⇒<br />
0 ≤ (height (n, R) i o )"<br />
apply (auto intro: sum ge0 maxf ge0 sum ge0 frange maxf ge0 frange z aleq bc simp add:<br />
done<br />
Let def max def)<br />
The containment theorem is similarly proved using an appropriately parameterised auto. The